The Arcive of vBulletin Modifications Site. |
|
Display Avatar In Any Template Details »»
|
|||||||||||||||||||||||||
Very similar to fraghappy's Show Avatar In Navbar 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:
PHP Code:
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. ![]() Supporters / CoAuthors Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Nice one M1th
|
|
#3
|
||||
|
||||
|
Who moved this to the plugin forum?
|
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
|||
|
|||
|
Will this work on 3.0.x?
|
|
#7
|
||||
|
||||
|
You will have to adapt it to function with vB3.0.x, but it should do
![]() Satan |
|
#8
|
|||
|
|||
|
Problem is I have no idea how.
I know the first find/add won't work, but how do I replace it? |
|
#9
|
||||
|
||||
|
Yep, this works with vB3.0.x too.
Just replace all the instances of $vbulletin->userinfo with $bbuserinfo and $vbulletin->options with $vboptions in the HTML code. ![]() And you wont see $config['Mysqli']['ini_file'] = ''; in the config.php file. Instead place the code right after $cookieprefix = 'bb'; |
|
#10
|
|||
|
|||
|
Quote:
Thanks though. |
![]() |
|
|