[solved] Blogsms oldestfirst not working

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
mmaurits

[solved] Blogsms oldestfirst not working

Post by mmaurits »

I have installed Blogs made simple 0.3.0b2, i've put some entries in it and i want to show the diferent catagorys on diferent pages, i made the catagorys cat1 cat2 etc.

Now when i put this code in the content page:
{cms_module module="Blogs"}
It shows al the entries, with the newest on top, but when i call 1 catagory with this code:
{cms_module module="Blogs" catid="cat1"}
It shows only the entries from cat1 (what i asked for) but with the oldest entry on top, putting parameter
oldestfirst="false"
in it didn't change a thing, are there more people with this problem?
Last edited by mmaurits on Wed Apr 02, 2008 9:50 am, edited 1 time in total.
chpochon

Re: Blogsms oldestfirst not working

Post by chpochon »

Yes, same problem here. I'm still looking everywhere for a solution.
chpochon

Re: Blogsms oldestfirst not working

Post by chpochon »

I've just found a solution working for me.
In Blogs.module.php, line 358 we have :

Code: Select all

    

$query="SELECT DISTINCT entry.* FROM ".cms_db_prefix()."module_blogs_entries AS entry LEFT JOIN ".cms_db_prefix()."module_blogs_comments AS comment ON entry.id=comment.entry WHERE entry.category=? $active ORDER BY comment.createtime";


This means that the entries will be ordered by the date of the comments !!!

So I've changed that line into :

Code: Select all


$query="SELECT DISTINCT entry.* FROM ".cms_db_prefix()."module_blogs_entries AS entry LEFT JOIN ".cms_db_prefix()."module_blogs_comments AS comment ON entry.id=comment.entry WHERE entry.category=? $active ORDER BY entry.createtime"


(only changed the end of the line, "comment.createtime" becomes "entry.createtime")

And it works !
Last edited by chpochon on Wed Apr 02, 2008 6:21 am, edited 1 time in total.
mmaurits

Re: Blogsms oldestfirst not working

Post by mmaurits »

Thanks, it also works here.
Locked

Return to “Modules/Add-Ons”