Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Dynamic Picture Resize for [IMG] tag Details »»
Dynamic Picture Resize for [IMG] tag
Version: 1.0.1, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.8 Rating:
Released: 09-06-2007 Last Update: 09-07-2007 Installs: 165
Uses Plugins
Code Changes  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 09-07-2007, 07:42 PM
ERuiz ERuiz is offline
 
Join Date: Feb 2005
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it work with VB 3.6.7?
Reply With Quote
  #23  
Old 09-07-2007, 08:36 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ERuiz View Post
Does it work with VB 3.6.7?
Yes.

Quote:
Originally Posted by NeutralizeR View Post
I did it thanks to TECK.
But unfortunately automatic linking to the original dimensions only work for IE and Opera. I at least need it for Firefox, too.

Test page:
http://www.msxlabs.org/forum/fantazi...r-2-a-202.html
I still need your help to understand what exactly you need to do. I'm sorry. I'm pretty smart and I catch up right away when someone is asking me something, but this time I have no idea what you try to accomplish. I thought I got it, but after your new post... I lost you again.

With your link posted above, I don't see any difference between FF and IE.
If anyone understands what NeutralizeR needs, please explain it in different terms, so I get it.

What do you mean by: automatic linking to the original dimensions?
Reply With Quote
  #24  
Old 09-07-2007, 08:39 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lizard King View Post
I was using ncode image resizer however that wasnot working with vB Blog. This one works perfectly. Demo for vb blog http://www.ayyas.com/blog.php?b=787
Thanks Floren
She does like the camera, ehh? You are in trouble when she will be 18, heh.
Reply With Quote
  #25  
Old 09-07-2007, 10:09 PM
pspmaster93 pspmaster93 is offline
 
Join Date: Aug 2007
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

INSTALLED.

This always was annoying when it screwed up the skin thanks.
But one thing that would make this SO much better is have a little bar above the image saying "This image was resized to meet the maximum image width set by the administrator"
THAT WOULD BE COOL for any future updates on this mod.
Reply With Quote
  #26  
Old 09-07-2007, 10:34 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK View Post
Yes.


I still need your help to understand what exactly you need to do. I'm sorry. I'm pretty smart and I catch up right away when someone is asking me something, but this time I have no idea what you try to accomplish. I thought I got it, but after your new post... I lost you again.

With your link posted above, I don't see any difference between FF and IE.
If anyone understands what NeutralizeR needs, please explain it in different terms, so I get it.

What do you mean by: automatic linking to the original dimensions?
This image is clickable on IE:
http://www.msxlabs.org/forum/682559-mesaj1006.html

But Firefox doesn't support your js edit.
Reply With Quote
  #27  
Old 09-07-2007, 10:35 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pspmaster93 View Post
INSTALLED.

This always was annoying when it screwed up the skin thanks.
But one thing that would make this SO much better is have a little bar above the image saying "This image was resized to meet the maximum image width set by the administrator"
THAT WOULD BE COOL for any future updates on this mod.
You are person no. 2 who requested the above feature.
Keep in mind this: There is no way (for now) to separate the [IMG] bbcode from actual postbit and signature. In other words, if you have a message because the image is resized, this message will show anywhere, including the signature, which will make users upset.

I will definitely not edit the code in several vBulletin files, just to avoid this feature in the signature... so be aware what you ask for.
Trust me, the best way is to leave it act like vBulletin [IMG] code is supposed, no extra gadgets on the side. If there are more then 20 people who will request this, I will do it, as an optional code. I have a ton of projects I work on it and I certainly don't need a trojan horse on my back.

Off Topic: I bought today the new Blackberry 8830. It kicks arse big time, simply an amazing phone. I will blog about it tonight or tomorrow...
Reply With Quote
  #28  
Old 09-07-2007, 10:38 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NeutralizeR View Post
This image is clickable on IE:
http://www.msxlabs.org/forum/682559-mesaj1006.html

But Firefox doesn't support your js edit.
Yes, it does.
Reply With Quote
  #29  
Old 09-07-2007, 10:39 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK View Post
Yes, it does.
No, it doesn't if you use class="resize"
Reply With Quote
  #30  
Old 09-07-2007, 10:43 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, why do you need to use resize class. To avoid displaying the original sized picture?

Let's fix this baby together.
Tell me if the current fix, listed on my server is working properly. If it doesn't the way you want, tell me what is missing, in detailed terms.
Reply With Quote
  #31  
Old 09-07-2007, 10:47 PM
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK View Post
Ok, why do you need to use resize class. To avoid displaying the original sized picture?

Let's fix this baby together.
Tell me if the current fix, listed on my server is working properly. If it doesn't the way you want, tell me what is missing, in detailed terms.
I need it because the images won't shrink till the pages completely load.

I combined my previous resizing method with your hack. Current problem is the Firefox issue i mentioned above. You can't click resized images to see their original versions on Firefox.

We can PM or IM each other if you want or i can keep flooding this thread. This hack is dedicated to me, isn't it?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 03:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04559 seconds
  • Memory Usage 2,322KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete