From d599fe0cfb93bad66a194ffd11e44a97867c0fa0 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 3 Apr 2008 10:13:22 +0000 Subject: Blog: extended comment form, etc. git-svn-id: https://code.elgg.org/elgg/trunk@388 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/languages/en.php | 4 +++ mod/blog/read.php | 40 +++++++++++++++++++++++++++++ mod/blog/views/default/blog/css.php | 20 +++++++++++++++ mod/blog/views/default/object/blog.php | 47 ++++++++++++++++++++++++++++------ 4 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 mod/blog/read.php (limited to 'mod/blog') diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index 1467f4774..1beb5129d 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -8,6 +8,7 @@ 'blog' => "Blog", 'blog:user' => "%s's blog", + 'blog:posttitle' => "%s's blog: %s", 'blog:read' => "Read blog", @@ -18,6 +19,9 @@ 'blog:strapline' => "%s", + 'blog:comment:add' => "Add a comment", + 'blog:comment:text' => "Comment text", + /** * Status messages */ diff --git a/mod/blog/read.php b/mod/blog/read.php new file mode 100644 index 000000000..35ee0c997 --- /dev/null +++ b/mod/blog/read.php @@ -0,0 +1,40 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + */ + + // Load Elgg engine + require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + + // Get the specified blog post + $post = (int) get_input('blogpost'); + if ($blogpost = get_entity($post)) { + + // Get any comments + $comments = $blogpost->getAnnotations('comments'); + + // Set the page owner + set_page_owner($blogpost->getOwner()); + $page_owner = get_entity($blogpost->getOwner()); + + // Display it + $body = elgg_view("object/blog",array( + 'entity' => $blogpost, + 'entity_owner' => $page_owner, + 'comments' => $comments, + 'full' => true + )); + + } + + // Display page + page_draw(sprintf(elgg_echo("blog:posttitle"),$page_owner->name,$blogpost->title),$body); + +?> \ No newline at end of file diff --git a/mod/blog/views/default/blog/css.php b/mod/blog/views/default/blog/css.php index 1aa20f8e0..2808508d6 100644 --- a/mod/blog/views/default/blog/css.php +++ b/mod/blog/views/default/blog/css.php @@ -22,6 +22,13 @@ } +.blog-post a { + + text-decoration: underline; + color: #777; + +} + .blog-post h3 { font-size: 200%; @@ -29,10 +36,23 @@ } +.blog-post h3 a { + + text-decoration: none; + +} + .blog-post .strapline { font-size: 130%; margin-bottom: 20px; color: #aaa; +} + +.blog-post .strapline a { + + text-decoration: none; + color: #aaa; + } \ 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 ee88a0888..b023d76e5 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -17,7 +17,7 @@ ?>
-

title; ?>

+

title; ?>

- getOwner()); - echo $owner->name; - - ?> + name; ?>

+ +

+ + $vars['comments'])); + +?> +
+

+ +

+

+ +

+

+ " /> +

+
+ +
+ + \ No newline at end of file -- cgit v1.2.3