Version: 1.1, by fraghappy
Developer Last Online: Mar 2006
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.
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!
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" ...>
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:
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.
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.
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.