Positing Entire Blog instead of just $extract

Obviously there is someway for doing this...

Most likely the code changes required are in some create.php blog plugin folder files...

The goal is making the Blog posts show full display of contents in Blogs & in the River/Activity.

Any hint would be massively appreciated!

  • oops my bad... version 1.12.17

    have 7 versions installed  during R&D

    this has been the most stable meeting my requirements

  • In mod\blog\views\default\object\blog.php

    Change 

    } else {
        // brief view
    
        $params = array(
            'entity' => $blog,
            'metadata' => $metadata,
            'subtitle' => $subtitle,
            'content' => $excerpt,
        );
        $params = $params + $vars;
        $list_body = elgg_view('object/elements/summary', $params);
    
        echo elgg_view_image_block($owner_icon, $list_body);
    }

    On

    } else {
        // brief view
    
        $params = array(
            'entity' => $blog,
            'metadata' => $metadata,
            'subtitle' => $subtitle,
            'content' => $blog->description
        );
        $params = $params + $vars;
        $list_body = elgg_view('object/elements/summary', $params);
    
        echo elgg_view_image_block($owner_icon, $list_body);
    }
  • so change

    'content' => $excerpt,

    for

    'content' => $blog->description

    gotcha TYVM!

  • added comma

    'content' => $blog->description,

    will try making new blog for posting soon

  • You can try to use $body instead of $blog->description also.

  • Neither made any difference. For some reason, the new & old blogs are still truncated extractions both on the blogs page and also in River activity. Let me search all of the mod/blog code when have some time, then report if/when find anything that seems it can effect how they are displayed in Blog/Activity pages...

  • None of the above methods made any change at all on any of the blog outputs pt making suggested code modifications and creating new blogs. The river and the "blog" stream blog items are still truncated extracts.... There is obviously some way for accomplishing this... Thanks for giving me clue regarding modifying: mod\blog\views\default\object\blog.php

  • The blog river view needs to be modified: https://github.com/Elgg/Elgg/blob/1.12/mod/blog/views/default/river/object/blog/create.php contains the lines

    $excerpt = $object->excerpt ? $object->excerpt : $object->description;
    $excerpt = strip_tags($excerpt);
    $excerpt = elgg_get_excerpt($excerpt);

    These lines will always result in only an excerpt getting displayed on the activity page, either the text entered in the exerpt field or an excerpt on the blog text (description). If you always want to the full blog just use the line

    $excerpt = $object->description;

    instead of the other three lines.

    The modification suggested by RvR in the file mod/blog/views/default/object/blog.php should definitely work. If you haven't flushed the cache of the site in the admin area, try again (or try with the caching options disabled with coding).

  • thanks for solution!

    ....took me ages figuring out because also had blog_tools, blogcoverphoto, and linkphoto_coverblog

    edited the views files of all...

    even though the last in chain seems having highest priority...