Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Dynamic Picture Resize for [IMG] tag Details »
Dynamic Picture Resize for [IMG] tag
Mod Version: 1.0.1, by TECK (Member) TECK is offline
Developer Last Online: Aug 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.8 Rating: (12 votes - 4.75 average) Installs: 163
Released: 07 Sep 2007 Last Update: 08 Sep 2007 Downloads: 1684
Not Supported Uses Plugins Code Changes  

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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements CES Dynamic [IMG] Resize (Plugin Version) thincom2000 vBulletin 3.6 Add-ons 140 08 Jul 2009 16:19
Dynamic Image Resize Hack dlst vBulletin 2.x Beta Releases 22 01 May 2003 18:10

Comments
  #2  
Old 07 Sep 2007, 04:52
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
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.
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog

Last edited by TECK; 10 Sep 2007 at 14:15.
Reply With Quote
  #3  
Old 07 Sep 2007, 05:17
Hornstar's Avatar
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Real name: Matt
Thanks, when I get a chance I will take a look at this for sure. thanks.
Reply With Quote
  #4  
Old 07 Sep 2007, 05:30
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
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.
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog
Reply With Quote
  #5  
Old 07 Sep 2007, 05:42
Njm's Avatar
Njm Njm is offline
 
Join Date: Jun 2007
Real name: Njm Alryiadh
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
__________________
Vist My Site : www.alskon.com
Saudi Arabia
contact me : Njm-Alryiadh(at)hotmail.com

Last edited by Njm; 07 Sep 2007 at 12:19.
Reply With Quote
  #6  
Old 07 Sep 2007, 05:54
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


You are done.
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog

Last edited by TECK; 07 Sep 2007 at 07:39.
Reply With Quote
  #7  
Old 07 Sep 2007, 06:39
2ndCz 2ndCz is offline
 
Join Date: Jan 2006
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.
Reply With Quote
  #8  
Old 07 Sep 2007, 07:32
kambiz's Avatar
kambiz kambiz is offline
 
Join Date: Oct 2003
Real name: kambiz
Thanks a lot. was looking for this a long time.

Clicked install.
Reply With Quote
  #9  
Old 07 Sep 2007, 07:49
kambiz's Avatar
kambiz kambiz is offline
 
Join Date: Oct 2003
Real name: kambiz
hmmm is it possible to show a message (or alert ) on the top of the picture to indicate the picture has been resized?
Reply With Quote
  #10  
Old 07 Sep 2007, 09:18
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Real name: Valdet
This feature is similar to this hack..
http://www.vbulletin.org/forum/showthread.php?t=125500
Reply With Quote
  #11  
Old 07 Sep 2007, 12:23
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
Originally Posted by kambiz View Post
hmmm is it possible to show a message (or alert ) on the top of the picture to indicate the picture has been resized?
Everything is possible. If many other users request it, I will do it... is that fair?
I wanted a solution that is very clean and it does not modify the way vBulletin behaves originally.

Originally Posted by valdet View Post
This feature is similar to this hack..
http://www.vbulletin.org/forum/showthread.php?t=125500
There are many hacks out there that do a similar thing. That does not mean they are written properly.
I want you to tell me what is wrong with the above hack, because there is something wrong with it.
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog
Reply With Quote
  #12  
Old 07 Sep 2007, 12:33
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Thank you TECK, installing and testing it now

Edit: I'm grateful for all your effors and help! No matter if this hack does whatever i want or not.

If you check my post at that thread you can understand what i need:
http://www.vbulletin.org/forum/showp...4&postcount=15

Dynamic resizing won't help us much as we have many big images on a single page so the layout will be broken till it completely loads all of the images.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If we can find a way to wrap oversized images with "<a href="$link">...</a>" it'll be done.

The method on vbulletin.org does what i'm asking for but they denied to help me and it's ok

Best Regards to Floren Munteanu
__________________
MsXLabs Forum

Last edited by NeutralizeR; 07 Sep 2007 at 12:52.
Reply With Quote
  #13  
Old 07 Sep 2007, 13:07
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
Aha, so you basically don't want to open the enlarged picture, when you click on it?
Please be more specific. And you cannot resize an image with JavaScript, before is loaded. It would not know the actual picture dimensions, in order to resize it properly.

In other words, this is the process:
1. Picture is loaded, for the first time. (it will show the full size)
2. Picture size is detected.
3. Picture is formatted to new dimensions.
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog
Reply With Quote
  #14  
Old 07 Sep 2007, 13:21
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by TECK View Post
Aha, so you basically don't want to open the enlarged picture, when you click on it?
Please be more specific. And you cannot resize an image with JavaScript, before is loaded. It would not know the actual picture dimensions, in order to resize it properly.

In other words, this is the process:
1. Picture is loaded, for the first time. (it will show the full size)
2. Picture size is detected.
3. Picture is formatted to new dimensions.
I want it to be resized before the picture is loaded and have the link to the original picture I know javascript can't do it.

I need an advanced version of this hack with the clickable url of the resized picture:
http://www.vbulletin.org/forum/showp...4&postcount=15
__________________
MsXLabs Forum
Reply With Quote
  #15  
Old 07 Sep 2007, 14:00
kambiz's Avatar
kambiz kambiz is offline
 
Join Date: Oct 2003
Real name: kambiz
Originally Posted by TECK View Post
Everything is possible. If many other users request it, I will do it... is that fair?
I wanted a solution that is very clean and it does not modify the way vBulletin behaves originally.

yeah sure.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:54.

Layout Options | Width: Wide Color: