diff options
Diffstat (limited to 'mod/blog/views/default/object')
-rw-r--r-- | mod/blog/views/default/object/blog-comment.php | 31 | ||||
-rw-r--r-- | mod/blog/views/default/object/blog-comments.php | 27 | ||||
-rw-r--r-- | mod/blog/views/default/object/blog.php | 3 |
3 files changed, 60 insertions, 1 deletions
diff --git a/mod/blog/views/default/object/blog-comment.php b/mod/blog/views/default/object/blog-comment.php new file mode 100644 index 000000000..ecbf5fcff --- /dev/null +++ b/mod/blog/views/default/object/blog-comment.php @@ -0,0 +1,31 @@ +<?php
+
+ /**
+ * Elgg blog individual comment view
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The comment to view
+ */
+
+
+?>
+
+ <li>
+
+ <?php echo elgg_view("output/longtext",array("value" => $vars['entity']->value)); ?>
+ <p>
+ <?php
+
+ if ($owner = get_entity($vars['entity']->owner_guid)) {
+ echo $owner->name;
+ }
+
+ ?>, <?php echo date("F j, g:i a",$vars['entity']->time_created); ?>
+ </p>
+
+ </li>
\ No newline at end of file diff --git a/mod/blog/views/default/object/blog-comments.php b/mod/blog/views/default/object/blog-comments.php new file mode 100644 index 000000000..991c42301 --- /dev/null +++ b/mod/blog/views/default/object/blog-comments.php @@ -0,0 +1,27 @@ +<?php
+
+ /**
+ * Elgg blog aggregate comments view
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['comments'] Array of comments
+ */
+
+ if (isset($vars['comments']) && is_array($vars['comments']) && sizeof($vars['comments']) > 0) {
+
+ echo "<h3>". elgg_echo("comments") ."</h3><ol>";
+ foreach($vars['comments'] as $comment) {
+
+ echo elgg_view("object/blog-comment",array('entity' => $comment));
+
+ }
+ echo "</ol>";
+
+ }
+
+?>
\ No newline at end of file diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index b023d76e5..d64495f9d 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -61,7 +61,7 @@ echo elgg_view('object/blog-comments',array('comments' => $vars['comments']));
?>
- <form action="<?php echo $vars['url']; ?>action/blog/comment/add" method="post">
+ <form action="<?php echo $vars['url']; ?>action/blog/comments/add" method="post">
<h3>
<?php echo elgg_echo("blog:comment:add"); ?>
</h3>
@@ -75,6 +75,7 @@ </label>
</p>
<p>
+ <input type="hidden" name="blogpost_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
<input type="submit" value="<?php echo elgg_echo("save"); ?>" />
</p>
</form>
|