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 |
#12
|
|||
|
|||
If you don't want your logo to be resized, following changes should be done:
Styles & Templates-> Style Manager-> Edit Templates-> Header: find HTML Code:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
HTML Code:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" id="forumlogo"/>
|
#13
|
|||
|
|||
Ok .I got mine working. A few things I modified for others who may care.
I use vb 3.0.7 so I don't know if this will work for older boards The original hack works once the thread has been posted. however I noticed that when you post a new thread and "preview" it or reply and "preview" it, the photo is still full size. I thought I fixed it but I had 007pigs hack installed too and since removing it ( i like this one better because it works better) the "preview" still shows it full size. I tried replacing the body tag in templetes newreply and newthread but got errors and the image link wouldn't work any ideas Maybe its a javascript setting in newpost_preview templete? |
#14
|
|||
|
|||
Quote:
Quote:
|
#15
|
||||
|
||||
|
#16
|
|||
|
|||
Is there a way in the resizeall.js clientscript so any resized photos will have text under it saying something like "this photo has been resized automatically, click for full view"
Thanks |
#17
|
|||
|
|||
I had to uninstall this hack and use another because my smilies wouldn't work on new post or reply, but the new one is god awful slow on the server, so now I want this one back but I can have the problem. Has anyone encountered this?
|
#18
|
|||
|
|||
Ok the problem with this hack is that it doesn't work with newreply or newpost and it has to do with the editInit() for the body onload part. So I'm trying to figure out how to load to variables in the body tag. I tried using a Javascript call but doesn't work
here the out put if I just do as the hack suggests and change the BODY tag in the newreply or repost . the end result is <body onload="editInit();" onload="fiImageResize();"> If we can load both the editInit() AND fiImageResize() in the <BODY> it will work I believe. BUT HOW!!! **************************** THIS IS THE FIX TO MAKE IT WORK!! **************************** As I stated I had a problem with this hack when it came to new threads (when you do a preview) and new replys. I been doing some research and I'm sure this was no brainer for many, but I'm pretty happy with it. In newreply and newthread look for Quote:
Quote:
Quote:
I think this should be added to the original hack :nervous: |
#19
|
||||
|
||||
Great hack! acidburn0520 clicks install!
|
#20
|
||||
|
||||
this isnt working for me, could i get some help :|
|
#21
|
||||
|
||||
It's a fairly straight-forward modification, what's the problem?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|