]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Standardized more files.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 16 Oct 2009 19:26:37 +0000 (19:26 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 16 Oct 2009 19:26:37 +0000 (19:26 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3554 36083f99-b078-4883-b0ff-0f9b5a30f544

46 files changed:
views/default/account/forms/forgotten_password.php
views/default/account/forms/login.php
views/default/account/forms/register.php
views/default/account/forms/useradd.php
views/default/admin/main.php
views/default/admin/main_opt/plugins.php
views/default/admin/main_opt/site.php
views/default/admin/main_opt/statistics.php
views/default/admin/main_opt/user.php
views/default/admin/plugins.php
views/default/admin/plugins_opt/plugin.php
views/default/admin/site.php
views/default/admin/statistics.php
views/default/admin/statistics_opt/basic.php
views/default/admin/statistics_opt/numentities.php
views/default/admin/statistics_opt/online.php
views/default/admin/user.php
views/default/admin/user_opt/adduser.php
views/default/admin/user_opt/search.php
views/default/ajax/loader.php
views/default/annotation/annotate.php
views/default/annotation/generic_comment.php
views/default/api/output.php
views/default/basic_elements/welcome.php
views/default/canvas/default.php
views/default/canvas/layouts/edit_layout.php
views/default/canvas/layouts/one_column.php
views/default/canvas/layouts/sidebar_boxes.php
views/default/canvas/layouts/two_column_left_sidebar.php
views/default/canvas/layouts/two_column_right_sidebar.php
views/default/canvas/layouts/widgets.php
views/default/canvas_header/submenu_group.php
views/default/canvas_header/submenu_template.php
views/default/comments/forms/edit.php
views/default/dashboard/blurb.php
views/default/export/entity.php
views/default/export/metadata.php
views/default/export/relationship.php
views/default/friends/collection.php
views/default/friends/collections.php
views/default/friends/collectiontabs.php
views/default/friends/forms/collectionfields.php
views/default/friends/forms/edit.php
views/default/friends/list.php
views/default/friends/picker.php
views/default/friends/river/create.php

index 1ab2bd42ef4a3368a204edc1529789fbbe08a2e1..5e760cef3abd4a7bf8ca4709b7507a6b27501bcc 100644 (file)
@@ -1,19 +1,19 @@
 <?php
-       /**
       * Elgg forgotten password.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg forgotten password.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $form_body = "<p>" . elgg_echo('user:password:text') . "</p>";
-       $form_body .= "<p><label>". elgg_echo('username') . " " . elgg_view('input/text', array('internalname' => 'username')) . "</label></p>";
-       $form_body .= elgg_view('input/captcha');
-       $form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>";
+$form_body = "<p>" . elgg_echo('user:password:text') . "</p>";
+$form_body .= "<p><label>". elgg_echo('username') . " " . elgg_view('input/text', array('internalname' => 'username')) . "</label></p>";
+$form_body .= elgg_view('input/captcha');
+$form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>";
 
 ?>
 <div class="contentWrapper">
-       <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/user/requestnewpassword", 'body' => $form_body)); ?>
+<?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/user/requestnewpassword", 'body' => $form_body)); ?>
 </div>
\ No newline at end of file
index 030375a19bb3358d567759af2094acec77567a3f..1894316989a6abcc8e91cafa39083e65218c0e6f 100644 (file)
@@ -1,37 +1,35 @@
 <?php
+/**
+ * Elgg login form
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-     /**
-        * Elgg login form
-        * 
-        * @package Elgg
-        * @subpackage Core
+global $CONFIG;
 
-        * @author Curverider Ltd
+$form_body = "<p class=\"loginbox\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label>";
+$form_body .= "<br />";
+$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />";
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>";
+$form_body .= "<p class=\"loginbox\">";
+$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
+$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
 
-        * @link http://elgg.org/
-        */
-        
-       global $CONFIG;
-       
-       $form_body = "<p class=\"loginbox\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label>";
-       $form_body .= "<br />";
-       $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />";
-       $form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>";
-       $form_body .= "<p class=\"loginbox\">";
-       $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
-       $form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";  
-               
-       $login_url = $vars['url'];
-       if ((isset($CONFIG->https_login)) && ($CONFIG->https_login))
-               $login_url = str_replace("http", "https", $vars['url']);
+$login_url = $vars['url'];
+if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+       $login_url = str_replace("http", "https", $vars['url']);
+}
 ?>
-       
-       <div id="login-box">
-       <h2><?php echo elgg_echo('login'); ?></h2>
-               <?php 
-                       echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
-               ?>      
-       </div>
-       <script type="text/javascript">
-               $(document).ready(function() { $('input[name=username]').focus(); });
-       </script>
\ No newline at end of file
+
+<div id="login-box">
+<h2><?php echo elgg_echo('login'); ?></h2>
+       <?php
+               echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
+       ?>
+</div>
+<script type="text/javascript">
+       $(document).ready(function() { $('input[name=username]').focus(); });
+</script>
\ No newline at end of file
index 8ceeaab8fa1ef955259c29bca17e9c7bb0a91b16..99fdea272253f8f0354739caed60c45203f18ce1 100644 (file)
@@ -1,45 +1,43 @@
 <?php
+/**
+ * Elgg register form
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-     /**
-        * Elgg register form
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-        
-       $username = get_input('u');
-       $email = get_input('e');
-       $name = get_input('n');
-
-       $admin_option = false;
-       if (($_SESSION['user']->admin) && ($vars['show_admin'])) 
-               $admin_option = true;
-               
-       $form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</label><br />";
-       
-       $form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</label><br />";
-       $form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</label><br />";
-       $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</label><br />";
-       $form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) . "</label><br />";
-       
-       // Add captcha hook
-       $form_body .= elgg_view('input/captcha');
-       
-       if ($admin_option)
-               $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
-       
-       $form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
-       $form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
-       $form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register'));
-       $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
+$username = get_input('u');
+$email = get_input('e');
+$name = get_input('n');
+
+$admin_option = false;
+if (($_SESSION['user']->admin) && ($vars['show_admin'])) {
+       $admin_option = true;
+}
+
+$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</label><br />";
+
+$form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</label><br />";
+$form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</label><br />";
+$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</label><br />";
+$form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) . "</label><br />";
+
+// Add captcha hook
+$form_body .= elgg_view('input/captcha');
+
+if ($admin_option) {
+       $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
+}
+
+$form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
+$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
+$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register'));
+$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
 ?>
 
-       
-       <div id="register-box">
-       <h2><?php echo elgg_echo('register'); ?></h2>
-       <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?>
-       </div>
\ No newline at end of file
+<div id="register-box">
+<h2><?php echo elgg_echo('register'); ?></h2>
+<?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?>
+</div>
\ No newline at end of file
index dac31a692991fba984e0e2051af492e701cbf110..09b4c4718a2be1ac2d084dae2ccf4a68dd971bbf 100644 (file)
@@ -1,32 +1,33 @@
 <?php
-       /**
-        * Elgg add user form. 
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg add user form.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $admin_option = false;
-       if (($_SESSION['user']->admin) && ($vars['show_admin'])) 
-               $admin_option = true;
-               
-       $form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</label></p>";
-       
-       $form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>";
-       $form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</label></p>";
-       $form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>";
-       $form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>";
-       
-       if ($admin_option)
-               $form_body .= "<p>" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
-       
-       $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
+$admin_option = false;
+if (($_SESSION['user']->admin) && ($vars['show_admin'])) {
+       $admin_option = true;
+}
+
+$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</label></p>";
+
+$form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>";
+
+if ($admin_option) {
+       $form_body .= "<p>" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
+}
+
+$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
 ?>
 
-       
-       <div id="add-box">
-       <h2><?php echo elgg_echo('adduser'); ?></h2>
-               <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/useradd", 'body' => $form_body)) ?>
-       </div>
\ No newline at end of file
+<div id="add-box">
+<h2><?php echo elgg_echo('adduser'); ?></h2>
+       <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/useradd", 'body' => $form_body)) ?>
+</div>
\ No newline at end of file
index 7922de906703ae983d4a072b6405e0fd3972a4dc..fc143244db001b7d19d48c443e03e5a770696a19 100644 (file)
@@ -1,19 +1,12 @@
 <?php
-
-       /**
-        * Elgg administration main screen
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-       // Description of what's going on 
-               echo "<p>" . elgg_view('output/longtext', array('value' => elgg_echo("admin:description"))) . "</p>";
-               
-       
-               
-?>
\ No newline at end of file
+/**
+ * Elgg administration main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+// Description of what's going on
+echo "<p>" . elgg_view('output/longtext', array('value' => elgg_echo("admin:description"))) . "</p>";
index 33467f7a27d0aad730613061aba7b2ef197cb5c0..b1e2f00784255a2bdf87bf198404fa840baa164d 100644 (file)
@@ -1,17 +1,17 @@
 <?php
-       /**
       * Elgg plugin sub-component on the main menu.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg plugin sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       global $CONFIG;
+global $CONFIG;
 ?>
 <div class="admin-menu-option">
        <h2><?php echo elgg_echo('admin:plugins'); ?> </h2>
        <p><?php echo elgg_echo('admin:plugins:opt:description'); ?><br />
-       <a href="<?php echo $CONFIG->wwwroot . "pg/admin/plugins/"; ?>"><?php echo elgg_echo('admin:plugins:opt:linktext'); ?></a></p> 
+       <a href="<?php echo $CONFIG->wwwroot . "pg/admin/plugins/"; ?>"><?php echo elgg_echo('admin:plugins:opt:linktext'); ?></a></p>
 </div>
\ No newline at end of file
index 0cfd9f70ca0d90c66caa7f4eddcb8f67c12f5939..7c34015ba6de411c489ec36eda027f863435cbdd 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-       /**
       * Elgg site sub-component on the main menu.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg site sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 <div class="admin-menu-option">
        <h2><?php echo elgg_echo('admin:site'); ?> </h2>
index b42825fa8714298f7a1fbb595f679ce8ca59744f..fec4c3f20d3704b03a0cba98595c45bba96bc31f 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-       /**
       * Elgg satistics sub-component on the main menu.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg satistics sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 <div class="admin-menu-option">
        <h2><?php echo elgg_echo('admin:statistics'); ?> </h2>
index 284bab255c3c92f7216ab2bb4c9c5e453c032f12..e82f976252f139d2384e62d1b8982620a51775c7 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-       /**
       * Elgg user sub-component on the main menu.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg user sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 <div class="admin-menu-option">
        <h2><?php echo elgg_echo('admin:user'); ?> </h2>
index e62943d462ada27d8f48257441eec30a6a40b244..f73530f44453c3640a16594b9d81849293964474 100644 (file)
@@ -1,55 +1,52 @@
 <?php
+/**
+ * Elgg administration plugin main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       /**
-        * Elgg administration plugin main screen
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
-               global $CONFIG;
-               
-               $ts = time();
-               $token = generate_action_token($ts);
-
-       // Description of what's going on
-               $buttons = " <a class='enableallplugins' href=\"{$CONFIG->url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')."</a>  <a class='disableallplugins' href=\"{$CONFIG->url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')."</a> ";
-               echo "<div class=\"contentWrapper\"><span class=\"contentIntro\">" . $buttons . elgg_view('output/longtext', array('value' => elgg_echo("admin:plugins:description"))) . "<div class='clearfloat'></div></span></div>";
-
-               $limit = get_input('limit', 10);
-               $offset = get_input('offset', 0);
-               
-               
-       // Get the installed plugins
-               $installed_plugins = $vars['installed_plugins'];
-               $count = count($installed_plugins);
-               
-               $plugin_list = get_plugin_list();
-               $max = 0;
-               foreach($plugin_list as $key => $foo)
-                       if ($key > $max) $max = $key;
-               
-       // Display list of plugins
-               $n = 0;
-               foreach ($installed_plugins as $plugin => $data)
-               {
-                       //if (($n>=$offset) && ($n < $offset+$limit))
-                               echo elgg_view("admin/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data, 'maxorder' => $max, 'order' => array_search($plugin, $plugin_list)));
-                       
-                       $n++;
-               }
-               
-       // Diplay nav
-       /*
-               if ($count) 
-               {
-                        echo elgg_view('navigation/pagination',array(
-                                                                                               'baseurl' => $_SERVER['REQUEST_URI'],
-                                                                                               'offset' => $offset,
-                                                                                               'count' => $count,
-                                                                                                               ));
-               }
-       */
-?>
+global $CONFIG;
+
+$ts = time();
+$token = generate_action_token($ts);
+
+// Description of what's going on
+$buttons = " <a class='enableallplugins' href=\"{$CONFIG->url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')."</a>  <a class='disableallplugins' href=\"{$CONFIG->url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')."</a> ";
+echo "<div class=\"contentWrapper\"><span class=\"contentIntro\">" . $buttons . elgg_view('output/longtext', array('value' => elgg_echo("admin:plugins:description"))) . "<div class='clearfloat'></div></span></div>";
+
+$limit = get_input('limit', 10);
+$offset = get_input('offset', 0);
+
+// Get the installed plugins
+$installed_plugins = $vars['installed_plugins'];
+$count = count($installed_plugins);
+
+$plugin_list = get_plugin_list();
+$max = 0;
+foreach($plugin_list as $key => $foo) {
+       if ($key > $max) $max = $key;
+}
+
+// Display list of plugins
+$n = 0;
+foreach ($installed_plugins as $plugin => $data) {
+       //if (($n>=$offset) && ($n < $offset+$limit))
+               echo elgg_view("admin/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data, 'maxorder' => $max, 'order' => array_search($plugin, $plugin_list)));
+
+       $n++;
+}
+
+// Diplay nav
+/*
+if ($count)
+{
+       echo elgg_view('navigation/pagination',array(
+                                                                               'baseurl' => $_SERVER['REQUEST_URI'],
+                                                                               'offset' => $offset,
+                                                                               'count' => $count,
+                                                                                               ));
+}
+*/
\ No newline at end of file
index 8a7850ed6ab97a9cfcd8c072ea22ca938ecc64ca..33718f2acdb944263203978c0b4d769ea4d5ebb5 100644 (file)
@@ -1,42 +1,41 @@
 <?php
-       /**
-        * Elgg plugin manifest class
-        * 
-        * This file renders a plugin for the admin screen, including active/deactive, manifest details & display plugin
-        * settings.
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
-
-       $plugin = $vars['plugin'];
-       $details = $vars['details'];
-       
-       $active = $details['active'];
-       $manifest = $details['manifest'];
-       
-       // Check elgg version if available
-       $version_check_valid = false;
-       if ($manifest['elgg_version'])
-               $version_check_valid = check_plugin_compatibility($manifest['elgg_version']);
-       
-       
-       $ts = time();
-       $token = generate_action_token($ts);
+/**
+ * Elgg plugin manifest class
+ *
+ * This file renders a plugin for the admin screen, including active/deactive, manifest details & display plugin
+ * settings.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$plugin = $vars['plugin'];
+$details = $vars['details'];
+
+$active = $details['active'];
+$manifest = $details['manifest'];
+
+// Check elgg version if available
+$version_check_valid = false;
+if ($manifest['elgg_version']) {
+       $version_check_valid = check_plugin_compatibility($manifest['elgg_version']);
+}
+
+$ts = time();
+$token = generate_action_token($ts);
 ?>
 <div class="plugin_details <?php if ($active) echo "active"; else echo "not-active" ?>">
        <div class="admin_plugin_reorder">
-               <?php
+<?php
                        if ($vars['order'] > 10) {
 ?>
                        <a href="<?php echo $vars['url']; ?>action/admin/plugins/reorder?plugin=<?php echo $plugin; ?>&order=1&__elgg_token=<?php echo $token; ?>&__elgg_ts=<?php echo $ts; ?>"><?php echo elgg_echo("top"); ?></a>
                        <a href="<?php echo $vars['url']; ?>action/admin/plugins/reorder?plugin=<?php echo $plugin; ?>&order=<?php echo $vars['order'] - 11; ?>&__elgg_token=<?php echo $token; ?>&__elgg_ts=<?php echo $ts; ?>"><?php echo elgg_echo("up"); ?></a>
 <?php
                        }
-               ?> 
+               ?>
                <?php
                        if ($vars['order'] < $vars['maxorder']) {
 ?>
@@ -44,7 +43,7 @@
                        <a href="<?php echo $vars['url']; ?>action/admin/plugins/reorder?plugin=<?php echo $plugin; ?>&order=<?php echo $vars['maxorder'] + 11; ?>&__elgg_token=<?php echo $token; ?>&__elgg_ts=<?php echo $ts; ?>"><?php echo elgg_echo("bottom"); ?></a>
 <?php
                        }
-               ?> 
+               ?>
        </div><div class="clearfloat"></div>
        <div class="admin_plugin_enable_disable">
                <?php if ($active) { ?>
@@ -55,7 +54,7 @@
        </div>
 
        <h3><?php echo $plugin; ?><?php if (elgg_view("settings/{$plugin}/edit")) { ?> <a class="pluginsettings_link">[<?php echo elgg_echo('settings'); ?>]</a><?php } ?></h3>
-       
+
        <?php if (elgg_view("settings/{$plugin}/edit")) { ?>
        <div class="pluginsettings">
                        <div id="<?php echo $plugin; ?>_settings">
                        </div>
        </div>
        <?php } ?>
-       
+
        <?php
 
                if ($manifest) {
-       
+
        ?>
                <div class="plugin_description"><?php echo elgg_view('output/longtext',array('value' => $manifest['description'])); ?></div>
        <?php
 
                }
-       
+
        ?>
-       
+
        <p><a class="manifest_details"><?php echo elgg_echo("admin:plugins:label:moreinfo"); ?></a></p>
 
        <div class="manifest_file">
-       
+
        <?php if ($manifest) { ?>
                <?php if ((!$version_check_valid) || (!isset($manifest['elgg_version']))) { ?>
                <div id="version_check">
-                       <?php 
+                       <?php
                                if (!isset($manifest['elgg_version']))
                                        echo elgg_echo('admin:plugins:warning:elggversionunknown');
                                else
@@ -99,5 +98,5 @@
        <?php } ?>
 
        </div>
-       
+
 </div>
\ No newline at end of file
index 077ce3bf36b865b6745339d1bc686b7b9e1d9498..67cfca5a119f2f4c3ff3e5e0d736ac04a8d3a4f1 100644 (file)
@@ -1,20 +1,18 @@
 <?php
+/**
+ * Elgg administration site main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       /**
-        * Elgg administration site main screen
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
+global $CONFIG;
 
-       global $CONFIG;
-       
-       // Description of what's going on
-               echo "<div class=\"contentWrapper\">" . elgg_view('output/longtext', array('value' => elgg_echo("admin:site:description"))) . " ";
-       
-               echo elgg_view("settings/system",array("action" => $CONFIG->wwwroot."action/admin/site/update_basic")); // Always want to do this first.
-               
-               echo "</div>";
-?>
\ No newline at end of file
+// Description of what's going on
+echo "<div class=\"contentWrapper\">" . elgg_view('output/longtext', array('value' => elgg_echo("admin:site:description"))) . " ";
+
+echo elgg_view("settings/system",array("action" => $CONFIG->wwwroot."action/admin/site/update_basic")); // Always want to do this first.
+
+echo "</div>";
\ No newline at end of file
index 4e0f7c3b1eb9a54c43a1316a94fcad35c305355f..7c987a6077817944fa8b53d0fc7d4469d8bdee1f 100644 (file)
@@ -1,15 +1,11 @@
 <?php
-       /**
-        * Elgg statistics screen
-        * 
-        * @package Elgg
-        * @subpackage Core
+/**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-       global $CONFIG;
-                
-?>
\ No newline at end of file
+global $CONFIG;
\ No newline at end of file
index aa6b48edfeff0796d1285efde1337eab32129d6b..eed94c76be6e938b696639b8490b7296f0effd46 100644 (file)
@@ -1,36 +1,35 @@
 <?php
-       /**
-        * Elgg statistics screen
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
+/**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+// Work out number of users
+$users_stats = get_number_users();
+$total_users = get_number_users(true);
+
+global $CONFIG;
+
+// Get version information
+$version = get_version();
+$release = get_version(true);
 
-       // Work out number of users
-       $users_stats = get_number_users();
-       $total_users = get_number_users(true);
-       
-       
-       global $CONFIG;
-       
-       // Get version information
-       $version = get_version();
-       $release = get_version(true);
-       
 ?>
 <div class="admin_statistics">
-    <h3><?php echo elgg_echo('admin:statistics:label:basic'); ?></h3>
-    <table>
-       <tr class="odd">
-            <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:version'); ?> :</b></td>
-            <td><?php echo elgg_echo('admin:statistics:label:version:release'); ?> - <?php echo $release; ?>, <?php echo elgg_echo('admin:statistics:label:version:version'); ?> - <?php echo $version; ?></td>
-        </tr>
-        <tr class="even">
-            <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td>
-            <td><?php echo $users_stats; ?> <?php echo elgg_echo('active'); ?> / <?php echo $total_users; ?> <?php echo elgg_echo('total') ?></td>
-        </tr>
+       <h3><?php echo elgg_echo('admin:statistics:label:basic'); ?></h3>
+       <table>
+               <tr class="odd">
+                       <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:version'); ?> :</b></td>
+                       <td><?php echo elgg_echo('admin:statistics:label:version:release'); ?> - <?php echo $release; ?>, <?php echo elgg_echo('admin:statistics:label:version:version'); ?> - <?php echo $version; ?></td>
+               </tr>
+               <tr class="even">
+                       <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td>
+                       <td><?php echo $users_stats; ?> <?php echo elgg_echo('active'); ?> / <?php echo $total_users; ?> <?php echo elgg_echo('total') ?></td>
+               </tr>
 
-    </table> 
-</div>  
\ No newline at end of file
+       </table>
+</div>
\ No newline at end of file
index b48b863193537f3ed2778a4f4ff6733de8b063ea..9f67512e17a47fa0606f1c6205bcc13502aed96b 100644 (file)
@@ -1,55 +1,51 @@
 <?php
-       /**
-        * Elgg statistics screen
-        * 
-        * @package Elgg
-        * @subpackage Core
+/**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-       
-       // Get entity statistics
-       $entity_stats = get_entity_statistics();
-       $even_odd = "";
+// Get entity statistics
+$entity_stats = get_entity_statistics();
+$even_odd = "";
 ?>
 <div class="admin_statistics">
-    <h3><?php echo elgg_echo('admin:statistics:label:numentities'); ?></h3>
-    <table>
-        <?php
-            foreach ($entity_stats as $k => $entry)
-            {
-               arsort($entry);
-                foreach ($entry as $a => $b)
-                {
-                    
-                    //This function controls the alternating class
-                       $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+       <h3><?php echo elgg_echo('admin:statistics:label:numentities'); ?></h3>
+       <table>
+               <?php
+                       foreach ($entity_stats as $k => $entry) {
+                               arsort($entry);
+                               foreach ($entry as $a => $b) {
+
+                                       //This function controls the alternating class
+                                       $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+
+                                       if ($a == "__base__") {
+                                               $a = elgg_echo("item:{$k}");
+                                               if (empty($a))
+                                                       $a = $k;
+                                       } else {
+                                                       if (empty($a)) {
+                                                               $a = elgg_echo("item:{$k}");
+                                                       } else {
+                                                               $a = elgg_echo("item:{$k}:{$a}");
+                                                       }
 
-                    if ($a == "__base__") {
-                       $a = elgg_echo("item:{$k}");
-                       if (empty($a)) 
-                               $a = $k;
-                    }
-                    else {
-                               if (empty($a))
-                                       $a = elgg_echo("item:{$k}");
-                               else
-                                               $a = elgg_echo("item:{$k}:{$a}");
-                               if (empty($a)) {
+                                                       if (empty($a)) {
                                                                $a = "$k $a";
-                               }
-                         }
-                    echo <<< END
-                        <tr class="{$even_odd}">
-                            <td class="column_one">{$a}:</td>
-                            <td>{$b}</td>
-                        </tr>
+                                                       }
+                                               }
+                                       echo <<< END
+                                               <tr class="{$even_odd}">
+                                                       <td class="column_one">{$a}:</td>
+                                                       <td>{$b}</td>
+                                               </tr>
 END;
-                }
-            }
-        ?>
-    </table>
+                               }
+                       }
+               ?>
+       </table>
 </div>
\ No newline at end of file
index 7b82ae0852a821d8272c91a6be0e05642ffe0953..70a2979c14e1f002a515faf597a5cb3d8237e956 100644 (file)
@@ -1,22 +1,20 @@
 <?php
-       /**
-        * Elgg statistics screen
-        * 
-        * @package Elgg
-        * @subpackage Core
+/**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-       // users online
-       get_context('search');
-       $users_online = get_online_users();
-       get_context('admin');
+// users online
+get_context('search');
+$users_online = get_online_users();
+get_context('admin');
 ?>
 
 <div class="admin_users_online">
-    <h3><?php echo elgg_echo('admin:statistics:label:onlineusers'); ?></h3>
-    <?php echo $users_online; ?>
+       <h3><?php echo elgg_echo('admin:statistics:label:onlineusers'); ?></h3>
+       <?php echo $users_online; ?>
 </div>
index afd4bdd51a20cc59684252b24b4e86aa9a36184c..409afbe88270e411a2098c556836920caf6d7d83 100644 (file)
@@ -1,21 +1,20 @@
 <?php
+/**
+ * Elgg administration user main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       /**
-        * Elgg administration user main screen
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
+// Description of what's going on
+echo "<div class=\"contentWrapper\"><span class=\"contentIntro\">" . elgg_view('output/longtext', array('value' => elgg_echo("admin:user:description"))) . "</span></div>";
 
-       // Description of what's going on
-               echo "<div class=\"contentWrapper\"><span class=\"contentIntro\">" . elgg_view('output/longtext', array('value' => elgg_echo("admin:user:description"))) . "</span></div>";
-       
-               echo elgg_view("admin/user_opt/adduser");
-               
-               echo elgg_view("admin/user_opt/search");
-               
-               if ($vars['list']) echo $vars['list'];
-               
-?>
\ No newline at end of file
+echo elgg_view("admin/user_opt/adduser");
+
+echo elgg_view("admin/user_opt/search");
+
+if ($vars['list']) {
+       echo $vars['list'];
+}
\ No newline at end of file
index 146a7bfa79a0ad52202d9c701ac21e672f4f8a48..759678bc11f5ecfae09d87da5243e4c76631d0c8 100644 (file)
@@ -1,13 +1,13 @@
 <?php
-       /**
       * Add a user.
       * Form to add a new user.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Add a user.
+ * Form to add a new user.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 
 <div class="admin_adduser_link">
index b7518bcd5b9aef06c1311ecb25ee0526ba6b8d81..80838a753e843b1edebc99fd6f57bb18be3e355b 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-       /**
       * Elgg user search box.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg user search box.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 <div id="search-box">
        <form action="<?php echo $vars['url']; ?>search/" method="get">
        <?php
 
                echo elgg_view('input/text',array('internalname' => 'tag'));
-       
+
        ?>
        <input type="hidden" name="object" value="user" />
-       <input type="submit" name="<?php echo elgg_echo('admin:user:label:seachbutton'); ?>" 
+       <input type="submit" name="<?php echo elgg_echo('admin:user:label:seachbutton'); ?>"
                value="<?php echo elgg_echo('admin:user:label:seachbutton'); ?>" />
-       </form> 
+       </form>
 </div>
index 430170aab6fb7c6b9ea30777240a8ac92476c220..7942ba4706221604ff2db5adeffbee72abee4fd7 100644 (file)
@@ -1,29 +1,24 @@
 <?php
+/**
+ * Elgg AJAX loader
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       /**
-        * Elgg AJAX loader
-        * 
-        * @package Elgg
-        * @subpackage Core
+$loader = <<< END
 
-        * @author Curverider Ltd
+<div align="center" class="ajax_loader"></div>
 
-        * @link http://elgg.org/
-        */
-
-       $loader = <<< END
-       
-       <div align="center" class="ajax_loader"></div>
-       
 END;
 
-       $loader = str_replace("\n","",$loader);
-       $loader = str_replace("\r","",$loader);
+$loader = str_replace("\n","",$loader);
+$loader = str_replace("\r","",$loader);
+
+if (isset($vars['slashes']) && $vars['slashes'] == true) {
+       $loader = addslashes($loader);
+}
 
-       if (isset($vars['slashes']) && $vars['slashes'] == true) {
-               $loader = addslashes($loader);
-       }
-       
-       echo $loader;
-               
-?>
\ No newline at end of file
+echo $loader;
\ No newline at end of file
index d2869536a07c73c550b33082a1b3e76dce335d1f..b4e68c9b2e0f0e46f3523d5a9723ae8439636104 100644 (file)
@@ -1,27 +1,36 @@
 <?php
+/**
+ * Elgg AJAX loader
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-       $object = get_entity($vars['item']->object_guid);
-       $url = $object->getURL();
-       $title = $object->title;
-       if(!$title)
-               $title = 'Untitled';
-       $subtype = get_subtype_from_id($object->subtype);
-       //grab the annotation, if one exists
-       if($vars['item']->annotation_id != 0)
-               $comment = get_annotation($vars['item']->annotation_id)->value; 
-       $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
-       $string = sprintf(elgg_echo("river:posted:generic"),$url) . " ";
-       $string .= elgg_echo("{$subtype}:river:annotate") . " | <a href=\"{$object->getURL()}\">" . $title . "</a>";
-       $string .= "<div class=\"river_content_display\">";
-       if($comment){
-               $contents = strip_tags($comment);//this is so we don't get large images etc in the activity river
-               if(strlen($contents) > 200)
-                       $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
-           else
-                   $string .= $contents;
-    }
-       $string .= "</div>";
-?>
+$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+$object = get_entity($vars['item']->object_guid);
+$url = $object->getURL();
+$title = $object->title;
+if(!$title) {
+       $title = 'Untitled';
+}
+$subtype = get_subtype_from_id($object->subtype);
+//grab the annotation, if one exists
+if($vars['item']->annotation_id != 0) {
+       $comment = get_annotation($vars['item']->annotation_id)->value;
+}
+$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+$string = sprintf(elgg_echo("river:posted:generic"),$url) . " ";
+$string .= elgg_echo("{$subtype}:river:annotate") . " | <a href=\"{$object->getURL()}\">" . $title . "</a>";
+$string .= "<div class=\"river_content_display\">";
+if($comment){
+       $contents = strip_tags($comment);//this is so we don't get large images etc in the activity river
+       if(strlen($contents) > 200) {
+                       $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+       } else {
+               $string .= $contents;
+       }
+$string .= "</div>";
 
-<?php echo $string; ?>
\ No newline at end of file
+echo $string;
\ No newline at end of file
index 1ecf7ad8e46f9b565afa187052cb150b0664cd40..ca0f69eaf1f7675c8f605a5e2eb067b4d0510b8e 100644 (file)
@@ -1,61 +1,58 @@
 <?php
-
-       /**
-        * Elgg generic comment
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        */
-
-       $owner = get_user($vars['annotation']->owner_guid);
+/**
+ * Elgg generic comment
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+$owner = get_user($vars['annotation']->owner_guid);
 
 ?>
-
-
-       <div class="generic_comment"><!-- start of generic_comment div -->
-           
-               <div class="generic_comment_icon">              
-               <?php
-                       echo elgg_view("profile/icon",
-                                               array(
-                                                       'entity' => $owner, 
-                                                       'size' => 'small'));
-               ?>
-               </div>
-               <div class="generic_comment_details">
-               
-                   <!-- output the actual comment -->
-                   <?php echo elgg_view("output/longtext",array("value" => $vars['annotation']->value)); ?>
-                   
-                   <p class="generic_comment_owner">
-               <a href="<?php echo $owner->getURL(); ?>"><?php echo $owner->name; ?></a> <?php echo friendly_time($vars['annotation']->time_created); ?>
-               </p>
-                   
-                   <?php
-                
-                       // if the user looking at the comment can edit, show the delete link
-                           if ($vars['annotation']->canEdit()) {
-                           
-            ?>
-                   <p>
-                       <?php
-
-                               echo elgg_view("output/confirmlink",array(
-                                                                                                               'href' => $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id,
-                                                                                                               'text' => elgg_echo('delete'),
-                                                                                                               'confirm' => elgg_echo('deleteconfirm'),
-                                                                                                       ));
-               
-                       ?>
-                   </p>
-               
-            <?php
-                           } //end of can edit if statement
-                   ?>
-               </div><!-- end of generic_comment_details -->
-       </div><!-- end of generic_comment div -->
\ No newline at end of file
+<div class="generic_comment"><!-- start of generic_comment div -->
+
+       <div class="generic_comment_icon">
+               <?php
+                       echo elgg_view("profile/icon",
+                               array(
+                                       'entity' => $owner,
+                                       'size' => 'small'
+                               )
+                       );
+               ?>
+       </div>
+       <div class="generic_comment_details">
+
+               <!-- output the actual comment -->
+               <?php echo elgg_view("output/longtext",array("value" => $vars['annotation']->value)); ?>
+
+               <p class="generic_comment_owner">
+                       <a href="<?php echo $owner->getURL(); ?>"><?php echo $owner->name; ?></a> <?php echo friendly_time($vars['annotation']->time_created); ?>
+               </p>
+
+               <?php
+
+                       // if the user looking at the comment can edit, show the delete link
+                       if ($vars['annotation']->canEdit()) {
+
+                       ?>
+               <p>
+                       <?php
+
+                               echo elgg_view("output/confirmlink",array(
+                                       'href' => $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id,
+                                       'text' => elgg_echo('delete'),
+                                       'confirm' => elgg_echo('deleteconfirm'),
+                               ));
+
+                       ?>
+               </p>
+
+                       <?php
+                       } //end of can edit if statement
+               ?>
+       </div><!-- end of generic_comment_details -->
+</div><!-- end of generic_comment div -->
\ No newline at end of file
index 112b09e64d626c02d0b7ec855e74f99c5a507e45..57b8461ea2fc3eded8b764a8631fb7212bddcff2 100644 (file)
@@ -1,18 +1,18 @@
 <?php
-       /**
-        * Elgg API default output
-        * This outputs the api in a human readable way.
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        */
+/**
+ * Elgg API default output
+ * This outputs the api in a human readable way.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+$result = $vars['result'];
+$export = $result->export();
 
-       $result = $vars['result'];
-       $export = $result->export();
-       
 ?>
 <div id="api_result">
        <table width="100%">
                                        echo "**** ERROR ({$export->status}) ****";
                        ?>
                </td></tr>
-               
+
                <?php if ($export->message!="") { ?>
                <tr><td width="100" valign="top"><b>Message:</b></td> <td><?php echo $export->message; ?></td></tr>
                <?php } ?>
                <?php if ($export->result) { ?>
                <tr><td width="100" valign="top"><b>Result:</b></td> <td><pre><?php print_r($export->result); ?></pre></td></tr>
                <?php } ?>
-               
-               
+
+
                <?php if ($export->pam) { ?>
                <tr><td width="100" valign="top"><b>PAM:</b></td> <td><pre><?php print_r($export->pam); ?></pre></td></tr>
                <?php } ?>
-               
+
                <?php if ($export->runtime_errors) { ?>
                <tr><td width="100" valign="top"><b>Runtime:</b></td> <td><pre><?php print_r($export->runtime_errors); ?></pre></td></tr>
                <?php } ?>
index 1a37a464e7da077ce7d59f217fca4d0e4cd4dae9..297daa830a830353c62ce62c6c5c094f4a3a14b2 100644 (file)
@@ -1,18 +1,15 @@
 <?php
+/**
+ * Elgg sample welcome page
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-    /**
-        * Elgg sample welcome page
-        * 
-        * @package Elgg
-        * @subpackage Core
+$user = $vars['name'];
 
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-        
-        $user = $vars['name'];
-        
 ?>
 
 <p><?php echo sprintf(elgg_echo('welcome:user'), $user); ?></p>
index a5c30fe52b4c1699d72027ffd40841be270724aa..0cfa8b49a01a1f8a232c1f66ababb2389ccdb1ea 100644 (file)
@@ -1,21 +1,15 @@
 <?php
-
-       /**
-        * Elgg default layout
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-       for ($i = 1; $i < 8; $i++) {
-               
-               if (isset($vars["area{$i}"]))
-                       echo $vars["area{$i}"];
-               
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+for ($i = 1; $i < 8; $i++) {
+       if (isset($vars["area{$i}"])) {
+               echo $vars["area{$i}"];
        }
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
index b43ff4255dfcf693af827ecbcce35c0acc269998..0d2997965743a7cb1a5fff79157536cf85b54368 100644 (file)
@@ -1,16 +1,12 @@
 <?php
-
-       /**
-        * Elgg 2 column right sidebar canvas layout
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
+/**
+ * Elgg 2 column right sidebar canvas layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 
 <div id="blog_edit_page">
index bb5681f4cd1ed5ae89ded27721ea6321ed4161a2..c71c2def675a62200b4150548bd0cdae7ccd3879 100644 (file)
@@ -1,14 +1,12 @@
 <?php
-
-       /**
-        * Elgg one-column layout
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
+/**
+ * Elgg one-column layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 
 <!-- main content -->
@@ -16,4 +14,4 @@
 
 <?php echo $vars['area1']; ?>
 
-</div><!-- /one_column -->     
\ No newline at end of file
+</div><!-- /one_column -->
\ No newline at end of file
index f6ae93a2ca184f37a9a273f91a6ebda4c952724d..d639901c052db94db6a1c1eb8a6d06e399095d8d 100644 (file)
@@ -1,23 +1,19 @@
 <?php
-
-       /**
-        * Elgg 2 column left sidebar with boxes
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
+/**
+ * Elgg 2 column left sidebar with boxes
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 
 <!-- left sidebar -->
 <div id="two_column_left_sidebar_boxes">
 
-     <?php if (isset($vars['area1'])) echo $vars['area1']; ?>
-        <?php if (isset($vars['area3'])) echo $vars['area3']; ?>
+       <?php if (isset($vars['area1'])) echo $vars['area1']; ?>
+       <?php if (isset($vars['area3'])) echo $vars['area3']; ?>
 
 </div><!-- /two_column_left_sidebar -->
 
index 4be8939bbe0c8b8d40f8d9fdbac52f937b045a3a..40eb77b1abdf4afa0f69772efae1d68b7ab30f80 100644 (file)
@@ -1,25 +1,23 @@
 <?php
-
-       /**
-        * Elgg 2 column left sidebar canvas layout
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
+/**
+ * Elgg 2 column left sidebar canvas layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 <!-- left sidebar -->
 <div id="two_column_left_sidebar">
 
-    <?php
+       <?php
+
+               echo elgg_view('page_elements/owner_block',array('content' => $vars['area1']));
 
-       echo elgg_view('page_elements/owner_block',array('content' => $vars['area1']));
-    
-    ?>
+       ?>
 
-    <?php if (isset($vars['area3'])) echo $vars['area3']; ?>
+       <?php if (isset($vars['area3'])) echo $vars['area3']; ?>
 
 </div><!-- /two_column_left_sidebar -->
 
index ab38e6529130927ec7ffcdab1138480d22e7ab84..feaa993b529e8a2e157f8c89a99478affe6c68be 100644 (file)
@@ -1,22 +1,20 @@
 <?php
-
-       /**
-        * Elgg 2 column right sidebar canvas layout
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
+/**
+ * Elgg 2 column right sidebar canvas layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 ?>
 <!-- main content -->
 <div id="two_column_right_sidebar_maincontent">
 
 <?php
 
-       echo elgg_view('page_elements/owner_block',array('content' => $vars['area1']));
-       if (isset($vars['area2'])) echo $vars['area2']; ?>
+echo elgg_view('page_elements/owner_block',array('content' => $vars['area1']));
+if (isset($vars['area2'])) echo $vars['area2']; ?>
 
 </div><!-- /two_column_right_sidebar_maincontent -->
 
@@ -25,5 +23,4 @@
 
 <?php if (isset($vars['area1'])) echo $vars['area1']; ?>
 
-</div><!-- /two_column_right_sidebar -->
-
+</div><!-- /two_column_right_sidebar -->
\ No newline at end of file
index 04df22bf96ccf96511da69857be3b49e36dadc23..f6c9dec79e149f740e93093bd3e82087981f66f8 100644 (file)
@@ -1,32 +1,33 @@
 <?php
 
-       /**
-        * Elgg widget layout
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        */
-
-               $widgettypes = get_widget_types();
-
-               $owner = page_owner_entity();
-               
-               $area1widgets = get_widgets(page_owner(),get_context(),1);
-               $area2widgets = get_widgets(page_owner(),get_context(),2);
-               $area3widgets = get_widgets(page_owner(),get_context(),3);
-               
-               if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
-                       
-                       if (isset($vars['area3'])) $vars['area1'] = $vars['area3'];
-                       if (isset($vars['area4'])) $vars['area2'] = $vars['area4'];
-                       
-               }
-               
-               if (is_array($widgettypes) && sizeof($widgettypes) > 0 && $owner && $owner->canEdit()) {
+/**
+ * Elgg widget layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$widgettypes = get_widget_types();
+
+$owner = page_owner_entity();
+
+$area1widgets = get_widgets(page_owner(),get_context(),1);
+$area2widgets = get_widgets(page_owner(),get_context(),2);
+$area3widgets = get_widgets(page_owner(),get_context(),3);
+
+if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
+       if (isset($vars['area3'])) {
+               $vars['area1'] = $vars['area3'];
+       }
+       if (isset($vars['area4'])) {
+               $vars['area2'] = $vars['area4'];
+       }
+}
+
+if (is_array($widgettypes) && sizeof($widgettypes) > 0 && $owner && $owner->canEdit()) {
 
-                       
 ?>
 
 <div id="customise_editpanel">
@@ -37,9 +38,7 @@
 
 
 <?php
-
        foreach($widgettypes as $handler => $widget) {
-
 ?>
 
 <table class="draggable_widget" cellspacing="0"><tr><td>
 <div id="customise_page_view">
 
 <table cellspacing="0">
-  <tr>
-    <td colspan="2" align="left" valign="top">
-    
-    <?php
-       if(get_context() == "profile"){ 
-    ?>
-               <h2 class="profile_box"><?php echo elgg_echo("widgets:profilebox"); ?></h2>
-               <div id="profile_box_widgets">
-               <p><small><?php echo elgg_echo('widgets:position:fixed'); ?></small></p>
-               </div>
-    <?php
-       } 
-    ?>
-    
-    </td>
-    
-    
-    <td rowspan="2" align="left" valign="top">
+<tr>
+       <td colspan="2" align="left" valign="top">
+
+       <?php
+       if(get_context() == "profile"){
+       ?>
+                       <h2 class="profile_box"><?php echo elgg_echo("widgets:profilebox"); ?></h2>
+                       <div id="profile_box_widgets">
+                       <p><small><?php echo elgg_echo('widgets:position:fixed'); ?></small></p>
+                       </div>
+       <?php
+       }
+       ?>
+
+       </td>
+
+       <td rowspan="2" align="left" valign="top">
                <h2><?php echo elgg_echo("widgets:rightcolumn"); ?></h2>
                <div id="rightcolumn_widgets" <?php if(get_context() == "profile")echo "class=\"long\""; ?>>
                <?php
                                        }
                                        $rightcolumn_widgets .= "{$widget->handler}::{$widget->getGUID()}";
                ?>
-               
+
                <table class="draggable_widget" cellspacing="0"><tr><td width="149px">
                        <h3>
                                <?php echo $widgettypes[$widget->handler]->name; ?>
-                               <input type="hidden" name="handler" value="<?php 
-                                       echo $widget->handler; 
+                               <input type="hidden" name="handler" value="<?php
+                                       echo $widget->handler;
                                ?>" />
                                <input type="hidden" name="multiple" value="<?php echo $widgettypes[$widget->handler]->multiple; ?>" />
                                <input type="hidden" name="side" value="<?php echo in_array('side',$widgettypes[$widget->handler]->positions); ?>" />
                <td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14px" height="14px" class="more_info" /></a></td>
                <td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15px" height="15px" class="drag_handle" /></a></td>
                </tr></table>
-               
+
                <?php
-                                       
+
                                }
                        }
                ?>
-               
+
                </div>
-    </td><!-- /rightcolumn td -->
-    
-  </tr>
-  
-  <tr>
+       </td><!-- /rightcolumn td -->
+
+</tr>
+
+<tr>
 
 <td>
 <h2><?php echo elgg_echo("widgets:leftcolumn"); ?></h2>
 <table class="draggable_widget" cellspacing="0"><tr><td width="149px">
        <h3>
                <?php echo $widgettypes[$widget->handler]->name; ?>
-               <input type="hidden" name="handler" value="<?php 
-                       echo $widget->handler; 
+               <input type="hidden" name="handler" value="<?php
+                       echo $widget->handler;
                ?>" />
                <input type="hidden" name="multiple" value="<?php echo $widgettypes[$widget->handler]->multiple; ?>" />
                <input type="hidden" name="side" value="<?php echo in_array('side',$widgettypes[$widget->handler]->positions); ?>" />
 </tr></table>
 
 <?php
-                       
+
                }
        }
 ?>
 <table class="draggable_widget" cellspacing="0"><tr><td width="149px">
        <h3>
                <?php echo $widgettypes[$widget->handler]->name; ?>
-               <input type="hidden" name="handler" value="<?php 
-                       echo $widget->handler; 
+               <input type="hidden" name="handler" value="<?php
+                       echo $widget->handler;
                ?>" />
                <input type="hidden" name="multiple" value="<?php echo $widgettypes[$widget->handler]->multiple; ?>" />
                <input type="hidden" name="side" value="<?php echo in_array('side',$widgettypes[$widget->handler]->positions); ?>" />
 </tr></table>
 
 <?php
-                       
+
                }
        }
 ?>
 </div><!-- /customise_editpanel -->
 
 <?php
-                       
+
                }
-               
+
 ?>
 
 
 <table cellspacing="0" id="widget_table">
-  <tr>
-    <td colspan="2" align="left" valign="top" height="1px">
+<tr>
+       <td colspan="2" align="left" valign="top" height="1px">
                <!-- profile box or 'dashboard info' notice -->
                <?php if (isset($vars['area1'])) echo $vars['area1']; ?>
        </td>
-    <td rowspan="2" align="left" valign="top" height="100%">
-               <?php 
+       <td rowspan="2" align="left" valign="top" height="100%">
+               <?php
                if($_SESSION['user']->guid == page_owner()){
                ?>
                <!-- customise page button -->
 
                <div id="widgets_right">
                <?php
-               
+
                        if (is_array($area3widgets) && sizeof($area3widgets) > 0)
                        foreach($area3widgets as $widget) {
                                echo elgg_view_entity($widget);
                        }
 
                ?>
-               
-               </div><!-- /#widgets_right -->      
-    </td>
-  </tr>
-  <tr>
+
+               </div><!-- /#widgets_right -->
+       </td>
+</tr>
+<tr>
        <td align="left" valign="top">
-       
+
                <!-- left widgets -->
                <div id="widgets_left">
-               
+
                <?php
-               
+
                        if (is_array($area1widgets) && sizeof($area1widgets) > 0)
                        foreach($area1widgets as $widget) {
                                echo elgg_view_entity($widget);
                        }
 
                ?>
-               
+
                </div><!-- /#widgets_left -->
-       
+
        </td>
        <td align="left" valign="top">
-       
+
                <!-- widgets middle -->
                <div id="widgets_middle">
-               
+
                <?php if (isset($vars['area2'])) echo $vars['area2']; ?>
                <?php
-               
+
                        if (is_array($area2widgets) && sizeof($area2widgets) > 0)
                        foreach($area2widgets as $widget) {
                                echo elgg_view_entity($widget);
                        }
-               
+
                ?>
-               
+
                </div><!-- /#widgets_middle -->
-       
+
        </td>
        </tr>
-</table>
-
-
+</table>
\ No newline at end of file
index a5995b24070630cc1f2d549cbf235605b342c8ab..2ec9ab4512edda8c8b0be3caff9bf5a7f79e333d 100644 (file)
@@ -1,15 +1,19 @@
 <?php
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+if (isset($vars['group_name'])) {
+       $groupname = $vars['group_name'];
+} else {
+       $groupname = "main";
+}
 
-       if (isset($vars['group_name'])) {
-               $groupname = $vars['group_name'];
-       } else {
-               $groupname = "main";
-       }
-       if (isset($vars['submenu'])) {
-               
-               $submenu = "<ul>" . $vars['submenu'] . "</ul>";
-               echo "<div class=\"submenu_group\"><div class=\"submenu_group_{$groupname}\">{$submenu}</div></div>";
-               
-       }
-
-?>
\ No newline at end of file
+if (isset($vars['submenu'])) {
+       $submenu = "<ul>" . $vars['submenu'] . "</ul>";
+       echo "<div class=\"submenu_group\"><div class=\"submenu_group_{$groupname}\">{$submenu}</div></div>";
+}
\ No newline at end of file
index 143b0311e3f3e56cc426fd8cd47c1d9222ae44bd..0210e865fbec3c8c2e15339912e5a2dc16474402 100644 (file)
@@ -1,16 +1,24 @@
 <?php
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       if (isset($vars['selected']) && $vars['selected'] == true) {
-               $selected = "class=\"selected\"";
-       } else {
-               $selected = "";
-       }
-       
-       if (isset($vars['onclick']) && $vars['onclick'] == true) {
-               $onclick = "onclick=\"javascript:return confirm('". elgg_echo('deleteconfirm') . "')\"";
-       } else {
-               $onclick = "";
-       }
+if (isset($vars['selected']) && $vars['selected'] == true) {
+       $selected = "class=\"selected\"";
+} else {
+       $selected = "";
+}
+
+if (isset($vars['onclick']) && $vars['onclick'] == true) {
+       $onclick = "onclick=\"javascript:return confirm('". elgg_echo('deleteconfirm') . "')\"";
+} else {
+       $onclick = "";
+}
 
 ?>
 <li <?php echo $selected; ?>><a href="<?php echo $vars['href']; ?>" <?php echo $onclick; ?>><?php echo $vars['label']; ?></a></li>
\ No newline at end of file
index b629fc3f078f7f4d9e2632f291c05b8cedbb0274..3116bd3da4dd89cdafaa3a3902d53c514497222c 100644 (file)
@@ -1,25 +1,19 @@
 <?php
+/**
+ * Elgg comments add form
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
 
-    /**
-        * Elgg comments add form
-        * 
-        * @package Elgg
+if (isset($vars['entity']) && isloggedin()) {
+       $form_body = "<div class=\"contentWrapper\"><p class='longtext_editarea'><label>".elgg_echo("generic_comments:text")."<br />" . elgg_view('input/longtext',array('internalname' => 'generic_comment')) . "</label></p>";
+       $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
+       $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))) . "</p></div>";
 
-        * @author Curverider Ltd <info@elgg.com>
+       echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add"));
 
-        * @link http://elgg.com/
-        * 
-        * @uses $vars['entity']
-        */
-        
-        if (isset($vars['entity']) && isloggedin()) {
-        
-                $form_body = "<div class=\"contentWrapper\"><p class='longtext_editarea'><label>".elgg_echo("generic_comments:text")."<br />" . elgg_view('input/longtext',array('internalname' => 'generic_comment')) . "</label></p>";
-                $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
-                $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))) . "</p></div>";
-                
-                echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add"));
-
-    }
-    
-?>
\ No newline at end of file
+}
\ No newline at end of file
index 1bde247367b75935800a6d306f25fa18e0116258..4b71e70e1e29ccd2b6e0e11a128786037352e7c4 100644 (file)
@@ -1,3 +1,15 @@
+<?php
+/**
+ * Elgg comments add form
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
+?>
+
 <div id="dashboard_info">
 <p>
 <?php
index 3bca680f8937b07a26ec8e39ccf8633545de7436..0bbc9d0797b82515d7caaba4f8f17381c3baf7e0 100644 (file)
@@ -1,22 +1,24 @@
 <?php
-       /**
       * Elgg Entity export.
       * Displays an entity using the current view.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg Entity export.
+ * Displays an entity using the current view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $entity = $vars['entity'];
-       if (!$entity) throw new InvalidParameterException(elgg_echo('InvalidParameterException:NoEntityFound'));
-       
-       $metadata = get_metadata_for_entity($entity->guid);
-       $annotations = get_annotations($entity->guid);
-       $relationships = get_entity_relationships($entity->guid);
-       
-       $exportable_values = $entity->getExportableValues();
+$entity = $vars['entity'];
+if (!$entity) {
+       throw new InvalidParameterException(elgg_echo('InvalidParameterException:NoEntityFound'));
+}
+
+$metadata = get_metadata_for_entity($entity->guid);
+$annotations = get_annotations($entity->guid);
+$relationships = get_entity_relationships($entity->guid);
+
+$exportable_values = $entity->getExportableValues();
 ?>
 <div class="contentWrapper">
 <div>
@@ -36,7 +38,7 @@
 
 <?php if ($metadata) { ?>
 <div id="metadata">
-<h2><?php echo elgg_echo('metadata'); ?></h2>  
+<h2><?php echo elgg_echo('metadata'); ?></h2>
        <?php
                foreach ($metadata as $m)
                {
 <?php
                }
        ?>
-       
+
 </div>
 <?php } ?>
 
 <?php if ($annotations) { ?>
 <div id="annotations">
-<h2><?php echo elgg_echo('annotations'); ?></h2>       
+<h2><?php echo elgg_echo('annotations'); ?></h2>
        <?php
                foreach ($annotations as $a)
                {
@@ -71,7 +73,7 @@
 
 <?php if ($relationships) { ?>
 <div id="relationship">
-<h2><?php echo elgg_echo('relationships'); ?></h2>     
+<h2><?php echo elgg_echo('relationships'); ?></h2>
        <?php
                foreach ($relationships as $r)
                {
index d021ba436f5def09b75beefd38ac7caabf48ed85..32a2fc8ed97fa2320ef9d1aaeb4fcb66f59c20e5 100644 (file)
@@ -1,16 +1,16 @@
 <?php
-       /**
       * Elgg metadata export.
       * Displays a metadata item using the current view.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg metadata export.
+ * Displays a metadata item using the current view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $m = $vars['metadata'];
-       $e = get_entity($m->entity_guid);
+$m = $vars['metadata'];
+$e = get_entity($m->entity_guid);
 ?>
 <div>
        <p><?php if ($e) echo "<a href=\"" . $e->getURL() . "\">GUID:{$m->entity_guid}</a>"; else echo "GUID:".$m->entity_guid;
index a91d381159eb6f773bd355c4ca69d40ef02942a2..ec6a94bd42e5d4b9593fc0ec3830d9caa51be21e 100644 (file)
@@ -1,20 +1,19 @@
 <?php
-       /**
       * Elgg relationship export.
       * Displays a relationship using the current view.
-        * 
       * @package Elgg
       * @subpackage Core
       * @author Curverider Ltd
       * @link http://elgg.org/
       */
+/**
+ * Elgg relationship export.
+ * Displays a relationship using the current view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
 
-       $r = $vars['relationship'];
-       
-       $e1 = get_entity($r->guid_one);
-       $e2 = get_entity($r->guid_two);
+$r = $vars['relationship'];
+
+$e1 = get_entity($r->guid_one);
+$e2 = get_entity($r->guid_two);
 
-       
 ?>
 <div>
        <p><?php
index 812623cb1e34cdeaa9e3e85e7335106fc55d5aae..deadb2f6a9d3436573a5023a8ed2e58a5ad82355 100644 (file)
@@ -1,60 +1,56 @@
 <?php
+/**
+ * Elgg friends collection
+ * Lists one of a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @see collections.php
+ *
+ * @uses $vars['collection'] The individual friends collection
+ */
+
+$coll = $vars['collection'];
+
+if (is_array($vars['collection']->members)) {
+       $count = sizeof($vars['collection']->members);
+} else {
+       $count = 0;
+}
+
+echo "<li><h2>";
+
+//as collections are private, check that the logged in user is the owner
+if($coll->owner_guid == $_SESSION['user']->getGUID()) {
+       echo "<div class=\"friends_collections_controls\">";
+       echo elgg_view('output/confirmlink', array(
+                       'href' => $vars['url'] . 'action/friends/deletecollection?collection=' . $coll->id,
+                       'class' => 'delete_collection'
+               ));
+       echo "</div>";
+}
+echo $coll->name;
+echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</span>) </h2>";
+
+// individual collection panels
+if($friends = $vars['collection']->entities) {
+       $content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
+
+       echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
+       ?>
+
+       <script type="text/javascript">
+       $(document).ready(function () {
+
+       $('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>');
 
-       /**
-        * Elgg friends collection
-        * Lists one of a user's friends collections
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @see collections.php
-        * 
-        * @uses $vars['collection'] The individual friends collection
-        */
-
-                       $coll = $vars['collection'];
-                       
-                       if (is_array($vars['collection']->members)) {
-                               $count = sizeof($vars['collection']->members);
-                       } else {
-                               $count = 0;
-                       }
-                       
-                       echo "<li><h2>";
-               
-                       //as collections are private, check that the logged in user is the owner
-                       if($coll->owner_guid == $_SESSION['user']->getGUID()) {
-                               echo "<div class=\"friends_collections_controls\">";
-                               echo elgg_view('output/confirmlink', array(
-                                               'href' => $vars['url'] . 'action/friends/deletecollection?collection=' . $coll->id,
-                                               'class' => 'delete_collection'
-                                               ));
-                               echo "</div>";
-                       }
-                       echo $coll->name;
-                       echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</span>) </h2>";
-                       
-                       // individual collection panels
-                       if($friends = $vars['collection']->entities){
-                               $content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
-                               echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
-                               ?>
-                               
-<script type="text/javascript">
-$(document).ready(function () {
-               
-               $('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>');
-                               
        });
-</script>
-                               <?php
-                       }
-                       
-                       // close friends_picker div and the accordian list item
-                       echo "</li>";
-
-?>
\ No newline at end of file
+       </script>
+       <?php
+}
+
+// close friends_picker div and the accordian list item
+echo "</li>";
index c785cd68e1fa2ec910755d6d352a941d759c3cc6..a013dc1dae395ff596925d573c58a7f984d29f94 100644 (file)
@@ -1,53 +1,45 @@
 <?php
+/**
+ * Elgg friends collections
+ * Lists a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['collections'] The array of friends collections
+ */
+
+if (!isset($friendspicker)) {
+       $friendspicker = 0;
+}
+
+echo "<div class=\"contentWrapper\">";
+
+if (is_array($vars['collections']) && sizeof($vars['collections'])) {
+       echo "<ul id=\"friends_collections_accordian\">";
+
+       foreach($vars['collections'] as $collection) {
+               $friendspicker++;
+               echo elgg_view('friends/collection',array('collection' => $collection, 'friendspicker' => $friendspicker));
+       }
+
+       echo "</ul>";
+
+} else {
+       echo elgg_echo("friends:nocollections");
+}
+
+echo "</div>";
 
-       /**
-        * Elgg friends collections
-        * Lists a user's friends collections
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['collections'] The array of friends collections
-        */
-
-               if (!isset($friendspicker)) $friendspicker = 0;
-
-               echo "<div class=\"contentWrapper\">";
-
-               if (is_array($vars['collections']) && sizeof($vars['collections'])) {
-                       
-                       echo "<ul id=\"friends_collections_accordian\">";
-                       
-                       foreach($vars['collections'] as $collection) {
-                               
-                               $friendspicker++;
-                               echo elgg_view('friends/collection',array('collection' => $collection, 'friendspicker' => $friendspicker));
-                               
-                       }
-                       
-                       echo "</ul>";
-                       
-               } else {
-                       
-                       echo elgg_echo("friends:nocollections");
-                       
-               }
-               
-               echo "</div>";
-    
 ?>
 
 <script>
 $(document).ready(function(){
-
-$('#friends_collections_accordian h2').click(function () {
-       $(this.parentNode).children("[class=friends_picker]").slideToggle("fast");
-       //return false;
+       $('#friends_collections_accordian h2').click(function () {
+               $(this.parentNode).children("[class=friends_picker]").slideToggle("fast");
+               //return false;
+       });
 });
-
-});  
-</script>
\ No newline at end of file
+</script>
index a4ad5986631923f1d33d7d137ec101422cdc9eea..8f3c684a8aba568ac8ff6b81b41620f27257eddc 100644 (file)
@@ -1,10 +1,21 @@
 <?php
+/**
+ * Elgg friends collections
+ * Lists a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['collections'] The array of friends collections
+ */
+
+$friendspicker = $vars['friendspicker'];
+
+$collectionid = $vars['collection']->id;
+$ownerid = $vars['owner']->getGUID();
 
-       $friendspicker = $vars['friendspicker'];
-       
-       $collectionid = $vars['collection']->id;
-       $ownerid = $vars['owner']->getGUID();
-       
 ?>
 
 <div id="elgg_horizontal_tabbed_nav">
@@ -22,14 +33,14 @@ $(document).ready(function () {
        $('a.collectionmembers<?php echo $friendspicker; ?>').click(function () {
                // load collection members pane
                $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>');
-               
+
                // remove selected state from previous tab
                $(this).parent().parent().find("li.selected").removeClass("selected");
                // add selected class to current tab
                $(this).parent().addClass("selected");
-                               
+
                return false;
-    });
+       });
 
        $('a.editmembers<?php echo $friendspicker; ?>').click(function () {
                // load friends picker pane
@@ -39,9 +50,9 @@ $(document).ready(function () {
                $(this).parent().parent().find("li.selected").removeClass("selected");
                // add selected class to current tab
                $(this).parent().addClass("selected");
-       
+
                return false;
-    });
+       });
 
 
 });
index bec7212eef1db6e94b9479b784749c1d27721720..f9d8ac5ffc3ef3e0fd0c30e3c20a1a10a7296215 100644 (file)
@@ -1,23 +1,17 @@
 <?php
-
-       /**
-        * Elgg friend collections required hidden fields for js friends picker form 
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        */
-
-               if (isset($vars['collection'])) {
+/**
+ * Elgg friend collections required hidden fields for js friends picker form
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+if (isset($vars['collection'])) {
 ?>
 
-               <input type="hidden" name="collection_id" value="<?php echo $vars['collection']->id; ?>" />
+       <input type="hidden" name="collection_id" value="<?php echo $vars['collection']->id; ?>" />
 
 <?php
-
-               }
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
index c35bcaba3c754ae11c69e4c3465b792515d4ba89..5751950d838d42d9b43549ef7bce734c5ae3a2ef 100644 (file)
@@ -1,59 +1,55 @@
 <?php
+/**
+ * Elgg friend collections add/edit
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] Optionally, the collection edit
+ */
 
-       /**
-        * Elgg friend collections add/edit 
-        * 
-        * @package Elgg
-        * @subpackage Core
-        * @author Curverider Ltd
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['object'] Optionally, the collection edit
-        */
-        
-       // var_export($vars['collection'][0]->id);
-       // Set title, form destination
-               if (isset($vars['collection'])) {
-                       $action = "friends/editcollection";
-                       $title = $vars['collection'][0]->name;
-                       $highlight = 'default';
-               } else  {
-                       $action = "friends/addcollection";
-                       $title = "";
-                       $highlight = 'all';
-           }
-
-           
-           $form_body = "<div class='contentWrapper'><p><label>" . elgg_echo("friends:collectionname") . "<br />" .
-                                                       elgg_view("input/text", array(
-                                                                       "internalname" => "collection_name",
-                                                                       "value" => $title,
-                                                               )) . "</label></p>";
-
-               $form_body .= "<p>";
-               
-               if($vars['collection_members']){
-           $form_body .= elgg_echo("friends:collectionfriends") . "<br />";
-            foreach($vars['collection_members'] as $mem){
-                
-               $form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
-               $form_body .= $mem->name;
-  
-            }
-        }
-        
-        $form_body .= "</p>";
-        
-        $form_body .= "<p><label>" . elgg_echo("friends:addfriends") . "</label>". 
-                                       elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "</p>";
-                                       
-        $form_body .= "<p>";
-        if (isset($vars['collection'])) {
-                       $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}"));
-               }
-               $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
-               $form_body .= "</p></div>";
-               
-               echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action"));
-?>
\ No newline at end of file
+// var_export($vars['collection'][0]->id);
+
+// Set title, form destination
+if (isset($vars['collection'])) {
+       $action = "friends/editcollection";
+       $title = $vars['collection'][0]->name;
+       $highlight = 'default';
+} else  {
+       $action = "friends/addcollection";
+       $title = "";
+       $highlight = 'all';
+}
+
+
+$form_body = "<div class='contentWrapper'><p><label>" . elgg_echo("friends:collectionname") . "<br />" .
+       elgg_view("input/text", array(
+               "internalname" => "collection_name",
+               "value" => $title,
+       )) . "</label></p>";
+
+$form_body .= "<p>";
+
+if($vars['collection_members']){
+       $form_body .= elgg_echo("friends:collectionfriends") . "<br />";
+       foreach($vars['collection_members'] as $mem){
+               $form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
+               $form_body .= $mem->name;
+       }
+}
+
+$form_body .= "</p>";
+
+$form_body .= "<p><label>" . elgg_echo("friends:addfriends") . "</label>".
+                       elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "</p>";
+
+$form_body .= "<p>";
+if (isset($vars['collection'])) {
+       $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}"));
+}
+$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+$form_body .= "</p></div>";
+
+echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action"));
\ No newline at end of file
index 3907479bd52bb38e2ce934593804306572eb86c0..7bc42a015217c2aae41023e302ae6ba489dfd8f0 100644 (file)
@@ -1,27 +1,18 @@
 <?php
+/**
+ * Elgg friends list
+ * Lists a user's friends
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['friends'] The array of ElggUser objects
+ */
 
-       /**
-        * Elgg friends list
-        * Lists a user's friends
-        * 
-        * @package Elgg
-        * @subpackage Core
-
-        * @author Curverider Ltd
-
-        * @link http://elgg.org/
-        * 
-        * @uses $vars['friends'] The array of ElggUser objects
-        */
-
-               if (is_array($vars['friends']) && sizeof($vars['friends']) > 0) {
-                       
-                       foreach($vars['friends'] as $friend) {
-                               
-                               echo elgg_view_entity($friend);
-                               
-                       }
-                       
-               }
-
-?>
\ No newline at end of file
+if (is_array($vars['friends']) && sizeof($vars['friends']) > 0) {
+       foreach($vars['friends'] as $friend) {
+               echo elgg_view_entity($friend);
+       }
+}
\ No newline at end of file
index 319088601f2a93c3d54d29ce7841a345074f549c..1ac8b23af7288435a0e65424c9edb7669480ed1a 100644 (file)
 <?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
-        */
-
-       // Let the system know that the friends picker is in use
-               global $pickerinuse;
-               $pickerinuse = true;
-               $chararray = elgg_echo('friendspicker:chararray');
-
-       // Initialise internalname
-               if (!isset($vars['internalname'])) {
-                       $internalname = "friend";
+/**
+ * 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
+ */
+
+// Let the system know that the friends picker is in use
+global $pickerinuse;
+$pickerinuse = true;
+$chararray = elgg_echo('friendspicker:chararray');
+
+// Initialise internalname
+if (!isset($vars['internalname'])) {
+       $internalname = "friend";
+} else {
+       $internalname = $vars['internalname'];
+}
+
+// Are we highlighting default or all?
+if (empty($vars['highlight'])) $vars['highlight'] = 'default';
+if ($vars['highlight'] != 'all') $vars['highlight'] = 'default';
+
+// Initialise values
+if (!isset($vars['value'])) {
+       $vars['value'] = array();
+} else {
+       if (!is_array($vars['value'])) {
+               $vars['value'] = (int) $vars['value'];
+               $vars['value'] = array($vars['value']);
+       }
+}
+
+// Initialise whether we're calling back or not
+if (isset($vars['callback'])) {
+       $callback = $vars['callback'];
+} else {
+       $callback = false;
+}
+
+// We need to count the number of friends pickers on the page.
+if (!isset($vars['friendspicker'])) {
+       global $friendspicker;
+       if (!isset($friendspicker)) $friendspicker = 0;
+       $friendspicker++;
+} else {
+       $friendspicker = $vars['friendspicker'];
+}
+
+$users = array();
+$activeletters = array();
+
+// Are we displaying form tags and submit buttons?
+// (If we've been given a target, then yes! Otherwise, no.)
+if (isset($vars['formtarget'])) {
+       $formtarget = $vars['formtarget'];
+} else {
+       $formtarget = false;
+}
+
+// Sort users by letter
+if (is_array($vars['entities']) && sizeof($vars['entities'])) {
+       foreach($vars['entities'] as $user) {
+               if (is_callable('mb_substr')) {
+                       $letter = strtoupper(mb_substr($user->name,0,1));
                } else {
-                       $internalname = $vars['internalname'];
-               }
-               
-       // Are we highlighting default or all?
-               if (empty($vars['highlight'])) $vars['highlight'] = 'default';
-               if ($vars['highlight'] != 'all') $vars['highlight'] = 'default';
-               
-       // Initialise values
-               if (!isset($vars['value'])) {
-                       $vars['value'] = array();
-               } else {
-                       if (!is_array($vars['value'])) {
-                               $vars['value'] = (int) $vars['value'];
-                               $vars['value'] = array($vars['value']);
-                       }
+                       $letter = strtoupper(substr($user->name,0,1));
                }
 
-       // Initialise whether we're calling back or not
-               if (isset($vars['callback'])) {
-                       $callback = $vars['callback'];
-               } else {
-                       $callback = false;
+               if (!substr_count($chararray,$letter)) {
+                       $letter = "*";
                }
-               
-       // We need to count the number of friends pickers on the page.
-               if (!isset($vars['friendspicker'])) {
-                       global $friendspicker;
-                       if (!isset($friendspicker)) $friendspicker = 0;
-                       $friendspicker++;
-               } else {
-                       $friendspicker = $vars['friendspicker'];
+               if (!isset($users[$letter])) {
+                       $users[$letter] = array();
                }
+               $users[$letter][$user->name] = $user;
+       }
+}
 
-               $users = array();
-               $activeletters = array();
-               
-       // Are we displaying form tags and submit buttons?
-       // (If we've been given a target, then yes! Otherwise, no.)
-               if (isset($vars['formtarget'])) {
-                       $formtarget = $vars['formtarget'];
-               } else {
-                       $formtarget = false;
-               }
-               
-       // Sort users by letter
-               if (is_array($vars['entities']) && sizeof($vars['entities']))
-                       foreach($vars['entities'] as $user) {
-                               
-                               if (is_callable('mb_substr'))
-                                       $letter = strtoupper(mb_substr($user->name,0,1));
-                               else
-                                       $letter = strtoupper(substr($user->name,0,1));
-                               if (!substr_count($chararray,$letter)) {
-                                       $letter = "*";
-                               }
-                               if (!isset($users[$letter])) {
-                                       $users[$letter] = array();
-                               }
-                               $users[$letter][$user->name] = $user;
-                               
-                       }
-               
-       if (!$callback) {
-                       
-?>
-
-<div class="friends_picker">
+if (!$callback) {
+       ?>
 
-<?php
+       <div class="friends_picker">
 
-       if (isset($vars['content'])) echo $vars['content'];
+       <?php
 
-       
-?>
+       if (isset($vars['content'])) {
+               echo $vars['content'];
+       }
+       ?>
 
        <div id="friends_picker_placeholder<?php echo $friendspicker; ?>">
 
-<?php
-       
-       }
-       
-       if (!isset($vars['replacement'])) {
-       
-               if ($formtarget) {
+       <?php
+}
+
+if (!isset($vars['replacement'])) {
+       if ($formtarget) {
 ?>
 
-       <script language="text/javascript">
+<script language="text/javascript">
                $(function() { // onload...do
                $('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
                        var inputs = [];
                                data: inputs.join('&'),
                                url: this.action,
                                success: function(){
-                               $('a.collectionmembers<?php echo $friendspicker; ?>').click();
-                               }
+                                       $('a.collectionmembers<?php echo $friendspicker; ?>').click();
+                               }
 
                        });
                        return false;
-        })
-      })
+               })
+       })
 
        </script>
 
-       <!-- Collection members form -->
-       <form id="collectionMembersForm<?php echo $friendspicker; ?>" action="<?php echo $formtarget; ?>" method="post"> <!-- action="" method=""> -->
+<!-- Collection members form -->
+<form id="collectionMembersForm<?php echo $friendspicker; ?>" action="<?php echo $formtarget; ?>" method="post"> <!-- action="" method=""> -->
 
 <?php
-
-               }
-
+       }
 ?>
 
-       <div class="friendsPicker_wrapper">
-       <div id="friendsPicker<?php echo $friendspicker; ?>">
-               <div class="friendsPicker_container">
+<div class="friendsPicker_wrapper">
+<div id="friendsPicker<?php echo $friendspicker; ?>">
+       <div class="friendsPicker_container">
 <?php
 
-       // Initialise letters
-               $chararray .= "*";
-               if (is_callable('mb_substr'))
-                       $letter = mb_substr($chararray,0,1);
-               else
-                       $letter = substr($chararray,0,1);
-               $letpos = 0;
-               while (1 == 1) {
-?>
-                       <div class="panel" title="<?php 
-                                       echo $letter;
-                       ?>">
-                               <div class="wrapper">
-                                       <h3><?php echo $letter; ?></h3>                                 
-                                       
-<?php
-
-                       if (isset($users[$letter])) {
-                               ksort($users[$letter]);
-                               
-                               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
-                               $col = 0;
-                               
-                               foreach($users[$letter] as $friend) {
-                                       if ($col == 0) echo "<tr>";
-                                       
-                                       //echo "<p>" . $user->name . "</p>";
-                                       $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true)); 
-                                       $options[$label] = $friend->getGUID();
-                                       
-                                       if ($vars['highlight'] == 'all'
-                                               && !in_array($letter,$activeletters)) {
-                                                       $activeletters[] = $letter;
-                                               }
-                                               
-                                       
-                                       if (in_array($friend->getGUID(),$vars['value'])) {
-                                               $checked = "checked = \"checked\"";
-                                               if (
-                                                               !in_array($letter,$activeletters)
-                                                               && $vars['highlight'] == 'default'
-                                                       )
-                                                       $activeletters[] = $letter;
-                                       } else {
-                                               $checked = "";
-                                       }
+// Initialise letters
+       $chararray .= "*";
+       if (is_callable('mb_substr')) {
+               $letter = mb_substr($chararray,0,1);
+       } else {
+               $letter = substr($chararray,0,1);
+       }
+       $letpos = 0;
+       while (1 == 1) {
+               ?>
+               <div class="panel" title="<?php echo $letter; ?>">
+                       <div class="wrapper">
+                               <h3><?php echo $letter; ?></h3>
+               <?php
+
+               if (isset($users[$letter])) {
+                       ksort($users[$letter]);
+
+                       echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
+                       $col = 0;
+
+                       foreach($users[$letter] as $friend) {
+                               if ($col == 0) {
+                                       echo "<tr>";
+                               }
 
-?>
+                               //echo "<p>" . $user->name . "</p>";
+                               $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true));
+                               $options[$label] = $friend->getGUID();
 
-                       <td>
-                       
-                               <input type="checkbox" <?php echo $checked; ?> name="<?php echo $internalname; ?>[]" value="<?php echo $options[$label]; ?>" />
-                       
-                       </td>
+                               if ($vars['highlight'] == 'all'
+                                       && !in_array($letter,$activeletters)) {
 
-                       <td >
-                       
-                               <div style="width: 25px; margin-bottom: 15px;">
-<?php
+                                       $activeletters[] = $letter;
+                               }
 
-                               echo $label;
-                       
-?>
-                               </div>
-                       </td>
-                       <td style="width: 200px; padding: 5px;">
-<?php
 
-                                       echo $friend->name;
-                               
-?>
-                       </td>
-<?php
-                                       
-                                       $col++;
-                                       if ($col == 3){
-                                               echo "</tr>";
-                                               $col = 0;
+                               if (in_array($friend->getGUID(),$vars['value'])) {
+                                       $checked = "checked = \"checked\"";
+                                       if (!in_array($letter,$activeletters) && $vars['highlight'] == 'default') {
+                                               $activeletters[] = $letter;
                                        }
+                               } else {
+                                       $checked = "";
                                }
-                               if ($col < 3) echo "</tr>";
-                               
-                               echo "</table>";
-                               
+                               ?>
+
+                               <td>
+
+                                       <input type="checkbox" <?php echo $checked; ?> name="<?php echo $internalname; ?>[]" value="<?php echo $options[$label]; ?>" />
+
+                               </td>
+
+                               <td>
+
+                                       <div style="width: 25px; margin-bottom: 15px;">
+                               <?php
+                                       echo $label;
+                               ?>
+                                       </div>
+                               </td>
+                               <td style="width: 200px; padding: 5px;">
+                                       <?php echo $friend->name; ?>
+                               </td>
+                               <?php
+                               $col++;
+                               if ($col == 3){
+                                       echo "</tr>";
+                                       $col = 0;
+                               }
+                       }
+                       if ($col < 3) {
+                               echo "</tr>";
                        }
 
+                       echo "</table>";
+               }
+
 ?>
-                       
-                               </div>
+
                        </div>
-<?php                  
+               </div>
+<?php
                        //if ($letter == 'Z') break;
-                       
-                       if (is_callable('mb_substr'))
+
+                       if (is_callable('mb_substr')) {
                                $substr = mb_substr($chararray,strlen($chararray) - 1,1);
-                       else
+                       } else {
                                $substr = substr($chararray,strlen($chararray) - 1,1);
-                       if ($letter == $substr) break;
+                       }
+                       if ($letter == $substr) {
+                               break;
+                       }
                        //$letter++;
                        $letpos++;
-                       if (is_callable('mb_substr'))
+                       if (is_callable('mb_substr')) {
                                $letter = mb_substr($chararray,$letpos,1);
-                       else
+                       } else {
                                $letter = substr($chararray,$letpos,1);
+                       }
                }
-               
+
 ?>
-               </div>
-               
+       </div>
+
 <?php
 
-       if ($formtarget) {
+if ($formtarget) {
+
+       if (isset($vars['formcontents']))
+               echo $vars['formcontents'];
 
-               if (isset($vars['formcontents']))
-                       echo $vars['formcontents'];
-               
 ?>
-               <div class="clearfloat"></div>
-               <div class="friendspicker_savebuttons">
-                       <input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
-                       <input type="button" class="cancel_button" value="<?php echo elgg_echo('cancel'); ?>" onclick="$('a.collectionmembers<?php echo $friendspicker; ?>').click();" />
-               <br /></div>
-               </form>
-               
+       <div class="clearfloat"></div>
+       <div class="friendspicker_savebuttons">
+               <input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
+               <input type="button" class="cancel_button" value="<?php echo elgg_echo('cancel'); ?>" onclick="$('a.collectionmembers<?php echo $friendspicker; ?>').click();" />
+       <br /></div>
+       </form>
+
 <?php
 
-       }
+}
 
 ?>
-               
-       </div>
-       </div>
-       
+
+</div>
+</div>
+
 <?php
-       } else {
-               echo $vars['replacement']; 
-       }
-       if (!$callback) {
+} else {
+       echo $vars['replacement'];
+}
+if (!$callback) {
 
 ?>
-                       
-       </div>
+
+</div>
 </div>
 
 
 <?php
 
-       }
+}
 
-       if (!isset($vars['replacement'])) {
+if (!isset($vars['replacement'])) {
 ?>
 
 <script type="text/javascript">
-               // initialise picker
-               $("div#friendsPicker<?php echo $friendspicker; ?>").friendsPicker(<?php echo $friendspicker; ?>);
+       // initialise picker
+       $("div#friendsPicker<?php echo $friendspicker; ?>").friendsPicker(<?php echo $friendspicker; ?>);
 </script>
 <script>
-       $(document).ready(function () {
-       // manually add class to corresponding tab for panels that have content
+$(document).ready(function () {
+// manually add class to corresponding tab for panels that have content
 <?php
-       if (sizeof($activeletters) > 0)
-               //$chararray = elgg_echo('friendspicker:chararray');
-               foreach($activeletters as $letter) {
-                       $tab = strpos($chararray, $letter) + 1;
+if (sizeof($activeletters) > 0)
+       //$chararray = elgg_echo('friendspicker:chararray');
+       foreach($activeletters as $letter) {
+               $tab = strpos($chararray, $letter) + 1;
 ?>
-       $("div#friendsPickerNavigation<?php echo $friendspicker; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
+$("div#friendsPickerNavigation<?php echo $friendspicker; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
 <?php
-               }
+       }
 
 ?>
-       });
+});
 </script>
 
 <?php
 
-       }
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
index 04947568b0e2a86c25db45b8454b2235384704c5..e577ba72147e29f90815f17ad364d113ae7257d0 100644 (file)
@@ -1,19 +1,23 @@
 <?php
+/**
+ * Elgg create river item
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
+$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+$performed_on = get_entity($vars['item']->object_guid);
+$url = $performed_on->getURL();
 
-       $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-       $performed_on = get_entity($vars['item']->object_guid);
-       $url = $performed_on->getURL();
+$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+$string = sprintf(elgg_echo("friends:river:add"),$url) . " ";
+$string .= "<a href=\"{$performed_on->getURL()}\">{$performed_on->name}</a>";
+$string .= "<div class=\"river_content_display\">";
+$string .= "<table><tr><td>" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small')) . "</td>";
+$string .= "<td><div class=\"following_icon\"></div></td><td>" . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'small')) . "</td></tr></table>";
+$string .= "</div>";
 
-       $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
-       $string = sprintf(elgg_echo("friends:river:add"),$url) . " ";
-       $string .= "<a href=\"{$performed_on->getURL()}\">{$performed_on->name}</a>";
-       $string .= "<div class=\"river_content_display\">";
-       $string .= "<table><tr><td>" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small')) . "</td>";
-       $string .= "<td><div class=\"following_icon\"></div></td><td>" . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'small')) . "</td></tr></table>";
-       $string .= "</div>";
-       
-?>
-
-<?php 
-       echo $string; 
-?>
\ No newline at end of file
+echo $string;
\ No newline at end of file