Back to vBulletin 3.0 Add-Ons

Auto resize Huge images for [IMG] bbcode
Mod Version: 1.00, by 007pig

This modification is in the archives.
vB Version: 3.0.3 Rating: (1 vote - 5.00 average) Installs: 44
Released: 25 Aug 2004 Last Update: Never Downloads: 2
Not Supported  

I find lots of people are looking for [IMG] hack. So i share mine now.

The hack modifies only a few lines and the images are resized automaticly by javascript.

Open functions_bbcodeparse.php

Search:
PHP Code:
function handle_bbcode_img_match($link)
{
    
$link strip_smilies(str_replace('\\"''"'$link));

    
// remove double spaces -- fixes issues with wordwrap
    
$link str_replace('  '''$link);

    return 
'<img src="' .  $link '" border="0" alt="" />';

Replace with:
PHP Code:
function handle_bbcode_img_match($link)
{
    global 
$vboptions;
    
    
$link strip_smilies(str_replace('\\"''"'$link));

    
// remove double spaces -- fixes issues with wordwrap
    
$link str_replace('  '''$link);

    if (
$vboptions['legacypostbit'])
    {
        return 
'<a href=' $link ' target="_blank"><img src="' $link '" onload="if(this.width>screen.width-255) {this.width=screen.width-255;this.alt=\'Full View\';}" onmouseover="if(this.alt) this.style.cursor=\'hand\';" border="0"></a>';
    }
    else
    {
        return 
'<a href=' $link ' target="_blank"><img src="' $link '" onload="if(this.width>screen.width-80) {this.width=screen.width-80;this.alt=\'Full View\';}" onmouseover="if(this.alt) this.style.cursor=\'hand\';" border="0"></a>';
    }

All done. Enjoy!

Download

No files for download.

Similar Mods

New Posting Features Auto Resize images when Quoted 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
Auto Resize Your Images 3.52 compliant vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024