View Full Version : hard-coding the sort order...
charlottezweb
01-04-2005, 12:28 AM
I have my site set to display only one review on each "lead-in" page and currently it's showing the most recent review by default.
How can I set it to show the oldest review first?
Regards,
Jason
imported_Tim Mousel
01-04-2005, 02:59 AM
I assume you are referring to index2.php...
Open that file and find this on line 12:
$sort = @$_REQUEST['sort'];
Change it to:
//$sort = @$_REQUEST['sort'];
Then below that line put this:
$sort = "date_added";
$order = "ASC";
Anonymous
01-04-2005, 03:52 AM
Thanks Tim, though that's not what I have on line 12. In fact, I don't see those lines at all. Perhaps I have an older version, or mine is altered when you helped me customize it?
Here's a better example...
http://www.chevychased.com/movies_80s_caddyshack2.php
You'll notice the review at the bottom is the latest. I want that page to show the oldest first...
Regards,
Jason
imported_Tim Mousel
01-04-2005, 04:01 AM
I think you're using the review_insert.php feature? If so, do the same changes in that file. It might not be the same line number but it will be close.
Tim
charlottezweb
01-04-2005, 01:13 PM
Thanks Tim! I'll try that tonight.
Regards,
Jason
charlottezweb
01-05-2005, 12:53 AM
Tim, even in that file, I'm unable to find anything similar to:
$sort = @$_REQUEST['sort'];
I'm wondering if I'm on an older script version?
In fact, if I click at the bottom to view all reviews, all I get is the other 1 out of 2 and not all of them. I can't see the options anywhere to sort them by ratings, date, etc...as I sorta see in the coding. I had you do some customizing. Perhaps that may be why or maybe I'm missing something?
Regards,
Jason[/code]
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.