diff options
Diffstat (limited to 'views')
46 files changed, 1217 insertions, 1282 deletions
diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php index 1ab2bd42e..5e760cef3 100644 --- a/views/default/account/forms/forgotten_password.php +++ b/views/default/account/forms/forgotten_password.php @@ -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 diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php index 030375a19..189431698 100644 --- a/views/default/account/forms/login.php +++ b/views/default/account/forms/login.php @@ -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 diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php index 8ceeaab8f..99fdea272 100644 --- a/views/default/account/forms/register.php +++ b/views/default/account/forms/register.php @@ -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 diff --git a/views/default/account/forms/useradd.php b/views/default/account/forms/useradd.php index dac31a692..09b4c4718 100644 --- a/views/default/account/forms/useradd.php +++ b/views/default/account/forms/useradd.php @@ -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 diff --git a/views/default/admin/main.php b/views/default/admin/main.php index 7922de906..fc143244d 100644 --- a/views/default/admin/main.php +++ b/views/default/admin/main.php @@ -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>"; diff --git a/views/default/admin/main_opt/plugins.php b/views/default/admin/main_opt/plugins.php index 33467f7a2..b1e2f0078 100644 --- a/views/default/admin/main_opt/plugins.php +++ b/views/default/admin/main_opt/plugins.php @@ -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 diff --git a/views/default/admin/main_opt/site.php b/views/default/admin/main_opt/site.php index 0cfd9f70c..7c34015ba 100644 --- a/views/default/admin/main_opt/site.php +++ b/views/default/admin/main_opt/site.php @@ -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> diff --git a/views/default/admin/main_opt/statistics.php b/views/default/admin/main_opt/statistics.php index b42825fa8..fec4c3f20 100644 --- a/views/default/admin/main_opt/statistics.php +++ b/views/default/admin/main_opt/statistics.php @@ -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> diff --git a/views/default/admin/main_opt/user.php b/views/default/admin/main_opt/user.php index 284bab255..e82f97625 100644 --- a/views/default/admin/main_opt/user.php +++ b/views/default/admin/main_opt/user.php @@ -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> diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php index e62943d46..f73530f44 100644 --- a/views/default/admin/plugins.php +++ b/views/default/admin/plugins.php @@ -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 diff --git a/views/default/admin/plugins_opt/plugin.php b/views/default/admin/plugins_opt/plugin.php index 8a7850ed6..33718f2ac 100644 --- a/views/default/admin/plugins_opt/plugin.php +++ b/views/default/admin/plugins_opt/plugin.php @@ -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"> @@ -63,27 +62,27 @@ </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 diff --git a/views/default/admin/site.php b/views/default/admin/site.php index 077ce3bf3..67cfca5a1 100644 --- a/views/default/admin/site.php +++ b/views/default/admin/site.php @@ -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 diff --git a/views/default/admin/statistics.php b/views/default/admin/statistics.php index 4e0f7c3b1..7c987a607 100644 --- a/views/default/admin/statistics.php +++ b/views/default/admin/statistics.php @@ -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 diff --git a/views/default/admin/statistics_opt/basic.php b/views/default/admin/statistics_opt/basic.php index aa6b48edf..eed94c76b 100644 --- a/views/default/admin/statistics_opt/basic.php +++ b/views/default/admin/statistics_opt/basic.php @@ -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 diff --git a/views/default/admin/statistics_opt/numentities.php b/views/default/admin/statistics_opt/numentities.php index b48b86319..9f67512e1 100644 --- a/views/default/admin/statistics_opt/numentities.php +++ b/views/default/admin/statistics_opt/numentities.php @@ -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 diff --git a/views/default/admin/statistics_opt/online.php b/views/default/admin/statistics_opt/online.php index 7b82ae085..70a2979c1 100644 --- a/views/default/admin/statistics_opt/online.php +++ b/views/default/admin/statistics_opt/online.php @@ -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> diff --git a/views/default/admin/user.php b/views/default/admin/user.php index afd4bdd51..409afbe88 100644 --- a/views/default/admin/user.php +++ b/views/default/admin/user.php @@ -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 diff --git a/views/default/admin/user_opt/adduser.php b/views/default/admin/user_opt/adduser.php index 146a7bfa7..759678bc1 100644 --- a/views/default/admin/user_opt/adduser.php +++ b/views/default/admin/user_opt/adduser.php @@ -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"> diff --git a/views/default/admin/user_opt/search.php b/views/default/admin/user_opt/search.php index b7518bcd5..80838a753 100644 --- a/views/default/admin/user_opt/search.php +++ b/views/default/admin/user_opt/search.php @@ -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"> @@ -14,10 +14,10 @@ <?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> diff --git a/views/default/ajax/loader.php b/views/default/ajax/loader.php index 430170aab..7942ba470 100644 --- a/views/default/ajax/loader.php +++ b/views/default/ajax/loader.php @@ -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 diff --git a/views/default/annotation/annotate.php b/views/default/annotation/annotate.php index d2869536a..b4e68c9b2 100644 --- a/views/default/annotation/annotate.php +++ b/views/default/annotation/annotate.php @@ -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 diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 1ecf7ad8e..ca0f69eaf 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -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 diff --git a/views/default/api/output.php b/views/default/api/output.php index 112b09e64..57b8461ea 100644 --- a/views/default/api/output.php +++ b/views/default/api/output.php @@ -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%"> @@ -24,19 +24,19 @@ 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 } ?> diff --git a/views/default/basic_elements/welcome.php b/views/default/basic_elements/welcome.php index 1a37a464e..297daa830 100644 --- a/views/default/basic_elements/welcome.php +++ b/views/default/basic_elements/welcome.php @@ -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> diff --git a/views/default/canvas/default.php b/views/default/canvas/default.php index a5c30fe52..0cfa8b49a 100644 --- a/views/default/canvas/default.php +++ b/views/default/canvas/default.php @@ -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 diff --git a/views/default/canvas/layouts/edit_layout.php b/views/default/canvas/layouts/edit_layout.php index b43ff4255..0d2997965 100644 --- a/views/default/canvas/layouts/edit_layout.php +++ b/views/default/canvas/layouts/edit_layout.php @@ -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"> diff --git a/views/default/canvas/layouts/one_column.php b/views/default/canvas/layouts/one_column.php index bb5681f4c..c71c2def6 100644 --- a/views/default/canvas/layouts/one_column.php +++ b/views/default/canvas/layouts/one_column.php @@ -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 diff --git a/views/default/canvas/layouts/sidebar_boxes.php b/views/default/canvas/layouts/sidebar_boxes.php index f6ae93a2c..d639901c0 100644 --- a/views/default/canvas/layouts/sidebar_boxes.php +++ b/views/default/canvas/layouts/sidebar_boxes.php @@ -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 --> diff --git a/views/default/canvas/layouts/two_column_left_sidebar.php b/views/default/canvas/layouts/two_column_left_sidebar.php index 4be8939bb..40eb77b1a 100644 --- a/views/default/canvas/layouts/two_column_left_sidebar.php +++ b/views/default/canvas/layouts/two_column_left_sidebar.php @@ -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 --> diff --git a/views/default/canvas/layouts/two_column_right_sidebar.php b/views/default/canvas/layouts/two_column_right_sidebar.php index ab38e6529..feaa993b5 100644 --- a/views/default/canvas/layouts/two_column_right_sidebar.php +++ b/views/default/canvas/layouts/two_column_right_sidebar.php @@ -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 diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index 04df22bf9..f6c9dec79 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -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> @@ -77,24 +76,23 @@ <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 @@ -106,12 +104,12 @@ } $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); ?>" /> @@ -124,19 +122,19 @@ <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> @@ -155,8 +153,8 @@ <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); ?>" /> @@ -171,7 +169,7 @@ </tr></table> <?php - + } } ?> @@ -196,8 +194,8 @@ <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); ?>" /> @@ -212,7 +210,7 @@ </tr></table> <?php - + } } ?> @@ -244,20 +242,20 @@ </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 --> @@ -269,54 +267,52 @@ <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 diff --git a/views/default/canvas_header/submenu_group.php b/views/default/canvas_header/submenu_group.php index a5995b240..2ec9ab451 100644 --- a/views/default/canvas_header/submenu_group.php +++ b/views/default/canvas_header/submenu_group.php @@ -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 diff --git a/views/default/canvas_header/submenu_template.php b/views/default/canvas_header/submenu_template.php index 143b0311e..0210e865f 100644 --- a/views/default/canvas_header/submenu_template.php +++ b/views/default/canvas_header/submenu_template.php @@ -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 diff --git a/views/default/comments/forms/edit.php b/views/default/comments/forms/edit.php index b629fc3f0..3116bd3da 100644 --- a/views/default/comments/forms/edit.php +++ b/views/default/comments/forms/edit.php @@ -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 diff --git a/views/default/dashboard/blurb.php b/views/default/dashboard/blurb.php index 1bde24736..4b71e70e1 100644 --- a/views/default/dashboard/blurb.php +++ b/views/default/dashboard/blurb.php @@ -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 diff --git a/views/default/export/entity.php b/views/default/export/entity.php index 3bca680f8..0bbc9d079 100644 --- a/views/default/export/entity.php +++ b/views/default/export/entity.php @@ -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) { @@ -47,13 +49,13 @@ <?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) { diff --git a/views/default/export/metadata.php b/views/default/export/metadata.php index d021ba436..32a2fc8ed 100644 --- a/views/default/export/metadata.php +++ b/views/default/export/metadata.php @@ -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; diff --git a/views/default/export/relationship.php b/views/default/export/relationship.php index a91d38115..ec6a94bd4 100644 --- a/views/default/export/relationship.php +++ b/views/default/export/relationship.php @@ -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 diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php index 812623cb1..deadb2f6a 100644 --- a/views/default/friends/collection.php +++ b/views/default/friends/collection.php @@ -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>"; diff --git a/views/default/friends/collections.php b/views/default/friends/collections.php index c785cd68e..a013dc1da 100644 --- a/views/default/friends/collections.php +++ b/views/default/friends/collections.php @@ -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> diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php index a4ad59866..8f3c684a8 100644 --- a/views/default/friends/collectiontabs.php +++ b/views/default/friends/collectiontabs.php @@ -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; - }); + }); }); diff --git a/views/default/friends/forms/collectionfields.php b/views/default/friends/forms/collectionfields.php index bec7212ee..f9d8ac5ff 100644 --- a/views/default/friends/forms/collectionfields.php +++ b/views/default/friends/forms/collectionfields.php @@ -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 diff --git a/views/default/friends/forms/edit.php b/views/default/friends/forms/edit.php index c35bcaba3..5751950d8 100644 --- a/views/default/friends/forms/edit.php +++ b/views/default/friends/forms/edit.php @@ -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 diff --git a/views/default/friends/list.php b/views/default/friends/list.php index 3907479bd..7bc42a015 100644 --- a/views/default/friends/list.php +++ b/views/default/friends/list.php @@ -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 diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index 319088601..1ac8b23af 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -1,115 +1,110 @@ <?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 = []; @@ -123,205 +118,197 @@ 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 diff --git a/views/default/friends/river/create.php b/views/default/friends/river/create.php index 04947568b..e577ba721 100644 --- a/views/default/friends/river/create.php +++ b/views/default/friends/river/create.php @@ -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 |