The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Wide image automatic resize for html and vB tags in posts - fixes template problems Details »» | |||||||||||||||||||||||||||
Wide image automatic resize for html and vB tags in posts - fixes template problems
Developer Last Online: Mar 2013
Having trouble with large images in [img] or <img src> tags in your posts causing your templates to go too wide causing a horizontal scroll bar for all posts? I have many users that attach large images to their posts either through vB img or html img src tags. In vB2 it wasn't that much of an issue because it only caused their post to go wide causing a horizontal scroll bar. In vB3 it causes all the posts on that thread to go to that width.
This hack uses the img src width="xx" tag to resize the picture to whatever max size you wish. It also adds a link to the full size image in it's original location and retains any extra formatting the user puts in the tag. In addition it checks to see if the picture actually exists and if not show "Image link is broken" where the picture would have been. Please click install if you install it and please give feedback so I can go full release with it if it's bug free. Updated on 07/30/2004 - R0.9 Updated on 08/06/2004 - R1.0 - Identical to R.9, no need to upgrade just changing to full release from beta Updated on 08/10/2004 - R1.1 - Added max_imgsize to the 2nd section of code (and removed global max_imgsize line from both), some users had problems with the code grabbing the max_imgsize from the first section - this fixes that. Updated on 09/09/2004 - R1.2 - fixed problem with duplicating the resize notice when using wysiwyg editor Show Your Support
|
Comments |
#32
|
|||
|
|||
now it work fine. Big ThX !
But one more question. If i chane the settings Max_Size to 800 all Pic over 800 are resize zu 800. But i want that all Pic with a size over 800 resize to 560. Is there a way to do this ? |
#33
|
|||
|
|||
Sure, in the hack text file on line 74 you would replace this:
. $link . '" width="'.$max_imgsize.'" border="0"'.substr($bbtag,$linkclose+1,strlen($bbt ag)-$linkclose+1).'<br>Picture has been resized, click for full size pic</a></td></tr></table>'; with: . $link . '" width="560" border="0"'.substr($bbtag,$linkclose+1,strlen($bbt ag)-$linkclose+1).'<br>Picture has been resized, click for full size pic</a></td></tr></table>'; and on line 149 replace this: . $link . '" width="'.$max_imgsize.'" border="0" alt=""><br>Picture has been resized, click for full size pic</a></td></tr></table>'; with: . $link . '" width="560" border="0" alt=""><br>Picture has been resized, click for full size pic</a></td></tr></table>'; |
#34
|
|||
|
|||
O.K. Big Thx for help !!!
This hack is great but it works sometimes slowly. Is there a way to make it faster ? On some Pics i wait over 12 sec. an than open the thread. |
#35
|
|||
|
|||
One mor problem.
If a user post a thread with this Code Code:
[.URL=http://members.lycos.co.uk/ccgts01/Jessica%20Alba/001.html][.img]http://members.lycos.co.uk/ccgts01/Jessica%20Alba/001.jpeg[./img][./URL] But if I click on the Image i dont brows to the URL separate it appears nur das Bild in his real size. But normally I should brows to his Page and not to the realsize image. I hope you understand, my english is not the best. here some Pics. |
#36
|
|||
|
|||
I see what you mean but I'm not sure I'll be able to come up with a fix. If you point at it the status bar shows the url given in the url link like it should but once you click on it goes to the large image size. There are two a href statements - one is the url link and sits outside a table and the 2nd is inside the table and is generated by the hack. If anyone has a solution please let me know.
As to the speed of it there really isn't anything that can be done for that. I've never had a single picture take anywhere near that amount of time. The more pictures on a page the longer it's going to take. Up towards the top of this thread there's a javascript that does this on the client side which wouldn't have the delay. But it doesn't work if the page is loaded out of the users cache. If the server is down that an image is linked to there will be a 5 second delay with this too - do you have an image like that on your page? |
#37
|
||||
|
||||
Great hack.. installed on vb3.0.3 ... thanks
|
#38
|
||||
|
||||
Once the URL/IMG thing is fixed I am installing this!
|
#39
|
||||
|
||||
Thanks for this hack!! I needed this! :up:
One small problem I had was that the text link under the image was being duplicated when editing a post with the WYSIWYG editor. So if you edited the post once there would be two text links, edit it again and there are three links, etc. To solve this for now, I just removed the links from the code so only the reduced size image will link. Any idea what would cause this? |
#40
|
||||
|
||||
I still cannot get this working right ( even with the latest version of this hack ).
|
#41
|
|||
|
|||
ok, found somewhat of an error. if a user goes in and edits their post. it adds another "Picture has been resized, click for full size pic" Link and if you preview it and changes something in the post, it does it again.
Is there anyway of fixing this?????? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|