From a7add808c43b0758a90791359bed0c075b0c35e6 Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 29 Mar 2010 13:12:24 +0000 Subject: simple comment wall added to profiles git-svn-id: http://code.elgg.org/elgg/trunk@5537 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../default/profile/commentwall/commentwall.php | 22 +++++++++++++++ .../profile/commentwall/commentwall_content.php | 32 ++++++++++++++++++++++ .../default/profile/commentwall/commentwalladd.php | 18 ++++++++++++ .../profile/profile_contents/commentwall.php | 13 +++++++++ .../views/default/profile/profile_navigation.php | 7 ++++- 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 mod/profile/views/default/profile/commentwall/commentwall.php create mode 100644 mod/profile/views/default/profile/commentwall/commentwall_content.php create mode 100644 mod/profile/views/default/profile/commentwall/commentwalladd.php create mode 100644 mod/profile/views/default/profile/profile_contents/commentwall.php (limited to 'mod/profile/views') diff --git a/mod/profile/views/default/profile/commentwall/commentwall.php b/mod/profile/views/default/profile/commentwall/commentwall.php new file mode 100644 index 000000000..9c1ff3fdb --- /dev/null +++ b/mod/profile/views/default/profile/commentwall/commentwall.php @@ -0,0 +1,22 @@ + 0) { + + //start the div which will wrap all the message board contents + echo "
"; + + //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 "
"; + +} else { + echo "
" . elgg_echo("profile:commentwall:none") . "
"; +} \ 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 new file mode 100644 index 000000000..d2a313d93 --- /dev/null +++ b/mod/profile/views/default/profile/commentwall/commentwall_content.php @@ -0,0 +1,32 @@ + +
+ +
+ get_entity($vars['annotation']->owner_guid), 'size' => 'tiny')); + ?> +
+ +

+ owner_guid)->name . " " . friendly_time($vars['annotation']->time_created); ?> +

+ +
parse_urls($vars['annotation']->value))); ?>
+
+ canEdit()) { + echo "
" . elgg_view("output/confirmlink",array( + 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id, + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )) . "
"; + } //end of can edit if statement + ?> +
+
+
diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php new file mode 100644 index 000000000..0d696b955 --- /dev/null +++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php @@ -0,0 +1,18 @@ + +
+
+ +
+ + + + + + + +
+
diff --git a/mod/profile/views/default/profile/profile_contents/commentwall.php b/mod/profile/views/default/profile/profile_contents/commentwall.php new file mode 100644 index 000000000..c13c16331 --- /dev/null +++ b/mod/profile/views/default/profile/profile_contents/commentwall.php @@ -0,0 +1,13 @@ + +
+ $vars['comments'])); +?> +
\ No newline at end of file diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/profile_navigation.php index c6ba3054a..1c2c782c7 100755 --- a/mod/profile/views/default/profile/profile_navigation.php +++ b/mod/profile/views/default/profile/profile_navigation.php @@ -26,6 +26,10 @@ switch($section){ case 'twitter': $twitter = 'class="selected"'; break; + + case 'commentwall': + $commentwall = 'class="selected"'; + break; case 'activity': default: @@ -39,6 +43,7 @@ switch($section){
  • >Activity
  • >Details
  • >Friends
  • +
  • >Comment Wall
  • twitter){ @@ -50,4 +55,4 @@ switch($section){ echo elgg_view('profilenav/extend', $profile); ?> - + \ No newline at end of file -- cgit v1.2.3