]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixing breadcrumb navigation and content header links for blogs.
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 2 Apr 2010 20:28:00 +0000 (20:28 +0000)
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 2 Apr 2010 20:28:00 +0000 (20:28 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5581 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/blog/blog_lib.php
mod/blog/languages/en.php
mod/blog/start.php
mod/blog/views/default/object/blog.php

index f3e853ad7a0321d9c202bd13e1479322d8f937e7..e8daeeed9863990d95c889ddc9da1a49f46eadb4 100644 (file)
  * @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(
index ecc0e96128db1c697311a5dac92fb1a877a1e328..4ae1bf63834c928cc1863132bb047e8df94cd22e 100644 (file)
@@ -5,9 +5,10 @@
  */
 
 $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',
 
@@ -15,6 +16,8 @@ $english = array(
        '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',
index 619378af25151da810370e0d5a47f3602613c449..06d7299f8dc0db35e802de00b716590043b6729c 100644 (file)
@@ -92,11 +92,12 @@ function blog_runonce() {
 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)) {
index fb996fb19f6b012e7432df3ff8c55e852b164e2d..79938ac0b2dad0104ec16ba366a7c97c796ecf11 100644 (file)
@@ -71,14 +71,13 @@ if ($full) {
 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