View Full Version : Order by start time and date
remlle
02-16-2003, 02:31 AM
I am totally new to hacking. Infact I have never coded anything and I am not good at all. I would like to sort the threads on my site to be sorted by start date and time. my users are used to this because that is how other boards sort this one does not.
I am used to discusware but this is way better than it. please help me. if you need more info pm me.
amykhar
02-16-2003, 02:46 AM
This won't be hard at all.
In newreply.php
Find:
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
Replace With:
$threadstarttime=$DB_site->query_first("SELECT dateline FROM thread WHERE threadid='$threadid'");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost=$threadstarttime, lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
amykhar
02-16-2003, 02:47 AM
Now, this will mess up the lastpost time that displays on your forum home page. Therefore, I probably wouldn't do it. But, it will ensure that your threads are sorted in chronological order based on the time they were posted.
Amy
remlle
02-16-2003, 06:19 PM
ok is there a way to make both work??
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.