Page 1 of 1

NEWBIE Q: Oldest FIRST ??

Posted: Fri Apr 29, 2005 6:43 am
by plebe
Ok, call me lame but I just simply can NOT find out how to make my entries list from the OLDEST FIRST, then newer as the list goes down.

:?:

I need this order for a specific purpose. I know other weblog systems allow for acending / decending / oldest first / newest first ordering, just can't find it in s9y. :(

s9y is the BOMB by the way. Excellent work peeps!! Best interface and Admin I have seen in a long time. Glad to have found it.

Any help much appreciated folks, and I DID search for a prior post on this subject but got nutin'.

THANKS! :D

Re: NEWBIE Q: Oldest FIRST ??

Posted: Fri Apr 29, 2005 3:12 pm
by garvinhicking
The easiest way for this is to patch up Serendipity.

Just open your include/functions_entries.inc.php file and find this:

function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fetchDrafts = false, $modified_since = false, $orderby = 'timestamp DESC', $filter_sql = '', $noCache = false, $noSticky = false) {

ther change the 'timestamp DESC' into 'timestamp ASC' and you're settled.

You *could* faciliate this method into a plugin easily (by hooking into the 'frontend_fetchentries' event and modifying $eventData['orderby']), but IMHO that's not worth the work. Patching the file should be "fair enough".

Great you enjoy Serendipity! :)

Regards,
Garvin

Posted: Fri Apr 29, 2005 5:25 pm
by plebe
Great! Thanks Garvin. And thanks for the quick reply!

I will give that a try.

It would be cool to have this option in the Admin section, maybe a drop down list or something but I know you must be busy!

Thanks again,

I look forward to using s9y in the future.

Joel