Changing display order in all pages

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Tim Posey

Changing display order in all pages

Post by Tim Posey »

:oops: Forgive me but I posted in the wrong forum on the previous message, but they were kind enough to help me with the following answer.

My original question was how to change the display order on the initial page of the blog so that the oldest appears first and they gave me the following answer which worked great, however when I go to the callendar and change months the entries on the resulting pages are still in the old order of last date posted.

Can anyone tell me where I need to edit to change this display.

Here's the code they gave me earlier. and thanks.

Yes, you can edit your include/genpage.inc.php file.

Replace:

Code:

// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit']));
break;


with

Code:

// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'], false, false, 'timestamp ASC'));
break;


You could also outsource the include/genpage.inc.php as your template's config.inc.php or layout.php file. But since this is advanced stuff and harder to achieve, you'll maybe not want to do this.

Thanks,

Tim
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Changing display order in all pages

Post by garvinhicking »

:-)

Actually, changing this for category view isn't hard as well. Look inside your include/genpage.inc.php and search for other calls of serendipity_fetchEntries(). You just need to change those calls like you changed the one earlier, by appending the parameters until "timestamp desc" [the 6th. parameter; parameter 4 and 5 can be "null"].

Have a try, it's not that hard. If you don'T succeed, just report back here with what you tried, and we'll solve it from there on :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply