aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
commitc5cc2821311012a8a4385a304a043c4b41f2afbb (patch)
tree3703351e4b5d56905eb52547d6129ffa14cb2a32 /views/default
parent775a5f08c501acc565c69659022bc31052677485 (diff)
downloadelgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz
elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/account/forms/login.php56
-rw-r--r--views/default/account/forms/register.php42
-rw-r--r--views/default/admin/main.php32
-rw-r--r--views/default/admin/plugins_opt/plugin.php64
-rw-r--r--views/default/admin/statistics.php24
-rw-r--r--views/default/admin/statistics_opt/numentities.php102
-rw-r--r--views/default/admin/statistics_opt/online.php40
-rw-r--r--views/default/admin/user_opt/search.php10
-rw-r--r--views/default/ajax/loader.php52
-rw-r--r--views/default/annotation/annotate.php46
-rw-r--r--views/default/annotation/generic_comment.php120
-rw-r--r--views/default/basic_elements/welcome.php32
-rw-r--r--views/default/canvas/default.php36
-rw-r--r--views/default/canvas/layouts/edit_layout.php34
-rw-r--r--views/default/canvas/layouts/sidebar_boxes.php60
-rw-r--r--views/default/canvas_header/submenu_group.php28
-rw-r--r--views/default/canvas_header/submenu_template.php30
-rw-r--r--views/default/comments/forms/edit.php44
-rw-r--r--views/default/dashboard/blurb.php22
-rw-r--r--views/default/embed/addcontentjs.php6
-rw-r--r--views/default/embed/js.php12
-rw-r--r--views/default/friends/collection.php114
-rw-r--r--views/default/friends/collections.php104
-rw-r--r--views/default/friends/collectiontabs.php96
-rw-r--r--views/default/friends/forms/collectionfields.php44
-rw-r--r--views/default/friends/forms/edit.php4
-rw-r--r--views/default/friends/list.php48
-rw-r--r--views/default/friends/picker.php652
-rw-r--r--views/default/friends/river/create.php36
-rw-r--r--views/default/friends/tablelistcountupdate.php38
-rw-r--r--views/default/input/access.php108
-rw-r--r--views/default/input/calendar.php82
-rw-r--r--views/default/input/checkboxes.php84
-rw-r--r--views/default/input/email.php38
-rw-r--r--views/default/input/file.php42
-rw-r--r--views/default/input/longtext.php38
-rw-r--r--views/default/input/password.php38
-rw-r--r--views/default/input/plaintext.php44
-rw-r--r--views/default/input/pulldown.php70
-rw-r--r--views/default/input/radio.php62
-rw-r--r--views/default/input/tags.php78
-rw-r--r--views/default/input/text.php38
-rw-r--r--views/default/input/url.php38
-rw-r--r--views/default/js/friendsPickerv1.php186
-rw-r--r--views/default/js/initialise_elgg.php592
-rw-r--r--views/default/js/upload_js.php112
-rw-r--r--views/default/messages/errors/error.php34
-rw-r--r--views/default/messages/errors/list.php112
-rw-r--r--views/default/messages/exceptions/exception.php30
-rw-r--r--views/default/messages/list.php44
-rw-r--r--views/default/messages/messages/list.php114
-rw-r--r--views/default/messages/messages/message.php34
-rw-r--r--views/default/navigation/viewtype.php62
-rw-r--r--views/default/notifications/settings/usersettings.php84
-rw-r--r--views/default/object/widget.php26
-rw-r--r--views/default/output/calendar.php26
-rw-r--r--views/default/output/checkboxes.php32
-rw-r--r--views/default/output/confirmlink.php54
-rw-r--r--views/default/output/date.php36
-rw-r--r--views/default/output/email.php36
-rw-r--r--views/default/output/longtext.php36
-rw-r--r--views/default/output/pulldown.php32
-rw-r--r--views/default/output/radio.php32
-rw-r--r--views/default/output/tagcloud.php98
-rw-r--r--views/default/output/tags.php104
-rw-r--r--views/default/output/text.php32
-rw-r--r--views/default/output/url.php46
-rw-r--r--views/default/page_elements/contentwrapper.php20
-rw-r--r--views/default/page_elements/header_contents.php44
-rw-r--r--views/default/page_elements/owner_block.php194
-rw-r--r--views/default/river/item/list.php100
-rw-r--r--views/default/river/item/noaccess.php8
-rw-r--r--views/default/river/item/wrapper.php74
-rw-r--r--views/default/river/wrapper.php20
-rw-r--r--views/default/settings/install.php32
-rw-r--r--views/default/settings/system.php138
-rw-r--r--views/default/settings/upgrading.php36
-rw-r--r--views/default/spotlight/default.php72
-rw-r--r--views/default/text/about.php28
-rw-r--r--views/default/text/privacy_view.php30
-rw-r--r--views/default/text/tos_view.php22
-rw-r--r--views/default/upload/upload_form_content.php230
-rw-r--r--views/default/user/default.php40
-rw-r--r--views/default/user/settings/default_access.php54
-rw-r--r--views/default/user/settings/email.php48
-rw-r--r--views/default/user/settings/name.php48
-rw-r--r--views/default/user/settings/password.php50
-rw-r--r--views/default/usersettings/statistics_opt/numentities.php100
-rw-r--r--views/default/welcome.php34
-rw-r--r--views/default/widgets/editwrapper.php74
-rw-r--r--views/default/widgets/wrapper.php224
91 files changed, 3251 insertions, 3251 deletions
diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php
index 11edfc25f..52e8b8ee1 100644
--- a/views/default/account/forms/login.php
+++ b/views/default/account/forms/login.php
@@ -1,37 +1,37 @@
-<?php
-
- /**
- * Elgg login form
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg login form
+ *
+ * @package Elgg
+ * @subpackage Core
- * @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>";
-
+ * @author Curverider Ltd
+
+ * @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>";
+
//<input name=\"username\" type=\"text\" class="general-textarea" /></label>
$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>
+ $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> \ No newline at end of file
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
index 16307fd0d..8ceeaab8f 100644
--- a/views/default/account/forms/register.php
+++ b/views/default/account/forms/register.php
@@ -1,22 +1,22 @@
-<?php
-
- /**
- * Elgg register form
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg register form
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
+ * @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 = 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 />";
@@ -31,15 +31,15 @@
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' => '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">
+ $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)) ?>
+ <?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/admin/main.php b/views/default/admin/main.php
index 98c9495e1..7922de906 100644
--- a/views/default/admin/main.php
+++ b/views/default/admin/main.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg administration main screen
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg administration main screen
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- // Description of what's going on
- echo "<p>" . elgg_view('output/longtext', array('value' => elgg_echo("admin:description"))) . "</p>";
-
-
-
+ * @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
diff --git a/views/default/admin/plugins_opt/plugin.php b/views/default/admin/plugins_opt/plugin.php
index 375f27a01..8a7850ed6 100644
--- a/views/default/admin/plugins_opt/plugin.php
+++ b/views/default/admin/plugins_opt/plugin.php
@@ -54,42 +54,42 @@
<?php } ?>
</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">
- <?php echo elgg_view("object/plugin", array('plugin' => $plugin, 'entity' => find_plugin_settings($plugin))) ?>
- </div>
- </div>
- <?php } ?>
-
- <?php
-
- if ($manifest) {
-
- ?>
- <div class="plugin_description"><?php echo elgg_view('output/longtext',array('value' => $manifest['description'])); ?></div>
- <?php
-
- }
-
- ?>
+ <h3><?php echo $plugin; ?><?php if (elgg_view("settings/{$plugin}/edit")) { ?> <a class="pluginsettings_link">[<?php echo elgg_echo('settings'); ?>]</a><?php } ?></h3>
- <p><a class="manifest_details"><?php echo elgg_echo("admin:plugins:label:moreinfo"); ?></a></p>
+ <?php if (elgg_view("settings/{$plugin}/edit")) { ?>
+ <div class="pluginsettings">
+ <div id="<?php echo $plugin; ?>_settings">
+ <?php echo elgg_view("object/plugin", array('plugin' => $plugin, 'entity' => find_plugin_settings($plugin))) ?>
+ </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
- if (!isset($manifest['elgg_version']))
- echo elgg_echo('admin:plugins:warning:elggversionunknown');
- else
- echo elgg_echo('admin:plugins:warning:elggtoolow');
- ?>
- </div>
+ <?php if ($manifest) { ?>
+ <?php if ((!$version_check_valid) || (!isset($manifest['elgg_version']))) { ?>
+ <div id="version_check">
+ <?php
+ if (!isset($manifest['elgg_version']))
+ echo elgg_echo('admin:plugins:warning:elggversionunknown');
+ else
+ echo elgg_echo('admin:plugins:warning:elggtoolow');
+ ?>
+ </div>
<?php } ?>
<div><?php echo elgg_echo('admin:plugins:label:version') . ": ". $manifest['version'] ?></div>
<div><?php echo elgg_echo('admin:plugins:label:author') . ": ". $manifest['author'] ?></div>
diff --git a/views/default/admin/statistics.php b/views/default/admin/statistics.php
index bf4818b64..4e0f7c3b1 100644
--- a/views/default/admin/statistics.php
+++ b/views/default/admin/statistics.php
@@ -1,15 +1,15 @@
-<?php
- /**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
- global $CONFIG;
-
+ * @link http://elgg.org/
+ */
+
+ global $CONFIG;
+
?> \ 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 d187655c3..b48b86319 100644
--- a/views/default/admin/statistics_opt/numentities.php
+++ b/views/default/admin/statistics_opt/numentities.php
@@ -1,55 +1,55 @@
-<?php
- /**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-
- // Get entity statistics
+ * @link http://elgg.org/
+ */
+
+
+ // 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';
-
- 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)) {
- $a = "$k $a";
- }
- }
- echo <<< END
- <tr class="{$even_odd}">
- <td class="column_one">{$a}:</td>
- <td>{$b}</td>
- </tr>
-END;
- }
- }
- ?>
- </table>
+ $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';
+
+ 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)) {
+ $a = "$k $a";
+ }
+ }
+ echo <<< END
+ <tr class="{$even_odd}">
+ <td class="column_one">{$a}:</td>
+ <td>{$b}</td>
+ </tr>
+END;
+ }
+ }
+ ?>
+ </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 403168ef0..7b82ae085 100644
--- a/views/default/admin/statistics_opt/online.php
+++ b/views/default/admin/statistics_opt/online.php
@@ -1,22 +1,22 @@
-<?php
- /**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
- // 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; ?>
-</div>
+ * @link http://elgg.org/
+ */
+
+ // 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; ?>
+</div>
diff --git a/views/default/admin/user_opt/search.php b/views/default/admin/user_opt/search.php
index 10c9b4088..b7518bcd5 100644
--- a/views/default/admin/user_opt/search.php
+++ b/views/default/admin/user_opt/search.php
@@ -11,11 +11,11 @@
<div id="search-box">
<form action="<?php echo $vars['url']; ?>search/" method="get">
<b><?php echo elgg_echo('admin:user:label:search'); ?></b>
- <?php
-
- echo elgg_view('input/text',array('internalname' => 'tag'));
-
- ?>
+ <?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'); ?>"
value="<?php echo elgg_echo('admin:user:label:seachbutton'); ?>" />
diff --git a/views/default/ajax/loader.php b/views/default/ajax/loader.php
index 5fe407fd5..430170aab 100644
--- a/views/default/ajax/loader.php
+++ b/views/default/ajax/loader.php
@@ -1,29 +1,29 @@
-<?php
-
- /**
- * Elgg AJAX loader
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg AJAX loader
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- $loader = <<< END
-
- <div align="center" class="ajax_loader"></div>
-
-END;
-
- $loader = str_replace("\n","",$loader);
- $loader = str_replace("\r","",$loader);
-
- if (isset($vars['slashes']) && $vars['slashes'] == true) {
- $loader = addslashes($loader);
- }
-
- echo $loader;
-
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $loader = <<< END
+
+ <div align="center" class="ajax_loader"></div>
+
+END;
+
+ $loader = str_replace("\n","",$loader);
+ $loader = str_replace("\r","",$loader);
+
+ if (isset($vars['slashes']) && $vars['slashes'] == true) {
+ $loader = addslashes($loader);
+ }
+
+ echo $loader;
+
?> \ No newline at end of file
diff --git a/views/default/annotation/annotate.php b/views/default/annotation/annotate.php
index cc42e1035..dfff81e83 100644
--- a/views/default/annotation/annotate.php
+++ b/views/default/annotation/annotate.php
@@ -1,24 +1,24 @@
-<?php
-
- $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
- $object = get_entity($vars['item']->object_guid);
- $url = $object->getURL();
- $subtype = get_subtype_from_id($object->subtype);
- $comment = $object->getAnnotations("generic_comment", 1, 0, "desc");
- foreach($comment as $c){
- $contents = $c->value;
- }
- $contents = strip_tags($contents);//this is so we don't get large images etc in the activity river
- $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() . "\">" . $object->title . "</a>";
- $string .= "<div class=\"river_content_display\">";
- if(strlen($contents) > 200) {
- $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
- }else{
- $string .= $contents;
- }
- $string .= "</div>";
-?>
-
+<?php
+
+ $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+ $object = get_entity($vars['item']->object_guid);
+ $url = $object->getURL();
+ $subtype = get_subtype_from_id($object->subtype);
+ $comment = $object->getAnnotations("generic_comment", 1, 0, "desc");
+ foreach($comment as $c){
+ $contents = $c->value;
+ }
+ $contents = strip_tags($contents);//this is so we don't get large images etc in the activity river
+ $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() . "\">" . $object->title . "</a>";
+ $string .= "<div class=\"river_content_display\">";
+ 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
diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php
index 43254d610..1ecf7ad8e 100644
--- a/views/default/annotation/generic_comment.php
+++ b/views/default/annotation/generic_comment.php
@@ -1,61 +1,61 @@
-<?php
-
- /**
- * 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 -->
+<?php
+
+ /**
+ * 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
diff --git a/views/default/basic_elements/welcome.php b/views/default/basic_elements/welcome.php
index 89b6e58d3..1a37a464e 100644
--- a/views/default/basic_elements/welcome.php
+++ b/views/default/basic_elements/welcome.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg sample welcome page
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg sample welcome page
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- $user = $vars['name'];
-
-?>
-
-<p><?php echo sprintf(elgg_echo('welcome:user'), $user); ?></p>
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $user = $vars['name'];
+
+?>
+
+<p><?php echo sprintf(elgg_echo('welcome:user'), $user); ?></p>
<p><a href="<?php echo $vars['url']; ?>action/logout">[logout]</a></p> \ No newline at end of file
diff --git a/views/default/canvas/default.php b/views/default/canvas/default.php
index 34ff1984d..a5c30fe52 100644
--- a/views/default/canvas/default.php
+++ b/views/default/canvas/default.php
@@ -1,21 +1,21 @@
-<?php
-
- /**
- * Elgg default layout
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * 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}"];
+
+ }
- * @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
diff --git a/views/default/canvas/layouts/edit_layout.php b/views/default/canvas/layouts/edit_layout.php
index 1537f98ae..b43ff4255 100644
--- a/views/default/canvas/layouts/edit_layout.php
+++ b/views/default/canvas/layouts/edit_layout.php
@@ -1,20 +1,20 @@
-<?php
-
- /**
- * Elgg 2 column right sidebar canvas layout
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg 2 column right sidebar canvas layout
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+?>
+
+<div id="blog_edit_page">
+
+<?php if (isset($vars['area1'])) echo $vars['area1']; ?>
- * @link http://elgg.org/
- */
-
-?>
-
-<div id="blog_edit_page">
-
-<?php if (isset($vars['area1'])) echo $vars['area1']; ?>
-
</div> \ 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 6e6f80c21..f6ae93a2c 100644
--- a/views/default/canvas/layouts/sidebar_boxes.php
+++ b/views/default/canvas/layouts/sidebar_boxes.php
@@ -1,30 +1,30 @@
-<?php
-
- /**
- * 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']; ?>
-
-</div><!-- /two_column_left_sidebar -->
-
-<!-- main content -->
-<div id="two_column_left_sidebar_maincontent_boxes">
-
-<?php if (isset($vars['area2'])) echo $vars['area2']; ?>
-
-</div><!-- /two_column_left_sidebar_maincontent -->
-
+<?php
+
+ /**
+ * 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']; ?>
+
+</div><!-- /two_column_left_sidebar -->
+
+<!-- main content -->
+<div id="two_column_left_sidebar_maincontent_boxes">
+
+<?php if (isset($vars['area2'])) echo $vars['area2']; ?>
+
+</div><!-- /two_column_left_sidebar_maincontent -->
+
diff --git a/views/default/canvas_header/submenu_group.php b/views/default/canvas_header/submenu_group.php
index 5af0f0609..a5995b240 100644
--- a/views/default/canvas_header/submenu_group.php
+++ b/views/default/canvas_header/submenu_group.php
@@ -1,15 +1,15 @@
-<?php
-
- 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>";
-
- }
-
+<?php
+
+ 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
diff --git a/views/default/canvas_header/submenu_template.php b/views/default/canvas_header/submenu_template.php
index e73b76f0e..143b0311e 100644
--- a/views/default/canvas_header/submenu_template.php
+++ b/views/default/canvas_header/submenu_template.php
@@ -1,16 +1,16 @@
-<?php
-
- 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 = "";
- }
-
-?>
+<?php
+
+ 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 e13f13977..b629fc3f0 100644
--- a/views/default/comments/forms/edit.php
+++ b/views/default/comments/forms/edit.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg comments add form
- *
- * @package Elgg
+<?php
- * @author Curverider Ltd <info@elgg.com>
+ /**
+ * Elgg comments add form
+ *
+ * @package Elgg
- * @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"));
-
- }
-
+ * @author Curverider Ltd <info@elgg.com>
+
+ * @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
diff --git a/views/default/dashboard/blurb.php b/views/default/dashboard/blurb.php
index 6220ba595..1bde24736 100644
--- a/views/default/dashboard/blurb.php
+++ b/views/default/dashboard/blurb.php
@@ -1,12 +1,12 @@
-<div id="dashboard_info">
-<p>
-<?php
-
- echo elgg_echo("dashboard:nowidgets");
-
-?>
-</p>
-<p>
- <a href="<?php echo $vars['url']; ?>dashboard/latest.php"><?php echo elgg_echo('content:latest:blurb'); ?></a>
-</p>
+<div id="dashboard_info">
+<p>
+<?php
+
+ echo elgg_echo("dashboard:nowidgets");
+
+?>
+</p>
+<p>
+ <a href="<?php echo $vars['url']; ?>dashboard/latest.php"><?php echo elgg_echo('content:latest:blurb'); ?></a>
+</p>
</div> \ No newline at end of file
diff --git a/views/default/embed/addcontentjs.php b/views/default/embed/addcontentjs.php
index e97a51883..481854c4d 100644
--- a/views/default/embed/addcontentjs.php
+++ b/views/default/embed/addcontentjs.php
@@ -1,4 +1,4 @@
-
- var entity;
- $('textarea[name='+entityname+']').val($('textarea[name='+entityname+']').val() + ' ' + content);
+
+ var entity;
+ $('textarea[name='+entityname+']').val($('textarea[name='+entityname+']').val() + ' ' + content);
\ No newline at end of file
diff --git a/views/default/embed/js.php b/views/default/embed/js.php
index 587acad1d..0787a226b 100644
--- a/views/default/embed/js.php
+++ b/views/default/embed/js.php
@@ -1,7 +1,7 @@
-
- function elggUpdateContent(content, entityname) {
- content = ' ' + content + ' ';
- <?php
- echo elgg_view('embed/addcontentjs');
- ?>
+
+ function elggUpdateContent(content, entityname) {
+ content = ' ' + content + ' ';
+ <?php
+ echo elgg_view('embed/addcontentjs');
+ ?>
} \ No newline at end of file
diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php
index 501283fc3..812623cb1 100644
--- a/views/default/friends/collection.php
+++ b/views/default/friends/collection.php
@@ -1,60 +1,60 @@
-<?php
-
- /**
- * Elgg friends collection
- * Lists one of a user's friends collections
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * 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>";
- * @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
diff --git a/views/default/friends/collections.php b/views/default/friends/collections.php
index 63446ec89..c785cd68e 100644
--- a/views/default/friends/collections.php
+++ b/views/default/friends/collections.php
@@ -1,53 +1,53 @@
-<?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>";
-
-?>
-
-<script>
-$(document).ready(function(){
-
-$('#friends_collections_accordian h2').click(function () {
- $(this.parentNode).children("[class=friends_picker]").slideToggle("fast");
- //return false;
-});
-
-});
+<?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>";
+
+?>
+
+<script>
+$(document).ready(function(){
+
+$('#friends_collections_accordian h2').click(function () {
+ $(this.parentNode).children("[class=friends_picker]").slideToggle("fast");
+ //return false;
+});
+
+});
</script> \ No newline at end of file
diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php
index 31ae0eacd..a4ad59866 100644
--- a/views/default/friends/collectiontabs.php
+++ b/views/default/friends/collectiontabs.php
@@ -1,48 +1,48 @@
-<?php
-
- $friendspicker = $vars['friendspicker'];
-
- $collectionid = $vars['collection']->id;
- $ownerid = $vars['owner']->getGUID();
-
-?>
-
-<div id="elgg_horizontal_tabbed_nav">
-<ul>
-<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker . "\">" . elgg_echo('friends:collections:members'); ?></a></li>
-
-<li><a href="#" class="editmembers<?php echo $friendspicker . "\">" . elgg_echo('friends:collections:edit'); ?></a></li>
-
-</ul>
-</div>
-
-<script type="text/javascript">
-$(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
- $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&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;
- });
-
-
-});
-</script>
+<?php
+
+ $friendspicker = $vars['friendspicker'];
+
+ $collectionid = $vars['collection']->id;
+ $ownerid = $vars['owner']->getGUID();
+
+?>
+
+<div id="elgg_horizontal_tabbed_nav">
+<ul>
+<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker . "\">" . elgg_echo('friends:collections:members'); ?></a></li>
+
+<li><a href="#" class="editmembers<?php echo $friendspicker . "\">" . elgg_echo('friends:collections:edit'); ?></a></li>
+
+</ul>
+</div>
+
+<script type="text/javascript">
+$(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
+ $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&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;
+ });
+
+
+});
+</script>
diff --git a/views/default/friends/forms/collectionfields.php b/views/default/friends/forms/collectionfields.php
index 0b387f830..bec7212ee 100644
--- a/views/default/friends/forms/collectionfields.php
+++ b/views/default/friends/forms/collectionfields.php
@@ -1,23 +1,23 @@
-<?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'])) {
-?>
-
- <input type="hidden" name="collection_id" value="<?php echo $vars['collection']->id; ?>" />
-
-<?php
-
- }
-
+<?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'])) {
+?>
+
+ <input type="hidden" name="collection_id" value="<?php echo $vars['collection']->id; ?>" />
+
+<?php
+
+ }
+
?> \ No newline at end of file
diff --git a/views/default/friends/forms/edit.php b/views/default/friends/forms/edit.php
index d9434f10b..c35bcaba3 100644
--- a/views/default/friends/forms/edit.php
+++ b/views/default/friends/forms/edit.php
@@ -16,11 +16,11 @@
// Set title, form destination
if (isset($vars['collection'])) {
$action = "friends/editcollection";
- $title = $vars['collection'][0]->name;
+ $title = $vars['collection'][0]->name;
$highlight = 'default';
} else {
$action = "friends/addcollection";
- $title = "";
+ $title = "";
$highlight = 'all';
}
diff --git a/views/default/friends/list.php b/views/default/friends/list.php
index c6709a2c1..3907479bd 100644
--- a/views/default/friends/list.php
+++ b/views/default/friends/list.php
@@ -1,27 +1,27 @@
-<?php
-
- /**
- * Elgg friends list
- * Lists a user's friends
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * 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);
+
+ }
+
+ }
- * @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
diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php
index 0dcb208aa..319088601 100644
--- a/views/default/friends/picker.php
+++ b/views/default/friends/picker.php
@@ -1,327 +1,327 @@
-<?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";
- } 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
- $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">
-
-<?php
-
- if (isset($vars['content'])) echo $vars['content'];
-
-
-?>
-
- <div id="friends_picker_placeholder<?php echo $friendspicker; ?>">
-
-<?php
-
- }
-
- if (!isset($vars['replacement'])) {
-
- if ($formtarget) {
-?>
-
- <script language="text/javascript">
- $(function() { // onload...do
- $('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
- var inputs = [];
- $(':input', this).each(function() {
- if (this.type != 'checkbox' || (this.type == 'checkbox' && this.checked != false)) {
- inputs.push(this.name + '=' + escape(this.value));
- }
- });
- jQuery.ajax({
- type: "POST",
- data: inputs.join('&'),
- url: this.action,
- success: function(){
- $('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=""> -->
-
-<?php
-
- }
-
-?>
-
- <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 = "";
- }
-
-?>
-
- <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
- //if ($letter == 'Z') break;
-
- if (is_callable('mb_substr'))
- $substr = mb_substr($chararray,strlen($chararray) - 1,1);
- else
- $substr = substr($chararray,strlen($chararray) - 1,1);
- if ($letter == $substr) break;
- //$letter++;
- $letpos++;
- if (is_callable('mb_substr'))
- $letter = mb_substr($chararray,$letpos,1);
- else
- $letter = substr($chararray,$letpos,1);
- }
-
-?>
- </div>
-
-<?php
-
- if ($formtarget) {
-
- 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>
-
-<?php
-
- }
-
-?>
-
- </div>
- </div>
-
-<?php
- } else {
- echo $vars['replacement'];
- }
- if (!$callback) {
-
-?>
-
- </div>
-</div>
-
-
-<?php
-
- }
-
- if (!isset($vars['replacement'])) {
-?>
-
-<script type="text/javascript">
- // 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
-<?php
- 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");
-<?php
- }
-
-?>
- });
-</script>
-
-<?php
-
- }
-
+<?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";
+ } 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
+ $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">
+
+<?php
+
+ if (isset($vars['content'])) echo $vars['content'];
+
+
+?>
+
+ <div id="friends_picker_placeholder<?php echo $friendspicker; ?>">
+
+<?php
+
+ }
+
+ if (!isset($vars['replacement'])) {
+
+ if ($formtarget) {
+?>
+
+ <script language="text/javascript">
+ $(function() { // onload...do
+ $('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
+ var inputs = [];
+ $(':input', this).each(function() {
+ if (this.type != 'checkbox' || (this.type == 'checkbox' && this.checked != false)) {
+ inputs.push(this.name + '=' + escape(this.value));
+ }
+ });
+ jQuery.ajax({
+ type: "POST",
+ data: inputs.join('&'),
+ url: this.action,
+ success: function(){
+ $('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=""> -->
+
+<?php
+
+ }
+
+?>
+
+ <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 = "";
+ }
+
+?>
+
+ <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
+ //if ($letter == 'Z') break;
+
+ if (is_callable('mb_substr'))
+ $substr = mb_substr($chararray,strlen($chararray) - 1,1);
+ else
+ $substr = substr($chararray,strlen($chararray) - 1,1);
+ if ($letter == $substr) break;
+ //$letter++;
+ $letpos++;
+ if (is_callable('mb_substr'))
+ $letter = mb_substr($chararray,$letpos,1);
+ else
+ $letter = substr($chararray,$letpos,1);
+ }
+
+?>
+ </div>
+
+<?php
+
+ if ($formtarget) {
+
+ 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>
+
+<?php
+
+ }
+
+?>
+
+ </div>
+ </div>
+
+<?php
+ } else {
+ echo $vars['replacement'];
+ }
+ if (!$callback) {
+
+?>
+
+ </div>
+</div>
+
+
+<?php
+
+ }
+
+ if (!isset($vars['replacement'])) {
+?>
+
+<script type="text/javascript">
+ // 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
+<?php
+ 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");
+<?php
+ }
+
+?>
+ });
+</script>
+
+<?php
+
+ }
+
?> \ No newline at end of file
diff --git a/views/default/friends/river/create.php b/views/default/friends/river/create.php
index df5d2418b..04947568b 100644
--- a/views/default/friends/river/create.php
+++ b/views/default/friends/river/create.php
@@ -1,19 +1,19 @@
-<?php
-
- $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>";
-
-?>
-
-<?php
- echo $string;
+<?php
+
+ $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>";
+
+?>
+
+<?php
+ echo $string;
?> \ No newline at end of file
diff --git a/views/default/friends/tablelistcountupdate.php b/views/default/friends/tablelistcountupdate.php
index 14728d16a..4c4e26c80 100644
--- a/views/default/friends/tablelistcountupdate.php
+++ b/views/default/friends/tablelistcountupdate.php
@@ -1,22 +1,22 @@
-<?php
-
- /**
- * Elgg friends picker count updater
- * Updates the friends count on a collection
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg friends picker count updater
+ * Updates the friends count on a collection
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['count'] The count
- * @uses $vars['friendspicker'] The friendspicker counter number
- */
-
-?>
-
-<script language="text/javascript">
- $("#friends_membership_count<?php echo $vars['friendspicker']; ?>").html("<?php echo $vars['count']; ?>");
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['count'] The count
+ * @uses $vars['friendspicker'] The friendspicker counter number
+ */
+
+?>
+
+<script language="text/javascript">
+ $("#friends_membership_count<?php echo $vars['friendspicker']; ?>").html("<?php echo $vars['count']; ?>");
</script> \ No newline at end of file
diff --git a/views/default/input/access.php b/views/default/input/access.php
index ccb38b54f..461fbf625 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -1,55 +1,55 @@
-<?php
-
- /**
- * Elgg access level input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-
- if (isset($vars['class'])) $class = $vars['class'];
- if (!$class) $class = "input-access";
-
- if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
- $vars['value'] = get_default_access();
-
-
- if ((!isset($vars['options'])) || (!is_array($vars['options'])))
- {
- $vars['options'] = array();
- $vars['options'] = get_write_access_array();
- }
-
- if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
-
-?>
-
-<select <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
-
- foreach($vars['options'] as $key => $option) {
- if ($key != $vars['value']) {
- echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
- } else {
- echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
- }
- }
-
-?>
-</select>
-
-<?php
-
- }
-
+<?php
+
+ /**
+ * Elgg access level input
+ * Displays a pulldown input field
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
+
+ if (isset($vars['class'])) $class = $vars['class'];
+ if (!$class) $class = "input-access";
+
+ if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
+ $vars['value'] = get_default_access();
+
+
+ if ((!isset($vars['options'])) || (!is_array($vars['options'])))
+ {
+ $vars['options'] = array();
+ $vars['options'] = get_write_access_array();
+ }
+
+ if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
+
+?>
+
+<select <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<?php
+
+ foreach($vars['options'] as $key => $option) {
+ if ($key != $vars['value']) {
+ echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+ } else {
+ echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+ }
+ }
+
+?>
+</select>
+
+<?php
+
+ }
+
?> \ No newline at end of file
diff --git a/views/default/input/calendar.php b/views/default/input/calendar.php
index 69ef01ee7..9dd5b2dc0 100644
--- a/views/default/input/calendar.php
+++ b/views/default/input/calendar.php
@@ -1,44 +1,44 @@
-<?php
-
- /**
- * Elgg calendar input
- * Displays a calendar input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg calendar input
+ * Displays a calendar input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-
- static $calendarjs;
- if (empty($calendarjs)) {
-
- echo <<< END
-
-<script language="JavaScript" src="{$vars['url']}vendors/calendarpopup/CalendarPopup.js"></script>
-
-END;
- $calendarjs = 1;
- }
- $strippedname = sanitise_string($vars['internalname']);
- $js = "cal" . $strippedname;
-
- if ($vars['value'] > 86400) {
- $val = date("F j, Y",$vars['value']);
- } else {
- $val = $vars['value'];
- }
-
-?>
-<script language="JavaScript">
- var cal<?php echo $strippedname; ?> = new CalendarPopup();
-</script>
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" id="<?php echo $strippedname; ?>" value="<?php echo $val; ?>" />
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
+
+ static $calendarjs;
+ if (empty($calendarjs)) {
+
+ echo <<< END
+
+<script language="JavaScript" src="{$vars['url']}vendors/calendarpopup/CalendarPopup.js"></script>
+
+END;
+ $calendarjs = 1;
+ }
+ $strippedname = sanitise_string($vars['internalname']);
+ $js = "cal" . $strippedname;
+
+ if ($vars['value'] > 86400) {
+ $val = date("F j, Y",$vars['value']);
+ } else {
+ $val = $vars['value'];
+ }
+
+?>
+<script language="JavaScript">
+ var cal<?php echo $strippedname; ?> = new CalendarPopup();
+</script>
+<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" id="<?php echo $strippedname; ?>" value="<?php echo $val; ?>" />
<a href="#" onclick="<?php echo $js; ?>.select(document.getElementById('<?php echo $strippedname; ?>'),'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" TITLE="<?php echo $js; ?>.select(document.forms[0].<?php echo $strippedname; ?>,'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" NAME="anchor<?php echo $strippedname; ?>" ID="anchor<?php echo $strippedname; ?>">select</a> \ No newline at end of file
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php
index 7e6c70a54..4e806bbfc 100644
--- a/views/default/input/checkboxes.php
+++ b/views/default/input/checkboxes.php
@@ -1,52 +1,52 @@
-<?php
-
- /**
- * Elgg checkbox input
- * Displays a checkbox input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg checkbox input
+ * Displays a checkbox input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the label => options for the checkbox field
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the label => options for the checkbox field
+ *
+ */
$class = $vars['class'];
- if (!$class) $class = "input-checkboxes";
-
- foreach($vars['options'] as $label => $option) {
- //if (!in_array($option,$vars['value'])) {
- if (is_array($vars['value'])) {
- $valarray = $vars['value'];
- $valarray = array_map('strtolower', $valarray);
- if (!in_array(strtolower($option),$valarray)) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
+ if (!$class) $class = "input-checkboxes";
+
+ foreach($vars['options'] as $label => $option) {
+ //if (!in_array($option,$vars['value'])) {
+ if (is_array($vars['value'])) {
+ $valarray = $vars['value'];
+ $valarray = array_map('strtolower', $valarray);
+ if (!in_array(strtolower($option),$valarray)) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
} else {
- if (strtolower($option) != strtolower($vars['value'])) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
- }
- $labelint = (int) $label;
- if ("{$label}" == "{$labelint}") {
- $label = $option;
+ if (strtolower($option) != strtolower($vars['value'])) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
+ }
+ $labelint = (int) $label;
+ if ("{$label}" == "{$labelint}") {
+ $label = $option;
}
if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\"";
$disabled = "";
- if ($vars['disabled']) $disabled = ' disabled="yes" ';
- echo "<label><input type=\"checkbox\" $id $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
- }
-
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "<label><input type=\"checkbox\" $id $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+ }
+
?> \ No newline at end of file
diff --git a/views/default/input/email.php b/views/default/input/email.php
index 75d7eec39..e1fb61eab 100644
--- a/views/default/input/email.php
+++ b/views/default/input/email.php
@@ -1,24 +1,24 @@
-<?php
-
- /**
- * Elgg email input
- * Displays an email input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg email input
+ * Displays an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
$class = $vars['class'];
- if (!$class) $class = "input-text";
-?>
-
+ if (!$class) $class = "input-text";
+?>
+
<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?>value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> \ No newline at end of file
diff --git a/views/default/input/file.php b/views/default/input/file.php
index ec961b6d0..e707e3ee0 100644
--- a/views/default/input/file.php
+++ b/views/default/input/file.php
@@ -1,26 +1,26 @@
-<?php
-
- /**
- * Elgg file input
- * Displays a file input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg file input
+ * Displays a file input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-
- if (!empty($vars['value'])) {
- echo elgg_echo('fileexists') . "<br />";
- }
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
+
+ if (!empty($vars['value'])) {
+ echo elgg_echo('fileexists') . "<br />";
+ }
$class = $vars['class'];
- if (!$class) $class = "input-file";
-?>
+ if (!$class) $class = "input-file";
+?>
<input type="file" size="30" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>" /> \ No newline at end of file
diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php
index c17b770d4..86b0f3fc4 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg long text input
- * Displays a long text input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg long text input
+ * Displays a long text input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
$class = $vars['class'];
if (!$class) $class = "input-textarea";
-
-?>
-
+
+?>
+
<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> \ No newline at end of file
diff --git a/views/default/input/password.php b/views/default/input/password.php
index 9a7e678fb..8ab0b6935 100644
--- a/views/default/input/password.php
+++ b/views/default/input/password.php
@@ -1,24 +1,24 @@
-<?php
-
- /**
- * Elgg password input
- * Displays a password input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg password input
+ * Displays a password input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
$class = $vars['class'];
- if (!$class) $class = "input-password";
-?>
-
+ if (!$class) $class = "input-password";
+?>
+
<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> \ No newline at end of file
diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php
index ee5854a0a..a99084a43 100644
--- a/views/default/input/plaintext.php
+++ b/views/default/input/plaintext.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg long text input (plaintext)
- * Displays a long text input field that should not be overridden by wysiwyg editors.
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg long text input (plaintext)
+ * Displays a long text input field that should not be overridden by wysiwyg editors.
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
+
+ $class = $vars['class'];
+ if (!$class) $class = "input-textarea";
+
+?>
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-
- $class = $vars['class'];
- if (!$class) $class = "input-textarea";
-
-?>
-
<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> \ No newline at end of file
diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php
index c73e6b6c9..6aa69f428 100644
--- a/views/default/input/pulldown.php
+++ b/views/default/input/pulldown.php
@@ -1,33 +1,33 @@
-<?php
-
- /**
- * Elgg pulldown input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the pulldown field
+<?php
+
+ /**
+ * Elgg pulldown input
+ * Displays a pulldown input field
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the options for the pulldown field
* @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is
- * the value displayed on the button. Replaces $vars['options'] when defined.
- */
+ * the value displayed on the button. Replaces $vars['options'] when defined.
+ */
$class = $vars['class'];
if (!$class) $class = "input-pulldown";
-
-?>
-
-
-<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
+
+?>
+
+
+<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<?php
if ($vars['options_values'])
{
foreach($vars['options_values'] as $value => $option) {
@@ -39,14 +39,14 @@
}
}
else
- {
- foreach($vars['options'] as $option) {
- if ($option != $vars['value']) {
- echo "<option>". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
- } else {
- echo "<option selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
- }
- }
- }
-?>
+ {
+ foreach($vars['options'] as $option) {
+ if ($option != $vars['value']) {
+ echo "<option>". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+ } else {
+ echo "<option selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+ }
+ }
+ }
+?>
</select> \ No newline at end of file
diff --git a/views/default/input/radio.php b/views/default/input/radio.php
index b94ed8080..12e40ccdd 100644
--- a/views/default/input/radio.php
+++ b/views/default/input/radio.php
@@ -1,40 +1,40 @@
-<?php
-
- /**
- * Elgg radio input
- * Displays a radio input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg radio input
+ * Displays a radio input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the radio field as "label" => option
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the options for the radio field as "label" => option
+ *
+ */
$class = $vars['class'];
if (!$class) $class = "input-radio";
-
- foreach($vars['options'] as $label => $option) {
- if (strtolower($option) != strtolower($vars['value'])) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
- $labelint = (int) $label;
- if ("{$label}" == "{$labelint}") {
- $label = $option;
+
+ foreach($vars['options'] as $label => $option) {
+ if (strtolower($option) != strtolower($vars['value'])) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
+ $labelint = (int) $label;
+ if ("{$label}" == "{$labelint}") {
+ $label = $option;
}
if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\"";
- if ($vars['disabled']) $disabled = ' disabled="yes" ';
- echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" $id value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
- }
-
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" $id value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+ }
+
?> \ No newline at end of file
diff --git a/views/default/input/tags.php b/views/default/input/tags.php
index dc38c979d..8793756e2 100644
--- a/views/default/input/tags.php
+++ b/views/default/input/tags.php
@@ -1,45 +1,45 @@
-<?php
-
- /**
- * Elgg tag input
- * Displays a tag input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg tag input
+ * Displays a tag input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['value'] An array of tags
- * @uses $vars['class'] Class override
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['value'] An array of tags
+ * @uses $vars['class'] Class override
+ */
$class = $vars['class'];
if (!$class) $class = "input-tags";
-
- $tags = "";
- if (!empty($vars['value'])) {
- if (is_array($vars['value'])) {
- foreach($vars['value'] as $tag) {
-
- if (!empty($tags)) {
- $tags .= ", ";
- }
- if (is_string($tag)) {
- $tags .= $tag;
- } else {
- $tags .= $tag->value;
- }
-
- }
- } else {
- $tags = $vars['value'];
- }
- }
-
-?>
+
+ $tags = "";
+ if (!empty($vars['value'])) {
+ if (is_array($vars['value'])) {
+ foreach($vars['value'] as $tag) {
+
+ if (!empty($tags)) {
+ $tags .= ", ";
+ }
+ if (is_string($tag)) {
+ $tags .= $tag;
+ } else {
+ $tags .= $tag->value;
+ }
+
+ }
+ } else {
+ $tags = $vars['value'];
+ }
+ }
+
+?>
<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?><?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($tags, ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> \ No newline at end of file
diff --git a/views/default/input/text.php b/views/default/input/text.php
index 86950ff9d..2a30ba081 100644
--- a/views/default/input/text.php
+++ b/views/default/input/text.php
@@ -1,27 +1,27 @@
-<?php
-
- /**
- * Elgg text input
- * Displays a text input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg text input
+ * Displays a text input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
* @uses $vars['disabled'] If true then control is read-only
- * @uses $vars['class'] Class override
- */
+ * @uses $vars['class'] Class override
+ */
$class = $vars['class'];
if (!$class) $class = "input-text";
-
-?>
-
+
+?>
+
<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> \ No newline at end of file
diff --git a/views/default/input/url.php b/views/default/input/url.php
index ba77f486f..82fde938e 100644
--- a/views/default/input/url.php
+++ b/views/default/input/url.php
@@ -1,24 +1,24 @@
-<?php
-
- /**
- * Elgg URL input
- * Displays a URL input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg URL input
+ * Displays a URL input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['class'] Class override
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ * @uses $vars['class'] Class override
+ */
$class = $vars['class'];
- if (!$class) $class = "input-url";
-?>
-
+ if (!$class) $class = "input-url";
+?>
+
<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> \ No newline at end of file
diff --git a/views/default/js/friendsPickerv1.php b/views/default/js/friendsPickerv1.php
index d399b35da..32b495938 100644
--- a/views/default/js/friendsPickerv1.php
+++ b/views/default/js/friendsPickerv1.php
@@ -1,93 +1,93 @@
-/*
- elgg friendsPicker plugin
- adapted from Niall Doherty's excellent Coda-Slider - http://www.ndoherty.com/coda-slider
-*/
-
-
-jQuery.fn.friendsPicker = function(iterator) {
-
- var settings;
- settings = $.extend({ easeFunc: "easeOutExpo", easeTime: 1000, toolTip: false }, settings);
-
- return this.each(function() {
-
- var container = $(this);
- container.addClass("friendsPicker");
- // set panelwidth manually as it's hidden initially - adjust this value for different themes/pagewidths
- var panelWidth = 678;
-
- // count the panels in the container
- var panelCount = container.find("div.panel").size();
- // calculate the width of all the panels lined up end-to-end
- var friendsPicker_containerWidth = panelWidth*panelCount;
- // specify width for the friendsPicker_container
- container.find("div.friendsPicker_container").css("width" , friendsPicker_containerWidth);
-
- // global variables for container.each function below
- var friendsPickerNavigationWidth = 0;
- var currentPanel = 1;
-
- // generate appropriate nav for each container
- container.each(function(i) {
- // generate Left and Right arrows
- $(this).before("<div class='friendsPickerNavigationL' id='friendsPickerNavigationL" + iterator + "'><a href='#'>Left</a><\/div>");
- $(this).after("<div class='friendsPickerNavigationR' id='friendsPickerNavigationR" + iterator + "'><a href='#'>Right</a><\/div>");
-
- // generate a-z tabs
- $(this).before("<div class='friendsPickerNavigation' id='friendsPickerNavigation" + iterator + "'><ul><\/ul><\/div>");
- $(this).find("div.panel").each(function(individualTabItemNumber) {
- $("div#friendsPickerNavigation" + iterator + " ul").append("<li class='tab" + (individualTabItemNumber+1) + "'><a href='#" + (individualTabItemNumber+1) + "'>" + $(this).attr("title") + "<\/a><\/li>");
- });
-
- // tabs navigation
- $("div#friendsPickerNavigation" + iterator + " a").each(function(individualTabItemNumber) {
- // calc friendsPickerNavigationWidth by summing width of each li
- friendsPickerNavigationWidth += $(this).parent().width();
- // set-up individual tab clicks
- $(this).bind("click", function() {
- $(this).addClass("current").parent().parent().find("a").not($(this)).removeClass("current");
- var distanceToMoveFriendsPicker_container = - (panelWidth*individualTabItemNumber);
- currentPanel = individualTabItemNumber + 1;
- $(this).parent().parent().parent().next().find("div.friendsPicker_container").animate({ left: distanceToMoveFriendsPicker_container}, settings.easeTime, settings.easeFunc);
- });
- });
-
- // Right arow click function
- $("div#friendsPickerNavigationR" + iterator + " a").click(function() {
- if (currentPanel == panelCount) {
- var distanceToMoveFriendsPicker_container = 0;
- currentPanel = 1;
- $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().parent().find("a:eq(0)").addClass("current");
- } else {
- var distanceToMoveFriendsPicker_container = - (panelWidth*currentPanel);
- currentPanel += 1;
- $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().next().find("a").addClass("current");
- };
- $(this).parent().parent().find("div.friendsPicker_container").animate({ left: distanceToMoveFriendsPicker_container}, settings.easeTime, settings.easeFunc);
- return false;
- });
-
- // Left arrow click function
- $("div#friendsPickerNavigationL" + iterator + " a").click(function() {
- if (currentPanel == 1) {
- var distanceToMoveFriendsPicker_container = - (panelWidth*(panelCount - 1));
- currentPanel = panelCount;
- $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().parent().find("li:last a").addClass("current");
- } else {
- currentPanel -= 1;
- var distanceToMoveFriendsPicker_container = - (panelWidth*(currentPanel - 1));
- $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().prev().find("a").addClass("current");
- };
- $(this).parent().parent().find("div.friendsPicker_container").animate({ left: distanceToMoveFriendsPicker_container}, settings.easeTime, settings.easeFunc);
- return false;
- });
-
- // apply 'current' class to currently selected tab link
- $("div#friendsPickerNavigation" + iterator + " a:eq(0)").addClass("current");
- });
-
- $("div#friendsPickerNavigation" + iterator).append("<br />");
- });
-};
-
-
+/*
+ elgg friendsPicker plugin
+ adapted from Niall Doherty's excellent Coda-Slider - http://www.ndoherty.com/coda-slider
+*/
+
+
+jQuery.fn.friendsPicker = function(iterator) {
+
+ var settings;
+ settings = $.extend({ easeFunc: "easeOutExpo", easeTime: 1000, toolTip: false }, settings);
+
+ return this.each(function() {
+
+ var container = $(this);
+ container.addClass("friendsPicker");
+ // set panelwidth manually as it's hidden initially - adjust this value for different themes/pagewidths
+ var panelWidth = 678;
+
+ // count the panels in the container
+ var panelCount = container.find("div.panel").size();
+ // calculate the width of all the panels lined up end-to-end
+ var friendsPicker_containerWidth = panelWidth*panelCount;
+ // specify width for the friendsPicker_container
+ container.find("div.friendsPicker_container").css("width" , friendsPicker_containerWidth);
+
+ // global variables for container.each function below
+ var friendsPickerNavigationWidth = 0;
+ var currentPanel = 1;
+
+ // generate appropriate nav for each container
+ container.each(function(i) {
+ // generate Left and Right arrows
+ $(this).before("<div class='friendsPickerNavigationL' id='friendsPickerNavigationL" + iterator + "'><a href='#'>Left</a><\/div>");
+ $(this).after("<div class='friendsPickerNavigationR' id='friendsPickerNavigationR" + iterator + "'><a href='#'>Right</a><\/div>");
+
+ // generate a-z tabs
+ $(this).before("<div class='friendsPickerNavigation' id='friendsPickerNavigation" + iterator + "'><ul><\/ul><\/div>");
+ $(this).find("div.panel").each(function(individualTabItemNumber) {
+ $("div#friendsPickerNavigation" + iterator + " ul").append("<li class='tab" + (individualTabItemNumber+1) + "'><a href='#" + (individualTabItemNumber+1) + "'>" + $(this).attr("title") + "<\/a><\/li>");
+ });
+
+ // tabs navigation
+ $("div#friendsPickerNavigation" + iterator + " a").each(function(individualTabItemNumber) {
+ // calc friendsPickerNavigationWidth by summing width of each li
+ friendsPickerNavigationWidth += $(this).parent().width();
+ // set-up individual tab clicks
+ $(this).bind("click", function() {
+ $(this).addClass("current").parent().parent().find("a").not($(this)).removeClass("current");
+ var distanceToMoveFriendsPicker_container = - (panelWidth*individualTabItemNumber);
+ currentPanel = individualTabItemNumber + 1;
+ $(this).parent().parent().parent().next().find("div.friendsPicker_container").animate({ left: distanceToMoveFriendsPicker_container}, settings.easeTime, settings.easeFunc);
+ });
+ });
+
+ // Right arow click function
+ $("div#friendsPickerNavigationR" + iterator + " a").click(function() {
+ if (currentPanel == panelCount) {
+ var distanceToMoveFriendsPicker_container = 0;
+ currentPanel = 1;
+ $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().parent().find("a:eq(0)").addClass("current");
+ } else {
+ var distanceToMoveFriendsPicker_container = - (panelWidth*currentPanel);
+ currentPanel += 1;
+ $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().next().find("a").addClass("current");
+ };
+ $(this).parent().parent().find("div.friendsPicker_container").animate({ left: distanceToMoveFriendsPicker_container}, settings.easeTime, settings.easeFunc);
+ return false;
+ });
+
+ // Left arrow click function
+ $("div#friendsPickerNavigationL" + iterator + " a").click(function() {
+ if (currentPanel == 1) {
+ var distanceToMoveFriendsPicker_container = - (panelWidth*(panelCount - 1));
+ currentPanel = panelCount;
+ $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().parent().find("li:last a").addClass("current");
+ } else {
+ currentPanel -= 1;
+ var distanceToMoveFriendsPicker_container = - (panelWidth*(currentPanel - 1));
+ $(this).parent().parent().find("div.friendsPickerNavigation a.current").removeClass("current").parent().prev().find("a").addClass("current");
+ };
+ $(this).parent().parent().find("div.friendsPicker_container").animate({ left: distanceToMoveFriendsPicker_container}, settings.easeTime, settings.easeFunc);
+ return false;
+ });
+
+ // apply 'current' class to currently selected tab link
+ $("div#friendsPickerNavigation" + iterator + " a:eq(0)").addClass("current");
+ });
+
+ $("div#friendsPickerNavigation" + iterator).append("<br />");
+ });
+};
+
+
diff --git a/views/default/js/initialise_elgg.php b/views/default/js/initialise_elgg.php
index cf6389aba..e63cd70ef 100644
--- a/views/default/js/initialise_elgg.php
+++ b/views/default/js/initialise_elgg.php
@@ -1,296 +1,296 @@
-$(document).ready(function () {
-
- // COLLAPSABLE WIDGETS (on Dashboard & Profile pages)
- // toggle widget box contents
- $('a.toggle_box_contents').bind('click', toggleContent);
-
- // toggle widget box edit panel
- $('a.toggle_box_edit_panel').click(function () {
- $(this.parentNode.parentNode).children(".collapsable_box_editpanel").slideToggle("fast");
- return false;
- });
-
- // toggle customise edit panel
- $('a.toggle_customise_edit_panel').click(function () {
- $('div#customise_editpanel').slideToggle("fast");
- return false;
- });
-
- // toggle plugin's settings nad more info on admin tools admin
- $('a.pluginsettings_link').click(function () {
- $(this.parentNode.parentNode).children(".pluginsettings").slideToggle("fast");
- return false;
- });
- $('a.manifest_details').click(function () {
- $(this.parentNode.parentNode).children(".manifest_file").slideToggle("fast");
- return false;
- });
- // reusable generic hidden panel
- $('a.collapsibleboxlink').click(function () {
- $(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
- return false;
- });
-
- // WIDGET GALLERY EDIT PANEL
- // Sortable widgets
- var els = ['#leftcolumn_widgets', '#middlecolumn_widgets', '#rightcolumn_widgets', '#widget_picker_gallery' ];
- var $els = $(els.toString());
-
- $els.sortable({
- items: '.draggable_widget',
- handle: '.drag_handle',
- forcePlaceholderSize: true,
- placeholder: 'ui-state-highlight',
- cursor: 'move',
- revert: true,
- opacity: 0.9,
- appendTo: 'body',
- connectWith: els,
- start:function(e,ui) {
-
- },
- stop: function(e,ui) {
- // refresh list before updating hidden fields with new widget order
- $(this).sortable( "refresh" );
-
- var widgetNamesLeft = outputWidgetList('#leftcolumn_widgets');
- var widgetNamesMiddle = outputWidgetList('#middlecolumn_widgets');
- var widgetNamesRight = outputWidgetList('#rightcolumn_widgets');
-
- document.getElementById('debugField1').value = widgetNamesLeft;
- document.getElementById('debugField2').value = widgetNamesMiddle;
- document.getElementById('debugField3').value = widgetNamesRight;
- }
- });
-
- // bind more info buttons - called when new widgets are created
- widget_moreinfo();
-
- // set-up hover class for dragged widgets
- $("#rightcolumn_widgets").droppable({
- accept: ".draggable_widget",
- hoverClass: 'droppable-hover'
- });
- $("#middlecolumn_widgets").droppable({
- accept: ".draggable_widget",
- hoverClass: 'droppable-hover'
- });
- $("#leftcolumn_widgets").droppable({
- accept: ".draggable_widget",
- hoverClass: 'droppable-hover'
- });
-
-}); /* end document ready function */
-
-
-// List active widgets for each page column
-function outputWidgetList(forElement) {
- return( $("input[name='handler'], input[name='guid']", forElement ).makeDelimitedList("value") );
-}
-
-// Make delimited list
-jQuery.fn.makeDelimitedList = function(elementAttribute) {
-
- var delimitedListArray = new Array();
- var listDelimiter = "::";
-
- // Loop over each element in the stack and add the elementAttribute to the array
- this.each(function(e) {
- var listElement = $(this);
- // Add the attribute value to our values array
- delimitedListArray[delimitedListArray.length] = listElement.attr(elementAttribute);
- }
- );
-
- // Return value list by joining the array
- return(delimitedListArray.join(listDelimiter));
-}
-
-
-// Read each widgets collapsed/expanded state from cookie and apply
-function widget_state(forWidget) {
-
- var thisWidgetState = $.cookie(forWidget);
-
- if (thisWidgetState == 'collapsed') {
- forWidget = "#" + forWidget;
- $(forWidget).find("div.collapsable_box_content").hide();
- $(forWidget).find("a.toggle_box_contents").html('+');
- $(forWidget).find("a.toggle_box_edit_panel").fadeOut('medium');
- };
-}
-
-
-// Toggle widgets contents and save to a cookie
-var toggleContent = function(e) {
-var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode);
- if (targetContent.css('display') == 'none') {
- targetContent.slideDown(400);
- $(this).html('-');
- $(this.parentNode).children(".toggle_box_edit_panel").fadeIn('medium');
-
- // set cookie for widget panel open-state
- var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id');
- $.cookie(thisWidgetName, 'expanded', { expires: 365 });
-
- } else {
- targetContent.slideUp(400);
- $(this).html('+');
- $(this.parentNode).children(".toggle_box_edit_panel").fadeOut('medium');
- // make sure edit pane is closed
- $(this.parentNode.parentNode).children(".collapsable_box_editpanel").hide();
-
- // set cookie for widget panel closed-state
- var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id');
- $.cookie(thisWidgetName, 'collapsed', { expires: 365 });
- }
- return false;
-};
-
-// More info tooltip in widget gallery edit panel
-function widget_moreinfo() {
-
- $("img.more_info").hover(function(e) {
- var widgetdescription = $("input[name='description']", this.parentNode.parentNode.parentNode ).attr('value');
- $("body").append("<p id='widget_moreinfo'><b>"+ widgetdescription +" </b></p>");
-
- if (e.pageX < 900) {
- $("#widget_moreinfo")
- .css("top",(e.pageY + 10) + "px")
- .css("left",(e.pageX + 10) + "px")
- .fadeIn("medium");
- }
- else {
- $("#widget_moreinfo")
- .css("top",(e.pageY + 10) + "px")
- .css("left",(e.pageX - 210) + "px")
- .fadeIn("medium");
- }
- },
- function() {
- $("#widget_moreinfo").remove();
- });
-
- $("img.more_info").mousemove(function(e) {
- // action on mousemove
- });
-};
-
-// COOKIES
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
- }
- // CAUTION: Needed to parenthesize options.path and options.domain
- // in the following expressions, otherwise they evaluate to undefined
- // in the packed version for some reason.
- var path = options.path ? '; path=' + (options.path) : '';
- var domain = options.domain ? '; domain=' + (options.domain) : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
-
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
-};
-
-// ELGG TOOLBAR MENU
-$.fn.elgg_topbardropdownmenu = function(options) {
-
- options = $.extend({speed: 350}, options || {});
-
- this.each(function() {
-
- var root = this, zIndex = 5000;
-
- function getSubnav(ele) {
- if (ele.nodeName.toLowerCase() == 'li') {
- var subnav = $('> ul', ele);
- return subnav.length ? subnav[0] : null;
- } else {
-
- return ele;
- }
- }
-
- function getActuator(ele) {
- if (ele.nodeName.toLowerCase() == 'ul') {
- return $(ele).parents('li')[0];
- } else {
- return ele;
- }
- }
-
- function hide() {
- var subnav = getSubnav(this);
- if (!subnav) return;
- $.data(subnav, 'cancelHide', false);
- setTimeout(function() {
- if (!$.data(subnav, 'cancelHide')) {
- $(subnav).slideUp(100);
- }
- }, 250);
- }
-
- function show() {
- var subnav = getSubnav(this);
- if (!subnav) return;
- $.data(subnav, 'cancelHide', true);
- $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
- if (this.nodeName.toLowerCase() == 'ul') {
- var li = getActuator(this);
- $(li).addClass('hover');
- $('> a', li).addClass('hover');
- }
- }
-
- $('ul, li', this).hover(show, hide);
- $('li', this).hover(
- function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
- function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
- );
-
- });
-
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+$(document).ready(function () {
+
+ // COLLAPSABLE WIDGETS (on Dashboard & Profile pages)
+ // toggle widget box contents
+ $('a.toggle_box_contents').bind('click', toggleContent);
+
+ // toggle widget box edit panel
+ $('a.toggle_box_edit_panel').click(function () {
+ $(this.parentNode.parentNode).children(".collapsable_box_editpanel").slideToggle("fast");
+ return false;
+ });
+
+ // toggle customise edit panel
+ $('a.toggle_customise_edit_panel').click(function () {
+ $('div#customise_editpanel').slideToggle("fast");
+ return false;
+ });
+
+ // toggle plugin's settings nad more info on admin tools admin
+ $('a.pluginsettings_link').click(function () {
+ $(this.parentNode.parentNode).children(".pluginsettings").slideToggle("fast");
+ return false;
+ });
+ $('a.manifest_details').click(function () {
+ $(this.parentNode.parentNode).children(".manifest_file").slideToggle("fast");
+ return false;
+ });
+ // reusable generic hidden panel
+ $('a.collapsibleboxlink').click(function () {
+ $(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
+ return false;
+ });
+
+ // WIDGET GALLERY EDIT PANEL
+ // Sortable widgets
+ var els = ['#leftcolumn_widgets', '#middlecolumn_widgets', '#rightcolumn_widgets', '#widget_picker_gallery' ];
+ var $els = $(els.toString());
+
+ $els.sortable({
+ items: '.draggable_widget',
+ handle: '.drag_handle',
+ forcePlaceholderSize: true,
+ placeholder: 'ui-state-highlight',
+ cursor: 'move',
+ revert: true,
+ opacity: 0.9,
+ appendTo: 'body',
+ connectWith: els,
+ start:function(e,ui) {
+
+ },
+ stop: function(e,ui) {
+ // refresh list before updating hidden fields with new widget order
+ $(this).sortable( "refresh" );
+
+ var widgetNamesLeft = outputWidgetList('#leftcolumn_widgets');
+ var widgetNamesMiddle = outputWidgetList('#middlecolumn_widgets');
+ var widgetNamesRight = outputWidgetList('#rightcolumn_widgets');
+
+ document.getElementById('debugField1').value = widgetNamesLeft;
+ document.getElementById('debugField2').value = widgetNamesMiddle;
+ document.getElementById('debugField3').value = widgetNamesRight;
+ }
+ });
+
+ // bind more info buttons - called when new widgets are created
+ widget_moreinfo();
+
+ // set-up hover class for dragged widgets
+ $("#rightcolumn_widgets").droppable({
+ accept: ".draggable_widget",
+ hoverClass: 'droppable-hover'
+ });
+ $("#middlecolumn_widgets").droppable({
+ accept: ".draggable_widget",
+ hoverClass: 'droppable-hover'
+ });
+ $("#leftcolumn_widgets").droppable({
+ accept: ".draggable_widget",
+ hoverClass: 'droppable-hover'
+ });
+
+}); /* end document ready function */
+
+
+// List active widgets for each page column
+function outputWidgetList(forElement) {
+ return( $("input[name='handler'], input[name='guid']", forElement ).makeDelimitedList("value") );
+}
+
+// Make delimited list
+jQuery.fn.makeDelimitedList = function(elementAttribute) {
+
+ var delimitedListArray = new Array();
+ var listDelimiter = "::";
+
+ // Loop over each element in the stack and add the elementAttribute to the array
+ this.each(function(e) {
+ var listElement = $(this);
+ // Add the attribute value to our values array
+ delimitedListArray[delimitedListArray.length] = listElement.attr(elementAttribute);
+ }
+ );
+
+ // Return value list by joining the array
+ return(delimitedListArray.join(listDelimiter));
+}
+
+
+// Read each widgets collapsed/expanded state from cookie and apply
+function widget_state(forWidget) {
+
+ var thisWidgetState = $.cookie(forWidget);
+
+ if (thisWidgetState == 'collapsed') {
+ forWidget = "#" + forWidget;
+ $(forWidget).find("div.collapsable_box_content").hide();
+ $(forWidget).find("a.toggle_box_contents").html('+');
+ $(forWidget).find("a.toggle_box_edit_panel").fadeOut('medium');
+ };
+}
+
+
+// Toggle widgets contents and save to a cookie
+var toggleContent = function(e) {
+var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode);
+ if (targetContent.css('display') == 'none') {
+ targetContent.slideDown(400);
+ $(this).html('-');
+ $(this.parentNode).children(".toggle_box_edit_panel").fadeIn('medium');
+
+ // set cookie for widget panel open-state
+ var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id');
+ $.cookie(thisWidgetName, 'expanded', { expires: 365 });
+
+ } else {
+ targetContent.slideUp(400);
+ $(this).html('+');
+ $(this.parentNode).children(".toggle_box_edit_panel").fadeOut('medium');
+ // make sure edit pane is closed
+ $(this.parentNode.parentNode).children(".collapsable_box_editpanel").hide();
+
+ // set cookie for widget panel closed-state
+ var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id');
+ $.cookie(thisWidgetName, 'collapsed', { expires: 365 });
+ }
+ return false;
+};
+
+// More info tooltip in widget gallery edit panel
+function widget_moreinfo() {
+
+ $("img.more_info").hover(function(e) {
+ var widgetdescription = $("input[name='description']", this.parentNode.parentNode.parentNode ).attr('value');
+ $("body").append("<p id='widget_moreinfo'><b>"+ widgetdescription +" </b></p>");
+
+ if (e.pageX < 900) {
+ $("#widget_moreinfo")
+ .css("top",(e.pageY + 10) + "px")
+ .css("left",(e.pageX + 10) + "px")
+ .fadeIn("medium");
+ }
+ else {
+ $("#widget_moreinfo")
+ .css("top",(e.pageY + 10) + "px")
+ .css("left",(e.pageX - 210) + "px")
+ .fadeIn("medium");
+ }
+ },
+ function() {
+ $("#widget_moreinfo").remove();
+ });
+
+ $("img.more_info").mousemove(function(e) {
+ // action on mousemove
+ });
+};
+
+// COOKIES
+jQuery.cookie = function(name, value, options) {
+ if (typeof value != 'undefined') { // name and value given, set cookie
+ options = options || {};
+ if (value === null) {
+ value = '';
+ options.expires = -1;
+ }
+ var expires = '';
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+ var date;
+ if (typeof options.expires == 'number') {
+ date = new Date();
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+ } else {
+ date = options.expires;
+ }
+ expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+ }
+ // CAUTION: Needed to parenthesize options.path and options.domain
+ // in the following expressions, otherwise they evaluate to undefined
+ // in the packed version for some reason.
+ var path = options.path ? '; path=' + (options.path) : '';
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
+ var secure = options.secure ? '; secure' : '';
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+
+ } else { // only name given, get cookie
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+ }
+};
+
+// ELGG TOOLBAR MENU
+$.fn.elgg_topbardropdownmenu = function(options) {
+
+ options = $.extend({speed: 350}, options || {});
+
+ this.each(function() {
+
+ var root = this, zIndex = 5000;
+
+ function getSubnav(ele) {
+ if (ele.nodeName.toLowerCase() == 'li') {
+ var subnav = $('> ul', ele);
+ return subnav.length ? subnav[0] : null;
+ } else {
+
+ return ele;
+ }
+ }
+
+ function getActuator(ele) {
+ if (ele.nodeName.toLowerCase() == 'ul') {
+ return $(ele).parents('li')[0];
+ } else {
+ return ele;
+ }
+ }
+
+ function hide() {
+ var subnav = getSubnav(this);
+ if (!subnav) return;
+ $.data(subnav, 'cancelHide', false);
+ setTimeout(function() {
+ if (!$.data(subnav, 'cancelHide')) {
+ $(subnav).slideUp(100);
+ }
+ }, 250);
+ }
+
+ function show() {
+ var subnav = getSubnav(this);
+ if (!subnav) return;
+ $.data(subnav, 'cancelHide', true);
+ $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
+ if (this.nodeName.toLowerCase() == 'ul') {
+ var li = getActuator(this);
+ $(li).addClass('hover');
+ $('> a', li).addClass('hover');
+ }
+ }
+
+ $('ul, li', this).hover(show, hide);
+ $('li', this).hover(
+ function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
+ function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
+ );
+
+ });
+
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/views/default/js/upload_js.php b/views/default/js/upload_js.php
index ab8c0dc20..cdd011729 100644
--- a/views/default/js/upload_js.php
+++ b/views/default/js/upload_js.php
@@ -1,57 +1,57 @@
-<script>
-/*
-Part of multi file uploader
-*/
-
-var number_of_files = 1;
-
-// wait for the DOM to be loaded
-$(document).ready(function() {
- // bind 'file_form' and provide a simple callback function
- $('#file_form').submit(function() {
- $('#form_container').hide();
- $('#form_message').html('<div class="contentWrapper"><?php echo $vars['submit_message']; ?></div>');
- $('#form_message').show();
- $(this).ajaxSubmit(function(response_message) {
- $('#form_message').html('<div class="contentWrapper">'+response_message+'</div>');
- });
-
- return false;
- });
-});
-
-function file_generate_bit(bit_label,prefix,classname,field_type,field_size) {
- bit = document.createElement('p');
- label = document.createElement('label');
- textnode = document.createTextNode(bit_label);
- label.appendChild(textnode);
- el = document.createElement('br');
- label.appendChild(el);
- el = document.createElement('input');
- el.type = field_type;
- el.className = classname;
- if (field_size > 0) {
- el.size = field_size;
- }
- el.name = prefix+number_of_files;
- el.value = "";
- label.appendChild(el);
- bit.appendChild(label);
-
- return bit;
-}
-
-function file_addtoform() {
- var o,el;
- o = document.getElementById('option_container');
- title_label = "<?php echo elgg_echo("title"); ?>";
- bit = file_generate_bit(title_label,'title_','input-text','text',0);
- o.appendChild(bit);
- file_label = "<?php echo elgg_echo("file:file"); ?>";
- bit = file_generate_bit(file_label,'upload_','input-file','file',30);
- o.appendChild(bit);
-
- number_of_files++;
- document.file_form.number_of_files.value = number_of_files;
-}
+<script>
+/*
+Part of multi file uploader
+*/
+
+var number_of_files = 1;
+
+// wait for the DOM to be loaded
+$(document).ready(function() {
+ // bind 'file_form' and provide a simple callback function
+ $('#file_form').submit(function() {
+ $('#form_container').hide();
+ $('#form_message').html('<div class="contentWrapper"><?php echo $vars['submit_message']; ?></div>');
+ $('#form_message').show();
+ $(this).ajaxSubmit(function(response_message) {
+ $('#form_message').html('<div class="contentWrapper">'+response_message+'</div>');
+ });
+
+ return false;
+ });
+});
+
+function file_generate_bit(bit_label,prefix,classname,field_type,field_size) {
+ bit = document.createElement('p');
+ label = document.createElement('label');
+ textnode = document.createTextNode(bit_label);
+ label.appendChild(textnode);
+ el = document.createElement('br');
+ label.appendChild(el);
+ el = document.createElement('input');
+ el.type = field_type;
+ el.className = classname;
+ if (field_size > 0) {
+ el.size = field_size;
+ }
+ el.name = prefix+number_of_files;
+ el.value = "";
+ label.appendChild(el);
+ bit.appendChild(label);
+
+ return bit;
+}
+
+function file_addtoform() {
+ var o,el;
+ o = document.getElementById('option_container');
+ title_label = "<?php echo elgg_echo("title"); ?>";
+ bit = file_generate_bit(title_label,'title_','input-text','text',0);
+ o.appendChild(bit);
+ file_label = "<?php echo elgg_echo("file:file"); ?>";
+ bit = file_generate_bit(file_label,'upload_','input-file','file',30);
+ o.appendChild(bit);
+
+ number_of_files++;
+ document.file_form.number_of_files.value = number_of_files;
+}
</script> \ No newline at end of file
diff --git a/views/default/messages/errors/error.php b/views/default/messages/errors/error.php
index 1702142b3..468505c89 100644
--- a/views/default/messages/errors/error.php
+++ b/views/default/messages/errors/error.php
@@ -1,20 +1,20 @@
-<?php
-
- /**
- * Elgg error message
- * Displays a single error message
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg error message
+ * Displays a single error message
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An error message (string)
- */
-?>
-
- <p>
- <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An error message (string)
+ */
+?>
+
+ <p>
+ <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
</p> \ No newline at end of file
diff --git a/views/default/messages/errors/list.php b/views/default/messages/errors/list.php
index 63e0a91f3..e9b9b2ebb 100644
--- a/views/default/messages/errors/list.php
+++ b/views/default/messages/errors/list.php
@@ -1,57 +1,57 @@
-<?php
-
- /**
- * Elgg list errors
- * Lists error messages
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of error messages
- */
-
- if (!empty($vars['object']) && is_array($vars['object'])) {
-
-?>
-<!-- used to fade out the system messages after 3 seconds -->
-<script>
-$(document).ready(function () {
- $('.messages_error').animate({opacity: 1.0}, 1000);
- $('.messages_error').animate({opacity: 1.0}, 5000);
- $('.messages_error').fadeOut('slow');
-
- $('span.closeMessages a').click(function () {
- $(".messages_error").stop();
- $('.messages_error').fadeOut('slow');
- return false;
- });
-
- $('div.messages_error').click(function () {
- $(".messages_error").stop();
- $('.messages_error').fadeOut('slow');
- return false;
- });
-
-});
-</script>
-
- <div class="messages_error">
- <span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
-
-<?php
- foreach($vars['object'] as $error) {
- echo elgg_view('messages/errors/error',array('object' => $error));
- }
-?>
-
- </div>
-<?php
- }
-
-
-
+<?php
+
+ /**
+ * Elgg list errors
+ * Lists error messages
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of error messages
+ */
+
+ if (!empty($vars['object']) && is_array($vars['object'])) {
+
+?>
+<!-- used to fade out the system messages after 3 seconds -->
+<script>
+$(document).ready(function () {
+ $('.messages_error').animate({opacity: 1.0}, 1000);
+ $('.messages_error').animate({opacity: 1.0}, 5000);
+ $('.messages_error').fadeOut('slow');
+
+ $('span.closeMessages a').click(function () {
+ $(".messages_error").stop();
+ $('.messages_error').fadeOut('slow');
+ return false;
+ });
+
+ $('div.messages_error').click(function () {
+ $(".messages_error").stop();
+ $('.messages_error').fadeOut('slow');
+ return false;
+ });
+
+});
+</script>
+
+ <div class="messages_error">
+ <span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
+
+<?php
+ foreach($vars['object'] as $error) {
+ echo elgg_view('messages/errors/error',array('object' => $error));
+ }
+?>
+
+ </div>
+<?php
+ }
+
+
+
?> \ No newline at end of file
diff --git a/views/default/messages/exceptions/exception.php b/views/default/messages/exceptions/exception.php
index 7381c969b..0b482d845 100644
--- a/views/default/messages/exceptions/exception.php
+++ b/views/default/messages/exceptions/exception.php
@@ -1,18 +1,18 @@
-<?php
-
- /**
- * Elgg exception
- * Displays a single exception
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An exception
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An exception
+ */
global $CONFIG;
@@ -39,6 +39,6 @@ END;
}
$title = $class;
-
- echo elgg_view_layout("one_column", elgg_view_title($title) . $body);
+
+ echo elgg_view_layout("one_column", elgg_view_title($title) . $body);
?> \ No newline at end of file
diff --git a/views/default/messages/list.php b/views/default/messages/list.php
index d454841d8..dd02fdac5 100644
--- a/views/default/messages/list.php
+++ b/views/default/messages/list.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg global system message list
- * Lists all system messages
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg global system message list
+ * Lists all system messages
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['object'] The array of message registers
- */
-
- if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
-
- foreach($vars['object'] as $register => $list ) {
- echo elgg_view("messages/{$register}/list", array('object' => $list));
- }
-
- }
-
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] The array of message registers
+ */
+
+ if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
+
+ foreach($vars['object'] as $register => $list ) {
+ echo elgg_view("messages/{$register}/list", array('object' => $list));
+ }
+
+ }
+
?> \ No newline at end of file
diff --git a/views/default/messages/messages/list.php b/views/default/messages/messages/list.php
index 6a1473582..41762c7f4 100644
--- a/views/default/messages/messages/list.php
+++ b/views/default/messages/messages/list.php
@@ -1,58 +1,58 @@
-<?php
-
- /**
- * Elgg list system messages
- * Lists system messages
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of system messages
- */
-
- if (!empty($vars['object']) && is_array($vars['object'])) {
-
-?>
-<!-- used to fade out the system messages after 3 seconds -->
-<script>
-$(document).ready(function () {
- $('.messages').animate({opacity: 1.0}, 1000);
- $('.messages').animate({opacity: 1.0}, 5000);
- $('.messages').fadeOut('slow');
-
- $('span.closeMessages a').click(function () {
- $(".messages").stop();
- $('.messages').fadeOut('slow');
- return false;
- });
-
- $('div.messages').click(function () {
- $(".messages").stop();
- $('.messages').fadeOut('slow');
- return false;
- });
-});
-</script>
-
- <div class="messages">
- <span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
-<?php
-
-
- foreach($vars['object'] as $message) {
- echo elgg_view('messages/messages/message',array('object' => $message));
- }
-
-?>
-
- </div>
-
-<?php
-
- }
-
+<?php
+
+ /**
+ * Elgg list system messages
+ * Lists system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of system messages
+ */
+
+ if (!empty($vars['object']) && is_array($vars['object'])) {
+
+?>
+<!-- used to fade out the system messages after 3 seconds -->
+<script>
+$(document).ready(function () {
+ $('.messages').animate({opacity: 1.0}, 1000);
+ $('.messages').animate({opacity: 1.0}, 5000);
+ $('.messages').fadeOut('slow');
+
+ $('span.closeMessages a').click(function () {
+ $(".messages").stop();
+ $('.messages').fadeOut('slow');
+ return false;
+ });
+
+ $('div.messages').click(function () {
+ $(".messages").stop();
+ $('.messages').fadeOut('slow');
+ return false;
+ });
+});
+</script>
+
+ <div class="messages">
+ <span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
+<?php
+
+
+ foreach($vars['object'] as $message) {
+ echo elgg_view('messages/messages/message',array('object' => $message));
+ }
+
+?>
+
+ </div>
+
+<?php
+
+ }
+
?> \ No newline at end of file
diff --git a/views/default/messages/messages/message.php b/views/default/messages/messages/message.php
index 1221e1001..bd3514e7a 100644
--- a/views/default/messages/messages/message.php
+++ b/views/default/messages/messages/message.php
@@ -1,20 +1,20 @@
-<?php
-
- /**
- * Elgg standard message
- * Displays a single Elgg system message
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg standard message
+ * Displays a single Elgg system message
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['object'] A system message (string)
- */
-?>
-
- <p>
- <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] A system message (string)
+ */
+?>
+
+ <p>
+ <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
</p> \ No newline at end of file
diff --git a/views/default/navigation/viewtype.php b/views/default/navigation/viewtype.php
index 63d79af8b..c5f3a80a1 100644
--- a/views/default/navigation/viewtype.php
+++ b/views/default/navigation/viewtype.php
@@ -1,34 +1,34 @@
-<?php
-
- /**
- * Elgg list view switcher
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg list view switcher
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
-
- $baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']);
-
- if ($vars['viewtype'] == "list") {
- $viewtype = "gallery";
- } else {
- $viewtype = "list";
- }
-
- if (substr_count($baseurl,'?')) {
- $baseurl .= "&search_viewtype=" . $viewtype;
- } else {
- $baseurl .= "?search_viewtype=" . $viewtype;
- }
-
-?>
-
- <div class="contentWrapper">
- <?php echo elgg_echo("viewtype:change") ?>:
- <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a>
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+
+ $baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']);
+
+ if ($vars['viewtype'] == "list") {
+ $viewtype = "gallery";
+ } else {
+ $viewtype = "list";
+ }
+
+ if (substr_count($baseurl,'?')) {
+ $baseurl .= "&search_viewtype=" . $viewtype;
+ } else {
+ $baseurl .= "?search_viewtype=" . $viewtype;
+ }
+
+?>
+
+ <div class="contentWrapper">
+ <?php echo elgg_echo("viewtype:change") ?>:
+ <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a>
</div> \ No newline at end of file
diff --git a/views/default/notifications/settings/usersettings.php b/views/default/notifications/settings/usersettings.php
index 8b34975c7..ff894cd0e 100644
--- a/views/default/notifications/settings/usersettings.php
+++ b/views/default/notifications/settings/usersettings.php
@@ -1,46 +1,46 @@
-<?php
- /**
- * User settings for notifications.
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * User settings for notifications.
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
- global $NOTIFICATION_HANDLERS;
+ * @link http://elgg.org/
+ */
+
+ global $NOTIFICATION_HANDLERS;
$notification_settings = get_user_notification_settings(page_owner());
-
-?>
- <h3><?php echo elgg_echo('notifications:usersettings'); ?></h3>
-
- <p><?php echo elgg_echo('notifications:methods'); ?>
-
- <table>
-<?php
- // Loop through options
- foreach ($NOTIFICATION_HANDLERS as $k => $v)
- {
-?>
- <tr>
- <td><?php echo elgg_echo($k); ?>: </td>
-
- <td>
-<?php
-
- if ($notification_settings->$k) {
- $val = "yes";
- } else {
- $val = "no";
- }
- echo elgg_view('input/radio',array('internalname' => "method[{$k}]", 'options' => array(elgg_echo('option:yes') => 'yes',elgg_echo('option:no') => 'no'), 'value' => $val));
-
-?>
- </td>
- </tr>
-<?php
- }
-?>
+
+?>
+ <h3><?php echo elgg_echo('notifications:usersettings'); ?></h3>
+
+ <p><?php echo elgg_echo('notifications:methods'); ?>
+
+ <table>
+<?php
+ // Loop through options
+ foreach ($NOTIFICATION_HANDLERS as $k => $v)
+ {
+?>
+ <tr>
+ <td><?php echo elgg_echo($k); ?>: </td>
+
+ <td>
+<?php
+
+ if ($notification_settings->$k) {
+ $val = "yes";
+ } else {
+ $val = "no";
+ }
+ echo elgg_view('input/radio',array('internalname' => "method[{$k}]", 'options' => array(elgg_echo('option:yes') => 'yes',elgg_echo('option:no') => 'no'), 'value' => $val));
+
+?>
+ </td>
+ </tr>
+<?php
+ }
+?>
</table> \ No newline at end of file
diff --git a/views/default/object/widget.php b/views/default/object/widget.php
index a08eaf2dc..b49120e2e 100644
--- a/views/default/object/widget.php
+++ b/views/default/object/widget.php
@@ -1,16 +1,16 @@
-<?php
-
- /**
- * Elgg default widget view
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg default widget view
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ echo elgg_view('widgets/wrapper',$vars);
- * @link http://elgg.org/
- */
-
- echo elgg_view('widgets/wrapper',$vars);
-
?> \ No newline at end of file
diff --git a/views/default/output/calendar.php b/views/default/output/calendar.php
index 353dd9b21..336129aed 100644
--- a/views/default/output/calendar.php
+++ b/views/default/output/calendar.php
@@ -1,19 +1,19 @@
<?php
-
- /**
- * Elgg calendar output
- * Displays a calendar output field
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
+ /**
+ * Elgg calendar output
+ * Displays a calendar output field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ *
+ */
if (is_int($vars['value'])) {
echo date("F j, Y", $vars['value']);
diff --git a/views/default/output/checkboxes.php b/views/default/output/checkboxes.php
index 462d6969e..a93455e28 100644
--- a/views/default/output/checkboxes.php
+++ b/views/default/output/checkboxes.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg text output
- * Displays some text that was input using a standard text field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg text output
+ * Displays some text that was input using a standard text field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['text'] The text to display
- *
- */
-
- echo elgg_view('output/tags',$vars);
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+ echo elgg_view('output/tags',$vars);
?> \ No newline at end of file
diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php
index c5440ab88..bb7e866f2 100644
--- a/views/default/output/confirmlink.php
+++ b/views/default/output/confirmlink.php
@@ -1,24 +1,24 @@
-<?php
-
- /**
- * Elgg confirmation link
- * A link that displays a confirmation dialog before it executes
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg confirmation link
+ * A link that displays a confirmation dialog before it executes
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['text'] The text of the link
- * @uses $vars['href'] The address
- * @uses $vars['confirm'] The dialog text
- *
- */
-
- $confirm = $vars['confirm'];
- if (!$confirm)
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text of the link
+ * @uses $vars['href'] The address
+ * @uses $vars['confirm'] The dialog text
+ *
+ */
+
+ $confirm = $vars['confirm'];
+ if (!$confirm)
$confirm = elgg_echo('question:areyousure');
$link = $vars['href'];
@@ -31,12 +31,12 @@
$sep = "?";
if (strpos($link, '?')>0) $sep = "&";
$link = "$link{$sep}__elgg_token=$token&__elgg_ts=$ts";
- }
-
- if ($vars['class']) {
- $class = 'class="' . $vars['class'] . '"';
- } else {
- $class = '';
- }
-?>
+ }
+
+ if ($vars['class']) {
+ $class = 'class="' . $vars['class'] . '"';
+ } else {
+ $class = '';
+ }
+?>
<a href="<?php echo $link; ?>" <?php echo $class; ?> onclick="return confirm('<?php echo addslashes($confirm); ?>');"><?php echo htmlentities($vars['text'], ENT_QUOTES, 'UTF-8'); ?></a> \ No newline at end of file
diff --git a/views/default/output/date.php b/views/default/output/date.php
index 6973a6c92..d4fba97a0 100644
--- a/views/default/output/date.php
+++ b/views/default/output/date.php
@@ -1,21 +1,21 @@
-<?php
-
- /**
- * Date
- * Displays a properly formatted date
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Date
+ * Displays a properly formatted date
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] A UNIX epoch timestamp
- *
- */
-
- if ($vars['value'] > 86400) {
- echo date("F j, Y",$vars['value']);
- }
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] A UNIX epoch timestamp
+ *
+ */
+
+ if ($vars['value'] > 86400) {
+ echo date("F j, Y",$vars['value']);
+ }
?> \ No newline at end of file
diff --git a/views/default/output/email.php b/views/default/output/email.php
index 6c8e66901..2d454213f 100644
--- a/views/default/output/email.php
+++ b/views/default/output/email.php
@@ -1,21 +1,21 @@
-<?php
-
- /**
- * Elgg email output
- * Displays an email address that was entered using an email input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg email output
+ * Displays an email address that was entered using an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The email address to display
- *
- */
-
- if (!empty($vars['value'])) {
- echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') ."</a>";
- }
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The email address to display
+ *
+ */
+
+ if (!empty($vars['value'])) {
+ echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') ."</a>";
+ }
?> \ No newline at end of file
diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php
index 101e72198..3d130359a 100644
--- a/views/default/output/longtext.php
+++ b/views/default/output/longtext.php
@@ -1,21 +1,21 @@
-<?php
-
- /**
- * Elgg display long text
- * Displays a large amount of text, with new lines converted to line breaks
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg display long text
+ * Displays a large amount of text, with new lines converted to line breaks
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['text'] The text to display
- *
- */
-
- global $CONFIG;
-
- echo autop(parse_urls(filter_tags($vars['value'])));
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+ global $CONFIG;
+
+ echo autop(parse_urls(filter_tags($vars['value'])));
?> \ No newline at end of file
diff --git a/views/default/output/pulldown.php b/views/default/output/pulldown.php
index ebda77471..60b365b11 100644
--- a/views/default/output/pulldown.php
+++ b/views/default/output/pulldown.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg pulldown display
- * Displays a value that was entered into the system via a pulldown
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg pulldown display
+ * Displays a value that was entered into the system via a pulldown
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['text'] The text to display
- *
- */
-
- echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value'];
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+ echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value'];
?> \ No newline at end of file
diff --git a/views/default/output/radio.php b/views/default/output/radio.php
index 1d93dc8a0..78723b555 100644
--- a/views/default/output/radio.php
+++ b/views/default/output/radio.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg text output
- * Displays some text that was input using a standard text field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg text output
+ * Displays some text that was input using a standard text field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['text'] The text to display
- *
- */
-
- echo elgg_view('output/text',$vars);
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+ echo elgg_view('output/text',$vars);
?> \ No newline at end of file
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php
index 10da20034..27d49b089 100644
--- a/views/default/output/tagcloud.php
+++ b/views/default/output/tagcloud.php
@@ -1,52 +1,52 @@
-<?php
-
- /**
- * Elgg tagcloud
- * Displays a tagcloud
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg tagcloud
+ * Displays a tagcloud
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['tagcloud'] An array of stdClass objects with two elements: 'tag' (the text of the tag) and 'total' (the number of elements with this tag)
- *
- */
-
- if (!empty($vars['subtype'])) {
- $subtype = "&subtype=" . urlencode($vars['subtype']);
- } else {
- $subtype = "";
- }
- if (!empty($vars['object'])) {
- $object = "&object=" . urlencode($vars['object']);
- } else {
- $object = "";
- }
-
- if (empty($vars['tagcloud']) && !empty($vars['value']))
- $vars['tagcloud'] = $vars['value'];
-
- if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
-
- $counter = 0;
- $cloud = "";
- $max = 0;
- foreach($vars['tagcloud'] as $tag) {
- if ($tag->total > $max) {
- $max = $tag->total;
- }
- }
- foreach($vars['tagcloud'] as $tag) {
- if (!empty($cloud)) $cloud .= ", ";
- $size = round((log($tag->total) / log($max)) * 100) + 30;
- if ($size < 60) $size = 60;
- $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . $object . $subtype . "\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
- }
- echo $cloud;
-
- }
-
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['tagcloud'] An array of stdClass objects with two elements: 'tag' (the text of the tag) and 'total' (the number of elements with this tag)
+ *
+ */
+
+ if (!empty($vars['subtype'])) {
+ $subtype = "&subtype=" . urlencode($vars['subtype']);
+ } else {
+ $subtype = "";
+ }
+ if (!empty($vars['object'])) {
+ $object = "&object=" . urlencode($vars['object']);
+ } else {
+ $object = "";
+ }
+
+ if (empty($vars['tagcloud']) && !empty($vars['value']))
+ $vars['tagcloud'] = $vars['value'];
+
+ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
+
+ $counter = 0;
+ $cloud = "";
+ $max = 0;
+ foreach($vars['tagcloud'] as $tag) {
+ if ($tag->total > $max) {
+ $max = $tag->total;
+ }
+ }
+ foreach($vars['tagcloud'] as $tag) {
+ if (!empty($cloud)) $cloud .= ", ";
+ $size = round((log($tag->total) / log($max)) * 100) + 30;
+ if ($size < 60) $size = 60;
+ $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . $object . $subtype . "\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ }
+ echo $cloud;
+
+ }
+
?> \ No newline at end of file
diff --git a/views/default/output/tags.php b/views/default/output/tags.php
index 87b23cb63..901fa806b 100644
--- a/views/default/output/tags.php
+++ b/views/default/output/tags.php
@@ -1,55 +1,55 @@
-<?php
-
- /**
- * Elgg tags
- * Displays a list of tags, separated by commas
- *
- * Tags can be a single string (for one tag) or an array of strings
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg tags
+ * Displays a list of tags, separated by commas
+ *
+ * Tags can be a single string (for one tag) or an array of strings
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['tags'] The tags to display
- * @uses $vars['tagtype'] The tagtype, optionally
- */
-
- if (!empty($vars['subtype'])) {
- $subtype = "&subtype=" . urlencode($vars['subtype']);
- } else {
- $subtype = "";
- }
- if (!empty($vars['object'])) {
- $object = "&object=" . urlencode($vars['object']);
- } else {
- $object = "";
- }
-
- if (empty($vars['tags']) && !empty($vars['value']))
- $vars['tags'] = $vars['value'];
- if (!empty($vars['tags'])) {
-
- $tagstr = "";
- if (!is_array($vars['tags']))
- $vars['tags'] = array($vars['tags']);
-
- foreach($vars['tags'] as $tag) {
- if (!empty($tagstr)) {
- $tagstr .= ", ";
- }
- if (!empty($vars['type'])) {
- $type = "&type={$vars['type']}";
- } else {
- $type = "";
- }
- if (is_string($tag)) {
- $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}tag/".urlencode($tag) . "{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
- }
- }
- echo $tagstr;
-
- }
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['tags'] The tags to display
+ * @uses $vars['tagtype'] The tagtype, optionally
+ */
+
+ if (!empty($vars['subtype'])) {
+ $subtype = "&subtype=" . urlencode($vars['subtype']);
+ } else {
+ $subtype = "";
+ }
+ if (!empty($vars['object'])) {
+ $object = "&object=" . urlencode($vars['object']);
+ } else {
+ $object = "";
+ }
+
+ if (empty($vars['tags']) && !empty($vars['value']))
+ $vars['tags'] = $vars['value'];
+ if (!empty($vars['tags'])) {
+
+ $tagstr = "";
+ if (!is_array($vars['tags']))
+ $vars['tags'] = array($vars['tags']);
+
+ foreach($vars['tags'] as $tag) {
+ if (!empty($tagstr)) {
+ $tagstr .= ", ";
+ }
+ if (!empty($vars['type'])) {
+ $type = "&type={$vars['type']}";
+ } else {
+ $type = "";
+ }
+ if (is_string($tag)) {
+ $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}tag/".urlencode($tag) . "{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ }
+ }
+ echo $tagstr;
+
+ }
?> \ No newline at end of file
diff --git a/views/default/output/text.php b/views/default/output/text.php
index ca667f98a..080b81d68 100644
--- a/views/default/output/text.php
+++ b/views/default/output/text.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg text output
- * Displays some text that was input using a standard text field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg text output
+ * Displays some text that was input using a standard text field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['text'] The text to display
- *
- */
-
- echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value'];
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['text'] The text to display
+ *
+ */
+
+ echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value'];
?> \ No newline at end of file
diff --git a/views/default/output/url.php b/views/default/output/url.php
index 87f551ed1..7f72f0dce 100644
--- a/views/default/output/url.php
+++ b/views/default/output/url.php
@@ -1,24 +1,24 @@
-<?php
-
- /**
- * Elgg URL display
- * Displays a URL as a link
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg URL display
+ * Displays a URL as a link
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The URL to display
- *
- */
-
- $val = trim($vars['value']);
- if (!empty($val)) {
- if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) {
- $val = "http://" . $val;
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The URL to display
+ *
+ */
+
+ $val = trim($vars['value']);
+ if (!empty($val)) {
+ if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) {
+ $val = "http://" . $val;
}
if ($vars['is_action'])
@@ -30,8 +30,8 @@
if (strpos($val, '?')>0) $sep = "&";
$val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts";
}
-
- echo "<a href=\"{$val}\" target=\"_blank\">". htmlentities($val, ENT_QUOTES, 'UTF-8'). "</a>";
- }
-
+
+ echo "<a href=\"{$val}\" target=\"_blank\">". htmlentities($val, ENT_QUOTES, 'UTF-8'). "</a>";
+ }
+
?> \ No newline at end of file
diff --git a/views/default/page_elements/contentwrapper.php b/views/default/page_elements/contentwrapper.php
index ff54a0b6e..2cb001b05 100644
--- a/views/default/page_elements/contentwrapper.php
+++ b/views/default/page_elements/contentwrapper.php
@@ -1,11 +1,11 @@
-<div class="contentWrapper<?php
-
- if (isset($vars['subclass'])) echo ' ' . $vars['subclass'];
-
-?>">
-<?php
-
- echo $vars['body'];
-
-?>
+<div class="contentWrapper<?php
+
+ if (isset($vars['subclass'])) echo ' ' . $vars['subclass'];
+
+?>">
+<?php
+
+ echo $vars['body'];
+
+?>
</div> \ No newline at end of file
diff --git a/views/default/page_elements/header_contents.php b/views/default/page_elements/header_contents.php
index 904378ef4..2786a720e 100644
--- a/views/default/page_elements/header_contents.php
+++ b/views/default/page_elements/header_contents.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg header contents
- * This file holds the header output that a user will see
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg header contents
+ * This file holds the header output that a user will see
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- **/
-
-?>
-
-<div id="page_container">
-<div id="page_wrapper">
-
-<div id="layout_header">
-<div id="wrapper_header">
- <!-- display the page title -->
- <h1><a href="<?php echo $vars['url']; ?>"><?php echo $vars['config']->sitename; ?></a></h1>
-</div><!-- /#wrapper_header -->
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ **/
+
+?>
+
+<div id="page_container">
+<div id="page_wrapper">
+
+<div id="layout_header">
+<div id="wrapper_header">
+ <!-- display the page title -->
+ <h1><a href="<?php echo $vars['url']; ?>"><?php echo $vars['config']->sitename; ?></a></h1>
+</div><!-- /#wrapper_header -->
</div><!-- /#layout_header --> \ No newline at end of file
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php
index 8296f2e5e..535d1b064 100644
--- a/views/default/page_elements/owner_block.php
+++ b/views/default/page_elements/owner_block.php
@@ -1,100 +1,100 @@
-<?php
-
- /**
- * Elgg owner block
- * Displays page ownership information
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg owner block
+ * Displays page ownership information
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ */
+
+ $contents = "";
+
+ // Is there a page owner?
+ $owner = page_owner_entity();
+ // if (!$owner && isloggedin()) $owner = $_SESSION['user'];
+ if ($owner instanceof ElggEntity) {
+ $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
+ if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
+ //$info = $owner->name;
+ $info = '<a href="' . $owner->getURL() . '">' . $owner->name . '</a>';
+ }
+ $display = "<div id=\"owner_block_icon\">" . $icon . "</div>";
+ $display .= "<div id=\"owner_block_content\">" . $info . "</div><div class=\"clearfloat ownerblockline\"></div>";
+
+ if ($owner->briefdescription) {
+ $desc = $owner->briefdescription;
+ $display .= "<div id=\"owner_block_desc\">" . $desc . "</div>";
+ }
+
+ $contents .= $display;
+ }
+
+ // Are there feeds to display?
+ global $autofeed;
+
+ if (isset($autofeed) && $autofeed == true) {
+ $url = $url2 = full_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ //if (substr_count($url2,'?')) {
+ // $url2 .= "&view=odd";
+ //} else {
+ // $url2 .= "?view=opendd";
+ //}
+ $label = elgg_echo('feed:rss');
+ //$label2 = elgg_echo('feed:odd');
+ $contents .= <<<END
+
+ <div id="owner_block_rss_feed"><a href="{$url}" rel="nofollow">{$label}</a></div>
+
+END;
+ }
+
+ //the follow are for logged in users only
+ if(isloggedin()){
+
+ //is the bookmark plugin installed?
+ if(is_plugin_enabled('bookmarks')){
+
+ $label3 = elgg_echo('bookmarks:this');
+ $contents .= "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
+
+ }
+
+ //report this button
+ if (is_plugin_enabled('reportedcontent'))
+ {
+ $label4 = elgg_echo('reportedcontent:report');
+ $contents .= "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
+ }
+
+ }
+
+
+ $contents .= elgg_view('owner_block/extend');
+
+ // Have we been asked to inject any content? If so, display it
+ if (isset($vars['content']))
+ $contents .= $vars['content'];
+
+ // Initialise the submenu
+ $submenu = get_submenu(); // elgg_view('canvas_header/submenu');
+ if (!empty($submenu))
+ $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
+
+ if (!empty($contents)) {
+ echo "<div id=\"owner_block\">";
+ echo $contents;
+ echo "</div><div id=\"owner_block_bottom\"></div>";
+ }
- * @link http://elgg.org/
- *
- */
-
- $contents = "";
-
- // Is there a page owner?
- $owner = page_owner_entity();
- // if (!$owner && isloggedin()) $owner = $_SESSION['user'];
- if ($owner instanceof ElggEntity) {
- $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
- if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
- //$info = $owner->name;
- $info = '<a href="' . $owner->getURL() . '">' . $owner->name . '</a>';
- }
- $display = "<div id=\"owner_block_icon\">" . $icon . "</div>";
- $display .= "<div id=\"owner_block_content\">" . $info . "</div><div class=\"clearfloat ownerblockline\"></div>";
-
- if ($owner->briefdescription) {
- $desc = $owner->briefdescription;
- $display .= "<div id=\"owner_block_desc\">" . $desc . "</div>";
- }
-
- $contents .= $display;
- }
-
- // Are there feeds to display?
- global $autofeed;
-
- if (isset($autofeed) && $autofeed == true) {
- $url = $url2 = full_url();
- if (substr_count($url,'?')) {
- $url .= "&view=rss";
- } else {
- $url .= "?view=rss";
- }
- //if (substr_count($url2,'?')) {
- // $url2 .= "&view=odd";
- //} else {
- // $url2 .= "?view=opendd";
- //}
- $label = elgg_echo('feed:rss');
- //$label2 = elgg_echo('feed:odd');
- $contents .= <<<END
-
- <div id="owner_block_rss_feed"><a href="{$url}" rel="nofollow">{$label}</a></div>
-
-END;
- }
-
- //the follow are for logged in users only
- if(isloggedin()){
-
- //is the bookmark plugin installed?
- if(is_plugin_enabled('bookmarks')){
-
- $label3 = elgg_echo('bookmarks:this');
- $contents .= "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
-
- }
-
- //report this button
- if (is_plugin_enabled('reportedcontent'))
- {
- $label4 = elgg_echo('reportedcontent:report');
- $contents .= "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
- }
-
- }
-
-
- $contents .= elgg_view('owner_block/extend');
-
- // Have we been asked to inject any content? If so, display it
- if (isset($vars['content']))
- $contents .= $vars['content'];
-
- // Initialise the submenu
- $submenu = get_submenu(); // elgg_view('canvas_header/submenu');
- if (!empty($submenu))
- $contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
-
- if (!empty($contents)) {
- echo "<div id=\"owner_block\">";
- echo $contents;
- echo "</div><div id=\"owner_block_bottom\"></div>";
- }
-
?> \ No newline at end of file
diff --git a/views/default/river/item/list.php b/views/default/river/item/list.php
index f529aac3f..7bbac0044 100644
--- a/views/default/river/item/list.php
+++ b/views/default/river/item/list.php
@@ -1,51 +1,51 @@
-
-<div class="river_item_list">
-<?php
-
- if (isset($vars['items']) && is_array($vars['items'])) {
-
- $i = 0;
- if (!empty($vars['items']))
- foreach($vars['items'] as $item) {
-
- echo elgg_view_river_item($item);
- $i++;
- if ($i >= $vars['limit']) break;
-
- }
-
- }
-
- if ($vars['pagination'] !== false) {
-
- $baseurl = $_SERVER['REQUEST_URI'];
- $baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl);
-
- $nav = '';
-
- if (sizeof($vars['items']) > $vars['limit']) {
- $newoffset = $vars['offset'] + $vars['limit'];
- $urladdition = 'offset='.$newoffset;
- if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
-
- $nav .= '<a class="back" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
- }
-
- if ($vars['offset'] > 0) {
- $newoffset = $vars['offset'] - $vars['limit'];
- if ($newoffset < 0) $newoffset = 0;
- $urladdition = 'offset='.$newoffset;
- if (substr_count($baseurl,'?')) $prevurl=$baseurl . '&' . $urladdition; else $prevurl=$baseurl . '?' . $urladdition;
-
- $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
- }
-
-
- if (!empty($nav)) {
- echo '<div class="river_pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
- }
-
- }
-
-?>
+
+<div class="river_item_list">
+<?php
+
+ if (isset($vars['items']) && is_array($vars['items'])) {
+
+ $i = 0;
+ if (!empty($vars['items']))
+ foreach($vars['items'] as $item) {
+
+ echo elgg_view_river_item($item);
+ $i++;
+ if ($i >= $vars['limit']) break;
+
+ }
+
+ }
+
+ if ($vars['pagination'] !== false) {
+
+ $baseurl = $_SERVER['REQUEST_URI'];
+ $baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl);
+
+ $nav = '';
+
+ if (sizeof($vars['items']) > $vars['limit']) {
+ $newoffset = $vars['offset'] + $vars['limit'];
+ $urladdition = 'offset='.$newoffset;
+ if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
+
+ $nav .= '<a class="back" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
+ }
+
+ if ($vars['offset'] > 0) {
+ $newoffset = $vars['offset'] - $vars['limit'];
+ if ($newoffset < 0) $newoffset = 0;
+ $urladdition = 'offset='.$newoffset;
+ if (substr_count($baseurl,'?')) $prevurl=$baseurl . '&' . $urladdition; else $prevurl=$baseurl . '?' . $urladdition;
+
+ $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
+ }
+
+
+ if (!empty($nav)) {
+ echo '<div class="river_pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
+ }
+
+ }
+
+?>
</div> \ No newline at end of file
diff --git a/views/default/river/item/noaccess.php b/views/default/river/item/noaccess.php
index 47c177ea4..96958170b 100644
--- a/views/default/river/item/noaccess.php
+++ b/views/default/river/item/noaccess.php
@@ -1,5 +1,5 @@
-<?php
-
- echo elgg_echo('river:noaccess');
-
+<?php
+
+ echo elgg_echo('river:noaccess');
+
?> \ No newline at end of file
diff --git a/views/default/river/item/wrapper.php b/views/default/river/item/wrapper.php
index 457e25abe..2b146c3c5 100644
--- a/views/default/river/item/wrapper.php
+++ b/views/default/river/item/wrapper.php
@@ -1,40 +1,40 @@
-<?php
-
- /**
- * Elgg river item wrapper.
- * Wraps all river items.
- *
- * @package Elgg
+<?php
- * @author Curverider
+ /**
+ * Elgg river item wrapper.
+ * Wraps all river items.
+ *
+ * @package Elgg
- * @link http://elgg.com/
- */
-
-
-?>
-
- <div class="river_item">
- <div class="river_<?php echo $vars['item']->type; ?>">
- <div class="river_<?php echo $vars['item']->subtype; ?>">
- <div class="river_<?php echo $vars['item']->action_type; ?>">
- <div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>">
- <p>
- <?php
-
- echo $vars['body'];
-
- ?>
- <span class="river_item_time">
- (<?php
-
- echo friendly_time($vars['item']->posted);
-
- ?>)
- </span>
- </p>
- </div>
- </div>
- </div>
- </div>
+ * @author Curverider
+
+ * @link http://elgg.com/
+ */
+
+
+?>
+
+ <div class="river_item">
+ <div class="river_<?php echo $vars['item']->type; ?>">
+ <div class="river_<?php echo $vars['item']->subtype; ?>">
+ <div class="river_<?php echo $vars['item']->action_type; ?>">
+ <div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>">
+ <p>
+ <?php
+
+ echo $vars['body'];
+
+ ?>
+ <span class="river_item_time">
+ (<?php
+
+ echo friendly_time($vars['item']->posted);
+
+ ?>)
+ </span>
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
</div> \ No newline at end of file
diff --git a/views/default/river/wrapper.php b/views/default/river/wrapper.php
index 23dd508fd..cba00ff5a 100644
--- a/views/default/river/wrapper.php
+++ b/views/default/river/wrapper.php
@@ -1,15 +1,15 @@
-<?php
-
- /**
- * Elgg river item wrapper.
- * Wraps all river items.
- *
- * @package Elgg
+<?php
- * @author Curverider
+ /**
+ * Elgg river item wrapper.
+ * Wraps all river items.
+ *
+ * @package Elgg
- * @link http://elgg.com/
- */
+ * @author Curverider
+
+ * @link http://elgg.com/
+ */
$statement = $vars['statement'];
$time = $vars['time'];
diff --git a/views/default/settings/install.php b/views/default/settings/install.php
index 6a3e075d9..2bf632c6a 100644
--- a/views/default/settings/install.php
+++ b/views/default/settings/install.php
@@ -1,19 +1,19 @@
-<?php
-
- /**
- * Elgg system settings on initial installation
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg system settings on initial installation
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ */
+
+ echo "<p>" . autop(elgg_echo("installation:settings:description")) . "</p>";
+
+ echo elgg_view("settings/system",array("action" => "action/systemsettings/install"));
- * @link http://elgg.org/
- *
- */
-
- echo "<p>" . autop(elgg_echo("installation:settings:description")) . "</p>";
-
- echo elgg_view("settings/system",array("action" => "action/systemsettings/install"));
-
?> \ No newline at end of file
diff --git a/views/default/settings/system.php b/views/default/settings/system.php
index 91c8e11aa..521415edd 100644
--- a/views/default/settings/system.php
+++ b/views/default/settings/system.php
@@ -1,72 +1,72 @@
-<?php
-
- /**
- * Elgg system settings form
- * The form to change system settings
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg system settings form
+ * The form to change system settings
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['action'] If set, the place to forward the form to (usually action/systemsettings/save)
- */
-
- // Set action appropriately
- if (!isset($vars['action'])) {
- $action = $vars['url'] . "action/systemsettings/save";
- } else {
- $action = $vars['action'];
- }
-
- $form_body = "";
- foreach(array('sitename','sitedescription', 'siteemail', 'wwwroot','path','dataroot', 'view') as $field) {
- $form_body .= "<p>";
- $form_body .= elgg_echo('installation:' . $field) . "<br />";
- $warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
- $value = $vars['config']->$field;
- $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
- $form_body .= "</p>";
- }
-
- $languages = get_installed_translations();
- $form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('admin:site:access:warning') . "<br />";
- $form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "</p>";
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:allow_user_default_access:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:allow_user_default_access:label')), 'internalname' => 'allow_user_default_access', 'value' => ($vars['config']->allow_user_default_access ? elgg_echo('installation:allow_user_default_access:label') : "") )) . "</p>";
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['action'] If set, the place to forward the form to (usually action/systemsettings/save)
+ */
+
+ // Set action appropriately
+ if (!isset($vars['action'])) {
+ $action = $vars['url'] . "action/systemsettings/save";
+ } else {
+ $action = $vars['action'];
+ }
+
+ $form_body = "";
+ foreach(array('sitename','sitedescription', 'siteemail', 'wwwroot','path','dataroot', 'view') as $field) {
+ $form_body .= "<p>";
+ $form_body .= elgg_echo('installation:' . $field) . "<br />";
+ $warning = elgg_echo('installation:warning:' . $field);
+ if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
+ $value = $vars['config']->$field;
+ $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
+ $form_body .= "</p>";
+ }
+
+ $languages = get_installed_translations();
+ $form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('admin:site:access:warning') . "<br />";
+ $form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "</p>";
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:allow_user_default_access:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:allow_user_default_access:label')), 'internalname' => 'allow_user_default_access', 'value' => ($vars['config']->allow_user_default_access ? elgg_echo('installation:allow_user_default_access:label') : "") )) . "</p>";
$form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:simplecache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:simplecache:label')), 'internalname' => 'simplecache_enabled', 'value' => ($vars['config']->simplecache_enabled ? elgg_echo('installation:simplecache:label') : "") )) . "</p>";
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:viewpathcache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:viewpathcache:label')), 'internalname' => 'viewpath_cache_enabled', 'value' => (($vars['config']->viewpath_cache_enabled) ? elgg_echo('installation:viewpathcache:label') : "") )) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
-
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
- $on = elgg_echo('installation:disableapi:label');
- if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
- $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
- $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
- $form_body .= "</p>";
-
- $form_body .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
- $on = elgg_echo('installation:usage:label');
-
- if (isset($CONFIG->ping_home))
- $on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
- $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
- $form_body .= "</p>";
-
-
-
- $form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
-
- $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
-
- echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
-
-?>
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:viewpathcache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:viewpathcache:label')), 'internalname' => 'viewpath_cache_enabled', 'value' => (($vars['config']->viewpath_cache_enabled) ? elgg_echo('installation:viewpathcache:label') : "") )) . "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
+
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
+ $on = elgg_echo('installation:disableapi:label');
+ if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
+ $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
+ $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
+ $form_body .= "</p>";
+
+ $form_body .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
+ $on = elgg_echo('installation:usage:label');
+
+ if (isset($CONFIG->ping_home))
+ $on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
+ $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
+ $form_body .= "</p>";
+
+
+
+ $form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
+
+ $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
+
+ echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
+
+?>
diff --git a/views/default/settings/upgrading.php b/views/default/settings/upgrading.php
index 82905af8a..e36d731a7 100644
--- a/views/default/settings/upgrading.php
+++ b/views/default/settings/upgrading.php
@@ -1,19 +1,19 @@
-<?php
-
-?>
-
-<html>
- <head>
- <title><?php echo elgg_echo('upgrading'); ?></title>
- <meta http-equiv="refresh" content="1;url=<?php echo $vars['url']; ?>upgrade.php?upgrade=upgrade"/>
- </head>
- <body bgcolor="white">
- <table width="100%" height="100%" border="0" style="margin: 0px; padding: 0px">
- <tr>
- <td width="100%" height="100%" valign="middle" align="center">
- <img src="<?php echo $vars['url']; ?>_graphics/ajax_loader.gif" />
- </td>
- </tr>
- </table>
- </body>
+<?php
+
+?>
+
+<html>
+ <head>
+ <title><?php echo elgg_echo('upgrading'); ?></title>
+ <meta http-equiv="refresh" content="1;url=<?php echo $vars['url']; ?>upgrade.php?upgrade=upgrade"/>
+ </head>
+ <body bgcolor="white">
+ <table width="100%" height="100%" border="0" style="margin: 0px; padding: 0px">
+ <tr>
+ <td width="100%" height="100%" valign="middle" align="center">
+ <img src="<?php echo $vars['url']; ?>_graphics/ajax_loader.gif" />
+ </td>
+ </tr>
+ </table>
+ </body>
</html> \ No newline at end of file
diff --git a/views/default/spotlight/default.php b/views/default/spotlight/default.php
index d228400a4..6870453a4 100644
--- a/views/default/spotlight/default.php
+++ b/views/default/spotlight/default.php
@@ -1,39 +1,39 @@
-<?php
-
- /**
- * Elgg default spotlight
- * The spotlight area that displays across the site
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg default spotlight
+ * The spotlight area that displays across the site
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- */
-?>
-
-<div id="spotlight_table">
- <!-- spotlight RHS content -->
- <div class="spotlightRHS">
- <h2>Information</h2>
- <ul>
- <li><a href="http://docs.elgg.org/wiki/Views/SystemViews">Populating this spotlight area</a></li>
- <li><a href="http://community.elgg.org">Elgg open source community</a></li>
- <li><a href="http://elgg.com">Elgg commercial services</a></li>
- </ul>
- </div>
- <!-- spotlight LHS content -->
- <div class="spotlightLHS">
- <h2>Welcome to Elgg</h2>
- <p>
- Elgg allows you to run your own social networking site, whether publicly (like
- Facebook) or privately within your company or organization.
- <a href="http://elgg.com/">Support and commercial services</a> are available,
- or you can find new tools for your Elgg site at the
- <a href="http://community.elgg.org/">Elgg community</a>.
- </p>
- </div><!-- /spotlight LHS content -->
- <div class="clearfloat"></div>
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ */
+?>
+
+<div id="spotlight_table">
+ <!-- spotlight RHS content -->
+ <div class="spotlightRHS">
+ <h2>Information</h2>
+ <ul>
+ <li><a href="http://docs.elgg.org/wiki/Views/SystemViews">Populating this spotlight area</a></li>
+ <li><a href="http://community.elgg.org">Elgg open source community</a></li>
+ <li><a href="http://elgg.com">Elgg commercial services</a></li>
+ </ul>
+ </div>
+ <!-- spotlight LHS content -->
+ <div class="spotlightLHS">
+ <h2>Welcome to Elgg</h2>
+ <p>
+ Elgg allows you to run your own social networking site, whether publicly (like
+ Facebook) or privately within your company or organization.
+ <a href="http://elgg.com/">Support and commercial services</a> are available,
+ or you can find new tools for your Elgg site at the
+ <a href="http://community.elgg.org/">Elgg community</a>.
+ </p>
+ </div><!-- /spotlight LHS content -->
+ <div class="clearfloat"></div>
</div> \ No newline at end of file
diff --git a/views/default/text/about.php b/views/default/text/about.php
index 20504e9a4..24372cb0a 100644
--- a/views/default/text/about.php
+++ b/views/default/text/about.php
@@ -1,17 +1,17 @@
-<?php
-
- /**
- * Elgg basic about page
- * The standard HTML about page
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg basic about page
+ * The standard HTML about page
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ */
+?>
- * @link http://elgg.org/
- *
- */
-?>
-
<!-- still to do --> \ No newline at end of file
diff --git a/views/default/text/privacy_view.php b/views/default/text/privacy_view.php
index aeca248b3..40820b560 100644
--- a/views/default/text/privacy_view.php
+++ b/views/default/text/privacy_view.php
@@ -1,15 +1,15 @@
-<?php
-
- /**
- * Elgg basic privacy page
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- */
-?>
-
+<?php
+
+ /**
+ * Elgg basic privacy page
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ */
+?>
+
diff --git a/views/default/text/tos_view.php b/views/default/text/tos_view.php
index 74be5a64b..aa1d12322 100644
--- a/views/default/text/tos_view.php
+++ b/views/default/text/tos_view.php
@@ -1,14 +1,14 @@
-<?php
-
- /**
- * Elgg basic tos page
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg basic tos page
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ */
?> \ No newline at end of file
diff --git a/views/default/upload/upload_form_content.php b/views/default/upload/upload_form_content.php
index c6208a8a5..dd0938cc2 100644
--- a/views/default/upload/upload_form_content.php
+++ b/views/default/upload/upload_form_content.php
@@ -1,115 +1,115 @@
-<input type="hidden" name="number_of_files" value="1">
-<?php
-
-if (isset($vars['entity'])) {
- $title = $vars['entity']->title;
- $description = $vars['entity']->description;
- $tags = $vars['entity']->tags;
- $access_id = $vars['entity']->access_id;
-} else {
- $title = "";
- $description = "";
- $tags = "";
- $access_id = get_default_access();
-}
-
-$plugin = $vars['plugin'];
-
-if (!$vars['entity']) {
-
-?>
- <div id="option_container">
- <p>
- <label><?php echo elgg_echo("title"); ?><br />
- <?php
-
- echo elgg_view("input/text", array(
- "internalname" => "title_0"
- ));
-
- ?>
- </label>
- </p>
- <p>
- <label><?php echo elgg_echo("$plugin:file"); ?><br />
- <?php
-
- echo elgg_view("input/file",array('internalname' => 'upload_0'));
-
- ?>
- </label>
- </p>
- </div>
- <p><input type="button" onclick="javascript:file_addtoform()" value="<?php echo elgg_echo("$plugin:add_to_form"); ?>"></p>
-<?php
- } else {
-
-?>
- <p>
- <label><?php echo elgg_echo("title"); ?><br />
- <?php
-
- echo elgg_view("input/text", array(
- "internalname" => "title",
- "value" => $title,
- ));
-
- ?>
- </label>
- </p>
-<?php
- }
-?>
- <p class="longtext_editarea">
- <label><?php echo elgg_echo("description"); ?><br />
- <?php
-
- echo elgg_view("input/longtext",array(
- "internalname" => "description",
- "value" => $description,
- ));
- ?>
- </label>
- </p>
- <br />
- <p>
- <label><?php echo elgg_echo("tags"); ?><br />
- <?php
-
- echo elgg_view("input/tags", array(
- "internalname" => "tags",
- "value" => $tags,
- ));
-
- ?>
- </label></p>
-<?php
-
- $categories = elgg_view('categories',$vars);
- if (!empty($categories)) {
-?>
-
- <p>
- <?php echo $categories; ?>
- </p>
-
-<?php
- }
- //remove folders until they are ready to use
- //echo elgg_view("$plugin/folders/select",$vars);
-?>
- <p>
- <label>
- <?php echo elgg_echo('access'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
- </label>
- </p>
-
-<?php
-
- if (isset($vars['container_guid']))
- echo "<input type=\"hidden\" name=\"container_guid\" value=\"{$vars['container_guid']}\" />";
- if (isset($vars['entity']))
- echo "<input type=\"hidden\" name=\"file_guid\" value=\"{$vars['entity']->getGUID()}\" />";
-
-?>
+<input type="hidden" name="number_of_files" value="1">
+<?php
+
+if (isset($vars['entity'])) {
+ $title = $vars['entity']->title;
+ $description = $vars['entity']->description;
+ $tags = $vars['entity']->tags;
+ $access_id = $vars['entity']->access_id;
+} else {
+ $title = "";
+ $description = "";
+ $tags = "";
+ $access_id = get_default_access();
+}
+
+$plugin = $vars['plugin'];
+
+if (!$vars['entity']) {
+
+?>
+ <div id="option_container">
+ <p>
+ <label><?php echo elgg_echo("title"); ?><br />
+ <?php
+
+ echo elgg_view("input/text", array(
+ "internalname" => "title_0"
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <label><?php echo elgg_echo("$plugin:file"); ?><br />
+ <?php
+
+ echo elgg_view("input/file",array('internalname' => 'upload_0'));
+
+ ?>
+ </label>
+ </p>
+ </div>
+ <p><input type="button" onclick="javascript:file_addtoform()" value="<?php echo elgg_echo("$plugin:add_to_form"); ?>"></p>
+<?php
+ } else {
+
+?>
+ <p>
+ <label><?php echo elgg_echo("title"); ?><br />
+ <?php
+
+ echo elgg_view("input/text", array(
+ "internalname" => "title",
+ "value" => $title,
+ ));
+
+ ?>
+ </label>
+ </p>
+<?php
+ }
+?>
+ <p class="longtext_editarea">
+ <label><?php echo elgg_echo("description"); ?><br />
+ <?php
+
+ echo elgg_view("input/longtext",array(
+ "internalname" => "description",
+ "value" => $description,
+ ));
+ ?>
+ </label>
+ </p>
+ <br />
+ <p>
+ <label><?php echo elgg_echo("tags"); ?><br />
+ <?php
+
+ echo elgg_view("input/tags", array(
+ "internalname" => "tags",
+ "value" => $tags,
+ ));
+
+ ?>
+ </label></p>
+<?php
+
+ $categories = elgg_view('categories',$vars);
+ if (!empty($categories)) {
+?>
+
+ <p>
+ <?php echo $categories; ?>
+ </p>
+
+<?php
+ }
+ //remove folders until they are ready to use
+ //echo elgg_view("$plugin/folders/select",$vars);
+?>
+ <p>
+ <label>
+ <?php echo elgg_echo('access'); ?><br />
+ <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
+ </label>
+ </p>
+
+<?php
+
+ if (isset($vars['container_guid']))
+ echo "<input type=\"hidden\" name=\"container_guid\" value=\"{$vars['container_guid']}\" />";
+ if (isset($vars['entity']))
+ echo "<input type=\"hidden\" name=\"file_guid\" value=\"{$vars['entity']->getGUID()}\" />";
+
+?>
diff --git a/views/default/user/default.php b/views/default/user/default.php
index 58b5ede8a..0e83b5fb0 100644
--- a/views/default/user/default.php
+++ b/views/default/user/default.php
@@ -1,23 +1,23 @@
-<?php
-
- /**
- * Elgg user display
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Elgg user display
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- if ($vars['full']) {
- echo elgg_view("profile/userdetails",$vars);
- } else {
- if (get_input('search_viewtype') == "gallery") {
- echo elgg_view('profile/gallery',$vars);
- } else {
- echo elgg_view("profile/listing",$vars);
- }
- }
-
+
+ * @link http://elgg.org/
+ */
+
+ if ($vars['full']) {
+ echo elgg_view("profile/userdetails",$vars);
+ } else {
+ if (get_input('search_viewtype') == "gallery") {
+ echo elgg_view('profile/gallery',$vars);
+ } else {
+ echo elgg_view("profile/listing",$vars);
+ }
+ }
+
?> \ No newline at end of file
diff --git a/views/default/user/settings/default_access.php b/views/default/user/settings/default_access.php
index 38b194d7d..d5df5e426 100644
--- a/views/default/user/settings/default_access.php
+++ b/views/default/user/settings/default_access.php
@@ -1,30 +1,30 @@
-<?php
- /**
- * Provide a way of setting your default access
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Provide a way of setting your default access
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+ if ($vars['config']->allow_user_default_access) {
+ $user = page_owner_entity();
+
+ if ($user) {
+ if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
+ $default_access = $vars['config']->default_access;
+ }
+ ?>
+ <h3><?php echo elgg_echo('default_access:settings'); ?></h3>
+ <p>
+ <?php echo elgg_echo('default_access:label'); ?>:
+ <?php
+
+ echo elgg_view('input/access',array('internalname' => 'default_access', 'value' => $default_access));
+
+ ?>
+ </p>
- * @link http://elgg.org/
- */
- if ($vars['config']->allow_user_default_access) {
- $user = page_owner_entity();
-
- if ($user) {
- if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
- $default_access = $vars['config']->default_access;
- }
- ?>
- <h3><?php echo elgg_echo('default_access:settings'); ?></h3>
- <p>
- <?php echo elgg_echo('default_access:label'); ?>:
- <?php
-
- echo elgg_view('input/access',array('internalname' => 'default_access', 'value' => $default_access));
-
- ?>
- </p>
-
<?php }} ?> \ No newline at end of file
diff --git a/views/default/user/settings/email.php b/views/default/user/settings/email.php
index 8a9d986d9..60f2f7acd 100644
--- a/views/default/user/settings/email.php
+++ b/views/default/user/settings/email.php
@@ -1,27 +1,27 @@
-<?php
- /**
- * Provide a way of setting your email
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Provide a way of setting your email
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $user = page_owner_entity();
+
+ if ($user) {
+?>
+ <h3><?php echo elgg_echo('email:settings'); ?></h3>
+ <p>
+ <?php echo elgg_echo('email:address:label'); ?>:
+ <?php
+
+ echo elgg_view('input/email',array('internalname' => 'email', 'value' => $user->email));
+
+ ?>
+ </p>
- * @link http://elgg.org/
- */
-
- $user = page_owner_entity();
-
- if ($user) {
-?>
- <h3><?php echo elgg_echo('email:settings'); ?></h3>
- <p>
- <?php echo elgg_echo('email:address:label'); ?>:
- <?php
-
- echo elgg_view('input/email',array('internalname' => 'email', 'value' => $user->email));
-
- ?>
- </p>
-
<?php } ?> \ No newline at end of file
diff --git a/views/default/user/settings/name.php b/views/default/user/settings/name.php
index f127532d6..56f6139e7 100644
--- a/views/default/user/settings/name.php
+++ b/views/default/user/settings/name.php
@@ -1,27 +1,27 @@
-<?php
- /**
- * Provide a way of setting your full name.
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Provide a way of setting your full name.
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $user = page_owner_entity();
+
+ if ($user) {
+?>
+ <h3><?php echo elgg_echo('user:set:name'); ?></h3>
+ <p>
+ <?php echo elgg_echo('user:name:label'); ?>:
+ <?php
+
+ echo elgg_view('input/text',array('internalname' => 'name', 'value' => $user->name));
+ echo elgg_view('input/hidden',array('internalname' => 'guid', 'value' => $user->guid));
+ ?>
+ </p>
- * @link http://elgg.org/
- */
-
- $user = page_owner_entity();
-
- if ($user) {
-?>
- <h3><?php echo elgg_echo('user:set:name'); ?></h3>
- <p>
- <?php echo elgg_echo('user:name:label'); ?>:
- <?php
-
- echo elgg_view('input/text',array('internalname' => 'name', 'value' => $user->name));
- echo elgg_view('input/hidden',array('internalname' => 'guid', 'value' => $user->guid));
- ?>
- </p>
-
<?php } ?> \ No newline at end of file
diff --git a/views/default/user/settings/password.php b/views/default/user/settings/password.php
index d467cd05e..d2b794808 100644
--- a/views/default/user/settings/password.php
+++ b/views/default/user/settings/password.php
@@ -1,28 +1,28 @@
-<?php
- /**
- * Provide a way of setting your password
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Provide a way of setting your password
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $user = page_owner_entity();
+
+ if ($user) {
+?>
+ <h3><?php echo elgg_echo('user:set:password'); ?></h3>
+ <p>
+ <?php echo elgg_echo('user:password:label'); ?>:
+ <?php
+ echo elgg_view('input/password',array('internalname' => 'password'));
+ ?></p><p>
+ <?php echo elgg_echo('user:password2:label'); ?>: <?php
+ echo elgg_view('input/password',array('internalname' => 'password2'));
+ ?>
+ </p>
- * @link http://elgg.org/
- */
-
- $user = page_owner_entity();
-
- if ($user) {
-?>
- <h3><?php echo elgg_echo('user:set:password'); ?></h3>
- <p>
- <?php echo elgg_echo('user:password:label'); ?>:
- <?php
- echo elgg_view('input/password',array('internalname' => 'password'));
- ?></p><p>
- <?php echo elgg_echo('user:password2:label'); ?>: <?php
- echo elgg_view('input/password',array('internalname' => 'password2'));
- ?>
- </p>
-
<?php } ?> \ No newline at end of file
diff --git a/views/default/usersettings/statistics_opt/numentities.php b/views/default/usersettings/statistics_opt/numentities.php
index ce048b7bb..ffc6b3280 100644
--- a/views/default/usersettings/statistics_opt/numentities.php
+++ b/views/default/usersettings/statistics_opt/numentities.php
@@ -1,53 +1,53 @@
-<?php
- /**
- * Elgg statistics screen
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-
- // Get entity statistics
- $entity_stats = get_entity_statistics($_SESSION['user']->guid);
-
- if ($entity_stats)
- {
-?>
-<div class="usersettings_statistics">
- <h3><?php echo elgg_echo('usersettings:statistics:label:numentities'); ?></h3>
- <table>
- <?php
- foreach ($entity_stats as $k => $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 {
- $a = elgg_echo("item:{$k}:{$a}");
- if (empty($a)) {
- $a = "$k $a";
- }
- }
- echo <<< END
- <tr class="{$even_odd}">
- <td class="column_one"><b>{$a}:</b></td>
- <td>{$b}</td>
- </tr>
-END;
- }
- }
- ?>
- </table>
-</div>
+ * @link http://elgg.org/
+ */
+
+
+ // Get entity statistics
+ $entity_stats = get_entity_statistics($_SESSION['user']->guid);
+
+ if ($entity_stats)
+ {
+?>
+<div class="usersettings_statistics">
+ <h3><?php echo elgg_echo('usersettings:statistics:label:numentities'); ?></h3>
+ <table>
+ <?php
+ foreach ($entity_stats as $k => $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 {
+ $a = elgg_echo("item:{$k}:{$a}");
+ if (empty($a)) {
+ $a = "$k $a";
+ }
+ }
+ echo <<< END
+ <tr class="{$even_odd}">
+ <td class="column_one"><b>{$a}:</b></td>
+ <td>{$b}</td>
+ </tr>
+END;
+ }
+ }
+ ?>
+ </table>
+</div>
<?php } ?> \ No newline at end of file
diff --git a/views/default/welcome.php b/views/default/welcome.php
index 238b485e9..1ae060d49 100644
--- a/views/default/welcome.php
+++ b/views/default/welcome.php
@@ -1,20 +1,20 @@
-<?php
-
- /**
- * Elgg sample welcome page
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg sample welcome page
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- if (isloggedin()) {
- echo elgg_view("welcome/logged_in");
- } else {
- echo elgg_view("welcome/logged_out");
- }
-
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ if (isloggedin()) {
+ echo elgg_view("welcome/logged_in");
+ } else {
+ echo elgg_view("welcome/logged_out");
+ }
+
?> \ No newline at end of file
diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php
index 45e935412..75e966028 100644
--- a/views/default/widgets/editwrapper.php
+++ b/views/default/widgets/editwrapper.php
@@ -1,46 +1,46 @@
-<?php
-
- /**
- * Elgg edit widget layout
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg edit widget layout
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- $guid = $vars['entity']->getGUID();
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $guid = $vars['entity']->getGUID();
$form_body = $vars['body'];
$form_body .= "<p><label>" . elgg_echo('access') . ": " . elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $vars['entity']->access_id)) . "</label></p>";
- $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $guid)) . elgg_view('input/hidden', array('internalname' => 'noforward', 'value' => 'true')) . elgg_view('input/submit', array('internalname' => "submit$guid", 'value' => elgg_echo('save'))) . "</p>";
+ $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $guid)) . elgg_view('input/hidden', array('internalname' => 'noforward', 'value' => 'true')) . elgg_view('input/submit', array('internalname' => "submit$guid", 'value' => elgg_echo('save'))) . "</p>";
echo elgg_view('input/form', array('internalid' => "widgetform$guid", 'body' => $form_body, 'action' => "{$vars['url']}action/widgets/save"))
-?>
-
-
-<script type="text/javascript">
-$(document).ready(function() {
-
- $("#widgetform<?php echo $guid; ?>").submit(function () {
-
- $("#submit<?php echo $guid; ?>").attr("disabled","disabled");
- $("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("saving"); ?>");
- $("#widgetcontent<?php echo $guid; ?>").html('<?php echo elgg_view('ajax/loader',array('slashes' => true)); ?>');
- $("#widget<?php echo $guid; ?> .toggle_box_edit_panel").click();
-
- var variables = $("#widgetform<?php echo $guid; ?>").serialize();
- $.post($("#widgetform<?php echo $guid; ?>").attr("action"),variables,function() {
- $("#submit<?php echo $guid; ?>").attr("disabled","");
- $("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("save"); ?>");
- $("#widgetcontent<?php echo $guid; ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo page_owner_entity()->username; ?>&context=<?php echo get_context(); ?>&callback=true");
- });
- return false;
-
- });
-
-});
+?>
+
+
+<script type="text/javascript">
+$(document).ready(function() {
+
+ $("#widgetform<?php echo $guid; ?>").submit(function () {
+
+ $("#submit<?php echo $guid; ?>").attr("disabled","disabled");
+ $("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("saving"); ?>");
+ $("#widgetcontent<?php echo $guid; ?>").html('<?php echo elgg_view('ajax/loader',array('slashes' => true)); ?>');
+ $("#widget<?php echo $guid; ?> .toggle_box_edit_panel").click();
+
+ var variables = $("#widgetform<?php echo $guid; ?>").serialize();
+ $.post($("#widgetform<?php echo $guid; ?>").attr("action"),variables,function() {
+ $("#submit<?php echo $guid; ?>").attr("disabled","");
+ $("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("save"); ?>");
+ $("#widgetcontent<?php echo $guid; ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo page_owner_entity()->username; ?>&context=<?php echo get_context(); ?>&callback=true");
+ });
+ return false;
+
+ });
+
+});
</script> \ No newline at end of file
diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php
index a5d36b1e3..e7791bde9 100644
--- a/views/default/widgets/wrapper.php
+++ b/views/default/widgets/wrapper.php
@@ -1,113 +1,113 @@
-<?php
-
- /**
- * Elgg widget wrapper
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- */
-
- static $widgettypes;
-
- $callback = get_input('callback');
-
- if (!isset($widgettypes)) $widgettypes = get_widget_types();
-
- if ($vars['entity'] instanceof ElggObject && $vars['entity']->getSubtype() == 'widget') {
- $handler = $vars['entity']->handler;
- $title = $widgettypes[$vars['entity']->handler]->name;
- if (!$title)
- $title = $handler;
- } else {
- $handler = "error";
- $title = elgg_echo("error");
- }
-
- if ($callback != "true") {
-
-?>
-
- <div id="widget<?php echo $vars['entity']->getGUID(); ?>">
- <div class="collapsable_box">
- <div class="collapsable_box_header">
- <a href="javascript:void(0);" class="toggle_box_contents">-</a><?php if ($vars['entity']->canEdit()) { ?><a href="javascript:void(0);" class="toggle_box_edit_panel"><?php echo elgg_echo('edit'); ?></a><?php } ?>
- <h1><?php echo $title; ?></h1>
- </div>
- <?php
-
- if ($vars['entity']->canEdit()) {
-
- ?>
- <div class="collapsable_box_editpanel"><?php
-
- echo elgg_view('widgets/editwrapper',
- array(
- 'body' => elgg_view("widgets/{$handler}/edit",$vars),
- 'entity' => $vars['entity']
- )
- );
-
- ?></div><!-- /collapsable_box_editpanel -->
- <?php
-
- }
-
- ?>
- <div class="collapsable_box_content">
- <?php
-
- echo "<div id=\"widgetcontent{$vars['entity']->getGUID()}\">";
-
-
- } else { // end if callback != "true"
-
- if (elgg_view_exists("widgets/{$handler}/view"))
- echo elgg_view("widgets/{$handler}/view",$vars);
- else
- echo elgg_echo('widgets:handlernotfound');
-
-?>
-
-<script language="javascript">
- $(document).ready(function(){
- setup_avatar_menu();
- });
-
-</script>
-
-
-<?php
-
- }
-
- if ($callback != "true") {
- echo elgg_view('ajax/loader');
- echo "</div>";
-
- ?>
- </div><!-- /.collapsable_box_content -->
- </div><!-- /.collapsable_box -->
- </div>
-
-<script type="text/javascript">
-$(document).ready(function() {
-
- $("#widgetcontent<?php echo $vars['entity']->getGUID(); ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $vars['entity']->getGUID(); ?>?shell=no&username=<?php echo page_owner_entity()->username; ?>&context=widget&callback=true");
-
- // run function to check for widgets collapsed/expanded state
- var forWidget = "widget<?php echo $vars['entity']->getGUID(); ?>";
- widget_state(forWidget);
-
-
-});
-</script>
-
-<?php
-
- }
-
+<?php
+
+ /**
+ * Elgg widget wrapper
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ static $widgettypes;
+
+ $callback = get_input('callback');
+
+ if (!isset($widgettypes)) $widgettypes = get_widget_types();
+
+ if ($vars['entity'] instanceof ElggObject && $vars['entity']->getSubtype() == 'widget') {
+ $handler = $vars['entity']->handler;
+ $title = $widgettypes[$vars['entity']->handler]->name;
+ if (!$title)
+ $title = $handler;
+ } else {
+ $handler = "error";
+ $title = elgg_echo("error");
+ }
+
+ if ($callback != "true") {
+
+?>
+
+ <div id="widget<?php echo $vars['entity']->getGUID(); ?>">
+ <div class="collapsable_box">
+ <div class="collapsable_box_header">
+ <a href="javascript:void(0);" class="toggle_box_contents">-</a><?php if ($vars['entity']->canEdit()) { ?><a href="javascript:void(0);" class="toggle_box_edit_panel"><?php echo elgg_echo('edit'); ?></a><?php } ?>
+ <h1><?php echo $title; ?></h1>
+ </div>
+ <?php
+
+ if ($vars['entity']->canEdit()) {
+
+ ?>
+ <div class="collapsable_box_editpanel"><?php
+
+ echo elgg_view('widgets/editwrapper',
+ array(
+ 'body' => elgg_view("widgets/{$handler}/edit",$vars),
+ 'entity' => $vars['entity']
+ )
+ );
+
+ ?></div><!-- /collapsable_box_editpanel -->
+ <?php
+
+ }
+
+ ?>
+ <div class="collapsable_box_content">
+ <?php
+
+ echo "<div id=\"widgetcontent{$vars['entity']->getGUID()}\">";
+
+
+ } else { // end if callback != "true"
+
+ if (elgg_view_exists("widgets/{$handler}/view"))
+ echo elgg_view("widgets/{$handler}/view",$vars);
+ else
+ echo elgg_echo('widgets:handlernotfound');
+
+?>
+
+<script language="javascript">
+ $(document).ready(function(){
+ setup_avatar_menu();
+ });
+
+</script>
+
+
+<?php
+
+ }
+
+ if ($callback != "true") {
+ echo elgg_view('ajax/loader');
+ echo "</div>";
+
+ ?>
+ </div><!-- /.collapsable_box_content -->
+ </div><!-- /.collapsable_box -->
+ </div>
+
+<script type="text/javascript">
+$(document).ready(function() {
+
+ $("#widgetcontent<?php echo $vars['entity']->getGUID(); ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $vars['entity']->getGUID(); ?>?shell=no&username=<?php echo page_owner_entity()->username; ?>&context=widget&callback=true");
+
+ // run function to check for widgets collapsed/expanded state
+ var forWidget = "widget<?php echo $vars['entity']->getGUID(); ?>";
+ widget_state(forWidget);
+
+
+});
+</script>
+
+<?php
+
+ }
+
?> \ No newline at end of file