PDA

View Full Version : Where is the update thread time, poster etc?


Mark Hewitt
02-01-2002, 09:40 AM
I'm trying to implement some primitive form of thread cross posting and think I've worked out how to do it for two threads.

Basically I create a standard pointer thread which points at the real thread, however I add an extra field to the thread table so the real thread can point back at the threadid of the pointer.

So then all I need to do when someone posts a reply is to update the lastpost time, poster etc on the pointer.

Can anyone point me to the routine that updates the thread info so I can modify it to update the other threads information also?

Thanks,
Mark

Admin
02-01-2002, 11:23 AM
In newreply.php:
if ($threadinfo[replycount]%10==0) {
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
} else {
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
}