In vB 3.x, I used the following code in index.php so that the "Welcome to our newest member" would only list the newest *activated* member:
PHP Code:
$newuser = $db->query_first("SELECT userid, username
FROM " . TABLE_PREFIX . "user
WHERE usergroupid NOT IN (3,4)
ORDER BY userid DESC
LIMIT 1");
$newuserid = $newuser['userid']; // set template variables
$newusername = $newuser['username'];
However, this is no longer working in forum.php, which seems to be the template in vB4.0 in which the code needs to go.
In the old version, the above replaced the following lines, which were canceled out by //:
PHP Code:
$newusername = $vbulletin->userstats['newusername'];
$newuserid = $vbulletin->userstats['newuserid'];
The above code has been replaced by the following in vB4.0:
PHP Code:
$newuserinfo = array(
'userid' => $vbulletin->userstats['newuserid'],
'username' => $vbulletin->userstats['newusername']
);
I hoped I could just use the // trick to cancel out the above, insert the old modified code and be good to go, but that only resulted in a blank on the forum home page. I tried several other variations but had no luck.
Any help would be much appreciated.