The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
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 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 { cursor: pointer; border: dotted 1px black; } -------------------------------- Done Show Your Support
|
Comments |
#22
|
|||
|
|||
thanks for the info
|
#23
|
|||
|
|||
is possible to autoresize the attachment file?
|
#24
|
|||
|
|||
Thanks, great hack!
/me clicks install |
#25
|
||||
|
||||
Great hack! Works fine in Firefox and Ie
|
#26
|
|||
|
|||
oh man..i installed it and it messed up my board..i reversed everything but still can't get my forum back to normal. the threads just doesn't load anymore ;(
The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/crickets/public_html/desihotty/includes/adminfunctions_template.php(3537) : eval()'d code on line 324 This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. |
#27
|
|||
|
|||
nice work, this is great for those to big images, iv had a heap of probelms with the skin being streached across the screen.
|
#28
|
|||
|
|||
Does this work for 3.6.0? If so could you please update the thread and change it to 3.6.0? Great hack, been loving it since I installed it .
|
#29
|
|||
|
|||
Quote:
tested with IE,Opera 9.1, FF. I have installed on my vbulletin 3.6 and working like a charm. Many thanks mr.gamesbay you can push your hack to 3.6 mike |
#30
|
|||
|
|||
works great! One question - when it resizes a picture, it ends up stretching my header/logo to a gigantic size... Should I put the css code at the beginning of the additional info area?
|
#31
|
|||
|
|||
Nice Hack!
For my purpose, I made a small, but effective change: Code:
var vbimgcodeWidthMax = screen.width-420; var vbimgcodeWidthSizeTo = screen.height-300; Now the max image-size depends on the screen-resolution of the visitor. Do the visitor have a high screen-resolution, he will see a greater pic than a visitor, that have a lower screen-resolution. In any case, the screen resolution will be used to its full capacity, without the problem, that the forum-layout gets destroyed, because of oversized pics. Greetings, Chriss |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|