A couple of my users asked that the PM login that shows up on the forum homepage will also be available on the forums pages, since many of them have specific forums bookmarked and don't see the forum homepage.
So I did a tiny hack to the hack to have this. Thought I'd share it with you if you're interested.
In forumdisplay, above the line // parse header ################## (or anywhere else for that matter which is outside a process), paste the following:
Code:
//PM HACK
if ($bbusername) {
$username = $bbusername;
$pmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$bbuserid");
$pmcount = $pmcounta[msgid];
$newpmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$bbuserid AND UNIX_TIMESTAMP(datetime)>$bblastvisit");
$newpmcount = $newpmcounta[msgid];
if($newpmcount == 0)
{
$newold = 'images/folder.gif';
} else {
$newold = 'images/newfolder.gif';
}
eval("\$pminfo .= \"".gettemplate("pmloggedin2")."\";");
} else {
eval("\$pminfo .= \"".gettemplate("pmloggedout2")."\";");
}
//END PM HACK
Now go to the templates, copy the content of "pmloggedin" and paste it into a
new template called "pmloggedin2". Make the necessary modifications so that it will have the same number of td in a row as the forumdisplaybit has.
Now do the same with "pmloggedout" - copy the content of this template and paste it into a
new template called "pmloggedout2". Edit it as necessary to fit your forumdisplay layout (same as pmloggedin2).
Finally, open the "forumdisplay" template and put $pminfo where you want the pm login to show (similar process as to the one for the forums homepage).
Enjoy