Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Proportionally Auto Resize User Avatar Details »»
Proportionally Auto Resize User Avatar
Version: 1.02, by toolblast toolblast is offline
Developer Last Online: Mar 2019 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-17-2006 Last Update: 04-18-2006 Installs: 24
Uses Plugins
Additional Files  
No support by the author.

PROPORTIONALLY AUTO RESIZE USER AVATAR PLUGIN

Last updated: April 18th - newest file is 'PluginFiles.zip'

What does this plugin do?
It will allow you to place the logged in user's avatar in your forum header or navbar and then set a predefined maximum width and height that the user's avatar can go in. Then, using PHP, an automatic resize will occur that will NOT stretch the image.

Update: this hack doesn't work everywhere like previously stated in earlier versions. Some templates in vbulletin do not render global variables making the plugin not show the avatar. One of these templates is the postbit template. If you put '$useravatar' in that template nothing will happen. Why? I'm not sure, and if anyone knows how to make it work please share!

What is the point of this plugin?
If you want the user to be able to upload a large avatar that will appear on the postbit, but in the forum login info part in the header you want to show their avatar, but at a smaller size than the original (without editing the original uploaded file and without stretching it). This is for you.

Installation:
Extremely simple. Simply upload plugin from the plugin manager area of your VBulletin Admin (for those who don't know, go to Plugin System > Download/Upload Plugin > Browse for the file and upload it). Then, you simply upload the imageresize.php file into your main forum folder.

Instructions:
To place the user's avatar in the template, edit one of your vbtemplates (header template preferrably), and then insert this code where you want the image to appear:

Quote:
$useravatar
If you want their avatar to link to their profile insert:
Quote:
<a href="$vboptions[bburl]/profile.php?do=editavatar">$useravatar</a>
To change the max height and width dimentions for the avatar, edit the plugin and change the following line of code:

Quote:
//SET MAX RESTRAINTS
$maxheight=40;
$maxwidth=50;
Note: Upload both photoresize.php and noavatar.gif to your forum HOME directory. You can change the noavatar.gif image to whatever you want. Make sure you have your vbulletin homepage url set in your general vbulletin options area otherwise the script wont know the url of your forum!


Credits:
The "Avatar in Navbar" plugin by sabret00the [click here]
NPL Solution's script from Webmaster-Talk [click here]
DONT FORGET TO CLICK INSTALL!

Show Your Support

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

Comments
  #12  
Old 04-19-2006, 01:42 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kihon Kata
HI Tool! Uhm do you mean my "Internal URLs"?
The script uses the variable you have set in your vbulletin settings.

Go to your vbulletin admincp and tell me what you find here:

VBULLETIN OPTIONS > VBULLETIN OPTIONS > SITE NAME / URL / CONTACT DETAILS >> The variable called "FORUM URL" (2nd input box).

You should have the url to your forum in there with no trailing slash.
Reply With Quote
  #13  
Old 04-19-2006, 01:44 AM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have that filled up with "http://www.MYSITENAME.com/forums" with no quotes and my real forum name.
Reply With Quote
  #14  
Old 04-19-2006, 01:47 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, and tell me:

1) Try putting the avatar code into the header template of your forum.

2) Then, login to your forum and make sure you have an avatar selected for the username you logged in with.

3) Make sure you've downloaded and are using the recent files I put in the zip file attached here.

It should work fine if you're using VB3.5. There must be a setting somewhere that is not set correctly on your forum if it doesnt work. I can show you a demo forum with this running if you'd like.
Reply With Quote
  #15  
Old 04-19-2006, 01:51 AM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did the top 2 already. Did you update #3 today?

EDIT: I am using 3.5.4
Reply With Quote
  #16  
Old 04-19-2006, 01:51 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Kihon,

I just did some checking and I see the problem you are seeing now. It only seems to happen in FireFox. If you use IE the plugin works fine.

I wonder why it doesnt work in firefox. I'll look into it.
Reply With Quote
  #17  
Old 04-19-2006, 01:52 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kihon Kata
I did the top 2 already. Did you update #3 today?

EDIT: I am using 3.5.4

Yes. I just uploaded a new zip file. It seems that the image isnt displaying in firefox (though its common php thats creating the image, so Im not sure sure why).
Reply With Quote
  #18  
Old 04-19-2006, 01:55 AM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh ok, even though I have a busy forum with 99.99% women, many many use Firefox. I'll wait until you update it w/ firefox. :-)
Reply With Quote
  #19  
Old 04-19-2006, 01:57 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Kihon.

Ok, I have gotten it to work with FireFox now. I will upload a new zip file to this thread in about 4 minutes and it will be called 'PluginFiles.zip' ok?
Reply With Quote
  #20  
Old 04-19-2006, 02:04 AM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woot! nice support toolblast! update the version and I'll reinstall it
Reply With Quote
  #21  
Old 04-19-2006, 02:18 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok Kihon. It should be all done.

Works in both Firefox and IE6. Ive checked both. Also, i've included an image called 'noavatar.jpg' which will show up if the user has no avatar.

Tell me if you have any problems!
Reply With Quote
Reply


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: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.08127 seconds
  • Memory Usage 2,306KB
  • 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
  • (5)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