diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blog/blog_lib.php | 36 | ||||
-rw-r--r-- | mod/blog/languages/en.php | 4 | ||||
-rw-r--r-- | mod/blog/start.php | 2 |
3 files changed, 27 insertions, 15 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php index 83afab872..0ecd48b86 100644 --- a/mod/blog/blog_lib.php +++ b/mod/blog/blog_lib.php @@ -30,7 +30,7 @@ function blog_get_page_content_read($owner_guid = NULL, $guid = NULL) { } } else { $content = elgg_view('page_elements/content_header', array( - 'context' => $context, + 'context' => $owner_guid ? 'mine' : 'everyone', 'type' => 'blog', 'all_link' => "{$CONFIG->site->url}pg/blog" )); @@ -61,7 +61,12 @@ function blog_get_page_content_read($owner_guid = NULL, $guid = NULL) { ); } - $content .= elgg_list_entities_from_metadata($options); + $list = elgg_list_entities_from_metadata($options); + if (!$list) { + $content .= elgg_echo('blog:none'); + } else { + $content .= $list; + } } return array('content' => $content); @@ -121,11 +126,8 @@ function blog_get_page_content_archive($owner_guid, $lower=0, $upper=0) { $now = time(); - $content = elgg_view('page_elements/content_header', array( - 'context' => $context, - 'type' => 'blog', - 'all_link' => "{$CONFIG->site->url}pg/blog" - )); + elgg_push_breadcrumb(elgg_echo('blog:archives')); + $content = elgg_view('page_elements/content_header_member', array('type' => 'blog')); if ($lower) { $lower = (int)$lower; @@ -174,7 +176,12 @@ function blog_get_page_content_archive($owner_guid, $lower=0, $upper=0) { ); } - $content .= elgg_list_entities_from_metadata($options); + $list = elgg_list_entities_from_metadata($options); + if (!$list) { + $content .= elgg_echo('blog:none'); + } else { + $content .= $list; + } return array( 'content' => $content @@ -190,16 +197,16 @@ function blog_get_page_content_archive($owner_guid, $lower=0, $upper=0) { function blog_get_page_content_friends($user_guid) { global $CONFIG; - elgg_push_breadcrumb(elgg_echo('blog:friends')); + elgg_push_breadcrumb(elgg_echo('friends')); $content = elgg_view('page_elements/content_header', array( - 'context' => $context, + 'context' => 'friends', 'type' => 'blog', 'all_link' => "{$CONFIG->site->url}pg/blog" )); if (!$friends = get_user_friends($user_guid, ELGG_ENTITIES_ANY_VALUE, 0)) { - $content .= elgg_echo('blog:no_friends'); + $content .= elgg_echo('friends:none:you'); } else { $options = array( 'type' => 'object', @@ -224,7 +231,12 @@ function blog_get_page_content_friends($user_guid) { ); } - $content .= elgg_list_entities_from_metadata($options); + $list = elgg_list_entities_from_metadata($options); + if (!$list) { + $content .= elgg_echo('blog:none'); + } else { + $content .= $list; + } } return array('content' => $content); diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index f005dbf4c..b210ba8d1 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -10,12 +10,11 @@ $english = array( 'blog:owned_blogs' => '%s', 'blog:revisions' => 'Revisions', 'blog:archives' => 'Archives', - 'blog:blog' => 'Blog', - 'blog:friends' => 'Friends\' blogs', 'blog:title:user_blogs' => '%s\'s Blogs', 'blog:title:all_blogs' => 'All Site Blogs', + 'blog:title:friends' => 'All Friends\' Blogs', // Editing 'blog:new' => 'New blog post', @@ -41,6 +40,7 @@ $english = array( 'blog:error:post_not_found' => 'This post has been removed or is invalid.', 'blog:messages:warning:draft' => 'There is an unsaved draft of this post!', 'blog:edit_revision_notice' => '(Old version)', + 'blog:none' => 'No blogs found', // river 'blog:river:create' => '%s wrote a new blog post', diff --git a/mod/blog/start.php b/mod/blog/start.php index a04d5d0bb..f36c542a2 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -133,7 +133,7 @@ function blog_page_handler($page) { break; case 'friends': - $title = elgg_echo('blog:friends'); + $title = elgg_echo('blog:title:friends'); $content_info = blog_get_page_content_friends($user->getGUID()); break; |