[req]php guru for avatar on vba[aria skin]

TheProphet

New Member
Ok the aria avatar is being called by the aria product on the forumhome true the navbar template.

product-aria.xml
PHP:
<hookname>forumhome_start</hookname>
			<phpcode><![CDATA[if ($vbulletin->userinfo['userid']){
require_once('./includes/functions_user.php'); 
$aria = fetch_avatar_url($vbulletin->userinfo['userid']);
if (!is_array($aria)){
$aria[0] = $vbulletin->options['bburl'] . "/images/aria/misc/noavatar.gif";
  }
}]]></phpcode>


Witch called in this piece the template. ("$aria[0]")
Aria navbar template:
PHP:
<div align="center"><a href="profile.php?do=editavatar"><img src="$aria[0]" alt="" border="0" /></a></div></td><td width="100%" class="alt1">

How can we make the code worked on the vbadvanced aswell from the product?
Changing the hook location doesnt work either.

Anyone who can provide a working code on this?

Thx
 

chaotic_geo

New Member
Should be:

PHP:
<hookname>global_start</hookname>
Then the $aria[0] variable will output something like image.php?u=1&dateline=1232201975 (the user's avatar URL on any vBulletin powered page)..

Make sure you include the full URL to image.php for example:

HTML:
<img src="http://www.yoursite.com/forums/$aria[0]" alt="" border="0" />
Don't forget to include the full URL to the no avatar image in case your vBA index is in a different directory to your forums (which it probably is).
 

TheProphet

New Member
Thx for helping m8, but those options i allready tried myself without succes... any other option we might try to get this work... and yes my vbadvanced and forum are separated.
 

chaotic_geo

New Member
PHP:
<hookname>global_start</hookname>
            <phpcode><![CDATA[if ($vbulletin->userinfo['userid']){
require_once('http://www.yoursite.com/forums/includes/functions_user.php'); 
$aria = fetch_avatar_url($vbulletin->userinfo['userid']);
if (!is_array($aria)){
$aria[0] = $vbulletin->options['bburl'] . "http://www.yoursite.com/forums/images/aria/misc/noavatar.gif";
  }
}]]></phpcode>

HTML:
<div align="center"><a href="http://www.yoursite.com/forums/profile.php?do=editavatar"><img src="http://www.yoursite.com/forums/$aria[0]" alt="" border="0" /></a></div>

Replace the 4 instances of http://www.yoursite.com/forums/ with yours. Make sure you are using absolute URLs.

Works for me.
 
Top