The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi,
Can anyone know how to add Welcome to Newest member greeting in template ? I got the function in core/includes/functions_databuild.php Code:
function build_user_statistics()
{
$members = vB::getDbAssertor()->getRow('vBForum:fetchUserStats');
// get newest member
$newuser = vB::getDbAssertor()->getRow('vBForum:fetchnewuserstats',
array('userid' => $members['maxid']));
// make a little array with the data
$values = array(
'numbermembers' => $members['users'],
'activemembers' => isset($members['active']) ? $members['active'] : 0,
'newusername' => $newuser['username'],
'newuserid' => $newuser['userid']
);
// update the special template
vB::getDatastore()->build('userstats', serialize($values), 1);
return $values;
}
can anyone guide me?spending many hours to search it and not found it... |
|
#2
|
|||
|
|||
|
Found the answer
edit /core/vb/api/user.php and add another function like this Code:
public function newestmember() {
$members = vB::getDbAssertor()->getRow('vBForum:fetchUserStats');
$newuser = vB::getDbAssertor()->getRow('vBForum:fetchnewuserstats',array('userid' => $members['maxid']));
return $newuser;
}
{vb:data newusername, user, newestmember} Thanks for lynne for inspiration. |
|
#3
|
|||
|
|||
|
this isn't working in vb 5.1.2 beta 1
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|