blogs 'sort order'

Has anyone looked into setting up blogs so when you view posts, you can select the order they appear in? 

As in, by default they show latest post at top. Would be great if there was an order reversal option... 

 

Anyone looked into this yet? Im sure it should be a fairly common need for blog users.

Quote · 5 Oct 2013

I like this option also.

Quote · 5 Oct 2013

makes sense if blogs are continuous content... such as diary, or story etc...

Quote · 5 Oct 2013

 exactly.

Since I can't seem to find a book mod for my site I would like to use the blog feature as an alternate but the current sorting setting is not good for such purpose.

 

makes sense if blogs are continuous content... such as diary, or story etc...

 

Quote · 6 Oct 2013

It is possible to change default sorting order in Blogs in modules/boonex/blogs/classes/BxBlogsSearchUnit.php file:

function setSorting ()
    {
        $this->aCurrent['sorting'] = (false !== bx_get('blogs_mode')) ? bx_get('blogs_mode') : $this->aCurrent['sorting'];

        if( $this->aCurrent['sorting'] != 'top' && $this->aCurrent['sorting'] != 'last' && $this->aCurrent['sorting'] != 'score' && $this->aCurrent['sorting'] != 'popular')
            $this->aCurrent['sorting'] = 'last';
    }

Just change 'last' to 'popular' for example.

Rules → http://www.boonex.com/terms
Quote · 9 Oct 2013

Can you just make it 'asc' as in ascending? I think that's what he wants. each of the options you list there, top, last, score, and popular won't do what he's asking.

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 9 Oct 2013

Thanks AlexT, but do you know how to add asc/desc order so readers can choose first or last?

 

Mine will be used for ongoing blogs, even books in a sense! Reading latest post is great, if you've already read the rest and are keeping up with changes. For most though, will need to start at the beginning!

Any help appreciated :-)

Quote · 10 Oct 2013

To implement custom sorting you need to make changes in function just below 'setSorting' function in the same modules/boonex/blogs/classes/BxBlogsSearchUnit.php file:

    function getAlterOrder()
    {
        if ($this->aCurrent['sorting'] == 'popular') {
            $aSql = array();
            $aSql['order'] = " ORDER BY `CommentsCount` DESC, `PostDate` DESC";
            return $aSql;
        }
        return array();
    }
Rules → http://www.boonex.com/terms
Quote · 17 Oct 2013

thanks Alex, tried this but then get this error when viewing site

Fatal error: Cannot redeclare BxBlogsSearchUnit::getAlterOrder() in /modules/boonex/blogs/classes/BxBlogsSearchUnit.php on line 530



Quote · 17 Oct 2013

Alex, could you check this if you get a mo please, would be really helpful to get this to work but the code you posted just gives me an error and can no longer access the site when using it.

 

Thanks :-)

Quote · 19 Oct 2013

I am keeping up with the Kardashians ,too.

Quote · 19 Oct 2013

Modzz was working to improve his module to add chapters which will make it a better "book" module.

Geeks, making the world a better place
Quote · 21 Oct 2013

I bought the multiple blogs mod by Modzzz which does have sort first/last filter. It's a good mod, but it changes the categories setup so that you place actual blogs into cats, instead of blog posts. This was something that didnt work on my site so gone back to ultimate blogs instead of 'standard' blogs... 

 

still dont have first/last filtering now though!

Quote · 21 Oct 2013

AlexT, could you double check the code you posted as it just gives an error message for me. 

Appreciate it.

Thanks :-)

Quote · 23 Oct 2013

What AlexT provided was a guidance, not a solution. The function exists already so you cannot copy and paste it again. he is simply saying that you need to make some modifications to that function to achieve what you want.

AlexT, could you double check the code you posted as it just gives an error message for me. 

Appreciate it.

Thanks :-)

 

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 23 Oct 2013

for example...

Quote · 23 Oct 2013

Ultimate Blogs module has been updated to allow members to sort postings on Blog page in Oldest or Newest order.

I bought the multiple blogs mod by Modzzz which does have sort first/last filter. It's a good mod, but it changes the categories setup so that you place actual blogs into cats, instead of blog posts. This was something that didnt work on my site so gone back to ultimate blogs instead of 'standard' blogs... 

 

still dont have first/last filtering now though!

 

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 28 Oct 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.