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

Reply
 
Thread Tools
Show User's Avatar in Navbar v1.1 Details »»
Show User's Avatar in Navbar v1.1
Version: 1.1, by fraghappy fraghappy is offline
Developer Last Online: Mar 2006 Show Printable Version Email this Page

Version: 3.5.0 Beta 1 Rating:
Released: 06-13-2005 Last Update: 06-14-2005 Installs: 71
Uses Plugins Template Edits
 
No support by the author.

This is my first plugin for vB. It took me awhile to figure things out, but, once I polished it down, it was a piece of cake. If you encounter any problems or have any suggestions, please let me know, thanks!

IF YOU HAVE VERSION 1.0 INSTALLED, please update to the most recent version (1.1). This is because of a necessary bugfix needed to prevent users who do not have avatars from having image problems!

-------------------

[3.5.x] Show User's Avatar in Navbar

Designed and Coded by: Thorne N. Melcher ("Frag")
Version: 1.1 (released 6/14/05)
Screenshots: 1; included in the .zip file.
Description: This hack will display the user's avatar next to the "Welcome, {username}" message in the navbar at the top of every page. If there is no user presently logged in, the plugin will not bother to query the database, and the avatar will not display.
Plugin ?2005 The Whispering Realms Studios.

Performance and Installation Specs
Supports vB versions: 3.5.x
New Queries: 1 per pageload, IF the user is logged in.
New Hook Calls: 1 (global_start)
New Files: 1 (/images/misc/noavatar.gif)
Template Modifications: 1 ('navbar')
File Edits: none

Included Files
avatar_on_navbar.xml - Plugin file
README.html - Installation instructions.
screenshot.jpg - Screenshot of the plugin in action.
/UPLOAD/images/misc/noavatar.gif - Default "No Avatar" image.
Version History
v1.1 (6.14.05) - A bug was indentified where, if the user viewing the page did not have an avatar uploaded/selected, it would try to display his or her avatar anyway.
New files: /images/misc/newavatar.gif
Changed files: /avatar_on_navbar.xml

v1.0 (6.14.05) - The first public release, complete with all necessary features.

Please click "Install" if you decide to use this plugin! Thank you!

Show Your Support

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

Comments
  #12  
Old 06-14-2005, 09:19 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem. Thanks for updating!
Reply With Quote
  #13  
Old 06-14-2005, 11:34 PM
fraghappy fraghappy is offline
 
Join Date: Feb 2004
Location: Hell, TN, USA.
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Version 1.1 has been released in order to address the following bug:

Quote:
Originally Posted by acidburn0520
When the user logged in doesn't have an avatar set, it shows that lovely red x box, would there be anyway to set it to go to a certain say, No Avatar Selected Image, if the user doesn't have an avatar set?
The .zip file has been updated and includes everything that you'll need to upgrade to the latest version. Thank you for showing so much interest in my hack. If you find any other bugs or have any other suggestions, please let me know!
Reply With Quote
  #14  
Old 06-15-2005, 08:40 AM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice.

Suggestions:
* smaller image size that fits to navbar & nice blue border: <img ..... height="37" border="1">
* put image and text more together: <table cellpadding="1" ...>
Reply With Quote
  #15  
Old 06-16-2005, 02:33 AM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520
Thank you for the update. I used a different "No Avatar" image than the provided one. If anyone would like to use mine, see the attached image. Also, I didn't like the way the avatar was positioned, it stretched my forum's header too much, instead of the html provided for the "navbar" template, I placed the avatar in a seperate table. For whatever reason the avatar was displayed above the userinfo, instead of beside it. So I used this html:

HTML Code:
	<if condition="$bbuserinfo['userid']">
		<td class="alt2" valign="left" nowrap="nowrap">

<a href="profile.php?$session[sessionurl]do=editavatar"><img src="$navbar_ava[0]" alt="Your avatar" border="0" /></a></td>
<td class="alt2" valign="right" nowrap="nowrap">
		<div class="smallfont">
			<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
			<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
			<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
		</div>
		</td>
I've also attached a screenshot of what my html looks like on the navbar.

Thanks again for the hack, Frag.
I would like to use your code but I get this error:
Code:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/mholtum/public_html/test/includes/adminfunctions_template.php(3515) : eval()'d code on line 181

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Reply With Quote
  #16  
Old 06-16-2005, 04:55 PM
fraghappy fraghappy is offline
 
Join Date: Feb 2004
Location: Hell, TN, USA.
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mholtum
I would like to use your code but I get this error:
Code:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/mholtum/public_html/test/includes/adminfunctions_template.php(3515) : eval()'d code on line 181

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
He missed an </if> at the end of his code. Add it in, and it should work.
Reply With Quote
  #17  
Old 06-16-2005, 04:59 PM
Jaxx Jaxx is offline
 
Join Date: Mar 2003
Location: Seattle, Wa
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure why, but all I'm getting for this is the following. My other admin says its working fine for him though.
Reply With Quote
  #18  
Old 06-16-2005, 05:05 PM
dsboyce8624 dsboyce8624 is offline
 
Join Date: May 2005
Location: New Jersey
Posts: 413
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there something like this for 3.0.x? Don't seem to find anything on searching.
Reply With Quote
  #19  
Old 06-16-2005, 05:07 PM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fraghappy
He missed an </if> at the end of his code. Add it in, and it should work.
I figured that, does it matter where I put it?
Reply With Quote
  #20  
Old 06-16-2005, 08:41 PM
fraghappy fraghappy is offline
 
Join Date: Feb 2004
Location: Hell, TN, USA.
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxx
Not sure why, but all I'm getting for this is the following. My other admin says its working fine for him though.
Hmm... could it perhaps be a browser issue? Do you use Firefox or Internet Explorer? Once I track down the problem, I release v1.2. After that, though, I probably won't work on this plugin much more, as I'm going to make it one of the features in a more advanced plugin that I'm developing.

Quote:
Originally Posted by dsboyce8624
Is there something like this for 3.0.x? Don't seem to find anything on searching.
Nope. As far as I know, it is an original idea.

Quote:
Originally Posted by mholtum
I figured that, does it matter where I put it?
Just put it at the end of the template code that he posted.
Reply With Quote
  #21  
Old 06-17-2005, 04:59 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fraghappy
He missed an </if> at the end of his code. Add it in, and it should work.
Strange, I have just that one </if>, my template gave no code errors. Hmm...

Quote:
Originally Posted by dsboyce8624
Is there something like this for 3.0.x? Don't seem to find anything on searching.
Yes, actually there is a hack that was just recently released based off of this plugin.

Use the directions, here: https://vborg.vbsupport.ru/showthread.php?p=668118
But be sure to take a look at this post, to see how to make it work for 3.0.x.:
https://vborg.vbsupport.ru/showpost....24&postcount=9

Hope everything works out for you. :classic:
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 02:45 AM.


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.07791 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (1)bbcode_html
  • (9)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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