The Arcive of vBulletin Modifications Site. |
|
Auto Resize large images in an IMG tag Details »»
|
|||||||||||||||||||||||||||
|
Auto Resize large images in an IMG tag
Developer Last Online: Dec 2009
First, sorry about my bad english
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 Work with vB 3.6.0 - 3.6.4 INSTALLATION: -------------------------------- - Copy the file resizevbimg.js in the dir clientscript. -------------------------------- Open the file includes/class_bbcode.php Search the line(~line 1887 ): 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 {
cursor: pointer;
border: dotted 1px black;
}
-------------------------------- Done ![]() Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
wow good hack
installed
|
|
#3
|
|||
|
|||
|
Nice job. I've seen this done before, but never on [IMG] tags. Fantastic work.
|
|
#4
|
|||
|
|||
|
I just installed this hack, but...how does it work? I tried to upload a new pic, but it doens't resize it..
Marco |
|
#5
|
|||
|
|||
|
that is one of the best mini hacks released for ages, many many thanks dude.
works in ie/firefox |
|
#6
|
||||
|
||||
|
I just came here to look for something like this after a member posted gigantic pictures! Thanks.
|
|
#7
|
||||
|
||||
|
Quote:
|
|
#8
|
|||
|
|||
|
Great work!
|
|
#9
|
||||
|
||||
|
Thanks for man
|
|
#10
|
|||
|
|||
|
Quote:
edit: looks like it loads the full image then resizes it on the fly GREAT HACK! THANKS update: installed and works perfectly! |
![]() |
|
|