View Full Version : How do I use $getnewthread[threads] & $getnewpost[posts] in forumhome_pmloggedin?
Gutspiller
01-13-2003, 05:37 AM
The title pretty much says it. I want to add it so that in the forumhome_pmloggedin template so that is shows the latest number of threads and posts created since your last visit.
Can somebody please help me with this?
Logician
01-13-2003, 08:35 AM
if that template is displayed when index.php is run, all you need to do is to add the variables into the template, that's it.
If you try to display the templates inside other .php files (eg. forumdisplay.php), you have to put their code into that php files. And this is :
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.