Adding User Avatars On Custom Modifications
by
17 Jan 2007
Compatible with vBulletin 3.6.x - Upload the attached image to your misc. folder.
- Import this product
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="NoAvatar" active="1">
<title>No Avatar</title>
<description>Add avatar in your mods</description>
<url>http://www.blabla.com</url>
<version>1.0.0</version>
<plugins>
<plugin active="1">
<title>NoAvatar</title>
<hookname>forumhome_start</hookname>
<phpcode><![CDATA[if ($vbulletin->userinfo['userid']){
require_once('./includes/functions_user.php');
$noavatar = fetch_avatar_url($vbulletin->userinfo['userid']);
if (!is_array($noavatar)){
$noavatar[0] = $vbulletin->options['bburl'] . "/images/misc/no_avatar.gif";
}
}]]></phpcode>
</plugin>
</plugins>
</product>
And add this variable in your mods: $noavatar[0]
If user doesn't have a avatar, the "no_avatar.gif" image will display.
(REMINDER: Upload the no_avatar.gif to your misc. folder.)
I don't want to display the no_avatar.gif image.
Add this code in your mod:
PHP Code:
<img src="image.php?$session[sessionurl]u=$bbuserinfo[userid]" alt="" border="0" />
If user doesn't have an avatar, the clear.gif (from your forum root) will display.
|