* @return string html
*/
function blog_get_page_content_read($owner_guid = NULL, $guid = NULL) {
- $content = elgg_view('page_elements/content_header', array('context' => $context, 'type' => 'blog'));
+ global $CONFIG;
+
+ $content = elgg_view('page_elements/content_header', array('context' => $context, 'type' => 'blog', 'all_link' => "{$CONFIG->site->url}pg/blog"));
if ($guid) {
$blog = get_entity($guid);
if (!elgg_instanceof($blog, 'object', 'blog') || ($blog->status != 'final' && !$blog->canEdit())) {
- $content .= elgg_echo('blog:error:post_not_found');
+ $content = elgg_echo('blog:error:post_not_found');
} else {
elgg_push_breadcrumb($blog->title, $blog->getURL());
- $content .= elgg_view_entity($blog, TRUE);
+ $content = elgg_view_entity($blog, TRUE);
}
} else {
$options = array(
*/
$english = array(
+ 'blog' => 'Blogs',
'item:object:blog' => 'Blog',
'blog:blogs' => 'Blogs',
- 'blog:owned_blogs' => '%s blogs',
+ 'blog:owned_blogs' => '%s',
'blog:revisions' => 'Revisions',
'blog:archives' => 'Archives',
'blog:yours' => 'Your blog',
'blog:all' => 'All blogs',
'blog:friends' => 'Friends\' blogs',
+
+ 'blog:title:user_blogs' => '%s\'s Blogs',
// Editing
'blog:new' => 'New blog post',
function blog_page_handler($page) {
global $CONFIG;
- elgg_push_breadcrumb(elgg_echo('blog:blogs'), "{$CONFIG->site->url}pg/blog");
-
// see if we're showing all or just a user's
if (isset($page[0]) && !empty($page[0])) {
$username = $page[0];
+
+ // push breadcrumb
+ elgg_push_breadcrumb(elgg_echo('blog:blogs'), "{$CONFIG->site->url}pg/blog");
// forward away if invalid user.
if (!$user = get_user_by_username($username)) {
echo <<<___END
<div class="blogpost clearfloat">
<div id="content_header" class="clearfloat">
- <div class="content_header_title"><h2>$owner_title</h2></div>
+ <div class="content_header_title"><h2>{$blog->title}</h2></div>
</div>
<div class="entity_listing_icon">
$owner_icon
</div>
<div class="entity_listing_info">
<div class="entity_metadata">$edit</div>
- <p class="entity_title">{$blog->title}</p>
<p class="entity_subtext">
$date
$categories