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 |
#112
|
|||
|
|||
Fit perfectly. There is some display probleme if you are using The "Attachments Styles with Attachments in Events" but hey .. that only in Template
Thanks u |
#113
|
|||
|
|||
flawless install on vb 3.0.6
thanks |
#114
|
|||
|
|||
it works fine with me on 3.0.6
but i wonder is there a way to make the pic open in new window ,also adding alt var for the pic to give "Picture has been resized, click for full size pic" msg, it is better than shown below the pic.... many thax to the coder *install |
#115
|
|||
|
|||
Quote:
You would add it into these lines: in the first part: $bbtag = '<table><tr><td align="center"><a href="' . $link . '"><img src="' . $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>'; would become: $bbtag = '<table><tr><td align="center"><a href="' . $link . '" target="_blank"><img src="' . $link . '" width="'.$max_imgsize.'" border="0"' alt="Picture has been resized, click for full size pic".substr($bbtag,$linkclose+1,strlen($bbtag)-$linkclose+1).'<br>Picture has been resized, click for full size pic</a></td></tr></table>'; and in the second section: $biglink = '<table><tr><td align="center"><a href="' . $link . '" ><img src="' . $link . '" width="'.$max_imgsize.'" border="0" alt=""><br>Picture has been resized, click for full size pic</a></td></tr></table>'; would become: $biglink = '<table><tr><td align="center"><a href="' . $link . '" target="_blank"><img src="' . $link . '" width="'.$max_imgsize.'" border="0" alt="Picture has been resized, click for full size pic"><br>Picture has been resized, click for full size pic</a></td></tr></table>'; If you want to remove the "Picture has been resiz".... text from below the pic just remove the <br>Picture has been resize, click for full size pic text out of both of those sections. |
#116
|
|||
|
|||
*installed* great hack cheers mate
|
#117
|
|||
|
|||
Does this work for Sigs as well?
|
#118
|
|||
|
|||
My thanks to you for this.
Now I don't have to worry about the idiots that can't read the forum rules for image restrictions. :banana: |
#119
|
|||
|
|||
This is absolutely superb!!!! Clicks install
|
#120
|
||||
|
||||
Quote:
|
#121
|
|||
|
|||
thank u very much and *installed*
greetZ knetgummi |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|