Display Avatar In Any Template
This modification is in the archives.
Very similar to fraghappy's http://%5Burl=index.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: PHP Code:
define('AVATAR_ON_NAVBAR', 1);
PHP Code:
$config['Mysqli']['ini_file'] = '';
Place this HTML code in any template you like. HTML Code:
<if condition="$vbulletin->userinfo['avatarid']"> <img src="$bbuserinfo[avatarpath]" alt="$bbuserinfo[username]'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[userid]_$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> Done. ![]() Creditsfraghappy for the idea and letting me release this mod. ![]() Download No files for download. Supporters / CoAuthors
Screenshots
|