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 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 |
#102
|
||||
|
||||
Hello
Thank you man nice mod But I use these mod vS-Hide.Hack.Resurrection.Expanded_2.8.1_by.Psionic.V ision When someone presses on my site on the thanked button the pics reresize my images! is there a way of changing wen someone press the thanks button en te pics don't stay resize !!! thanks |
#103
|
|||
|
|||
Can I edit the PHP file with just notepad, or do I need something specific for these file types?
Thank you... Regards, Badger Edit: NM, I downloaded a freeware PHP editor just in case, which seemed to work fine... |
#104
|
|||
|
|||
Quote:
Should I be modding the "adv_portal template" as well, even though it seems to be working? Nice mod and something like this should be included in original version. Thanks Regards, Badger |
#105
|
||||
|
||||
Installed and working gr8 on 3.6.5
Regards Wengi |
#106
|
|||
|
|||
I have a suggestion, which I think it would be great...
You know when you click on the image that it pops up in a different window? You should make an addon to the script so it uses the Lightbox.js script to pop that image instead than a different window. I'd love to see this implemented because it would make this script yet much cooler... What do you think? Kil PS. I have this installed in 3.6.5 and it works just fine. |
#107
|
|||
|
|||
Very Good!
|
#108
|
|||
|
|||
Quote:
1. In line #13 of resizevbimg.js find Code:
[i]docImg.className = vbimgcodeClassName; [i]2. In Styles & Templates > Style Manager > Main CSS > Additional CSS Definitions instead of adding Code:
.vbimgcodelimit { cursor: pointer; border: dotted 1px black; } Code:
.vBCodeIMG { cursor: pointer; border: dotted 1px black; } Any way it is a good hack and I installed it. |
#109
|
|||
|
|||
To make modifications in less templates, Additional CSS Definitions template may not be modified at all. Instead, the same effect can be made using javascript.
In file resizevbimg.js: find Code:
docImg[i].onclick = vbImagecodeWinOpen; Code:
docImg[i].style.cursor = 'pointer'; docImg[i].style.cursor = 'hand'; docImg[i].style.border = 'dotted 1px black'; Using 2 cursor values (pointer & hand) instead of (pointer) only to be cross browser, as (pointer) value is valid only for NS6/ IE6. |
#110
|
|||
|
|||
In a version 3.6.7 the line modified in a file class_bbcode.php is: ~ line1937
|
#111
|
|||
|
|||
Works on 3.6.7
Not work with Safari. Thank you very much for your nice hack! Click Installed now. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|