[REQ] Auto Resize large images in an IMG tag

INSTALLATION:
--------------------------------
- Copy the file attached in the zip, resizevbimg.js, in your clientscript directory.
--------------------------------
Open the file includes/class_bbcode.php
Search the line(~line 1879 ):

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

and replace with:

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

Save and re-upload (no need to re-upload if you edited via cPanel or DirectAdmin or anything like that).
--------------------------------
Go to AdmincP>Styles & Templates >Search in Templates

Search for
PHP:
<body onload="$onload">

In the SHOWTHREAD template replace with:
PHP:
<body onload="$onload;vbImageResize()">

Save the template.
--------------------------------
Go to AdmincP>Styles & Templates >Search in Templates

Search for

PHP:
<body$onload>

In the NEWREPLY template replace with:
Code:

<body onload="$onload;vbImageResize()">

Save the template.
--------------------------------
- Styles & Templates > Style Manager > Common Templates > headinclude

Look for:

PHP:
<!-- / CSS Stylesheet -->

After, add:

PHP:
<script type="text/javascript" src="clientscript/resizevbimg.js"></script>

Save the template.
--------------------------------
Styles & Templates > Style Manager > Main CSS > Additional CSS Definitions

After, add:


PHP:
.vbimgcodelimit {
        cursor: pointer;
        border: dotted 1px black;
}

Save.
--------------------------------
Done



:)
 
Back
Top