M1th
06-14-2005, 10:00 PM
Very similar to fraghappy's Show Avatar In Navbar (http://%5Burl=https://vborg.vbsupport.ru/showthread.php?t=83053%5D) Plugin with the difference being that you will now be able to get rid of the extra query executed on every page
Simply open up your config.php file and place:
define('AVATAR_ON_NAVBAR', 1);
at the end, right after:
$config['Mysqli']['ini_file'] = '';
Place this HTML code in any template you like.
<if condition="$vbulletin->userinfo['avatarid']">
<img src="$bbuserinfo[avatarpath]" alt="$bbuserinfo's Avatar" border="0" />
<else />
<if condition="$vbulletin->userinfo['hascustomavatar']">
<if condition="$vbulletin->options['usefileavatar']">
<a href="profile.php?do=editavatar"><img src="$vboptions[avatarurl]/avatar$bbuserinfo_$bbuserinfo[avatarrevision].gif" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" /></a>
<else />
<a href="profile.php?do=editavatar"><img src="image.php?u=$bbuserinfo[userid]&dateline=$avatar[dateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" /></a>
</if>
<else />
<a href="profile.php?do=editavatar"><img src="$stylevar[imgdir_misc]/noavatar.gif" alt="guestavatar.gif" title="No Avatar Specified" border="0" /></a>
</if>
</if>
Upload the noavatar.gif to your /images/misc directory
Done. :)
[u][u]Credits fraghappy for the idea and letting me release this mod. :)
Simply open up your config.php file and place:
define('AVATAR_ON_NAVBAR', 1);
at the end, right after:
$config['Mysqli']['ini_file'] = '';
Place this HTML code in any template you like.
<if condition="$vbulletin->userinfo['avatarid']">
<img src="$bbuserinfo[avatarpath]" alt="$bbuserinfo's Avatar" border="0" />
<else />
<if condition="$vbulletin->userinfo['hascustomavatar']">
<if condition="$vbulletin->options['usefileavatar']">
<a href="profile.php?do=editavatar"><img src="$vboptions[avatarurl]/avatar$bbuserinfo_$bbuserinfo[avatarrevision].gif" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" /></a>
<else />
<a href="profile.php?do=editavatar"><img src="image.php?u=$bbuserinfo[userid]&dateline=$avatar[dateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" /></a>
</if>
<else />
<a href="profile.php?do=editavatar"><img src="$stylevar[imgdir_misc]/noavatar.gif" alt="guestavatar.gif" title="No Avatar Specified" border="0" /></a>
</if>
</if>
Upload the noavatar.gif to your /images/misc directory
Done. :)
[u][u]Credits fraghappy for the idea and letting me release this mod. :)