Back to vBulletin 3.5 Add-ons

Auto Resize Your Images 3.52 compliant
Mod Version: 1.00, by ggiersdorf

This modification is in the archives.
vB Version: 3.5.3 Rating: (2 votes - 5.00 average) Installs: 100
Released: 28 Dec 2005 Last Update: Never Downloads: 21
Not Supported Template Edits Code Changes  

I was looking for some code that would allow an image over size x to be resized in IE, Firefox, and Opera. I tried all the variations out there without luck some would work in IE, some in Firefox, etc.. So I finally got a tweaked version of some old code that actually works flawless in IE, Firefox, and Opera. I have included it below, but It needs 1 final tweak that I'm hoping someone in the community can help with.

i am NOT taking credit for this hack, all I have done is tweak it to get it working for me..

This code has been updated as of 8:30pm with the clickable link built in now!

Step 1: Edit your class_bbcode.php file located in (root/includes)

find

PHP Code:
return '<img src="' .  $link '" border="0" alt="" />'
replace with the following.

PHP Code:
/* Start Image RESIZE */  

 
$navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower$_SERVER['HTTP_USER_AGENT'] ) : '';   
if (
stristr($navigator_user_agent"msie")) {   
    return 
'<a href="' .  $link '" target="_blank"><img src="' .  $link '" border="0" alt="" style="width: expression(this.width > 640 ? 480 : true);" /></a>';   
} else {   
    return 
'<a href="' .  $link '" target="_blank"><img src="' .  $link '" border="0" alt="" style="max-width: 730px;" /></a>';   
}    

/* End Image RESIZE */ 
you can play with the widths to get what you want working.

Download

No files for download.

Similar Mods

Show Thread Enhancements Auto Resize large images in an IMG tag vBulletin 3.7 Add-ons
Forum Display Enhancements Auto Resize large images in an IMG tag vBulletin 3.6 Add-ons
Auto Resize large images in an IMG tag vBulletin 3.5 Add-ons
auto resize huge images vBulletin 3.0 Template Modifications

vblts.ru supports vBulletin®, 2022-2024