vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Proportionally Auto Resize User Avatar (https://vborg.vbsupport.ru/showthread.php?t=113306)

toolblast 04-24-2006 04:02 AM

Hi Cannabis,

Why do you need exif data removed, may I ask? There may be another solution.

cannabis-world 04-24-2006 11:00 PM

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!!

toolblast 04-25-2006 01:24 AM

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.

fneumeier 04-25-2006 03:13 AM

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

cannabis-world 04-27-2006 01:42 PM

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

yellowchaser 04-27-2006 04:20 PM

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.

rmxs 04-27-2006 05:59 PM

very good nice job :)

toolblast 04-27-2006 06:48 PM

Quote:

Originally Posted by fneumeier
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


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:

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
Im not exactly sure what you are doing here, what are you putting the include code in your upload script? This script dynamically resizes the images on OUTPUT, not when saving the image. So, the image that is uploaded by the user is uploaded normally, this script would kick in where that uploaded image is meant to be DISPLAYED, the script would take the original uploaded image, resize it, and then output the new one all in realtime without saving a new jpg file.

toolblast 04-27-2006 06:52 PM

Quote:

Originally Posted by yellowchaser
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.

You will need to go into the postbit template via the VBulletin AdminCP template editor. Once you're in the postbit template (postbit templates > postbit), find where it outputs the user's avatar:

Code:

                          <if condition="$show['avatar']">&nbsp;<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>
And replace it with:

Code:

                          <if condition="$show['avatar']">&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]">$useravatar</a></if>
P.S. And thanks rmxs for the thank-you ;)

fneumeier 04-28-2006 03:20 AM

Quote:

Originally Posted by toolblast
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?

Chad,

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


All times are GMT. The time now is 11:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01086 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete