Back to vBulletin 3.5 Add-ons

Auto-Resize Large Images - EASY Version
Mod Version: 1.00, by paul41598

This modification is in the archives.
vB Version: 3.5.5 Rating: (3 votes - 4.67 average) Installs: 44
Released: 18 Aug 2006 Last Update: Never Downloads: 5
Not Supported  

Description:
Auto Resizes in showthread those dam large images people post constantly. On the fly and very fast.

Inspiration:
- I just found out I needed an autoresizer, and tried about 3 of them on here with NO luck. They didnt work whatsoever for whatever reason. I remembered having this piece of code on my 3.0.7 series, and tried it in 3.5.4. Too much luck, a little simple javascript goes along way...

Compliancy:
Tested & Verifed in both I.E & Firefox

Open up headinclude (Add Anywhere)
PHP Code:
<if condition="THIS_SCRIPT == 'showthread'">

<
script type="text/javascript">
function 
resizeImages() {
  if (
document.images) {
    var 
mw 640;
    var 
mh 480;
    for (var 
ii 0ii document.images.lengthii++) {
      var 
document.images[ii];
      var 
iw i.width;
      var 
ih i.height;
      if (
ih iw && ih mh) {
        
i.style.height mh 'px';
      } else if (
iw mw) {
        
i.style.width mw 'px';
      }
    }
  }
}
if (
window.addEventListener) {
  
window.addEventListener('load'resizeImagesfalse);
} else if (
window.attachEvent) {
  
window.attachEvent('onload'resizeImages);
} else {
  
window.onload resizeImages;
}
//-->
</script>
</if> 

If you want to adjust the size, alter the variables:

var mw = 640;
var mh = 480;

Click INSTALL if you like!

Download

No files for download.

Screenshots

   

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

vblts.ru supports vBulletin®, 2022-2024