aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 16:44:37 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 16:44:37 +0000
commitae88842fce124942780875fef7d0158b8c87d9aa (patch)
tree35a871654e6c5f8a7428311ba0f503a6d726ad71
parent5ebfb769b6f05e4d606f4d94d6c6e9d9104b7973 (diff)
downloadelgg-ae88842fce124942780875fef7d0158b8c87d9aa.tar.gz
elgg-ae88842fce124942780875fef7d0158b8c87d9aa.tar.bz2
Removed windows line endings.
git-svn-id: http://code.elgg.org/elgg/trunk@5657 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/profile/actions/addcomment.php94
-rw-r--r--mod/profile/actions/deletecomment.php56
-rw-r--r--mod/profile/actions/editfield.php40
-rw-r--r--mod/profile/actions/reorder.php32
-rw-r--r--mod/profile/views/default/profile/commentwall/commentwall.php42
-rw-r--r--mod/profile/views/default/profile/commentwall/commentwall_content.php64
-rw-r--r--mod/profile/views/default/profile/commentwall/commentwalladd.php36
-rw-r--r--mod/profile/views/default/profile/editdefaultprofileitems.php136
-rw-r--r--mod/profile/views/default/profile/profile_contents/commentwall.php24
9 files changed, 262 insertions, 262 deletions
diff --git a/mod/profile/actions/addcomment.php b/mod/profile/actions/addcomment.php
index b5c5e0708..5850efe25 100644
--- a/mod/profile/actions/addcomment.php
+++ b/mod/profile/actions/addcomment.php
@@ -1,48 +1,48 @@
-<?php
-/**
- * Elgg profile commentwall: add message action
- */
-
-// Make sure we're logged in; forward to the front page if not
-if (!isloggedin()) forward();
-
-// Get input
-$message_content = get_input('message_content'); // the actual message
-$page_owner = get_input("pageOwner"); // the message board owner
-$message_owner = get_input("guid"); // the user posting the message
-$user = get_entity($page_owner); // the commentwall owner details
-
-// Let's see if we can get a user entity from the specified page_owner
-if ($user && !empty($message_content)) {
-
- // If posting the comment was successful, say so
- if ($user->annotate('commentwall',$message_content,$user->access_id, $_SESSION['user']->getGUID())) {
-
- global $CONFIG;
-
- if ($user->getGUID() != $_SESSION['user']->getGUID())
- notify_user($user->getGUID(), $_SESSION['user']->getGUID(), elgg_echo('profile:comment:subject'),
- sprintf(
- elgg_echo('profile:comment:body'),
- $_SESSION['user']->name,
- $message_content,
- $CONFIG->wwwroot . "pg/profile/" . $user->username,
- $_SESSION['user']->name,
- $_SESSION['user']->getURL()
- )
- );
-
- system_message(elgg_echo("profile:commentwall:posted"));
- // add to river
- add_to_river('river/object/profile/commentwall/create','commentwall',$_SESSION['user']->guid,$user->guid);
-
- } else {
- register_error(elgg_echo("profile:commentwall:failure"));
- }
-
-} else {
- register_error(elgg_echo("profile:commentwall:blank"));
-}
-
-// Forward back to the messageboard
+<?php
+/**
+ * Elgg profile commentwall: add message action
+ */
+
+// Make sure we're logged in; forward to the front page if not
+if (!isloggedin()) forward();
+
+// Get input
+$message_content = get_input('message_content'); // the actual message
+$page_owner = get_input("pageOwner"); // the message board owner
+$message_owner = get_input("guid"); // the user posting the message
+$user = get_entity($page_owner); // the commentwall owner details
+
+// Let's see if we can get a user entity from the specified page_owner
+if ($user && !empty($message_content)) {
+
+ // If posting the comment was successful, say so
+ if ($user->annotate('commentwall',$message_content,$user->access_id, $_SESSION['user']->getGUID())) {
+
+ global $CONFIG;
+
+ if ($user->getGUID() != $_SESSION['user']->getGUID())
+ notify_user($user->getGUID(), $_SESSION['user']->getGUID(), elgg_echo('profile:comment:subject'),
+ sprintf(
+ elgg_echo('profile:comment:body'),
+ $_SESSION['user']->name,
+ $message_content,
+ $CONFIG->wwwroot . "pg/profile/" . $user->username,
+ $_SESSION['user']->name,
+ $_SESSION['user']->getURL()
+ )
+ );
+
+ system_message(elgg_echo("profile:commentwall:posted"));
+ // add to river
+ add_to_river('river/object/profile/commentwall/create','commentwall',$_SESSION['user']->guid,$user->guid);
+
+ } else {
+ register_error(elgg_echo("profile:commentwall:failure"));
+ }
+
+} else {
+ register_error(elgg_echo("profile:commentwall:blank"));
+}
+
+// Forward back to the messageboard
forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
diff --git a/mod/profile/actions/deletecomment.php b/mod/profile/actions/deletecomment.php
index 48399af4a..0a104eabe 100644
--- a/mod/profile/actions/deletecomment.php
+++ b/mod/profile/actions/deletecomment.php
@@ -1,29 +1,29 @@
-<?php
-/**
- * Elgg profile commentwall: delete message action
- */
-
-// Ensure we're logged in
-if (!isloggedin()) forward();
-
-// Make sure we can get the comment in question
-$annotation_id = (int) get_input('annotation_id');
-
-//make sure that there is a message on the commentwall matching the passed id
-if ($message = get_annotation($annotation_id)) {
- //grab the user or group entity
- $entity = get_entity($message->entity_guid);
- //check to make sure the current user can actually edit the commentwall
- if ($message->canEdit()) {
- //delete the comment
- $message->delete();
- //display message
- system_message(elgg_echo("profile:commentwall:deleted"));
- forward($_SERVER['HTTP_REFERER']);
- }
-
-} else {
- system_message(elgg_echo("profile:commentwall:notdeleted"));
-}
-
+<?php
+/**
+ * Elgg profile commentwall: delete message action
+ */
+
+// Ensure we're logged in
+if (!isloggedin()) forward();
+
+// Make sure we can get the comment in question
+$annotation_id = (int) get_input('annotation_id');
+
+//make sure that there is a message on the commentwall matching the passed id
+if ($message = get_annotation($annotation_id)) {
+ //grab the user or group entity
+ $entity = get_entity($message->entity_guid);
+ //check to make sure the current user can actually edit the commentwall
+ if ($message->canEdit()) {
+ //delete the comment
+ $message->delete();
+ //display message
+ system_message(elgg_echo("profile:commentwall:deleted"));
+ forward($_SERVER['HTTP_REFERER']);
+ }
+
+} else {
+ system_message(elgg_echo("profile:commentwall:notdeleted"));
+}
+
forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
diff --git a/mod/profile/actions/editfield.php b/mod/profile/actions/editfield.php
index c26dfa4d9..5a0181a00 100644
--- a/mod/profile/actions/editfield.php
+++ b/mod/profile/actions/editfield.php
@@ -1,21 +1,21 @@
-<?php
-/**
- * Elgg profile plugin edit default profile action
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
-admin_gatekeeper();
-
-$field = get_input('field');
-$text = get_input('value');
-
-set_plugin_setting("admin_defined_profile_{$field}",$text,'profile');
-
-echo $text;
-
+<?php
+/**
+ * Elgg profile plugin edit default profile action
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
+
+admin_gatekeeper();
+
+$field = get_input('field');
+$text = get_input('value');
+
+set_plugin_setting("admin_defined_profile_{$field}",$text,'profile');
+
+echo $text;
+
exit; \ No newline at end of file
diff --git a/mod/profile/actions/reorder.php b/mod/profile/actions/reorder.php
index a189b0513..2260ed5b7 100644
--- a/mod/profile/actions/reorder.php
+++ b/mod/profile/actions/reorder.php
@@ -1,17 +1,17 @@
-<?php
-/**
- * Elgg profile plugin reorder fields
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
-admin_gatekeeper();
-$ordering = get_input('fieldorder');
-//if (!empty($ordering))
-$result = set_plugin_setting('user_defined_fields',$ordering,'profile');
-
+<?php
+/**
+ * Elgg profile plugin reorder fields
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
+
+admin_gatekeeper();
+$ordering = get_input('fieldorder');
+//if (!empty($ordering))
+$result = set_plugin_setting('user_defined_fields',$ordering,'profile');
+
exit; \ No newline at end of file
diff --git a/mod/profile/views/default/profile/commentwall/commentwall.php b/mod/profile/views/default/profile/commentwall/commentwall.php
index f693a3317..79869a454 100644
--- a/mod/profile/views/default/profile/commentwall/commentwall.php
+++ b/mod/profile/views/default/profile/commentwall/commentwall.php
@@ -1,22 +1,22 @@
-<?php
-/**
- * Elgg Commentwall display page
- */
-
-// If there is any content to view, view it
-if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) {
-
- //start the div which will wrap all the message board contents
- echo "<div id='comment_wall_display'>";
-
- //loop through all annotations and display
- foreach($vars['annotation'] as $content) {
- echo elgg_view("profile/commentwall/commentwall_content", array('annotation' => $content));
- }
-
- //close the wrapper div
- echo "</div>";
-
-} else {
- echo "<p class='margin_top'>" . elgg_echo("profile:commentwall:none") . "</p>";
+<?php
+/**
+ * Elgg Commentwall display page
+ */
+
+// If there is any content to view, view it
+if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) {
+
+ //start the div which will wrap all the message board contents
+ echo "<div id='comment_wall_display'>";
+
+ //loop through all annotations and display
+ foreach($vars['annotation'] as $content) {
+ echo elgg_view("profile/commentwall/commentwall_content", array('annotation' => $content));
+ }
+
+ //close the wrapper div
+ echo "</div>";
+
+} else {
+ echo "<p class='margin_top'>" . elgg_echo("profile:commentwall:none") . "</p>";
} \ No newline at end of file
diff --git a/mod/profile/views/default/profile/commentwall/commentwall_content.php b/mod/profile/views/default/profile/commentwall/commentwall_content.php
index 1317ba62e..cacea117c 100644
--- a/mod/profile/views/default/profile/commentwall/commentwall_content.php
+++ b/mod/profile/views/default/profile/commentwall/commentwall_content.php
@@ -1,32 +1,32 @@
-<?php
-/**
-* Elgg Message board individual item display page
- */
-?>
-<div class="entity_listing clearfloat">
- <!-- display the user icon of the user that posted the message -->
- <div class="entity_listing_icon">
- <?php
- echo elgg_view("profile/icon",array('entity' => get_entity($vars['annotation']->owner_guid), 'size' => 'tiny'));
- ?>
- </div>
-
- <div class="entity_listing_info">
- <?php
- // if the user looking at the comment can edit, show the delete link
- if ($vars['annotation']->canEdit()) {
- echo "<div class='entity_metadata'><span class='delete_button'>" . elgg_view("output/confirmlink",array(
- 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id,
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- )) . "</span></div>";
- } //end of can edit if statement
- ?>
- <!-- display the user's name who posted and the date/time -->
- <p class="entity_subtext">
- <?php echo get_entity($vars['annotation']->owner_guid)->name . " " . friendly_time($vars['annotation']->time_created); ?>
- </p>
- <!-- output the actual comment -->
- <?php echo elgg_view("output/longtext",array("value" => parse_urls($vars['annotation']->value))); ?>
- </div>
-</div>
+<?php
+/**
+* Elgg Message board individual item display page
+ */
+?>
+<div class="entity_listing clearfloat">
+ <!-- display the user icon of the user that posted the message -->
+ <div class="entity_listing_icon">
+ <?php
+ echo elgg_view("profile/icon",array('entity' => get_entity($vars['annotation']->owner_guid), 'size' => 'tiny'));
+ ?>
+ </div>
+
+ <div class="entity_listing_info">
+ <?php
+ // if the user looking at the comment can edit, show the delete link
+ if ($vars['annotation']->canEdit()) {
+ echo "<div class='entity_metadata'><span class='delete_button'>" . elgg_view("output/confirmlink",array(
+ 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id,
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ )) . "</span></div>";
+ } //end of can edit if statement
+ ?>
+ <!-- display the user's name who posted and the date/time -->
+ <p class="entity_subtext">
+ <?php echo get_entity($vars['annotation']->owner_guid)->name . " " . friendly_time($vars['annotation']->time_created); ?>
+ </p>
+ <!-- output the actual comment -->
+ <?php echo elgg_view("output/longtext",array("value" => parse_urls($vars['annotation']->value))); ?>
+ </div>
+</div>
diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php
index 084ffc400..f5bd1bdce 100644
--- a/mod/profile/views/default/profile/commentwall/commentwalladd.php
+++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php
@@ -1,18 +1,18 @@
-<?php
-/**
- * Elgg profile comment wall add
- */
-?>
-<div id="comment_wall_add">
-<form action="<?php echo $vars['url']; ?>action/profile/addcomment" method="post" name="messageboardForm">
- <!-- textarea for the contents -->
- <textarea name="message_content" value="" class="commentwall"></textarea><br />
- <!-- the person posting an item on the message board -->
- <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" />
- <!-- the page owner, this will be the profile owner -->
- <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" />
- <?php echo elgg_view('input/securitytoken'); ?>
- <!-- submit messages input -->
- <input type="submit" id="postit" value="<?php echo elgg_echo('profile:commentwall:add'); ?>">
-</form>
-</div>
+<?php
+/**
+ * Elgg profile comment wall add
+ */
+?>
+<div id="comment_wall_add">
+<form action="<?php echo $vars['url']; ?>action/profile/addcomment" method="post" name="messageboardForm">
+ <!-- textarea for the contents -->
+ <textarea name="message_content" value="" class="commentwall"></textarea><br />
+ <!-- the person posting an item on the message board -->
+ <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" />
+ <!-- the page owner, this will be the profile owner -->
+ <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" />
+ <?php echo elgg_view('input/securitytoken'); ?>
+ <!-- submit messages input -->
+ <input type="submit" id="postit" value="<?php echo elgg_echo('profile:commentwall:add'); ?>">
+</form>
+</div>
diff --git a/mod/profile/views/default/profile/editdefaultprofileitems.php b/mod/profile/views/default/profile/editdefaultprofileitems.php
index 403943d23..4cd5d68e9 100644
--- a/mod/profile/views/default/profile/editdefaultprofileitems.php
+++ b/mod/profile/views/default/profile/editdefaultprofileitems.php
@@ -1,68 +1,68 @@
-<script language="javascript" type="text/javascript" src="<?php echo $vars['url']?>mod/profile/vendor/jquery.jeditable.mini.js"></script>
-<script language="javascript" type="text/javascript">
-var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>';
-function sortCallback(event, ui) {
- var orderArr = $('#sortableList').sortable('toArray');
- var orderStr = orderArr.join(',');
- console.log(orderArr);
- console.log(orderStr);
- jQuery.post(reorderURL, {'fieldorder': orderStr});
-}
-
-$(document).ready(function() {
- $('#sortableList').sortable({
- items: 'li',
- handle: '.handle',
- stop: sortCallback
- });
-});
-
-</script>
-<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/multiadmin/vendors/js/jquery.jeditable.js" ></script>
-
-<div id="list">
- <ul id="sortableList">
-<?php
-
- $save = elgg_echo('save');
- $cancel = elgg_echo('cancel');
- $edit_url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/editfield", FALSE);
-
- foreach($vars['items'] as $item) {
- echo <<< END
-
-<script language="javascript" type="text/javascript">
-
- $(function() {
- $(".{$item->shortname}_editable").editable("$edit_url ", {
- type : 'text',
- submitdata: { _method: "post", 'field': '{$item->shortname}' },
- onblur: 'submit',
- width:'300px',
- height:'none',
- style:'display:inline;',
- tooltip:'Click to edit label'
- });
- });
-
-</script>
-
-END;
-
- echo elgg_view("profile/", array('value' => $item->translation));
-
- //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- $url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/delete?id={$item->shortname}");
- echo "<li id=\"{$item->shortname}\"><div class=\"delete_note\" style=\"float:right\"><a href=\"$url\">" . elgg_echo('delete') . "</a></div>";
- echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='{$vars['url']}mod/profile/graphics/drag_handle.png'/>";
- echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]";
- echo "</li>";
-
- }
-
-?>
- </ul>
-</div>
-<div id="tempList"></div>
-
-<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $vars['fieldlist']; ?>" />
+<script language="javascript" type="text/javascript" src="<?php echo $vars['url']?>mod/profile/vendor/jquery.jeditable.mini.js"></script>
+<script language="javascript" type="text/javascript">
+var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>';
+function sortCallback(event, ui) {
+ var orderArr = $('#sortableList').sortable('toArray');
+ var orderStr = orderArr.join(',');
+ console.log(orderArr);
+ console.log(orderStr);
+ jQuery.post(reorderURL, {'fieldorder': orderStr});
+}
+
+$(document).ready(function() {
+ $('#sortableList').sortable({
+ items: 'li',
+ handle: '.handle',
+ stop: sortCallback
+ });
+});
+
+</script>
+<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/multiadmin/vendors/js/jquery.jeditable.js" ></script>
+
+<div id="list">
+ <ul id="sortableList">
+<?php
+
+ $save = elgg_echo('save');
+ $cancel = elgg_echo('cancel');
+ $edit_url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/editfield", FALSE);
+
+ foreach($vars['items'] as $item) {
+ echo <<< END
+
+<script language="javascript" type="text/javascript">
+
+ $(function() {
+ $(".{$item->shortname}_editable").editable("$edit_url ", {
+ type : 'text',
+ submitdata: { _method: "post", 'field': '{$item->shortname}' },
+ onblur: 'submit',
+ width:'300px',
+ height:'none',
+ style:'display:inline;',
+ tooltip:'Click to edit label'
+ });
+ });
+
+</script>
+
+END;
+
+ echo elgg_view("profile/", array('value' => $item->translation));
+
+ //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+ $url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/delete?id={$item->shortname}");
+ echo "<li id=\"{$item->shortname}\"><div class=\"delete_note\" style=\"float:right\"><a href=\"$url\">" . elgg_echo('delete') . "</a></div>";
+ echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='{$vars['url']}mod/profile/graphics/drag_handle.png'/>";
+ echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]";
+ echo "</li>";
+
+ }
+
+?>
+ </ul>
+</div>
+<div id="tempList"></div>
+
+<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $vars['fieldlist']; ?>" />
diff --git a/mod/profile/views/default/profile/profile_contents/commentwall.php b/mod/profile/views/default/profile/profile_contents/commentwall.php
index c13c16331..f3a2adb1c 100644
--- a/mod/profile/views/default/profile/profile_contents/commentwall.php
+++ b/mod/profile/views/default/profile/profile_contents/commentwall.php
@@ -1,13 +1,13 @@
-<?php
-/**
- * Elgg profile comment wall
- */
-?>
-<div id="profile_content">
-<?php
-if(isloggedin()){
- echo elgg_view("profile/commentwall/commentwalladd");
-}
-echo elgg_view("profile/commentwall/commentwall", array('annotation' => $vars['comments']));
-?>
+<?php
+/**
+ * Elgg profile comment wall
+ */
+?>
+<div id="profile_content">
+<?php
+if(isloggedin()){
+ echo elgg_view("profile/commentwall/commentwalladd");
+}
+echo elgg_view("profile/commentwall/commentwall", array('annotation' => $vars['comments']));
+?>
</div> \ No newline at end of file