it's working well, except I don't know where to put the other variables and vb code... like this:
PHP Code:
// pm
// -------------------------
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0");
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$logincode = \"".gettemplate('home_logout')."\";");
eval("\$buddy = \"".gettemplate('home_buddy1')."\";");
} else {
eval("\$logincode = \"".gettemplate('home_login')."\";");
$buddy = "";
}
i tried putting it in index.php and global.php but it doesn't work

I'll try to find some code in index.php where I can just insert some lines of this code... I think that should work, but I don't like searching