The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Dynamic Picture Resize for [IMG] tag Details »» | |||||||||||||||||||||||||
If an image submited by a user (using the [IMG] bbcode tag) is to big, chances are that it will break your current vBulletin style. This hack will dynamically resize that image to acceptable dimensions, that you previously specified. It will do it for pictures inserted into postbit or user signature.
The code modifications listed below were tested into a clean installed vBulletin board. They work 100%. Installation In order to perform an efficient modification of your files, I recommend you to use Komodo Edit or Textpad. Both editors will allow you to complete all steps without any coding errors. You will need to make one small change for each of the following files: ? vbulletin_global.js (folder /clientscript) ? class_bbcode.php (folder /includes) Make sure you modify, save and upload one file at the time to your server. Then, simply run the product-dynamicpic.xml file. Once the product installed, don't forget to enable it. Go to your vBulletin Options, click on Dynamic Picture Resize setting group and set all your options. If you encounter any problems, feel free to post in the support thread. Learn how to open the image into a new tab/window. But you should stop using the target tag, since it will be deprecated soon. There is a reason why all browsers have now the Shift and CTRL options to open a new tab/window with the link you click on. Show Your Support
|
Comments |
#62
|
|||
|
|||
What you have described is a default vBulletin feature.
|
#63
|
||||
|
||||
JohnnieOO, this hack applies only to images that you insert using the [IMG] bbcode tag.
In other words, if your board width is set 1024px and the user inserts an image hosted on imageshack.us that has 1900px in width, it will break your design. My hack will automatically resize that image to load a specific width you desire, eliminating the ugly look your board will get from a very wide image. |
#64
|
||||
|
||||
Installed, Thank you
|
#65
|
||||
|
||||
Wonderful hack...Clicked Installed...
I saw in an earlier post, if enough people request it...you would make a code change to state the original image has been edited... You should actually include that code within your mod...as well as including the code to open the image in a new window...just like the vBulletin default image attachments already do. It only stands to reason that this would be the best way to go...convenient...and warranted. Again...thanks for the hack...Kudos! |
#66
|
|||
|
|||
Does anyone know if theres a similar thing for avatars?
|
#67
|
||||
|
||||
Is a default option in vBulletin, no need to hack it. Hmm actually, it will display a warning that your avatar is to big... Let them work a little.
Quote:
|
#68
|
|||
|
|||
Yeh i dont just want something resized to fit a 400 x 400 box for example.
If their image is 1000 x 600 (ony an example) and they put it in their avatar I want it to keep the proportions but be smaller. So if i state the avatar size to be 400x400 max it would be resized to 400 x 240 If i just left it how it is in VB the image would be stretched to 400 x 400 and unless its a square image to start it looks messed up. |
#69
|
||||
|
||||
Avatars are stored into database. They have nothing to do with the [IMG] tag.
|
#70
|
|||
|
|||
Actually, you can configure vBulletin to store avatars (like attachments) in the file system. Thus, an IMG tag would be able to fetch said avatar.
|
#71
|
|||
|
|||
Yeh my avatars are saved to folders along with all other images rather than having a huge database file.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|