Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Display Avatar In Any Template Details »»
Display Avatar In Any Template
Version: 1.00, by M1th M1th is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 Beta 1 Rating:
Released: 06-14-2005 Last Update: Never Installs: 22
Template Edits
Code Changes  
No support by the author.

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:
define('AVATAR_ON_NAVBAR'1); 
at the end, right after:
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]&amp;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.

Creditsfraghappy for the idea and letting me release this mod.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-16-2007, 04:39 PM
PayBas PayBas is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of this still becoming a plugin?
Reply With Quote
  #23  
Old 05-20-2007, 11:35 AM
Ben Wilkins Ben Wilkins is offline
 
Join Date: Aug 2006
Location: England, UK
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight View Post
Hmm.. I've just noticed that the dateline doesn't appear to be working when placing the avatar on my navbar.

The image URL is:
image.php?u=1&dateline=

This can cause an out-of-date avatar to be displayed, and it seems that only a hard refresh (Ctrl+F5) can fix this.. This there any additional code that can be changed for a more "solid" fix?


bump. I need this fixed.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05628 seconds
  • Memory Usage 2,218KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete