was trying to add a random avatar for no avatar users not sure how i can achieve this adding a nicely hook into this one
for this i edited "functions_user.php"
original
PHP Code:
// final case: didn't get an avatar, so use the fake one
if (empty($userinfo['avatarurl']) AND $returnfakeavatar AND $vbulletin->options['avatarenabled'])
{
$userinfo['avatarurl'] = vB_Template_Runtime::fetchStyleVar('imgdir_misc') . '/unknown.gif';
}
Here is my eidt
PHP Code:
if (empty($userinfo['avatarurl']) AND $returnfakeavatar AND $vbulletin->options['avatarenabled'])
{
$newavatar = rand(1,90);
$userinfo['avatarurl'] = 'images/avatars/' .$newavatar. ".jpg";
(This assigns a random image from 1.jpg to 90.jpg)
can you help me please how can a do this under a hook instead of editing source file