aboutsummaryrefslogtreecommitdiff
path: root/mod/tabbed_profile/views/default/profile/commentwall
diff options
context:
space:
mode:
Diffstat (limited to 'mod/tabbed_profile/views/default/profile/commentwall')
-rw-r--r--mod/tabbed_profile/views/default/profile/commentwall/commentwall.php18
-rw-r--r--mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php32
-rw-r--r--mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php18
3 files changed, 68 insertions, 0 deletions
diff --git a/mod/tabbed_profile/views/default/profile/commentwall/commentwall.php b/mod/tabbed_profile/views/default/profile/commentwall/commentwall.php
new file mode 100644
index 000000000..56670dcf0
--- /dev/null
+++ b/mod/tabbed_profile/views/default/profile/commentwall/commentwall.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg Commentwall display page
+ */
+//start the div which will wrap all the message board contents
+echo "<div id='comment_wall_display'>";
+
+// If there is any content to view, view it
+if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) {
+ //loop through all annotations and display
+ foreach($vars['annotation'] as $content) {
+ echo elgg_view("profile/commentwall/commentwall_content", array('annotation' => $content));
+ }
+} else {
+ echo "<p class='margin-top'>" . elgg_echo("profile:commentwall:none") . "</p>";
+}
+//close the wrapper div
+echo "</div>"; \ No newline at end of file
diff --git a/mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php b/mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php
new file mode 100644
index 000000000..a0785b565
--- /dev/null
+++ b/mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php
@@ -0,0 +1,32 @@
+<?php
+/**
+* Elgg Message board individual item display page
+ */
+?>
+<div class="entity-listing clearfix">
+ <!-- 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' => "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 . " " . elgg_view_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/tabbed_profile/views/default/profile/commentwall/commentwalladd.php b/mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php
new file mode 100644
index 000000000..dcb520ea1
--- /dev/null
+++ b/mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg profile comment wall add
+ */
+?>
+<div id="comment_wall_add">
+<form action="<?php echo elgg_get_site_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 get_loggedin_userid(); ?>" />
+ <!-- the page owner, this will be the profile owner -->
+ <input type="hidden" name="pageOwner" value="<?php echo elgg_get_page_owner_guid(); ?>" />
+ <?php echo elgg_view('input/securitytoken'); ?>
+ <!-- submit messages input -->
+ <input type="submit" id="postit" value="<?php echo elgg_echo('profile:commentwall:add'); ?>">
+</form>
+</div>