Quote:
Originally Posted by Mr. Boo
Thanks for this it looks like a really awesome mod, Im having a problem with installation though  I get the following error...
PHP Code:
Fatal error: Cannot redeclare fetch_avatar_url() (previously declared in /home/killah03/public_html/forums/includes/functions_user.php:259) in /home/killah03/public_html/forums/includes/functions_grps.php on line 53
Could it be another mod interfering with this one?
|
you have vBredux installed or something similar?
in your functions grps, find:
PHP Code:
// ###################### Start getavatarurl #######################
function fetch_avatar_url($userid)
{
global $session, $vbulletin;
if ($avatarinfo = $vbulletin->db->query_first("
SELECT user.avatarid, user.avatarrevision, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (customavatar.userid = user.userid)
WHERE user.userid = " . intval($userid)))
{
if (!empty($avatarinfo['avatarpath']))
{
return $avatarinfo['avatarpath'];
}
else if ($avatarinfo['hascustomavatar'])
{
if ($vbulletin->options['usefileavatar'])
{
return $vbulletin->options['avatarurl'] . "/avatar" . $userid . "_" . $avatarinfo['avatarrevision'] . ".gif";
}
else
{
return $vbulletin->options['bburl'] . "/image.php?u=" . $userid . "&dateline=" . $avatarinfo['dateline'];
}
}
else
{
return '';
}
}
}
and replace with
PHP Code:
if (!function_exists('fetch_avatar_url'))
{
function fetch_avatar_url($userid)
{
global $session, $vbulletin;
if ($avatarinfo = $vbulletin->db->query_first("
SELECT user.avatarid, user.avatarrevision, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (customavatar.userid = user.userid)
WHERE user.userid = " . intval($userid)))
{
if (!empty($avatarinfo['avatarpath']))
{
return $avatarinfo['avatarpath'];
}
else if ($avatarinfo['hascustomavatar'])
{
if ($vbulletin->options['usefileavatar'])
{
return $vbulletin->options['avatarurl'] . "/avatar" . $userid . "_" . $avatarinfo['avatarrevision'] . ".gif";
}
else
{
return $vbulletin->options['bburl'] . "/image.php?u=" . $userid . "&dateline=" . $avatarinfo['dateline'];
}
}
else
{
return '';
}
}
}
}