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 |
#2
|
||||
|
||||
I am not sure what the "clientscript directory" is?
|
#3
|
|||
|
|||
it's one of the directories off your forum root one. It's usually listed in FTP after admincp and archive and is actually called clientscript.
|
#4
|
||||
|
||||
I found it in httpdocs/forums/...
I've uploaded it and can't seem to get it functioning. Have you had any luck? |
#5
|
|||
|
|||
I've not actually tried it as I'm upto my neck in writing a hack at the moment which is just doing my head in but I don't want to change anything else on my localhost until thats finished and I never do a live install untill I've done a localhost one as my site is that hacked.
|
#6
|
|||
|
|||
This worked perfect on my 3.0.3 install - thanks for a great mod!
|
#7
|
||||
|
||||
I was originally having problems with this, so I decided to wipe it out and try again. Next time, I made more progress. (I think the first time I uploaded the file to the wrong directory). This time, I followed the directions to the word, very closely.
Now, this is happening: I can resize the image inside of the text editor, but when you save and view the thread, the image is still the original dimensions? Any follow-up? I really need this hack to work. |
#8
|
|||
|
|||
I´m sorry, but i don´t have a solution to the problem with the WYSIWYG editor and when you return to the thread after posting a message.
You might try to ask the question at the link to vulletin-germany.com but i once asked and nobody came up with a solution. You might try to set a fix width in maincss unstead of having it set to 100%. |
#9
|
||||
|
||||
Quote:
Could I change my editor setting to "standard" and this would work? Or no? |
#10
|
|||
|
|||
It works very well for me. It´s quick and doesn´t have any problem with broken links.
I suggest that you properly install it on a testserver, so that you can play around and test things with standart/wysiwyg editor, replying, etc. In your case you´d have to place the file in httpdocs/forums/clientscript/resizeall.js Make sure that directory is chmoded to 777. You can do that with an ftp client. Inform me if you should have any more problems, and i´ll take more time to have a look. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|