![]() |
Auto Resize large images in an IMG tag
First, sorry about my bad english :rolleyes:
With this small hack, all large images in an IMG Tag will be resized after the site has loaded. With a click on the resized imge, it will open in an new window with the original size. Works in Firefox, Opera, IE and i think in all other browser. Here is a Demo: Link INSTALLATION: -------------------------------- - Copy the file resizevbimg.js in the dir clientscript. -------------------------------- Open the file includes/class_bbcode.php Search the line(~line 1831): Code:
return '<img src="' . $link . '" border="0" alt="" />'; Code:
return '<img src="' . $link . '" border="0" alt="" id="vBCodeIMG" />'; -------------------------------- Styles & Templates > Search the SHOWTHREAD Template Seach: Code:
<body onload="$onload"> Code:
<body onload="$onload;vbImageResize()"> -------------------------------- Styles & Templates > Search the NEWREPLY Template Search: Code:
<body$onload> Code:
<body onload="$onload;vbImageResize()"> -------------------------------- - Styles & Templates > Style Manager > Common Templates > headinclude Search: Code:
<!-- / CSS Stylesheet --> Code:
<script type="text/javascript" src="clientscript/resizevbimg.js"></script> -------------------------------- Styles & Templates > Style Manager > Main CSS > Additional CSS Definitions After, add: Code:
.vbimgcodelimit { -------------------------------- Done :) |
< Post reserved for future use >
|
Looks good; I am currently using this hack and get similar results. How do the two methods compare?
|
What does it do with images smaller than the pre-configured size ?
|
Quote:
|
resize the image after load......
I use small piece of code that resize the IMAGE ON LOAD.. Byt its cool... |
VERY nice ... sorry, one more question .. the size is customizeable ?
edit : Code:
var vbimgcodeWidthMax = 500; |
Mod nice *install*
|
Nice hack gona install later
|
It works in IE and Opera, but I can't get it to work in FF. It is hiding the images completely.
|
All times are GMT. The time now is 12:53 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|