Dynamic Picture Resize for [IMG] tag
This modification is in the archives.
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 Spoiler (click to open)
Njm, my hack will not generate any server load. The process is completed through JavaScript.
In other words, the client (browser) does the job, not the server. ![]() About your request to open the link into a new tab/window: Open vbulletin_global.js file (where you edited the code originally) and find: Code:
window.location.href = link; Code:
window.open(link, '_blank'); You are done. ![]() Close
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. Download
This modification is archived, downloads are still allowed. |
Similar Mods
Show Thread Enhancements CES Dynamic [IMG] Resize (Plugin Version) | vBulletin 3.6 Add-ons |
Dynamic Image Resize Hack | vBulletin 2.x Beta Releases |