Quote:
Originally Posted by Jaxel
Okay... I use file structure avatars (not database), so I've diagnosed two problems with this mod... The following code is broken in TWO places:
PHP Code:
if (has_avatar($vbulletin->userinfo['userid'])) { $woopra_avatar_url = $woopra_homeurl . "/image.php?u=" . $vbulletin->userinfo['userid']; }
Firstly, the has_avatar function doesn't work. The if statement ALWAYS fails 100%. If you get rid of the if statement, then image.php fails because the images are not being read from the database, they should be read from the file structure. So I replaced the above lines with the following, and it worked great:
PHP Code:
require_once(DIR . '/includes/functions_user.php'); $woopra_avatar_url = fetch_avatar_url($vbulletin->userinfo['userid']); $woopra_avatar_url = $woopra_homeurl . '/' . $woopra_avatar_url[0];
|
Thank you, but I had to make a couple changes to this aswell. I replaced
PHP Code:
$woopra_homeurl = $vbulletin->options['homeurl']
if (has_avatar($vbulletin->userinfo['userid']))
{
$woopra_avatar_url = $woopra_homeurl . "/image.php?u=" . $vbulletin->userinfo['userid'];
}
with
PHP Code:
$woopra_homeurl = $vbulletin->options['bburl'];
require_once(DIR . '/includes/functions_user.php');
$avatar_url = fetch_avatar_url($vbulletin->userinfo['userid']);
$woopra_avatar_url = str_replace('./', "", $avatar_url);
$woopra_avatar_url = $woopra_homeurl . "/" . $woopra_avatar_url[0];
I am still working on an if statement for those without avatars