Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Wide image automatic resize for html and vB tags in posts - fixes template problems Details »»
Wide image automatic resize for html and vB tags in posts - fixes template problems
Version: 1.00, by Steve St.Lauren Steve St.Lauren is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Version: 3.0.8 Rating:
Released: 07-28-2004 Last Update: 09-09-2004 Installs: 111
 
No support by the author.

Having trouble with large images in [img] or <img src> tags in your posts causing your templates to go too wide causing a horizontal scroll bar for all posts? I have many users that attach large images to their posts either through vB img or html img src tags. In vB2 it wasn't that much of an issue because it only caused their post to go wide causing a horizontal scroll bar. In vB3 it causes all the posts on that thread to go to that width.

This hack uses the img src width="xx" tag to resize the picture to whatever max size you wish. It also adds a link to the full size image in it's original location and retains any extra formatting the user puts in the tag. In addition it checks to see if the picture actually exists and if not show "Image link is broken" where the picture would have been. Please click install if you install it and please give feedback so I can go full release with it if it's bug free.

Updated on 07/30/2004 - R0.9
Updated on 08/06/2004 - R1.0 - Identical to R.9, no need to upgrade just changing to full release from beta
Updated on 08/10/2004 - R1.1 - Added max_imgsize to the 2nd section of code (and removed global max_imgsize line from both), some users had problems with the code grabbing the max_imgsize from the first section - this fixes that.
Updated on 09/09/2004 - R1.2 - fixed problem with duplicating the resize notice when using wysiwyg editor

Show Your Support

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

Comments
  #152  
Old 07-08-2005, 09:14 PM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tommyxv
Well, I rehosted the images myself as a test and they came up fine. It was just with this one user. Large or small images, but its fixed now and working great.

Awesome Hack!
Some servers have firewalls installed that will not allow other servers to open files for reading from them. If they do that then this hack won't work on that image. It doesn't come up often but it does happen.
Reply With Quote
  #153  
Old 07-21-2005, 04:26 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alkatraz
awesome hack!
Is it available for 3.5?
Reply With Quote
  #154  
Old 07-21-2005, 05:33 PM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eagle Creek
Is it available for 3.5?
Not yet. I won't be working with 3.5 until it's a full release and has been out for a month or two.
Reply With Quote
  #155  
Old 07-21-2005, 05:41 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Steve St.Lauren
Not yet. I won't be working with 3.5 until it's a full release and has been out for a month or two.
Why not? Can't you test it on the beta version?

Or is that too risky because code changes. But I thought it was easy with the plug-ins.
Reply With Quote
  #156  
Old 08-12-2005, 06:18 AM
chris g chris g is offline
 
Join Date: Jun 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eagle Creek
Why not? Can't you test it on the beta version?

Or is that too risky because code changes. But I thought it was easy with the plug-ins.
Hey, I installed this hack and it doesn't seem to do anything. No error messages are generated, the image just shows up full size. I double checked the hack install and everything looks fine. Is there anything that you know of that would cause this code to fail gracefully (as it seems to be doing)? Having this hack isn't a huge issue for me, but it would be nice. Let me know if you need more information to help me out here.

PHP: 4.3.10
vB: 3.0.7

Thanks for writing the code and the GREAT support! Big props!
Reply With Quote
  #157  
Old 08-12-2005, 06:51 AM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eagle Creek
Why not? Can't you test it on the beta version?

Or is that too risky because code changes. But I thought it was easy with the plug-ins.
I could but all my work is production based. I won't be deploying 3.5 anywhere until it's a working stable version and has been out for a few months. Unforetunately, I just don't have enough hours in the day to play around with beta releases. The main site I run gets 2.5 million hits a day and has up to 1400 simultaneous users on the forums and is a subscription site. With that kind of traffic volume I'll let others be the guinea pigs to mark sure it's all working stable before I deploy it. Sorry.
Reply With Quote
  #158  
Old 08-12-2005, 06:52 AM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chris g
Hey, I installed this hack and it doesn't seem to do anything. No error messages are generated, the image just shows up full size. I double checked the hack install and everything looks fine. Is there anything that you know of that would cause this code to fail gracefully (as it seems to be doing)? Having this hack isn't a huge issue for me, but it would be nice. Let me know if you need more information to help me out here.

PHP: 4.3.10
vB: 3.0.7

Thanks for writing the code and the GREAT support! Big props!
Hmmm, are you sure the images in question are larger than 560 pixels wide (or whatever you set it to in the hack)? Also that they are linked images and not attached ones? This only works with images linked in with html or vb codes.
Reply With Quote
  #159  
Old 08-12-2005, 02:26 PM
chris g chris g is offline
 
Join Date: Jun 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I changed the value to 600, will be changing to 800 today when I check the code again. I think I'll have a friend look as well to see if I'm missing anything obvious. Images are inserted via the [ img] [ /img] tags.

In case it helps this: http://shoandgo.com/gallery/albums/album23/100_0491.jpg is one of the test images th at I used. (Warning: Quite large)

I've only tried with vb tags, should I try HTML as another test?
Reply With Quote
  #160  
Old 08-17-2005, 07:03 PM
dansgts dansgts is offline
 
Join Date: Jun 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Steve St.Lauren
You must have missed something - look back over the entire hack file and make sure that you did everything in it. It works fine on 3.0.7
it works for linked immages, but not attached ones, any way to fix that?
Reply With Quote
  #161  
Old 08-18-2005, 03:14 PM
dai-kun dai-kun is offline
 
Join Date: Jul 2005
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this a couple of times, but everytime ALL my pictures within posts have the "Image link is broken" error, no matter what size it is. Even signature pics comes up like that. I've read all the replies but nothing really helps. Thanks.
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 04:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06659 seconds
  • Memory Usage 2,312KB
  • 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