The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
auto resize huge images Details »» | |||||||||||||||||||||||||
This Hack has been published by mr.gamesbay in this thread at vbulletin-germany.com who let me translate this hack for vb.org.
It resizes the pictures from the [img] tag after showthread.php has been loaded. It doesn?t need any editing of php files. Other similar hacks: https://vborg.vbsupport.ru/showthread.php?t=67743 from St.Lauren which has the drawback of beeing slow. https://vborg.vbsupport.ru/showthread.php?t=68677 fron 007pig which doesn?t always cut down the img size of each picture and makes each picture as a link. and the hack from Aurous: an ideal version, very fast and no problems with broken links. But there are problems with the use of the WYSIWYG editor and caching. (BTW, this hack doesn?t solve the WYSIWYG thingy. If you find a solution, feel free to share it with the rest) Advantages of this version: -fast -works with cache enabled -no editing of php files, just template edits Here?s what you need to do: Styles & Templates > Style Manager > All Style options > Additional CSS Definitions: go to the bottom of it and add the following: .imglimit {cursor: pointer;border: dotted 1px black;} Styles & Templates > Style Manager > Common Templates > headinclude: Find: HTML Code: <script type="text/javascript"><!--var SESSIONURL = "$session[sessionurl]";var IMGDIR_MISC = "$stylevar[imgdir_misc]";// --></script> Behind that, add the following code: HTML Code: <script type="text/javascript" src="clientscript/resizeall.js"></script> Styles & Templates > Edit Templates > showthread: Find: HTML Code: <body onload="$onload"> Replace with: HTML Code: <body onload="$onload; fiImageResize()"> Then, you will have to updload resizeall.js to your clientscript directory and that?s all. In the file resizeall.js you have the option to choose the size for the images. Demo: http://www.gamesbay.de/showthread.php?t=3316 Show Your Support
|
Comments |
#22
|
||||
|
||||
i dont know, i did all the modifications and uploaded the file.... but it doesnt seem to work.
do i have to refresh anything, or something like that? |
#23
|
||||
|
||||
well, i did it again ... still doesnt work, are there any certain settings i need to change or anything... please help i really need this hack
|
#24
|
|||
|
|||
Does anyone have any idea how to make this so the full sized image is opened in a window sized to fit the image?
I tried the following changes below, but it's not working. It seems to work on some images but not on others. If someone could suggest how to return the proper height and width values from the clicked image, that would be a great help towards making this work. TIA Code:
function fiImageWinOpen(e) { if( window.event ){ var wwidth = window.event.srcElement.width+140; var wheight = window.event.srcElement.height+140; window.open(window.event.srcElement.src,'OriginalSize','menubar=no, toolbar=no, location=no, directories=no, fullscreen=no, titlebar=no, hotkeys=no, status=no, scrollbars=yes, resizable=yes, width='+wwidth+', Height='+wheight); } else { var wwidth = E.target.width+140; var wheight = E.target.height+140; window.open(e.target.src,'OriginalSize','menubar=no, toolbar=no, location=no, directories=no, fullscreen=no, titlebar=no, hotkeys=no, status=no, scrollbars=yes, resizable=yes, width='+wwidth+', Height='+wheight); } } |
#25
|
|||
|
|||
Im really eager to use this great hack... Ive set it up with the additions for header exclusion and replythread stuff... but I still have a random resized image on the bottom of posts and I cant find where this area is ? to try to do a similar thing that was done with the header. (if you know what I mean?)
here is an example : the image itself is clear.gif - which is only 1x1 pixels, but clear is a spacer aint it? so perhaps its stretched/repeated over that length... I just want to find how to exclude this image element from the re-size process to make this hack perfect for my forums... thanks in advance. Jon EDIT - not a brilliant example in that pic really - but that resized bar appears like that at the bottom of every post 'block' in a thread. better example : |
#26
|
|||
|
|||
ok =- sorted the issue of the resized box at the bottom of the forum posts - by adding the id=forumlogo thing to the clear.gif in the postbit? ... still have one in the legacy part though? will look see
|
#27
|
|||
|
|||
ahhh.... NAVBAR
|
#28
|
|||
|
|||
Quote:
normal showthread pics are resizing normally ? PLEASE HELP! |
#29
|
|||
|
|||
this seems to have changed in vb3.5 for some reason...
now on accessing a new reply to a thread that's images have been successfully resized - it brings up errors on page as follows : Quote:
|
#30
|
|||
|
|||
Quote:
ok seems to have fixed this ... for some reason it no longer liked <body onload="editInit();fiImageResize();"> in the newreply/newthread bits... instead I used <body onload="$onload; fiImageResize()"> which worked fine. |
#31
|
|||
|
|||
I don't have 3.5 but I'm glad you got it working
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|