07-06-2000, 02:20 PM
Thought I'd post this code in the correct section as well...
The following modifications will make the search results show the http://www.vbulletin.com/forum/images/firstnew.gif image for each thread that is new to the user. This will allow the user to click on the icon to jump to the new posts in the results.
In search.php, I changed the line (204 or so):
$threadinfo=$DB_site->query_first("SELECT title,postusername,dateline,lastposter,postusernam e,replycount FROM thread WHERE threadid=$searchresult[threadid]");
to
$threadinfo=$DB_site->query_first("SELECT title,postusername,dateline,lastposter,postusernam e,replycount,lastpost FROM thread WHERE threadid=$searchrestult[threadid]");
... which basically just adds "lastpost" to the query results.
I then added the following lines:
$gotonew = "";
if ($threadinfo[lastpost]>$bblastvisit) {
$threadid = $searchresult[threadid];
eval("\$gotonew = \"".gettemplate("forumdisplay_gotonew")."\";");
}
... around line 225 right above the line that reads:
eval ("\$searchresultbits .= \"".gettemplate("searchresultbit")."\";");
Let me know if this doesn't work!
The following modifications will make the search results show the http://www.vbulletin.com/forum/images/firstnew.gif image for each thread that is new to the user. This will allow the user to click on the icon to jump to the new posts in the results.
In search.php, I changed the line (204 or so):
$threadinfo=$DB_site->query_first("SELECT title,postusername,dateline,lastposter,postusernam e,replycount FROM thread WHERE threadid=$searchresult[threadid]");
to
$threadinfo=$DB_site->query_first("SELECT title,postusername,dateline,lastposter,postusernam e,replycount,lastpost FROM thread WHERE threadid=$searchrestult[threadid]");
... which basically just adds "lastpost" to the query results.
I then added the following lines:
$gotonew = "";
if ($threadinfo[lastpost]>$bblastvisit) {
$threadid = $searchresult[threadid];
eval("\$gotonew = \"".gettemplate("forumdisplay_gotonew")."\";");
}
... around line 225 right above the line that reads:
eval ("\$searchresultbits .= \"".gettemplate("searchresultbit")."\";");
Let me know if this doesn't work!