Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues
Author Message
ohiodarter
Hangin' Around



Joined: Nov 06, 2002
Posts: 32

PostPosted: Thu Jul 05, 2007 8:18 pm Reply with quote

I am using the Content Module for posting stories, and I mean a lot of stories on a sports writers site. I have noticed that when listing a specific category of Content, it lists the stories one way. Oldest first. When having multiple pages, that is not the way my client wants it. He wants newest first. I have been bucking the system by modifying the sql to change the timestamps, but his site is getting too big. How and what can I change to make the newest show up first in the list. Thanks in advance!
Mike
 
View user's profile Send private message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Jul 05, 2007 8:59 pm Reply with quote

I'm assuming you aren't talking about any Content block, but the module itself.

In modules/Content/index.php there are several lines that look something like this:

Code:


 $result4 = $db->sql_query("SELECT pid, title, subtitle, clanguage FROM ".$prefix."_pages WHERE active='1' AND cid='0' ORDER BY date");


(Search for 'ORDER BY date' to find them all)

All you have to do is add 'DESC' after 'date'. In the above line's case, it would look like this:

Code:


 $result4 = $db->sql_query("SELECT pid, title, subtitle, clanguage FROM ".$prefix."_pages WHERE active='1' AND cid='0' ORDER BY date DESC");


Each line will be a little different so don't just copy the one above everywhere. Just add the DESC after date as shown. Hope that helps.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©