Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

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
  #122  
Old 01-15-2008, 11:28 AM
Chevy II Chevy II is offline
 
Join Date: Nov 2003
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your assistance, I wasn't aware that I could do that. So I did it, and it ran without a problem. However, it didn't fix the problem. One thing I did notice is that if I go into a thread where images have been linked with the [image] tags and click edit and then save. The images are now size properly, however, as soon as I go back into the thread again or I refresh the thread the images are large again.

This is strange. Thanks for your assistance.
Reply With Quote
  #123  
Old 01-16-2008, 04:05 AM
kiennt718 kiennt718 is offline
 
Join Date: Oct 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chevy II View Post
Thanks for your assistance, I wasn't aware that I could do that. So I did it, and it ran without a problem. However, it didn't fix the problem. One thing I did notice is that if I go into a thread where images have been linked with the [image] tags and click edit and then save. The images are now size properly, however, as soon as I go back into the thread again or I refresh the thread the images are large again.

This is strange. Thanks for your assistance.
You should add the 2 lines in instruction file to the additional CSS section in your new style. Otherwise, the image will display in Full-Size first, before it can be resized by this hack. Cheers
Reply With Quote
  #124  
Old 03-08-2008, 10:24 PM
sub_ubi sub_ubi is offline
 
Join Date: Dec 2004
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tested on:
Vbulletin 3.6.8 PL2
5 different styles

Tested with:
Opera 9
Safari
IE6
IE7
Firefox 1.5
Firefox 2.0

All flawless. Great work.
Reply With Quote
  #125  
Old 03-10-2008, 10:07 AM
mark|3 mark|3 is offline
 
Join Date: Oct 2007
Posts: 186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will it possible to have 2 different resize options for both blog and forum?

thanks
Reply With Quote
  #126  
Old 03-16-2008, 10:40 PM
R1lover's Avatar
R1lover R1lover is offline
 
Join Date: Apr 2006
Location: Northern Ca
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone want to update this to 3.7?

It seems the vbulletin_global.js file is much different and I can't figure out how to edit it to make this work again.

Thanks for any help
Reply With Quote
  #127  
Old 03-16-2008, 11:26 PM
Alibass's Avatar
Alibass Alibass is offline
 
Join Date: Mar 2007
Posts: 615
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by R1lover View Post
Anyone want to update this to 3.7?

It seems the vbulletin_global.js file is much different and I can't figure out how to edit it to make this work again.


Thanks for any help
I haven't installed beta 6 yet, but this hack is working fine for me on beta 5
Reply With Quote
  #128  
Old 03-17-2008, 12:30 AM
R1lover's Avatar
R1lover R1lover is offline
 
Join Date: Apr 2006
Location: Northern Ca
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alibass View Post
I haven't installed beta 6 yet, but this hack is working fine for me on beta 5
Interesting..

The file I listed above was no where near the content of the old one and I have no clue where to edit it in order to make this work.

Maybe they changed the .js file in beta6?
Reply With Quote
  #129  
Old 03-17-2008, 12:36 AM
R1lover's Avatar
R1lover R1lover is offline
 
Join Date: Apr 2006
Location: Northern Ca
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just looked back and yes this file was changed in a recent update... my last one was beta4 and it was like the 3.6.8 version. The new one is uhhhhh very different and hard to read. lol
Reply With Quote
  #130  
Old 03-17-2008, 03:13 PM
R1lover's Avatar
R1lover R1lover is offline
 
Join Date: Apr 2006
Location: Northern Ca
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The issue is they are now compressing the java script files with a standard download, you can select uncrompressed version though when you download your copy on vb, this is new to me and something I was not aware of. Trying to read and edit the compressed version it not something I'm going to tackle. I have a feeling there will be more people finding this the hard was as well.
Reply With Quote
  #131  
Old 03-17-2008, 04:14 PM
R1lover's Avatar
R1lover R1lover is offline
 
Join Date: Apr 2006
Location: Northern Ca
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the fix on 3.7.0 Beta 6 (or work around)

Download the uncompressed version of vBulletin from vbulletin.com members area. Then edit the .js file in the uncompressed version and replace the compressed version with it on your server. By default it seems that the compressed version is standard if you don't select the option of uncompressed. I'm sure this will get others as well with this mod.

It's up and running fine on 3.7 now.
Reply With Quote
Reply

Thread Tools

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 10:32 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.05194 seconds
  • Memory Usage 2,304KB
  • 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
  • (3)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