![]() |
Dynamic Picture Resize for [IMG] tag
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. |
For a quick look, visit this vBulletin Blog entry on Lizard King's server.
As you notice, my hack works on the vBulletin forum and blog. :) |
Thanks, when I get a chance I will take a look at this for sure. thanks.
|
NeutralizeR was begging the site administration guys to help him with the hack, but nobody wanted to.
It took me 10min to write and implement the hack and one hour to make the readme file. Go figure... Honestly, I felt bad because nobody wanted to help him. NeutralizeR, my new friend... there are people who still care. Enjoy the hack, I did it especially for you. |
thanx man ..
but is there any problom in my site 4 load server same the other products that resizer the image another que can u edit the product soo the image may open in new Window thanx agin ... njm |
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. :) |
Read the other thread... Wow, this was nice of you to do for them. :)
Clicked install. This is what I've been hoping for as well, something dynamic. Thank you for sharing with everyone, TECK. I can now replace my old re-sizer. :) |
Thanks a lot. was looking for this a long time.
Clicked install. |
hmmm is it possible to show a message (or alert ) on the top of the picture to indicate the picture has been resized?
|
This feature is similar to this hack..
https://vborg.vbsupport.ru/showthread.php?t=125500 |
All times are GMT. The time now is 10:03 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|