The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Proportionally Auto Resize User Avatar Details »» | ||||||||||||||||||||||||||||
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:
Quote:
Quote:
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
|
Comments |
#32
|
||||
|
||||
Hi Cannabis,
Why do you need exif data removed, may I ask? There may be another solution. |
#33
|
|||
|
|||
the users have specifically requested that exif data get dropped for their personal security (cannabis gardeners), also it will help reduce the bandwidth, overhead etc.
thank you for looking into this matter, much appreciated!! |
#34
|
||||
|
||||
The only way I see that being done would be to recreate the image (thus taking away the tags from the previous authorship). Using this script you could do that. All you need to do is use the imageresize.php script and make the maximum dimentions HUGE like 99999. That way the image they do upload will not need to be resized. Once you've done that, php will recreate the image and it wont lose any quality (at least it shouldnt). Tell me how that goes. Goodluck.
|
#35
|
|||
|
|||
My original question was: Where in the code is the place to do this. And, hey, I really want to reduce the size of the images!
Any idea where in the code ist the place to do this? I just couldn't find the place where the images are being handled when/after uploaded by the user. Thanks! Franz |
#36
|
|||
|
|||
I'm kinda in the same boat, due to my lack of php skills I'm not sure where to put the include, but I figured out it would go in the includes/class_upload.php somewhere
|
#37
|
|||
|
|||
How can this be used in the postbit so that all users avatars can be made a consistent size within the forums? What code and where would need to be replaced to make this work? I would assume the post_bit but not sure.
|
#38
|
|||
|
|||
very good nice job
|
#39
|
||||
|
||||
Quote:
What are you wanting to resize... ALL images that your users upload in their forum posts? So, it would be in the postbit where the forum displays the images attached to the post? Quote:
|
#40
|
||||
|
||||
Quote:
Code:
<if condition="$show['avatar']"> <br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1=" $post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></if> Code:
<if condition="$show['avatar']"> <br /><a href="member.php?$session[sessionurl]u=$post[userid]">$useravatar</a></if> |
#41
|
|||
|
|||
Quote:
I've read such suggestions now many time here in various forums. But this definitely it not a solution but only is a desaster for performance on my server. Imaging users upload a 3-Mpixel image and VB is resizing this EVERY TIME this image is being viewed! Also, think about storage space these pictures would need on the server/in the database! No, I really want to resize the images right when they're uploaded. In consider this as extremely userfriendly (no need fo the user to resize the images prior to upload) and as a optimal solutions for server performance and storage space. The high resolution/big sized images are not needed for anything, so why keep them on the server? Have you got an idea where to resize the pictures right at the upload? Thanks Franz |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|