]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Standardizing views.`
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 16 Oct 2009 20:26:12 +0000 (20:26 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 16 Oct 2009 20:26:12 +0000 (20:26 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3555 36083f99-b078-4883-b0ff-0f9b5a30f544

57 files changed:
views/default/friends/tablelist.php
views/default/friends/tablelistcountupdate.php
views/default/graphics/icon.php
views/default/group/default.php
views/default/group/search/finishblurb.php
views/default/group/search/startblurb.php
views/default/input/access.php
views/default/input/autocomplete.php
views/default/input/button.php
views/default/input/calendar.php
views/default/input/captcha.php
views/default/input/checkboxes.php
views/default/input/email.php
views/default/input/file.php
views/default/input/form.php
views/default/input/hidden.php
views/default/input/longtext.php
views/default/input/password.php
views/default/input/plaintext.php
views/default/input/pulldown.php
views/default/input/radio.php
views/default/input/reset.php
views/default/input/securitytoken.php
views/default/input/submit.php
views/default/input/tags.php
views/default/input/text.php
views/default/input/url.php
views/default/input/urlshortener.php
views/default/input/userpicker.php
views/default/js/initialise_elgg.php
views/default/messages/errors/error.php
views/default/messages/errors/list.php
views/default/messages/exceptions/exception.php
views/default/messages/list.php
views/default/messages/messages/list.php
views/default/messages/messages/message.php
views/default/navigation/pagination.php
views/default/navigation/topbar_tools.php
views/default/navigation/viewtype.php
views/default/notifications/settings/usersettings.php
views/default/object/default.php
views/default/object/object.php
views/default/object/plugin.php
views/default/object/widget.php
views/default/output/calendar.php
views/default/output/checkboxes.php
views/default/output/confirmlink.php
views/default/output/date.php
views/default/output/email.php
views/default/output/iframe.php
views/default/output/longtext.php
views/default/output/pulldown.php
views/default/output/radio.php
views/default/output/tagcloud.php
views/default/output/tags.php
views/default/output/text.php
views/default/output/url.php

index af37ff4ed8f3f8e95a01673f7db5102d675043cc..4581c04f7d572805fe6059b8bf01c82df5782a74 100644 (file)
@@ -1,64 +1,52 @@
 <?php
+/**
+ * Elgg friends picker
+ * Lists the friends picker
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['entities'] The array of ElggUser objects
+ */
+
+if (is_array($vars['entities'])) {
 
-       /**
-        * Elgg friends picker
-        * Lists the friends picker
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['entities'] The array of ElggUser objects
-        */
-
-               if (is_array($vars['entities'])) {
-                       
-?>
-
-       <table cellspacing="0" id="collectionMembersTable">
-               <tr>
-<?php
-                       $column = 0;
-                       foreach($vars['entities'] as $entity) {
-                               if (!($entity instanceof ElggEntity)) $entity = get_entity($entity);
-                                       if ($entity instanceof ElggEntity) {
 ?>
 
-                       <td style="width:25px;">
-                       <div style="width: 25px; margin-bottom: 15px;">
-                               <?php echo elgg_view("profile/icon",array('entity' => $entity, 'size' => 'tiny')); ?> 
-                       </div>
-                       </td>
-                       <td style="width: 200px; padding: 5px;">
-<?php
-
-                                       echo $entity->name;
-                               
-?>
-                       </td>
+<table cellspacing="0" id="collectionMembersTable">
+       <tr>
+               <?php
+               $column = 0;
+               foreach($vars['entities'] as $entity) {
+                       if (!($entity instanceof ElggEntity)) {
+                               $entity = get_entity($entity);
+                       }
 
-<?php
-                               
+                       if ($entity instanceof ElggEntity) {
+                               ?>
+                               <td style="width:25px;">
+                               <div style="width: 25px; margin-bottom: 15px;">
+                                       <?php echo elgg_view("profile/icon",array('entity' => $entity, 'size' => 'tiny')); ?>
+                               </div>
+                               </td>
+                               <td style="width: 200px; padding: 5px;">
+                                       <?php echo $entity->name; ?>
+                               </td>
+                               <?php
                                $column++;
                                if ($column == 3) {
                                        echo "</tr><tr>";
                                        $column = 0;
                                }
-                               
                        }
-                       
-                       
-?>
-
-       
-
-<?php
-                       }
-               if ($column < 3 && $column != 0) echo "</tr>";  
-               echo "</table>";
                }
-               
-               if (isset($vars['content'])) echo $vars['content'];
 
-?>
\ No newline at end of file
+if ($column < 3 && $column != 0) echo "</tr>";
+       echo "</table>";
+}
+
+if (isset($vars['content'])) {
+       echo $vars['content'];
+}
\ No newline at end of file
index 4c4e26c8062178e36d349d975dc089d73199eea1..81a061439a885298234ef112e1109e865330fa16 100644 (file)
@@ -1,19 +1,16 @@
 <?php
-
-       /**
-        * Elgg friends picker count updater
-        * Updates the friends count on a collection
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['count'] The count
-        * @uses $vars['friendspicker'] The friendspicker counter number
-        */
+/**
+ * Elgg friends picker count updater
+ * Updates the friends count on a collection
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['count'] The count
+ * @uses $vars['friendspicker'] The friendspicker counter number
+ */
 
 ?>
 
index ca1bc20547a2a8163ce2d964bd44d13f10850d04..bc7c36e715277404c38af451e6d54bf25919faea 100644 (file)
@@ -1,30 +1,40 @@
 <?php
-       /**
-        * Generic icon view.
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
+/**
+ * Generic icon view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$entity = $vars['entity'];
+
+$sizes = array('small','medium','large','tiny','master','topbar');
+// Get size
+if (!in_array($vars['size'], $sizes)) {
+       $vars['size'] = "medium";
+}
+
+// Get any align and js
+if (!empty($vars['align'])) {
+       $align = " align=\"{$vars['align']}\" ";
+} else {
+       $align = "";
+}
+
 
-       $entity = $vars['entity'];
-       
-       // Get size
-       if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
-               $vars['size'] = "medium";
-                       
-       // Get any align and js
-       if (!empty($vars['align'])) {
-               $align = " align=\"{$vars['align']}\" ";
-       } else {
-               $align = "";
-       }
-       
-       
 ?>
 <div class="icon">
-<?php if ($vars['link']) { ?><a href="<?php echo $vars['link'] ?>"><?php } ?>
+<?php
+if ($vars['link']) {
+       ?><a href="<?php echo $vars['link'] ?>"><?php
+}
+?>
 <img src="<?php echo $entity->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> />
-<?php if ($vars['link']) { ?></a><?php } ?>
+<?php
+if ($vars['link']) {
+       ?></a><?php
+}
+?>
 </div>
\ No newline at end of file
index a3fa967241a0f36477fb1e018686af72fae80bac..92594bf4a697da8f12fa4344aa70f85fdbf1e4e6 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-       /**
       * ElggGroup default view.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * ElggGroup default view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       echo elgg_view('object/default', $vars);
+echo elgg_view('object/default', $vars);
 ?>
\ No newline at end of file
index caee030b704e708fe31a81de447d8f25d661b31e..4164c6713feb5e797d2d2a9488bca3015978491e 100644 (file)
@@ -1,15 +1,17 @@
 <?php\r
-\r
-       if ($vars['count'] > $vars['threshold']) {\r
+/**\r
+ * @package Elgg\r
+ * @subpackage Core\r
+ * @author Curverider Ltd\r
+ * @link http://elgg.org/\r
+ */\r
+if ($vars['count'] > $vars['threshold']) {\r
 \r
 ?>\r
-<div class="contentWrapper"><a href="<?php echo $vars['url']; ?>pg/search/groups/?tag=<?php echo urlencode($vars['tag']); ?>"><?php \r
-       \r
-               echo elgg_echo("group:search:finishblurb"); \r
-       \r
-       ?></a></div>\r
+<div class="contentWrapper"><a href="<?php echo $vars['url']; ?>pg/search/groups/?tag=<?php echo urlencode($vars['tag']); ?>">\r
+       <?php\r
+       echo elgg_echo("group:search:finishblurb");\r
+       ?></a>\r
+</div>\r
 <?php\r
-\r
-       }\r
-\r
-?>
\ No newline at end of file
+}\r
index c7f3a4e5521a0f98f5403371a7c9e7218bbdf10c..3abfe4dc52b6b3f4cf7d8b60bebf802f0d9b5618 100644 (file)
@@ -1,8 +1,14 @@
+<?php\r
+/**\r
+ * @package Elgg\r
+ * @subpackage Core\r
+ * @author Curverider Ltd\r
+ * @link http://elgg.org/\r
+ */\r
+?>\r
 \r
 <div class="contentWrapper">\r
-       <?php \r
-       \r
-               echo sprintf(elgg_echo("group:search:startblurb"),$vars['tag']); \r
-       \r
+       <?php\r
+               echo sprintf(elgg_echo("group:search:startblurb"),$vars['tag']);\r
        ?>\r
 </div>
\ No newline at end of file
index 461fbf6259f6ad4baa01a2c2f6d06c9792bcdb76..42247af61f6d8735c8ba45406611d743da740859 100644 (file)
@@ -1,55 +1,53 @@
 <?php
-
-       /**
-        * Elgg access level input
-        * Displays a pulldown input field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-       if (isset($vars['class'])) $class = $vars['class'];
-       if (!$class) $class = "input-access";
-       
-       if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
-               $vars['value'] = get_default_access();
-                       
-
-               if ((!isset($vars['options'])) || (!is_array($vars['options'])))
-               {
-                       $vars['options'] = array();
-                       $vars['options'] = get_write_access_array();
+/**
+ * Elgg access level input
+ * Displays a pulldown input field
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
+
+if (isset($vars['class'])) {
+       $class = $vars['class'];
+}
+if (!$class) {
+       $class = "input-access";
+}
+
+if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT) {
+       $vars['value'] = get_default_access();
+}
+
+
+if ((!isset($vars['options'])) || (!is_array($vars['options']))) {
+       $vars['options'] = array();
+       $vars['options'] = get_write_access_array();
+}
+
+if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
+       ?>
+
+       <select <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+       <?php
+
+       foreach($vars['options'] as $key => $option) {
+               if ($key != $vars['value']) {
+                       echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+               } else {
+                       echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
                }
-               
-               if (is_array($vars['options']) && sizeof($vars['options']) > 0) {        
-                        
-?>
-
-<select <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
-
-    foreach($vars['options'] as $key => $option) {
-        if ($key != $vars['value']) {
-            echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
-        } else {
-            echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
-        }
-    }
-
-?> 
-</select>
-
-<?php
-
-               }               
+       }
 
-?>
\ No newline at end of file
+       ?>
+       </select>
+       <?php
+}
\ No newline at end of file
index 052219a1ba2f4875ecf782c680d54527069ad45d..7dc088d0e0135dacfb0f2c187a4a6ff77bd96409 100644 (file)
@@ -1,56 +1,59 @@
 <?php
+/**
+ * Displays an autocomplete text input.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @TODO: This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page.
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['match_on'] Array | str What to match on. all|array(group|user|friend|subtype)
+ * @uses $vars['match_owner'] Bool.  Match only entities that are owned by logged in user.
+ *
+ */
+
+global $autocomplete_js_loaded;
+
+$internalname = $vars['internalname'];
+$value = $vars['value'];
+
+if(!$value) {
+       $value= '';
+}
+
+if($vars['internal_id']) {
+       $id_autocomplete = $vars['internal_id'];
+}
+
+$ac_url_params = http_build_query(array(
+       'match_on' => $vars['match_on'],
+       'match_owner' => $vars['match_owner'],
+));
+$ac_url = $vars['url'] . 'pg/autocomplete?' . $ac_url_params;
+
+if (!isset($autocomplete_js_loaded)) {
+       $autocomplete_js_loaded = false;
+}
 
-       /**
-        * Displays an autocomplete text input.
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        * @TODO: This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page.
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['match_on'] Array | str What to match on. all|array(group|user|friend|subtype)
-        * @uses $vars['match_owner'] Bool.  Match only entities that are owned by logged in user.
-        * 
-        */
-
-       global $autocomplete_js_loaded;
-       
-       $internalname = $vars['internalname'];
-       $value = $vars['value'];
-       
-       if(!$value)
-               $value= '';
-       
-       if($vars['internal_id'])
-               $id_autocomplete = $vars['internal_id'];
-               
-       $ac_url_params = http_build_query(array(
-               'match_on' => $vars['match_on'],
-               'match_owner' => $vars['match_owner'],
-       ));
-       $ac_url = $vars['url'] . 'pg/autocomplete?' . $ac_url_params;
-                       
-       if (!isset($autocomplete_js_loaded)) $autocomplete_js_loaded = false;
-       
 ?>
 
 <!-- show the input -->
-       <input type="text" class='autocomplete' name ='<?php echo $internalname; ?>_autocomplete' value='<?php echo $value?>' />
-       <input type="hidden" name="<?php echo $internalname; ?>" value='<?php echo $value; ?>' />
-       
+<input type="text" class='autocomplete' name ='<?php echo $internalname; ?>_autocomplete' value='<?php echo $value?>' />
+<input type="hidden" name="<?php echo $internalname; ?>" value='<?php echo $value; ?>' />
+
 <?php
-       if (!$autocomplete_js_loaded) { 
-?>
+if (!$autocomplete_js_loaded) {
+       ?>
 
-<!-- include autocomplete -->
-<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.autocomplete.min.js"></script>
-<script type="text/javascript">
-function bindAutocomplete() {
+       <!-- include autocomplete -->
+       <script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.autocomplete.min.js"></script>
+       <script type="text/javascript">
+       function bindAutocomplete() {
        $('input[type=text].autocomplete').autocomplete("<?php echo $ac_url; ?>", {
                minChars: 1,
                matchContains: true,
@@ -58,13 +61,13 @@ function bindAutocomplete() {
                formatItem: function(row, i, max, term) {
                        eval("var info = " + row + ";");
                        var r = '';
-                       
+
                        switch (info.type) {
                                case 'user':
                                case 'group':
                                        r = info.icon + info.name + ' - ' + info.desc;
                                        break;
-                                       
+
                                default:
                                        r = info.name + ' - ' + info.desc;
                                        break;
@@ -80,20 +83,20 @@ function bindAutocomplete() {
                var hidden = $(this).next();
                hidden.val(info.guid);
        });
-}
+       }
 
-$(document).ready(function() {
+       $(document).ready(function() {
        bindAutocomplete();
-});
+       });
 
-</script>
+       </script>
 
-<?php
+       <?php
 
-               $autocomplete_js_loaded = true;
-       } else {
-?>
-<!-- rebind autocomplete -->
-<script type="text/javascript">bindAutocomplete();</script>
-<?php
-       }
\ No newline at end of file
+       $autocomplete_js_loaded = true;
+} else {
+       ?>
+       <!-- rebind autocomplete -->
+       <script type="text/javascript">bindAutocomplete();</script>
+       <?php
+}
\ No newline at end of file
index 4a21a3127ac5345c01b80cbdb443eae77b640ff6..0a65feb82a425ca173c09d16f5b0acca5a12e143 100644 (file)
@@ -1,39 +1,59 @@
 <?php
-       /**
       * Create a input button
       * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
       * extra security which help prevent CSRF attacks.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
-        * 
       * @uses $vars['value'] The current value, if any
       * @uses $vars['js'] Any Javascript to enter into the input tag
       * @uses $vars['internalname'] The name of the input field
       * @uses $vars['type'] Submit or reset, defaults to submit.
       * @uses $vars['src'] Src of an image
-        * 
       */
+/**
+ * Create a input button
+ * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
+ * extra security which help prevent CSRF attacks.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['type'] Submit or reset, defaults to submit.
+ * @uses $vars['src'] Src of an image
+ *
+ */
 
-       global $CONFIG;
-       
-       if (isset($vars['class'])) $class = $vars['class'];
-       if (!$class) $class = "submit_button";
+global $CONFIG;
 
-       if (isset($vars['type'])) { $type = strtolower($vars['type']); } else { $type = 'submit'; }
-       switch ($type)
-       {
-               case 'button' : $type='button'; break;
-               case 'reset' : $type='reset'; break;
-               case 'submit':
-               default: $type = 'submit';
-       }
-       
-       $value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
-       if (isset($vars['internalname'])) $name = $vars['internalname'];
-       if (isset($vars['src'])) $src = "src=\"{$vars['src']}\"";
-       if (strpos($src,$CONFIG->wwwroot)===false) $src = ""; // blank src if trying to access an offsite image.
+if (isset($vars['class'])) {
+       $class = $vars['class'];
+}
+if (!$class) {
+       $class = "submit_button";
+}
+
+if (isset($vars['type'])) {
+       $type = strtolower($vars['type']);
+} else {
+       $type = 'submit';
+}
+
+switch ($type) {
+       case 'button' :
+               $type='button';
+               break;
+       case 'reset' :
+               $type='reset';
+               break;
+       case 'submit':
+       default:
+               $type = 'submit';
+}
+
+$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
+if (isset($vars['internalname'])) {
+       $name = $vars['internalname'];
+}
+if (isset($vars['src'])) {
+       $src = "src=\"{$vars['src']}\"";
+}
+// blank src if trying to access an offsite image.
+if (strpos($src,$CONFIG->wwwroot)===false) {
+       $src = "";
+}
 ?>
 <input name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> type="<?php echo $type; ?>" class="<?php echo $class; ?>" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" <?php echo $src; ?> />
\ No newline at end of file
index 9dd5b2dc0683bcef97f4f6132ed15473282ad316..12cbf95ecf68ed370b4fcb3a4ea9d030eb9a7268 100644 (file)
@@ -1,44 +1,40 @@
-<?php 
+<?php
+/**
+ * Elgg calendar input
+ * Displays a calendar input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 
-       /**
-        * Elgg calendar input
-        * Displays a calendar input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+static $calendarjs;
+if (empty($calendarjs)) {
+       echo <<< END
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-    static $calendarjs;
-    if (empty($calendarjs)) {
-        
-        echo <<< END
-        
 <script language="JavaScript" src="{$vars['url']}vendors/calendarpopup/CalendarPopup.js"></script>
-        
+
 END;
-        $calendarjs = 1;
-    }
-    $strippedname = sanitise_string($vars['internalname']);
-    $js = "cal" . $strippedname;
+       $calendarjs = 1;
+}
+$strippedname = sanitise_string($vars['internalname']);
+$js = "cal" . $strippedname;
+
+if ($vars['value'] > 86400) {
+       $val = date("F j, Y",$vars['value']);
+} else {
+       $val = $vars['value'];
+}
 
-    if ($vars['value'] > 86400) {
-        $val = date("F j, Y",$vars['value']);
-    } else {
-        $val = $vars['value'];
-    }
-    
 ?>
 <script language="JavaScript">
-    var cal<?php echo $strippedname; ?> = new CalendarPopup();
+var cal<?php echo $strippedname; ?> = new CalendarPopup();
 </script>
 <input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" id="<?php echo $strippedname; ?>" value="<?php echo $val; ?>" />
-<a href="#" onclick="<?php echo $js; ?>.select(document.getElementById('<?php echo $strippedname; ?>'),'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" TITLE="<?php echo $js; ?>.select(document.forms[0].<?php echo $strippedname; ?>,'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" NAME="anchor<?php echo $strippedname; ?>" ID="anchor<?php echo $strippedname; ?>">select</a> 
\ No newline at end of file
+<a href="#" onclick="<?php echo $js; ?>.select(document.getElementById('<?php echo $strippedname; ?>'),'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" TITLE="<?php echo $js; ?>.select(document.forms[0].<?php echo $strippedname; ?>,'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" NAME="anchor<?php echo $strippedname; ?>" ID="anchor<?php echo $strippedname; ?>">select</a>
\ No newline at end of file
index f4ebc218ac52b5aaf3ebf74efd9ce95c2e820804..d1d780e7730ca070e7e3d616bc4d28ee2ed11657 100644 (file)
@@ -1,10 +1,10 @@
 <?php
-       /**
       * This view provides a hook for third parties to provide captcha behaviour.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * This view provides a hook for third parties to provide captcha behaviour.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
\ No newline at end of file
index 4e806bbfc4223d7d6956b590701f31f5201e3350..7d03db257927dee6d73757e1e39c722eb09712dc 100644 (file)
@@ -1,52 +1,49 @@
 <?php
+/**
+ * Elgg checkbox input
+ * Displays a checkbox input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the label => options for the checkbox field
+ *
+ */
 
-       /**
-        * Elgg checkbox input
-        * Displays a checkbox input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-checkboxes";
+}
 
-        * @author Curverider Ltd
+foreach($vars['options'] as $label => $option) {
+       //if (!in_array($option,$vars['value'])) {
+       if (is_array($vars['value'])) {
+               $valarray = $vars['value'];
+               $valarray = array_map('strtolower', $valarray);
+               if (!in_array(strtolower($option),$valarray)) {
+                       $selected = "";
+               } else {
+                       $selected = "checked = \"checked\"";
+               }
+       } else {
+               if (strtolower($option) != strtolower($vars['value'])) {
+                       $selected = "";
+               } else {
+                       $selected = "checked = \"checked\"";
+               }
+       }
+       $labelint = (int) $label;
+       if ("{$label}" == "{$labelint}") {
+               $label = $option;
+       }
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['options'] An array of strings representing the label => options for the checkbox field
-        * 
-        */
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-checkboxes";
-       
-    foreach($vars['options'] as $label => $option) {
-        //if (!in_array($option,$vars['value'])) {
-        if (is_array($vars['value'])) {
-               $valarray = $vars['value'];
-               $valarray = array_map('strtolower', $valarray);
-               if (!in_array(strtolower($option),$valarray)) {
-                   $selected = "";
-               } else {
-                   $selected = "checked = \"checked\"";
-               }
-        } else {
-               if (strtolower($option) != strtolower($vars['value'])) {
-                   $selected = "";
-               } else {
-                   $selected = "checked = \"checked\"";
-               }
-        }
-        $labelint = (int) $label;
-        if ("{$label}" == "{$labelint}") {
-               $label = $option;
-        }
-        
-        if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; 
-        $disabled = "";
-        if ($vars['disabled']) $disabled = ' disabled="yes" '; 
-        echo "<label><input type=\"checkbox\" $id $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
-    }
-
-?> 
\ No newline at end of file
+       if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\"";
+       $disabled = "";
+       if ($vars['disabled']) $disabled = ' disabled="yes" ';
+       echo "<label><input type=\"checkbox\" $id $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+}
\ No newline at end of file
index e1fb61eabf6e3ba23050dbf4683207f844cafd9c..bd2892e97dd086b7edfb6dc6b25a2824902c5fed 100644 (file)
@@ -1,24 +1,25 @@
 <?php
+/**
+ * Elgg email input
+ * Displays an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
 
-       /**
-        * Elgg email input
-        * Displays an email input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+ * @author Curverider Ltd
 
-        * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-text";
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-text";
+}
 ?>
 
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?>value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
+<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?>value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/>
\ No newline at end of file
index e707e3ee06580cda4018af818bdde9f7ff60573b..15cc011f6230f3e27dd6da9454607037e50a6872 100644 (file)
@@ -1,26 +1,25 @@
 <?php
+/**
+ * Elgg file input
+ * Displays a file input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 
-       /**
-        * Elgg file input
-        * Displays a file input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+if (!empty($vars['value'])) {
+       echo elgg_echo('fileexists') . "<br />";
+}
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-    if (!empty($vars['value'])) {
-        echo elgg_echo('fileexists') . "<br />";
-    }
-
-    $class = $vars['class'];
-       if (!$class) $class = "input-file";
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-file";
+}
 ?>
 <input type="file" size="30" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>" />
\ No newline at end of file
index 0a4619ac14daef8ca23c7c58761ceaf92517890f..25f140a012d74b76246f4ea06b2fe2d6fd042308 100644 (file)
@@ -1,34 +1,50 @@
 <?php
-       /**
-        * Create a form for data submission.
-        * Use this view for forms rather than creating a form tag in the wild as it provides
-        * extra security which help prevent CSRF attacks.
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['body'] The body of the form (made up of other input/xxx views and html
-        * @uses $vars['method'] Method (default POST)
-        * @uses $vars['enctype'] How the form is encoded, default blank
-        * @uses $vars['action'] URL of the action being called
-        * 
-        */
-       
-       if (isset($vars['internalid'])) { $id = $vars['internalid']; } else { $id = ''; }
-       if (isset($vars['internalname'])) { $name = $vars['internalname']; } else { $name = ''; }
-       $body = $vars['body'];
-       $action = $vars['action'];
-       if (isset($vars['enctype'])) { $enctype = $vars['enctype']; } else { $enctype = ''; }
-       if (isset($vars['method'])) { $method = $vars['method']; } else { $method = 'POST'; }
+/**
+ * Create a form for data submission.
+ * Use this view for forms rather than creating a form tag in the wild as it provides
+ * extra security which help prevent CSRF attacks.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['body'] The body of the form (made up of other input/xxx views and html
+ * @uses $vars['method'] Method (default POST)
+ * @uses $vars['enctype'] How the form is encoded, default blank
+ * @uses $vars['action'] URL of the action being called
+ *
+ */
 
-       // Generate a security header
-       $security_header = "";
-       if ($vars['disable_security']!=true)
-       {
-               $security_header = elgg_view('input/securitytoken');
-       }
+if (isset($vars['internalid'])) {
+       $id = $vars['internalid'];
+} else {
+       $id = '';
+}
+
+if (isset($vars['internalname'])) {
+       $name = $vars['internalname'];
+} else {
+       $name = '';
+}
+$body = $vars['body'];
+$action = $vars['action'];
+if (isset($vars['enctype'])) {
+       $enctype = $vars['enctype'];
+} else {
+       $enctype = '';
+}
+if (isset($vars['method'])) {
+       $method = $vars['method'];
+} else {
+       $method = 'POST';
+}
+
+// Generate a security header
+$security_header = "";
+if ($vars['disable_security']!=true) {
+       $security_header = elgg_view('input/securitytoken');
+}
 ?>
 <form <?php if ($id) { ?>id="<?php echo $id; ?>" <?php } ?> <?php if ($name) { ?>name="<?php echo $name; ?>" <?php } ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>" <?php if ($enctype!="") echo "enctype=\"$enctype\""; ?>>
 <?php echo $security_header; ?>
index 2338a66bbe137cea1d5868e9deebe0cbb48263f1..e9577936786a576349a1717e9685831b288d0ba0 100644 (file)
@@ -1,18 +1,18 @@
 <?php
-       /**
       * Create a hidden data field
       * Use this view for forms rather than creating a hidden tag in the wild as it provides
       * extra security which help prevent CSRF attacks.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
-        * 
       * @uses $vars['value'] The current value, if any
       * @uses $vars['js'] Any Javascript to enter into the input tag
       * @uses $vars['internalname'] The name of the input field
-        * 
       */
+/**
+ * Create a hidden data field
+ * Use this view for forms rather than creating a hidden tag in the wild as it provides
+ * extra security which help prevent CSRF attacks.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 ?>
-<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" /> 
\ No newline at end of file
+<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" />
\ No newline at end of file
index 86b0f3fc46eb32272760178733c6de7bcd68ceac..f60e29a70173e23cc3c450450eec87f70f24e8c1 100644 (file)
@@ -1,25 +1,22 @@
 <?php
+/**
+ * Elgg long text input
+ * Displays a long text input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 
-       /**
-        * Elgg long text input
-        * Displays a long text input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+$class = $vars['class'];
+if (!$class) $class = "input-textarea";
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-textarea";
-       
 ?>
 
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
+<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea>
\ No newline at end of file
index 8ab0b693522b5ebb30c16ae16ae9e64d80ec4ac8..90ee984d486543049d32b046c21ae58aa2f726ec 100644 (file)
@@ -1,24 +1,23 @@
 <?php
+/**
+ * Elgg password input
+ * Displays a password input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 
-       /**
-        * Elgg password input
-        * Displays a password input field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-password";
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-password";
+}
 ?>
 
-<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> 
\ No newline at end of file
+<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" />
\ No newline at end of file
index a99084a4343568fd7ff1fd5b43f047b510d6e79f..e177f8b3fcb38e34358aa43cd20732260b714df6 100644 (file)
@@ -1,25 +1,24 @@
 <?php
+/**
+ * Elgg long text input (plaintext)
+ * Displays a long text input field that should not be overridden by wysiwyg editors.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
 
-       /**
-        * Elgg long text input (plaintext)
-        * Displays a long text input field that should not be overridden by wysiwyg editors.
-        * 
-        * @package Elgg
-        * @subpackage Core
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-textarea";
+}
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * 
-        */
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-textarea";
-       
 ?>
 
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
+<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea>
\ No newline at end of file
index 6aa69f428043c00e580d511f1b2eba8f99ab3edb..03143d677f07f426a157ebed600608d673204b50 100644 (file)
@@ -1,52 +1,46 @@
 <?php
-
-       /**
-        * Elgg pulldown input
-        * Displays a pulldown input field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['options'] An array of strings representing the options for the pulldown field
-        * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is 
-        *                                                               the value displayed on the button. Replaces $vars['options'] when defined. 
-        */
-
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-pulldown";
+/**
+ * Elgg pulldown input
+ * Displays a pulldown input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the options for the pulldown field
+ * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is
+ *                                                              the value displayed on the button. Replaces $vars['options'] when defined.
+ */
+
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-pulldown";
+}
 
 ?>
 
-
 <select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
 <?php
-       if ($vars['options_values'])
-       {
-               foreach($vars['options_values'] as $value => $option) {
-               if ($value != $vars['value']) {
-                   echo "<option value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
-               } else {
-                   echo "<option value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
-               }
-           }
+if ($vars['options_values']) {
+       foreach($vars['options_values'] as $value => $option) {
+               if ($value != $vars['value']) {
+                       echo "<option value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+               } else {
+                       echo "<option value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+               }
        }
-       else
-       {
-           foreach($vars['options'] as $option) {
-               if ($option != $vars['value']) {
-                   echo "<option>". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
-               } else {
-                   echo "<option selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
-               }
-           }
+} else {
+       foreach($vars['options'] as $option) {
+               if ($option != $vars['value']) {
+                       echo "<option>". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+               } else {
+                       echo "<option selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+               }
        }
-?> 
+}
+?>
 </select>
\ No newline at end of file
index 12e40ccdd81efbbd42b60333ddb6c58e649e28a9..c6163b1412a63963c421e2558d79962e2824fa56 100644 (file)
@@ -1,40 +1,41 @@
 <?php
+/**
+ * Elgg radio input
+ * Displays a radio input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the options for the radio field as "label" => option
+ *
+ */
 
-       /**
-        * Elgg radio input
-        * Displays a radio input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-radio";
+}
 
-        * @author Curverider Ltd
+foreach($vars['options'] as $label => $option) {
+       if (strtolower($option) != strtolower($vars['value'])) {
+               $selected = "";
+       } else {
+               $selected = "checked = \"checked\"";
+       }
+       $labelint = (int) $label;
+       if ("{$label}" == "{$labelint}") {
+               $label = $option;
+       }
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['options'] An array of strings representing the options for the radio field as "label" => option
-        * 
-        */
-       
-       $class = $vars['class'];
-       if (!$class) $class = "input-radio";
-
-    foreach($vars['options'] as $label => $option) {
-        if (strtolower($option) != strtolower($vars['value'])) {
-            $selected = "";
-        } else {
-            $selected = "checked = \"checked\"";
-        }
-        $labelint = (int) $label;
-        if ("{$label}" == "{$labelint}") {
-               $label = $option;
-        }
-        
-        if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; 
-        if ($vars['disabled']) $disabled = ' disabled="yes" '; 
-        echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" $id value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
-    }
-
-?> 
\ No newline at end of file
+       if (isset($vars['internalid'])) {
+               $id = "id=\"{$vars['internalid']}\"";
+       }
+       if ($vars['disabled']) {
+               $disabled = ' disabled="yes" ';
+       }
+       echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" $id value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+}
\ No newline at end of file
index 96fc57a4f7174d0de408edefc2767486331c620f..bb8d278c37bf54f67fc56ce288139e02f25ebdd4 100644 (file)
@@ -1,25 +1,26 @@
 <?php
-       /**
       * Create a reset input button
       * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
       * extra security which help prevent CSRF attacks.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
-        * 
       * @uses $vars['value'] The current value, if any
       * @uses $vars['js'] Any Javascript to enter into the input tag
       * @uses $vars['internalname'] The name of the input field
       * @uses $vars['type'] Submit or reset, defaults to submit.
-        * 
       */
+/**
+ * Create a reset input button
+ * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
+ * extra security which help prevent CSRF attacks.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['type'] Submit or reset, defaults to submit.
+ *
+ */
 
-       $vars['type'] = 'reset';
-       $class = $vars['class'];
-       if (!$class) $class = "submit_button";
-       $vars['class'] = $class;
-       
-       echo elgg_view('input/button', $vars);
-?>
\ No newline at end of file
+$vars['type'] = 'reset';
+$class = $vars['class'];
+if (!$class) {
+       $class = "submit_button";
+}
+$vars['class'] = $class;
+
+echo elgg_view('input/button', $vars);
\ No newline at end of file
index fa202548ef886c1477c6081785f2396e452dd87b..a2a4a0e017e081fb510812544b76cdcb4eaf74ce 100644 (file)
@@ -1,18 +1,17 @@
 <?php
-       /**
       * CSRF security token view for use with secure forms.
-        * 
       * It is still recommended that you use input/form.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * CSRF security token view for use with secure forms.
+ *
+ * It is still recommended that you use input/form.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $ts = time();
-       $token = generate_action_token($ts);
-       
-       echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token));
-       echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts));
-?>
+$ts = time();
+$token = generate_action_token($ts);
+
+echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token));
+echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts));
index 66e5c543b6a203c4ada05f239829133ddbbd8133..b0c72791f786dae1d5197137fdd013fe47af2dde 100644 (file)
@@ -1,25 +1,28 @@
 <?php
-       /**
       * Create a submit input button
       * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
       * extra security which help prevent CSRF attacks.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
-        * 
       * @uses $vars['value'] The current value, if any
       * @uses $vars['js'] Any Javascript to enter into the input tag
       * @uses $vars['internalname'] The name of the input field
       * @uses $vars['type'] Submit or reset, defaults to submit.
-        * 
       */
+/**
+ * Create a submit input button
+ * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
+ * extra security which help prevent CSRF attacks.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['type'] Submit or reset, defaults to submit.
+ *
+ */
 
-       $vars['type'] = 'submit';
-       if (isset($vars['class'])) $class = $vars['class'];
-       if (!$class) $class = "submit_button";
-       $vars['class'] = $class;
-       
-       echo elgg_view('input/button', $vars);
-?>
\ No newline at end of file
+$vars['type'] = 'submit';
+if (isset($vars['class'])) {
+       $class = $vars['class'];
+}
+if (!$class) {
+       $class = "submit_button";
+}
+$vars['class'] = $class;
+
+echo elgg_view('input/button', $vars);
\ No newline at end of file
index 8793756e2804268ad7d375b3db9f84a98d861775..1728750043e8b7f3259e812d4e13158f8f1839a3 100644 (file)
@@ -1,45 +1,45 @@
-<?php 
+<?php
+/**
+ * Elgg tag input
+ * Displays a tag input field
+ *
+ * @package Elgg
+ * @subpackage Core
 
-       /**
-        * Elgg tag input
-        * Displays a tag input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+ * @author Curverider Ltd
 
-        * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['value'] An array of tags
+ * @uses $vars['class'] Class override
+ */
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['value'] An array of tags
-        * @uses $vars['class'] Class override
-        */
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-tags";
+}
 
-       $class = $vars['class'];
-       if (!$class) $class = "input-tags";
+$tags = "";
+if (!empty($vars['value'])) {
+       if (is_array($vars['value'])) {
+               foreach($vars['value'] as $tag) {
+
+                       if (!empty($tags)) {
+                               $tags .= ", ";
+                       }
+                       if (is_string($tag)) {
+                               $tags .= $tag;
+                       } else {
+                               $tags .= $tag->value;
+                       }
+               }
+       } else {
+               $tags = $vars['value'];
+       }
+}
 
-    $tags = "";
-    if (!empty($vars['value'])) {
-       if (is_array($vars['value'])) {
-               foreach($vars['value'] as $tag) {
-                   
-                   if (!empty($tags)) {
-                       $tags .= ", ";
-                   }
-                   if (is_string($tag)) {
-                       $tags .= $tag;
-                   } else {
-                       $tags .= $tag->value;
-                   }
-                   
-               }
-       } else {
-               $tags = $vars['value'];
-       }
-    }
-    
 ?>
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?><?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($tags, ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?><?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($tags, ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/>
\ No newline at end of file
index 2a30ba08156852951c659f8d47af7e7728d84c9a..1814e580167e0c846222eca786b7ae1c4e5eb5ad 100644 (file)
@@ -1,27 +1,28 @@
 <?php
+/**
+ * Elgg text input
+ * Displays a text input field
+ *
+ * @package Elgg
+ * @subpackage Core
 
-       /**
-        * Elgg text input
-        * Displays a text input field
-        * 
-        * @package Elgg
-        * @subpackage Core
+ * @author Curverider Ltd
 
-        * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['disabled'] If true then control is read-only
+ * @uses $vars['class'] Class override
+ */
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['disabled'] If true then control is read-only
-        * @uses $vars['class'] Class override
-        */
 
-       
-       $class = $vars['class'];
-       if (!$class) $class = "input-text";
-       
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-text";
+}
+
 ?>
 
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> 
\ No newline at end of file
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/>
\ No newline at end of file
index 82fde938edcf9a0866b3706d7d1646bab69f27e3..6bf19d3190afa06e72e5a025d56fce7252a64cd0 100644 (file)
@@ -1,24 +1,23 @@
 <?php
+/**
+ * Elgg URL input
+ * Displays a URL input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['class'] Class override
+ */
 
-       /**
-        * Elgg URL input
-        * Displays a URL input field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * @uses $vars['js'] Any Javascript to enter into the input tag
-        * @uses $vars['internalname'] The name of the input field
-        * @uses $vars['class'] Class override
-        */
-
-       $class = $vars['class'];
-       if (!$class) $class = "input-url";
+$class = $vars['class'];
+if (!$class) {
+       $class = "input-url";
+}
 ?>
 
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/>
\ No newline at end of file
index 4707809f5d3185409adace803ede588465045ca6..7a8c2786a07ee1ede9063083d50e37efa08cf411 100644 (file)
@@ -1,10 +1,10 @@
 <?php
-       /**
       * This view provides a hook for third parties to provide a URL shortener.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * This view provides a hook for third parties to provide a URL shortener.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
\ No newline at end of file
index efe83ec14b3298add9159a740dc51e1ed9ebec50..742554dbd3bc87c2b5f6d4aec12430b9049def31 100644 (file)
@@ -1,23 +1,23 @@
-<?php 
+<?php
 /**
- * User Picker.  Sends an array of user guids. 
- * 
+ * User Picker.  Sends an array of user guids.
+ *
  * @package Elgg
  * @subpackage Core
  * @author Curverider Ltd
  * @link http://elgg.org/
- * 
+ *
  * @uses $vars['value'] The current value, if any
  * @uses $vars['internalname'] The name of the input field
- * 
- * 
+ *
+ *
  * pops up defaulted to lazy load friends lists in paginated alphabetical order.
- * upon 
- * 
+ * upon
+ *
  * As users are checked they move down to a "users" box.
  * When this happens, a hidden input is created also.
  *     {$internalnal}[] with the value th GUID.
- * 
+ *
  */
 
 global $user_picker_js_sent;
@@ -81,13 +81,13 @@ function userPickerFormatItem(row, i, max, term) {
        var r = '';
        var name = info.name.replace(new RegExp("(" + term + ")", "gi"), "<span class=\"user_picker_highlight\">$1</b>");
        var desc = info.desc.replace(new RegExp("(" + term + ")", "gi"), "<span class=\"user_picker_highlight\">$1</b>");
-       
+
        switch (info.type) {
                case 'user':
                case 'group':
                        r = info.icon + name + ' - ' + desc;
                        break;
-                       
+
                default:
                        r = name + ' - ' + desc;
                        break;
@@ -103,10 +103,10 @@ function userPickerAddUser(event, data, formatted) {
        var internalName = picker.find('input.internalname').val();
        // not sure why formatted isn't.
        var formatted = userPickerFormatItem(data);
-       
+
        // add guid as hidden input and to list.
        var li = formatted + ' <a class="delete_collection" onclick="userPickerRemoveUser(this, ' + info.guid + ')"><strong>X</strong></a>'
-        + '<input type="hidden" name="' + internalName + '[]" value="' + info.guid + '" />';
+       + '<input type="hidden" name="' + internalName + '[]" value="' + info.guid + '" />';
        $('<li class="user_picker_entry">').html(li).appendTo(users);
 
        $(this).val('');
@@ -137,11 +137,10 @@ $(document).ready(function() {
        <input class="internalname" type="hidden" name="internalname" value="<?php echo $vars['internalname']; ?>" />
        <input class="search" type="text" name="user_search" size="30"/>
        <span class="controls">
-               <label><input class="all_users" type="checkbox" name="match_on" value="true" /><?php echo elgg_echo('userpicker:only_friends'); ?></label>              
+               <label><input class="all_users" type="checkbox" name="match_on" value="true" /><?php echo elgg_echo('userpicker:only_friends'); ?></label>
        </span>
        <div class="results">
                <!-- This space will be filled with users, checkboxes and magic. -->
        </div>
        <ul class="users"></ul>
 </div>
-
index e63cd70ef0ad8340fa9df7253f6ae83aaaaac006..fbe46824eca0eea190b226fc9973083b2c758f09 100644 (file)
@@ -3,19 +3,19 @@ $(document).ready(function () {
        // COLLAPSABLE WIDGETS (on Dashboard & Profile pages)
        // toggle widget box contents
        $('a.toggle_box_contents').bind('click', toggleContent);
-       
+
        // toggle widget box edit panel
        $('a.toggle_box_edit_panel').click(function () {
                $(this.parentNode.parentNode).children(".collapsable_box_editpanel").slideToggle("fast");
                return false;
        });
-       
+
        // toggle customise edit panel
        $('a.toggle_customise_edit_panel').click(function () {
                $('div#customise_editpanel').slideToggle("fast");
                return false;
-       }); 
-       
+       });
+
        // toggle plugin's settings nad more info on admin tools admin
        $('a.pluginsettings_link').click(function () {
                $(this.parentNode.parentNode).children(".pluginsettings").slideToggle("fast");
@@ -30,12 +30,12 @@ $(document).ready(function () {
                $(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
                return false;
        });
-       
+
        // WIDGET GALLERY EDIT PANEL
        // Sortable widgets
        var els = ['#leftcolumn_widgets', '#middlecolumn_widgets', '#rightcolumn_widgets', '#widget_picker_gallery' ];
        var $els = $(els.toString());
-       
+
        $els.sortable({
                items: '.draggable_widget',
                handle: '.drag_handle',
@@ -47,25 +47,25 @@ $(document).ready(function () {
                appendTo: 'body',
                connectWith: els,
                start:function(e,ui) {
-       
+
                },
-               stop: function(e,ui) {  
-                       // refresh list before updating hidden fields with new widget order             
+               stop: function(e,ui) {
+                       // refresh list before updating hidden fields with new widget order
                        $(this).sortable( "refresh" );
-                       
+
                        var widgetNamesLeft = outputWidgetList('#leftcolumn_widgets');
                        var widgetNamesMiddle = outputWidgetList('#middlecolumn_widgets');
                        var widgetNamesRight = outputWidgetList('#rightcolumn_widgets');
-                       
+
                        document.getElementById('debugField1').value = widgetNamesLeft;
                        document.getElementById('debugField2').value = widgetNamesMiddle;
                        document.getElementById('debugField3').value = widgetNamesRight;
                }
        });
-       
+
        // bind more info buttons - called when new widgets are created
        widget_moreinfo();
-       
+
        // set-up hover class for dragged widgets
        $("#rightcolumn_widgets").droppable({
                accept: ".draggable_widget",
@@ -85,7 +85,7 @@ $(document).ready(function () {
 
 // List active widgets for each page column
 function outputWidgetList(forElement) {
-       return( $("input[name='handler'], input[name='guid']", forElement ).makeDelimitedList("value") );       
+       return( $("input[name='handler'], input[name='guid']", forElement ).makeDelimitedList("value") );
 }
 
 // Make delimited list
@@ -93,7 +93,7 @@ jQuery.fn.makeDelimitedList = function(elementAttribute) {
 
        var delimitedListArray = new Array();
        var listDelimiter = "::";
-       
+
        // Loop over each element in the stack and add the elementAttribute to the array
        this.each(function(e) {
                        var listElement = $(this);
@@ -101,7 +101,7 @@ jQuery.fn.makeDelimitedList = function(elementAttribute) {
                        delimitedListArray[delimitedListArray.length] = listElement.attr(elementAttribute);
                }
        );
-       
+
        // Return value list by joining the array
        return(delimitedListArray.join(listDelimiter));
 }
@@ -117,7 +117,7 @@ function widget_state(forWidget) {
                $(forWidget).find("div.collapsable_box_content").hide();
                $(forWidget).find("a.toggle_box_contents").html('+');
                $(forWidget).find("a.toggle_box_edit_panel").fadeOut('medium');
-       };      
+       };
 }
 
 
@@ -128,21 +128,21 @@ var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode)
                targetContent.slideDown(400);
                $(this).html('-');
                $(this.parentNode).children(".toggle_box_edit_panel").fadeIn('medium');
-               
+
                // set cookie for widget panel open-state
                var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id');
                $.cookie(thisWidgetName, 'expanded', { expires: 365 });
-               
+
        } else {
                targetContent.slideUp(400);
                $(this).html('+');
                $(this.parentNode).children(".toggle_box_edit_panel").fadeOut('medium');
                // make sure edit pane is closed
                $(this.parentNode.parentNode).children(".collapsable_box_editpanel").hide();
-               
+
                // set cookie for widget panel closed-state
                var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id');
-               $.cookie(thisWidgetName, 'collapsed', { expires: 365 });                        
+               $.cookie(thisWidgetName, 'collapsed', { expires: 365 });
        }
        return false;
 };
@@ -150,147 +150,132 @@ var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode)
 // More info tooltip in widget gallery edit panel
 function widget_moreinfo() {
 
-       $("img.more_info").hover(function(e) {                                                                            
+       $("img.more_info").hover(function(e) {
        var widgetdescription = $("input[name='description']", this.parentNode.parentNode.parentNode ).attr('value');
        $("body").append("<p id='widget_moreinfo'><b>"+ widgetdescription +" </b></p>");
-       
+
                if (e.pageX < 900) {
                        $("#widget_moreinfo")
                                .css("top",(e.pageY + 10) + "px")
                                .css("left",(e.pageX + 10) + "px")
-                               .fadeIn("medium");      
-               }       
+                               .fadeIn("medium");
+               }
                else {
                        $("#widget_moreinfo")
                                .css("top",(e.pageY + 10) + "px")
                                .css("left",(e.pageX - 210) + "px")
-                               .fadeIn("medium");              
-               }                       
+                               .fadeIn("medium");
+               }
        },
        function() {
                $("#widget_moreinfo").remove();
-       });     
-       
+       });
+
        $("img.more_info").mousemove(function(e) {
                // action on mousemove
-       });     
+       });
 };
 
 // COOKIES
 jQuery.cookie = function(name, value, options) {
        if (typeof value != 'undefined') { // name and value given, set cookie
-    options = options || {};
-           if (value === null) {
-               value = '';
-               options.expires = -1;
-           }
-    var expires = '';
-    if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
-        var date;
-        if (typeof options.expires == 'number') {
-            date = new Date();
-            date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
-        } else {
-            date = options.expires;
-        }
-        expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
-    }
-    // CAUTION: Needed to parenthesize options.path and options.domain
-    // in the following expressions, otherwise they evaluate to undefined
-    // in the packed version for some reason.
-    var path = options.path ? '; path=' + (options.path) : '';
-    var domain = options.domain ? '; domain=' + (options.domain) : '';
-    var secure = options.secure ? '; secure' : '';
-    document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
-    
+       options = options || {};
+               if (value === null) {
+                       value = '';
+                       options.expires = -1;
+               }
+       var expires = '';
+       if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+               var date;
+               if (typeof options.expires == 'number') {
+                       date = new Date();
+                       date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+               } else {
+                       date = options.expires;
+               }
+               expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+       }
+       // CAUTION: Needed to parenthesize options.path and options.domain
+       // in the following expressions, otherwise they evaluate to undefined
+       // in the packed version for some reason.
+       var path = options.path ? '; path=' + (options.path) : '';
+       var domain = options.domain ? '; domain=' + (options.domain) : '';
+       var secure = options.secure ? '; secure' : '';
+       document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+
        } else { // only name given, get cookie
-           var cookieValue = null;
-           if (document.cookie && document.cookie != '') {
-               var cookies = document.cookie.split(';');
-               for (var i = 0; i < cookies.length; i++) {
-                   var cookie = jQuery.trim(cookies[i]);
-                   // Does this cookie string begin with the name we want?
-                   if (cookie.substring(0, name.length + 1) == (name + '=')) {
-                       cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
-                       break;
-                   }
-               }
-           }
-           return cookieValue;
+               var cookieValue = null;
+               if (document.cookie && document.cookie != '') {
+                       var cookies = document.cookie.split(';');
+                       for (var i = 0; i < cookies.length; i++) {
+                               var cookie = jQuery.trim(cookies[i]);
+                               // Does this cookie string begin with the name we want?
+                               if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                                       cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                                       break;
+                               }
+                       }
+               }
+               return cookieValue;
        }
 };
 
 // ELGG TOOLBAR MENU
 $.fn.elgg_topbardropdownmenu = function(options) {
-    
-  options = $.extend({speed: 350}, options || {});
-  
-  this.each(function() {
-    
-    var root = this, zIndex = 5000;
-    
-    function getSubnav(ele) {
-      if (ele.nodeName.toLowerCase() == 'li') {
-        var subnav = $('> ul', ele);
-        return subnav.length ? subnav[0] : null;
-      } else {
-             
-        return ele;
-      }
-    }
-    
-    function getActuator(ele) {
-      if (ele.nodeName.toLowerCase() == 'ul') {
-        return $(ele).parents('li')[0];
-      } else {
-        return ele;
-      }
-    }
-    
-    function hide() {
-      var subnav = getSubnav(this);
-      if (!subnav) return;
-      $.data(subnav, 'cancelHide', false);
-      setTimeout(function() {
-        if (!$.data(subnav, 'cancelHide')) {
-          $(subnav).slideUp(100);
-        }
-      }, 250);
-    }
-  
-    function show() {
-      var subnav = getSubnav(this);
-      if (!subnav) return;
-      $.data(subnav, 'cancelHide', true);
-      $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
-      if (this.nodeName.toLowerCase() == 'ul') {
-        var li = getActuator(this);
-        $(li).addClass('hover');
-        $('> a', li).addClass('hover');
-      }
-    }
-    
-    $('ul, li', this).hover(show, hide);
-    $('li', this).hover(
-      function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
-      function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
-    );
-    
-  });
-  
-};
-
-
-
-
 
+options = $.extend({speed: 350}, options || {});
 
+this.each(function() {
 
+       var root = this, zIndex = 5000;
 
+       function getSubnav(ele) {
+         if (ele.nodeName.toLowerCase() == 'li') {
+               var subnav = $('> ul', ele);
+               return subnav.length ? subnav[0] : null;
+         } else {
 
+               return ele;
+         }
+       }
 
+       function getActuator(ele) {
+         if (ele.nodeName.toLowerCase() == 'ul') {
+               return $(ele).parents('li')[0];
+         } else {
+               return ele;
+         }
+       }
 
+       function hide() {
+         var subnav = getSubnav(this);
+         if (!subnav) return;
+         $.data(subnav, 'cancelHide', false);
+         setTimeout(function() {
+               if (!$.data(subnav, 'cancelHide')) {
+                 $(subnav).slideUp(100);
+               }
+         }, 250);
+       }
 
+       function show() {
+         var subnav = getSubnav(this);
+         if (!subnav) return;
+         $.data(subnav, 'cancelHide', true);
+         $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
+         if (this.nodeName.toLowerCase() == 'ul') {
+               var li = getActuator(this);
+               $(li).addClass('hover');
+               $('> a', li).addClass('hover');
+         }
+       }
 
+       $('ul, li', this).hover(show, hide);
+       $('li', this).hover(
+         function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
+         function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
+       );
 
+});
 
+};
index 468505c897879756e5b87832c0e377b059925af1..26a24c80711d4e045e8fa4889daa61b3566d5bc2 100644 (file)
@@ -1,20 +1,17 @@
 <?php
-
-       /**
-        * Elgg error message
-        * Displays a single error message
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] An error message (string)
-        */
+/**
+ * Elgg error message
+ * Displays a single error message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An error message (string)
+ */
 ?>
 
-       <p>
-               <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
-       </p>
\ No newline at end of file
+<p>
+       <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+</p>
\ No newline at end of file
index e9b9b2ebbbfb40f5012c5b83a025e4c371b4c4c1..846e22a8058a430e97d4ef70ef24c04fa8d61f0f 100644 (file)
@@ -1,57 +1,50 @@
 <?php
-
-       /**
-        * Elgg list errors
-        * Lists error messages
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] An array of error messages
-        */
-
-               if (!empty($vars['object']) && is_array($vars['object'])) {
+/**
+ * Elgg list errors
+ * Lists error messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of error messages
+ */
+
+if (!empty($vars['object']) && is_array($vars['object'])) {
 
 ?>
 <!-- used to fade out the system messages after 3 seconds -->
 <script>
 $(document).ready(function () {
-       $('.messages_error').animate({opacity: 1.0}, 1000); 
+       $('.messages_error').animate({opacity: 1.0}, 1000);
        $('.messages_error').animate({opacity: 1.0}, 5000);
        $('.messages_error').fadeOut('slow');
-      
+
        $('span.closeMessages a').click(function () {
                $(".messages_error").stop();
                $('.messages_error').fadeOut('slow');
        return false;
-    });
-    
+       });
+
        $('div.messages_error').click(function () {
                $(".messages_error").stop();
                $('.messages_error').fadeOut('slow');
        return false;
-    });
+       });
 
-});  
+});
 </script>
 
        <div class="messages_error">
        <span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
 
 <?php
-                       foreach($vars['object'] as $error) {
-                               echo elgg_view('messages/errors/error',array('object' => $error));
-                       }
+       foreach($vars['object'] as $error) {
+               echo elgg_view('messages/errors/error',array('object' => $error));
+       }
 ?>
 
        </div>
 <?php
-               }
-
-
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
index 0b482d845c413e865c0dde408d50751c2c675592..c93883cbc6e4316ce9e745aa4b0ecca689fea8b3 100644 (file)
@@ -1,44 +1,39 @@
 <?php
+/**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An exception
+ */
 
-       /**
-        * Elgg exception
-        * Displays a single exception
-        * 
-        * @package Elgg
-        * @subpackage Core
+global $CONFIG;
 
-        * @author Curverider Ltd
+$class = get_class($vars['object']);
+$message = elgg_view('output/longtext', array('value' => $vars['object']->getMessage()));
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] An exception
-        */
+$body = <<< END
+<p class="messages-exception">
+       <span title="$class">
+               <b>$message</b>
+       </span>
+</p>
+END;
 
-       global $CONFIG;
-        
-       $class = get_class($vars['object']);
-       $message = elgg_view('output/longtext', array('value' => $vars['object']->getMessage()));
-       
-       $body = <<< END
-       <p class="messages-exception">
-               <span title="$class">
-                       <b>$message</b>
-               </span>
+if ($CONFIG->debug) {
+       $details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')));
+       $body .= <<< END
+       <hr />
+       <p class="messages-exception-detail">
+               $details
        </p>
 END;
+}
 
-       if ($CONFIG->debug)
-       {
-               $details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')));
-               $body .= <<< END
-               <hr />
-               <p class="messages-exception-detail">
-                       $details
-               </p>
-END;
-       }
-       
-       $title = $class;
-       
-       echo elgg_view_layout("one_column", elgg_view_title($title) . $body);
-?>
\ No newline at end of file
+$title = $class;
+
+echo elgg_view_layout("one_column", elgg_view_title($title) . $body);
\ No newline at end of file
index dd02fdac5c67b732010288baadb225511ec4ec53..62500882cbcbdcf9df79809d514a4f239a44bd92 100644 (file)
@@ -1,25 +1,18 @@
 <?php
+/**
+ * Elgg global system message list
+ * Lists all system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] The array of message registers
+ */
 
-       /**
-        * Elgg global system message list
-        * Lists all system messages
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] The array of message registers
-        */
-
-               if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
-                       
-                       foreach($vars['object'] as $register => $list ) {
-                               echo elgg_view("messages/{$register}/list", array('object' => $list));
-                       }
-                       
-               }
-               
-?>
\ No newline at end of file
+if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
+       foreach($vars['object'] as $register => $list ) {
+               echo elgg_view("messages/{$register}/list", array('object' => $list));
+       }
+}
index 81f3a45a89ebfc3621caff139c5f70c42537925e..67da01657be1f60eea9dc30de44926dac6e71651 100644 (file)
@@ -1,58 +1,50 @@
 <?php
-
-       /**
-        * Elgg list system messages
-        * Lists system messages
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] An array of system messages
-        */
-
-       if (!empty($vars['object']) && is_array($vars['object'])) {
+/**
+ * Elgg list system messages
+ * Lists system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of system messages
+ */
+
+if (!empty($vars['object']) && is_array($vars['object'])) {
 
 ?>
 <!-- used to fade out the system messages after 3 seconds -->
 <script type="text/javascript">
 $(document).ready(function () {
-       $('.messages').animate({opacity: 1.0}, 1000); 
+       $('.messages').animate({opacity: 1.0}, 1000);
        $('.messages').animate({opacity: 1.0}, 5000);
        $('.messages').fadeOut('slow');
-      
+
        $('span.closeMessages a').click(function () {
                $(".messages").stop();
                $('.messages').fadeOut('slow');
        return false;
-    });
-    
+       });
+
        $('div.messages').click(function () {
                $(".messages").stop();
                $('.messages').fadeOut('slow');
        return false;
-    });
-});  
+       });
+});
 </script>
 
        <div class="messages">
        <span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
 <?php
-
-               
-                       foreach($vars['object'] as $message) {
-                               echo elgg_view('messages/messages/message',array('object' => $message));
-                       }
-
+       foreach($vars['object'] as $message) {
+               echo elgg_view('messages/messages/message',array('object' => $message));
+       }
 ?>
 
        </div>
-       
-<?php
 
-       }
+<?php
 
-?>
\ No newline at end of file
+}
index bd3514e7abbcb0bd68afb874a39f7942baad17be..717fd5e570e426386bd054a03784bc0f25ae8d9f 100644 (file)
@@ -1,20 +1,17 @@
 <?php
-
-       /**
-        * Elgg standard message
-        * Displays a single Elgg system message
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] A system message (string)
-        */
+/**
+ * Elgg standard message
+ * Displays a single Elgg system message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] A system message (string)
+ */
 ?>
 
-       <p>
-               <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
-       </p>
\ No newline at end of file
+<p>
+       <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+</p>
\ No newline at end of file
index e141675c8e8c027274505034acdde46433b7df63..aec005eaf312389a0dbb437741e95c770891405c 100644 (file)
@@ -1,75 +1,74 @@
 <?php
+/**
+ * Elgg pagination
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
 
-       /**
-        * Elgg pagination
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        */
-
-       if (!isset($vars['offset'])) {
-               $offset = 0;
-       } else {
-               $offset = $vars['offset'];
-       }
-       if ((!isset($vars['limit'])) || (!$vars['limit'])) {
-               $limit = 10;
-       } else {
-               $limit = (int)$vars['limit'];
-       }
-       if (!isset($vars['count'])) {
-               $count = 0;
-       } else {
-               $count = $vars['count'];
-       }
-       if (!isset($vars['word'])) {
-               $word = "offset";
-       } else {
-               $word = $vars['word'];
-       }
-       if (isset($vars['nonefound'])) {
-               $nonefound = $vars['nonefound'];
-       } else {
-               $nonefound = true;
-       }
-       
-       $totalpages = ceil($count / $limit);
-       $currentpage = ceil($offset / $limit) + 1;
+if (!isset($vars['offset'])) {
+       $offset = 0;
+} else {
+       $offset = $vars['offset'];
+}
+if ((!isset($vars['limit'])) || (!$vars['limit'])) {
+       $limit = 10;
+} else {
+       $limit = (int)$vars['limit'];
+}
+if (!isset($vars['count'])) {
+       $count = 0;
+} else {
+       $count = $vars['count'];
+}
+if (!isset($vars['word'])) {
+       $word = "offset";
+} else {
+       $word = $vars['word'];
+}
+if (isset($vars['nonefound'])) {
+       $nonefound = $vars['nonefound'];
+} else {
+       $nonefound = true;
+}
 
-       $baseurl = preg_replace('/[\&\?]'.$word.'\=[0-9]*/',"",$vars['baseurl']);
-       
-       //only display if there is content to paginate through or if we already have an offset
-       if (($count > $limit || $offset > 0) && get_context() != 'widget') {
+$totalpages = ceil($count / $limit);
+$currentpage = ceil($offset / $limit) + 1;
 
-?>
+$baseurl = preg_replace('/[\&\?]'.$word.'\=[0-9]*/',"",$vars['baseurl']);
 
-<div class="pagination">
-<?php
+//only display if there is content to paginate through or if we already have an offset
+if (($count > $limit || $offset > 0) && get_context() != 'widget') {
+
+       ?>
+
+       <div class="pagination">
+       <?php
 
        if ($offset > 0) {
-               
+
                $prevoffset = $offset - $limit;
                if ($prevoffset < 0) $prevoffset = 0;
-               
+
                $prevurl = $baseurl;
                if (substr_count($baseurl,'?')) {
                        $prevurl .= "&{$word}=" . $prevoffset;
                } else {
                        $prevurl .= "?{$word}=" . $prevoffset;
                }
-               
+
                echo "<a href=\"{$prevurl}\" class=\"pagination_previous\">&laquo; ". elgg_echo("previous") ."</a> ";
-               
+
        }
 
        if ($offset > 0 || $offset < ($count - $limit)) {
-               
+
                $currentpage = round($offset / $limit) + 1;
                $allpages = ceil($count / $limit);
-               
+
                $i = 1;
                $pagesarray = array();
                while ($i <= $allpages && $i <= 4) {
                }
                $i = $currentpage - 2;
                while ($i <= $allpages && $i <= ($currentpage + 2)) {
-                       if ($i > 0 && !in_array($i,$pagesarray))
+                       if ($i > 0 && !in_array($i,$pagesarray)) {
                                $pagesarray[] = $i;
+                       }
                        $i++;
                }
                $i = $allpages - 3;
                while ($i <= $allpages) {
-                       if ($i > 0 && !in_array($i,$pagesarray))
+                       if ($i > 0 && !in_array($i,$pagesarray)) {
                                $pagesarray[] = $i;
+                       }
                        $i++;
                }
-               
+
                sort($pagesarray);
-               
+
                $prev = 0;
                foreach($pagesarray as $i) {
-               
                        if (($i - $prev) > 1) {
-                               
                                echo "<span class=\"pagination_more\">...</span>";
-                               
                        }
-                       
+
                        $counturl = $baseurl;
                        $curoffset = (($i - 1) * $limit);
                        if (substr_count($baseurl,'?')) {
                                echo "<span class=\"pagination_currentpage\"> {$i} </span>";
                        }
                        $prev = $i;
-               
-               }
 
+               }
        }
-       
+
        if ($offset < ($count - $limit)) {
-               
+
                $nextoffset = $offset + $limit;
-               if ($nextoffset >= $count) $nextoffset--;
-               
+               if ($nextoffset >= $count) {
+                       $nextoffset--;
+               }
+
                $nexturl = $baseurl;
                if (substr_count($baseurl,'?')) {
                        $nexturl .= "&{$word}=" . $nextoffset;
                } else {
                        $nexturl .= "?{$word}=" . $nextoffset;
                }
-               
+
                echo " <a href=\"{$nexturl}\" class=\"pagination_next\">" . elgg_echo("next") . " &raquo;</a>";
-               
+
        }
 
-?>
-<div class="clearfloat"></div>
-</div>
-<?php
-    } // end of pagination check if statement
-?>
\ No newline at end of file
+       ?>
+       <div class="clearfloat"></div>
+       </div>
+       <?php
+} // end of pagination check if statement
\ No newline at end of file
index 49dacde72a64606f7439c183bf1d0bad5a0788b3..897a827d617b7aac319a929125406d2d0486d45e 100644 (file)
@@ -1,47 +1,45 @@
 <?php
+/**
+ * Elgg standard tools drop down
+ * This will be populated depending on the plugins active - only plugin navigation will appear here
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
 
-       /**
-        * Elgg standard tools drop down
-        * This will be populated depending on the plugins active - only plugin navigation will appear here
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        */
-        
-               $menu = get_register('menu');
-               
-               //var_export($menu);
+$menu = get_register('menu');
+
+//var_export($menu);
+
+if (is_array($menu) && sizeof($menu) > 0) {
+       $alphamenu = array();
+       foreach($menu as $item) {
+               $alphamenu[$item->name] = $item;
+       }
+       ksort($alphamenu);
 
-               if (is_array($menu) && sizeof($menu) > 0) {
-                       $alphamenu = array();
-                       foreach($menu as $item) {
-                               $alphamenu[$item->name] = $item;
-                       }
-                       ksort($alphamenu);
-               
 ?>
 
 <ul class="topbardropdownmenu">
-    <li class="drop"><a href="#" class="menuitemtools"><?php echo(elgg_echo('tools')); ?></a>
-         <ul>
-      <?php
-                       foreach($alphamenu as $item) {
-                       echo "<li><a href=\"{$item->value}\">" . $item->name . "</a></li>";
-                       } 
-     ?>
-      </ul>
-    </li>
+       <li class="drop"><a href="#" class="menuitemtools"><?php echo(elgg_echo('tools')); ?></a>
+       <ul>
+       <?php
+               foreach($alphamenu as $item) {
+                       echo "<li><a href=\"{$item->value}\">" . $item->name . "</a></li>";
+               }
+       ?>
+       </ul>
+       </li>
 </ul>
 
 <script type="text/javascript">
-  $(function() {
-    $('ul.topbardropdownmenu').elgg_topbardropdownmenu();
-  });
+$(function() {
+       $('ul.topbardropdownmenu').elgg_topbardropdownmenu();
+});
 </script>
 
 <?php
-               }
-?>
+}
\ No newline at end of file
index c5f3a80a1cc0ba4d2df496308f5207a553a44230..fcea39b61a186a9ee8908ba0d9a017f80e4ff084 100644 (file)
@@ -1,34 +1,30 @@
 <?php
+/**
+ * Elgg list view switcher
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       /**
-        * Elgg list view switcher
-        * 
-        * @package Elgg
-        * @subpackage Core
+$baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']);
 
-        * @author Curverider Ltd
+if ($vars['viewtype'] == "list") {
+       $viewtype = "gallery";
+} else {
+       $viewtype = "list";
+}
 
-        * @link http://elgg.org/
-        */
-
-
-               $baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']);
-               
-               if ($vars['viewtype'] == "list") {
-                       $viewtype = "gallery";
-               } else {
-                       $viewtype = "list";
-               }
-               
-               if (substr_count($baseurl,'?')) {
-                       $baseurl .= "&search_viewtype=" . $viewtype;
-               } else {
-                       $baseurl .= "?search_viewtype=" . $viewtype;
-               }
+if (substr_count($baseurl,'?')) {
+       $baseurl .= "&search_viewtype=" . $viewtype;
+} else {
+       $baseurl .= "?search_viewtype=" . $viewtype;
+}
 
 ?>
 
-       <div class="contentWrapper">
-               <?php echo elgg_echo("viewtype:change") ?>:
-               <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a>
-       </div>
\ No newline at end of file
+<div class="contentWrapper">
+       <?php echo elgg_echo("viewtype:change") ?>:
+       <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a>
+</div>
\ No newline at end of file
index ff894cd0ee516e378227c705059e152e62c45e8c..cba5cdef0c56762354d5d9a59f93255f3a045062 100644 (file)
@@ -1,33 +1,30 @@
 <?php
-       /**
-        * User settings for notifications.
-        * 
-        * @package Elgg
-        * @subpackage Core
+/**
+ * User settings for notifications.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-        * @author Curverider Ltd
+global $NOTIFICATION_HANDLERS;
+$notification_settings = get_user_notification_settings(page_owner());
 
-        * @link http://elgg.org/
-        */
-
-       global $NOTIFICATION_HANDLERS;
-       $notification_settings = get_user_notification_settings(page_owner());
-       
 ?>
-       <h3><?php echo elgg_echo('notifications:usersettings'); ?></h3>
-       
-       <p><?php echo elgg_echo('notifications:methods'); ?>
-       
-       <table>
+<h3><?php echo elgg_echo('notifications:usersettings'); ?></h3>
+
+<p><?php echo elgg_echo('notifications:methods'); ?>
+
+<table>
 <?php
-               // Loop through options
-               foreach ($NOTIFICATION_HANDLERS as $k => $v) 
-               {       
+       // Loop through options
+       foreach ($NOTIFICATION_HANDLERS as $k => $v) {
 ?>
-                       <tr>
-                               <td><?php echo elgg_echo($k); ?>: </td>
+               <tr>
+                       <td><?php echo elgg_echo($k); ?>: </td>
 
-                               <td>
+                       <td>
 <?php
 
        if ($notification_settings->$k) {
        }
        echo elgg_view('input/radio',array('internalname' => "method[{$k}]", 'options' => array(elgg_echo('option:yes') => 'yes',elgg_echo('option:no') => 'no'), 'value' => $val));
 
-?>                             
-                               </td>
-                       </tr>
+?>
+                       </td>
+               </tr>
 <?php
-               }
+       }
 ?>
-       </table>
\ No newline at end of file
+</table>
\ No newline at end of file
index 10ac062d1ec66a6c96cfbe0d2023f232e8d01f09..3ace73d7f2db2693c718ba603f608f5ece8fe0e0 100644 (file)
@@ -1,57 +1,59 @@
 <?php
-       /**
-        * ElggEntity default view.
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
-       if ($vars['full']) {
-               echo elgg_view('export/entity', $vars);
-       } else {
-               
-               $icon = elgg_view(
-                               'graphics/icon', array(
-                               'entity' => $vars['entity'],
-                               'size' => 'small',
-                       )
-               );
-               
-               
-               $title = $vars['entity']->title;
-               if (!$title) $title = $vars['entity']->name;
-               if (!$title) $title = get_class($vars['entity']);
-                       
-               $controls = "";
-               if ($vars['entity']->canEdit())
-               {
-                       $controls .= " (<a href=\"{$vars['url']}action/entities/delete?guid={$vars['entity']->guid}\">" . elgg_echo('delete') . "</a>)";
-               }
-               
-               $info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $title . "</a></b> $controls </p></div>";
-               
-               if (get_input('search_viewtype') == "gallery") {
-                       
-                       $icon = "";
-                       
-               } 
-               
-               $owner = $vars['entity']->getOwnerEntity();
-               $ownertxt = elgg_echo('unknown');
-               if ($owner)
-                       $ownertxt = "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>";
-               
-               $info .= "<div>".sprintf(elgg_echo("entity:default:strapline"),
-                                               friendly_time($vars['entity']->time_created),
-                                               $ownertxt
-               );
-               
-               $info .= "</div>";
-               
-               $info = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$info</span>";
-               $icon = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$icon</span>";
-       
-               echo elgg_view_listing($icon, $info);
+/**
+ * ElggEntity default view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+if ($vars['full']) {
+       echo elgg_view('export/entity', $vars);
+} else {
+
+       $icon = elgg_view(
+                       'graphics/icon', array(
+                       'entity' => $vars['entity'],
+                       'size' => 'small',
+               )
+       );
+
+
+       $title = $vars['entity']->title;
+       if (!$title) {
+               $title = $vars['entity']->name;
+       }
+       if (!$title) {
+               $title = get_class($vars['entity']);
+       }
+
+       $controls = "";
+       if ($vars['entity']->canEdit()) {
+               $controls .= " (<a href=\"{$vars['url']}action/entities/delete?guid={$vars['entity']->guid}\">" . elgg_echo('delete') . "</a>)";
+       }
+
+       $info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $title . "</a></b> $controls </p></div>";
+
+       if (get_input('search_viewtype') == "gallery") {
+               $icon = "";
+       }
+
+       $owner = $vars['entity']->getOwnerEntity();
+       $ownertxt = elgg_echo('unknown');
+       if ($owner) {
+               $ownertxt = "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>";
        }
+
+       $info .= "<div>".sprintf(elgg_echo("entity:default:strapline"),
+               friendly_time($vars['entity']->time_created),
+               $ownertxt
+       );
+
+       $info .= "</div>";
+
+       $info = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$info</span>";
+       $icon = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$icon</span>";
+
+       echo elgg_view_listing($icon, $info);
+}
\ No newline at end of file
index a27a2910f12ccf6c183c1188be2405b78a414416..2be9e1fa14933185e3b9859a4b77072eb42a38ab 100644 (file)
@@ -1,15 +1,15 @@
 <?php
-       /**
       * Elgg default object view.
       * This is a placeholder.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg default object view.
+ * This is a placeholder.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $entity = $vars['entity'];
+$entity = $vars['entity'];
 
 ?>
 <div>
index 5f9c5354cef2124dbad7b35f7e027587546e0098..411a9f8d8e75c21a15020452dc00dcd01a753b4a 100644 (file)
@@ -1,20 +1,19 @@
 <?php
-       /**
       * Elgg plugin
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg plugin
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $entity = $vars['entity'];
-       $plugin = $vars['plugin'];
-       $prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings
-       
-       $form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars);
-       $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>";
-       
+$entity = $vars['entity'];
+$plugin = $vars['plugin'];
+$prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings
+
+$form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars);
+$form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>";
 
 ?>
 <div>
index b49120e2e2d785249c2a8fafeab37bce5c4e7985..9dd2999cef4c7eddd075de3776774d3ae20acb01 100644 (file)
@@ -1,16 +1,11 @@
 <?php
-
-       /**
-        * Elgg default widget view
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-               echo elgg_view('widgets/wrapper',$vars);
-
-?>
\ No newline at end of file
+/**
+ * Elgg default widget view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+echo elgg_view('widgets/wrapper',$vars);
index 336129aede0e15412708ad4c340f7b7b64b3a57d..0a21eb74ce68144e5ec39498fb6e288ded6bdaa7 100644 (file)
@@ -1,24 +1,19 @@
 <?php
+/**
+ * Elgg calendar output
+ * Displays a calendar output field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ *
+ */
 
-       /**
-        * Elgg calendar output
-        * Displays a calendar output field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The current value, if any
-        * 
-        */
-
-    if (is_int($vars['value'])) {
-        echo date("F j, Y", $vars['value']);
-    } else {
-        echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
-    }
-
-?>
\ No newline at end of file
+if (is_int($vars['value'])) {
+       echo date("F j, Y", $vars['value']);
+} else {
+       echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
+}
\ No newline at end of file
index a93455e28df1ece6e7f34c56a1c0a9273fa5036d..537d996e02ccfabeaaaf40f9128f4690b0473c31 100644 (file)
@@ -1,19 +1,15 @@
 <?php
-
-       /**
-        * Elgg text output
-        * Displays some text that was input using a standard text field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['text'] The text to display
-        * 
-        */
-
-    echo elgg_view('output/tags',$vars);
-?>
\ No newline at end of file
+/**
+ * Elgg text output
+ * Displays some text that was input using a standard text field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+echo elgg_view('output/tags',$vars);
\ No newline at end of file
index bb7e866f2f0c99208f1c848080f9025c9153ff94..e0a6f65d7e50e9b69a752de732104e7c63a420be 100644 (file)
@@ -1,42 +1,39 @@
 <?php
+/**
+ * Elgg confirmation link
+ * A link that displays a confirmation dialog before it executes
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text of the link
+ * @uses $vars['href'] The address
+ * @uses $vars['confirm'] The dialog text
+ *
+ */
 
-       /**
-        * Elgg confirmation link
-        * A link that displays a confirmation dialog before it executes
-        * 
-        * @package Elgg
-        * @subpackage Core
+$confirm = $vars['confirm'];
+if (!$confirm) {
+       $confirm = elgg_echo('question:areyousure');
+}
 
-        * @author Curverider Ltd
+$link = $vars['href'];
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['text'] The text of the link
-        * @uses $vars['href'] The address
-        * @uses $vars['confirm'] The dialog text
-        * 
-        */
+if ($vars['is_action']) {
+       $ts = time();
+       $token = generate_action_token($ts);
 
-       $confirm = $vars['confirm'];
-       if (!$confirm)
-               $confirm = elgg_echo('question:areyousure');
-               
-       $link = $vars['href'];
-       
-       if ($vars['is_action'])
-       {
-               $ts = time();
-               $token = generate_action_token($ts);
-       
-       $sep = "?";
-               if (strpos($link, '?')>0) $sep = "&";
-               $link = "$link{$sep}__elgg_token=$token&__elgg_ts=$ts";
-       }
-       
-       if ($vars['class']) {
-               $class = 'class="' . $vars['class'] . '"';
-       } else {
-               $class = '';
-       }
+       $sep = "?";
+       if (strpos($link, '?')>0) $sep = "&";
+       $link = "$link{$sep}__elgg_token=$token&__elgg_ts=$ts";
+}
+
+if ($vars['class']) {
+       $class = 'class="' . $vars['class'] . '"';
+} else {
+       $class = '';
+}
 ?>
 <a href="<?php echo $link; ?>" <?php echo $class; ?> onclick="return confirm('<?php echo addslashes($confirm); ?>');"><?php echo htmlentities($vars['text'], ENT_QUOTES, 'UTF-8'); ?></a>
\ No newline at end of file
index d4fba97a0ea351225d3f608a4e8e6cc045089a8f..fdc8e3a1b236c9b341c2c8ce9ad0a1bbf65bd06e 100644 (file)
@@ -1,21 +1,17 @@
 <?php
+/**
+ * Date
+ * Displays a properly formatted date
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] A UNIX epoch timestamp
+ *
+ */
 
-       /**
-        * Date
-        * Displays a properly formatted date
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] A UNIX epoch timestamp
-        * 
-        */
-
-    if ($vars['value'] > 86400) {
-        echo date("F j, Y",$vars['value']);
-    }
-?>
\ No newline at end of file
+if ($vars['value'] > 86400) {
+       echo date("F j, Y",$vars['value']);
+}
\ No newline at end of file
index 2d454213fe692a5180a694d58ef246db03464a8c..e2142b09b161cd9d8cfe1c67fbf8e36321fa9fee 100644 (file)
@@ -1,21 +1,17 @@
 <?php
+/**
+ * Elgg email output
+ * Displays an email address that was entered using an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The email address to display
+ *
+ */
 
-       /**
-        * Elgg email output
-        * Displays an email address that was entered using an email input field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The email address to display
-        * 
-        */
-
-    if (!empty($vars['value'])) {
-       echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') ."</a>";
-    }
-?>
\ No newline at end of file
+if (!empty($vars['value'])) {
+       echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') ."</a>";
+}
\ No newline at end of file
index eb0cea0b4375c0eca905e87d4338c1b9ee48c749..e1a1e98c48f6189c92f5ba566544d2de91f07c76 100644 (file)
@@ -1,15 +1,15 @@
 <?php
-       /**
       * Display a page in an embedded window
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
-        * 
       * @uses $vars['value'] Source of the page
-        * 
       */
+/**
+ * Display a page in an embedded window
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] Source of the page
+ *
+ */
 ?>
 <iframe src="<?php echo $vars['value']; ?>">
 </iframe>
\ No newline at end of file
index 3d130359a4c2105b3de45a899f40bf886e56d4da..a8540913ff73d2ce0f326a1a6a5bdd5bcc96fac0 100644 (file)
@@ -1,21 +1,17 @@
 <?php
+/**
+ * Elgg display long text
+ * Displays a large amount of text, with new lines converted to line breaks
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
 
-       /**
-        * Elgg display long text
-        * Displays a large amount of text, with new lines converted to line breaks
-        * 
-        * @package Elgg
-        * @subpackage Core
+global $CONFIG;
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['text'] The text to display
-        * 
-        */
-
-       global $CONFIG;
-
-    echo autop(parse_urls(filter_tags($vars['value'])));
-?>
\ No newline at end of file
+echo autop(parse_urls(filter_tags($vars['value'])));
\ No newline at end of file
index 60b365b11328266434ede45cb5416492ac23e946..6e48043a9f06b8d78b62a7d1fed12792bebdb61e 100644 (file)
@@ -1,19 +1,15 @@
 <?php
-
-       /**
-        * Elgg pulldown display
-        * Displays a value that was entered into the system via a pulldown
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['text'] The text to display
-        * 
-        */
-
-    echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value'];
-?>
\ No newline at end of file
+/**
+ * Elgg pulldown display
+ * Displays a value that was entered into the system via a pulldown
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value'];
\ No newline at end of file
index 78723b5557e77b424bd8dd3cad493be94c3e16c8..b454bae71fb674afb39ed1b4e682b96cb12c7476 100644 (file)
@@ -1,19 +1,15 @@
 <?php
-
-       /**
-        * Elgg text output
-        * Displays some text that was input using a standard text field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['text'] The text to display
-        * 
-        */
-
-    echo elgg_view('output/text',$vars);
-?>
\ No newline at end of file
+/**
+ * Elgg text output
+ * Displays some text that was input using a standard text field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+echo elgg_view('output/text',$vars);
\ No newline at end of file
index 27d49b089df87086b9ab6156df2f84cbcb7bb856..a41ec20c37a5de76f440cc0e80845b5f650f75b8 100644 (file)
@@ -1,52 +1,50 @@
 <?php
+/**
+ * Elgg tagcloud
+ * Displays a tagcloud
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['tagcloud'] An array of stdClass objects with two elements: 'tag' (the text of the tag) and 'total' (the number of elements with this tag)
+ *
+ */
 
-       /**
-        * Elgg tagcloud
-        * Displays a tagcloud
-        * 
-        * @package Elgg
-        * @subpackage Core
+if (!empty($vars['subtype'])) {
+       $subtype = "&subtype=" . urlencode($vars['subtype']);
+} else {
+       $subtype = "";
+}
+if (!empty($vars['object'])) {
+       $object = "&object=" . urlencode($vars['object']);
+} else {
+       $object = "";
+}
 
-        * @author Curverider Ltd
+if (empty($vars['tagcloud']) && !empty($vars['value'])) {
+       $vars['tagcloud'] = $vars['value'];
+}
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['tagcloud'] An array of stdClass objects with two elements: 'tag' (the text of the tag) and 'total' (the number of elements with this tag) 
-        * 
-        */
-    
-       if (!empty($vars['subtype'])) {
-               $subtype = "&subtype=" . urlencode($vars['subtype']);
-       } else {
-               $subtype = "";
+if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
+       $counter = 0;
+       $cloud = "";
+       $max = 0;
+       foreach($vars['tagcloud'] as $tag) {
+               if ($tag->total > $max) {
+                       $max = $tag->total;
+               }
        }
-       if (!empty($vars['object'])) {
-               $object = "&object=" . urlencode($vars['object']);
-       } else {
-               $object = "";
+       foreach($vars['tagcloud'] as $tag) {
+               if (!empty($cloud)) {
+                       $cloud .= ", ";
+               }
+               $size = round((log($tag->total) / log($max)) * 100) + 30;
+               if ($size < 60) {
+                       $size = 60;
+               }
+               $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . $object . $subtype . "\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
        }
-       
-       if (empty($vars['tagcloud']) && !empty($vars['value']))
-               $vars['tagcloud'] = $vars['value'];
-
-    if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
-        
-        $counter = 0;
-        $cloud = "";
-        $max = 0;
-        foreach($vars['tagcloud'] as $tag) {
-               if ($tag->total > $max) {
-                       $max = $tag->total;
-               }
-        }
-        foreach($vars['tagcloud'] as $tag) {
-            if (!empty($cloud)) $cloud .= ", ";
-            $size = round((log($tag->total) / log($max)) * 100) + 30;
-            if ($size < 60) $size = 60;
-            $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . $object . $subtype . "\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
-        }
-        echo $cloud;
-
-    }
-     
-?>
\ No newline at end of file
+       echo $cloud;
+}
\ No newline at end of file
index 901fa806b19d49dcf37c97754e674143dd339633..f394d084f96914eee240186bcc58fc90a413e48e 100644 (file)
@@ -1,55 +1,52 @@
 <?php
+/**
+ * Elgg tags
+ * Displays a list of tags, separated by commas
+ *
+ * Tags can be a single string (for one tag) or an array of strings
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['tags'] The tags to display
+ * @uses $vars['tagtype'] The tagtype, optionally
+ */
 
-       /**
-        * Elgg tags
-        * Displays a list of tags, separated by commas
-        * 
-        * Tags can be a single string (for one tag) or an array of strings
-        * 
-        * @package Elgg
-        * @subpackage Core
+if (!empty($vars['subtype'])) {
+       $subtype = "&subtype=" . urlencode($vars['subtype']);
+} else {
+       $subtype = "";
+}
+if (!empty($vars['object'])) {
+       $object = "&object=" . urlencode($vars['object']);
+} else {
+       $object = "";
+}
 
-        * @author Curverider Ltd
+if (empty($vars['tags']) && !empty($vars['value'])) {
+       $vars['tags'] = $vars['value'];
+}
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['tags'] The tags to display
-        * @uses $vars['tagtype'] The tagtype, optionally
-        */
-
-       if (!empty($vars['subtype'])) {
-               $subtype = "&subtype=" . urlencode($vars['subtype']);
-       } else {
-               $subtype = "";
-       }
-       if (!empty($vars['object'])) {
-               $object = "&object=" . urlencode($vars['object']);
-       } else {
-               $object = "";
+if (!empty($vars['tags'])) {
+       $tagstr = "";
+       if (!is_array($vars['tags'])) {
+               $vars['tags'] = array($vars['tags']);
        }
 
-       if (empty($vars['tags']) && !empty($vars['value']))
-               $vars['tags'] = $vars['value'];
-    if (!empty($vars['tags'])) {
-        
-        $tagstr = "";
-        if (!is_array($vars['tags']))
-               $vars['tags'] = array($vars['tags']);
-
-        foreach($vars['tags'] as $tag) {
-            if (!empty($tagstr)) {
-                $tagstr .= ", ";
-            }
-           if (!empty($vars['type'])) {
-               $type = "&type={$vars['type']}";
-           } else {
-               $type = "";
-           }
-           if (is_string($tag)) { 
-               $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}tag/".urlencode($tag) . "{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
-           }
-        }
-         echo $tagstr;
-        
-    }
-?>
\ No newline at end of file
+       foreach($vars['tags'] as $tag) {
+               if (!empty($tagstr)) {
+                       $tagstr .= ", ";
+               }
+               if (!empty($vars['type'])) {
+                       $type = "&type={$vars['type']}";
+               } else {
+                       $type = "";
+               }
+               if (is_string($tag)) {
+                       $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}tag/".urlencode($tag) . "{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+               }
+       }
+       echo $tagstr;
+}
\ No newline at end of file
index 080b81d6805860c646bed53b21f6adb0d1ad8a80..bcfe33ea0cf6a500b147e1629000a6220a763a7e 100644 (file)
@@ -1,19 +1,15 @@
 <?php
-
-       /**
-        * Elgg text output
-        * Displays some text that was input using a standard text field
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['text'] The text to display
-        * 
-        */
-
-    echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value'];
-?>
\ No newline at end of file
+/**
+ * Elgg text output
+ * Displays some text that was input using a standard text field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value'];
\ No newline at end of file
index 7f72f0dce54a816cf97ab0622f0d4be2322ef924..190b08c21350d10cf18abb810f3c1ecdaed6ccde 100644 (file)
@@ -1,37 +1,33 @@
 <?php
+/**
+ * Elgg URL display
+ * Displays a URL as a link
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The URL to display
+ *
+ */
 
-       /**
-        * Elgg URL display
-        * Displays a URL as a link
-        * 
-        * @package Elgg
-        * @subpackage Core
+$val = trim($vars['value']);
+if (!empty($val)) {
+       if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) {
+               $val = "http://" . $val;
+       }
 
-        * @author Curverider Ltd
+       if ($vars['is_action']) {
+               $ts = time();
+               $token = generate_action_token($ts);
 
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['value'] The URL to display
-        * 
-        */
-
-    $val = trim($vars['value']);
-    if (!empty($val)) {
-           if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) {
-               $val = "http://" . $val;
-           }
-           
-           if ($vars['is_action'])
-               {
-                       $ts = time();
-                       $token = generate_action_token($ts);
-               
-               $sep = "?";
-                       if (strpos($val, '?')>0) $sep = "&";
-                       $val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts";
+               $sep = "?";
+               if (strpos($val, '?')>0) {
+                       $sep = "&";
                }
-           
-           echo "<a href=\"{$val}\" target=\"_blank\">". htmlentities($val, ENT_QUOTES, 'UTF-8'). "</a>";
-    }
+               $val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts";
+       }
 
-?>
\ No newline at end of file
+       echo "<a href=\"{$val}\" target=\"_blank\">". htmlentities($val, ENT_QUOTES, 'UTF-8'). "</a>";
+}
\ No newline at end of file