Back to vBulletin 3.5 Add-ons

Auto resize large image
Mod Version: 1.00, by DanLai

This modification is in the archives.
vB Version: 3.5.0 Rating: (3 votes - 5.00 average) Installs: 145
Released: 25 Oct 2005 Last Update: Never Downloads: 19
Not Supported  

In fact this is a work around for the auto resize feature to work with the WYSIWYG editor.

Step1. In includes/class_bbcode.php

Find (in line around 18xx):
Code:
return '<img src="' .  $link . '" border="0" alt="" />';
Replace with:
Code:
return '<img src="' . $link . '" onload="if(largerThan(this.width,700)) {this.width=700;this.alt=\'Click here to see a large version\';}" onmouseover="if(this.alt) this.style.cursor=\'pointer\';" onclick="if(this.alt) window.open(\'' . $link . '\');" border="0" />';
Step2. Modify the common template of your template set

Add this to the headinclude section:
Code:
<script type="text/javascript">
function largerThan(a,b)
{
return a>b;
}
</script>
Demo:
http://talkmusic.org/index.php?t=3165

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

vblts.ru supports vBulletin®, 2022-2025