Add-on: since your last visit XX posts and XX threads
This modification will add the amount of new post/threads in the welcome panel. Be aware this adds
2 queries to index.php and they are processer intensive. Ive released this modification in stand alone format
here.
Install doc: (welcome panel must be installed frist)
---------------------------------------
Open the phpinclude template
---------------------------------------
## find
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
if ($bbuserinfo[userid]!=0) {
$avatarurl=getavatarurl($bbuserinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/noavatar.gif';
}
$avatarimage='<img src="'.$avatarurl.'">';
} else {
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/guestavatar.gif"></a>';
}
}
## Replace with:
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
if ($bbuserinfo[userid]!=0) {
$avatarurl=getavatarurl($bbuserinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/noavatar.gif';
}
$avatarimage='<img src="'.$avatarurl.'">';
} else {
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/guestavatar.gif"></a>';
}
// Start new threads/posts
$loonewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$loonewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
}
---------------------------------------------------
Open template forumhome_welcometext
---------------------------------------------------
## Find:
You last visited: $bbuserinfo[lastvisitdate].<br>
## Replace with:
You last visited: $bbuserinfo[lastvisitdate].<br />There have been <b>$loonewthread[threads]</b> threads and <b>$loonewpost[posts]</b> posts since your last visit!<br />
////////
add-on installed
///////
Screenshot