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
  #142  
Old 07-05-2005, 03:50 AM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theinz
Steve,

This hack saved us a lot of trouble thanks so much!! It's working perfectly. I do have a question however. At the end of your install notes you say:

"That's it. Set the max_imagesize at the beginning of the each of the large edits and that will be your max image size."

Where can I set the max_imagesize?
Look in the hack text file and you'll see two instances of "$mag_imgsize=560;" - just change the 560 in those two instances to whatever size you want. Before the first one it says " // set max_imgsize to the max size you want pictures to be"
Reply With Quote
  #143  
Old 07-05-2005, 03:51 AM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JohnBee
I installed this hack it worked nicely but for all our signatures that involved images
they were replaced with a message that said "Image link is broken"

any ideas what might cause this, is there a way to turn this off for signatures?
Where are those signature images coming from? The server they are on may be restricting your server from opening a file from their server which will cause that error. Give me a link to a page showing a signature doing that and I will take a look.
Reply With Quote
  #144  
Old 07-05-2005, 03:52 AM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dansgts
can this work with 3.0.7???
i followed the instructions exactly and it dosent do anything.
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
Reply With Quote
  #145  
Old 07-05-2005, 03:56 AM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mustang_lex
I heard that "client side" would be faster. Can we mod this hack to load the html page as its resizing the images.

I seen some sites that says "loading images" then the photo appears. Can we implement something like that. just so the page loads first then the photos.

I really love this hack over the others but I do understand people removing because of the lag.
No, there's no way to do that because the server has to have loaded the images so that it knows the size of the image so that it can decide if it needs to be resized or not. If it needs to be resized then it generates the html code to make that resize happen on the client side - if the html was already loaded there wouldn't be any way to modify that. The only other option would be to resize all pictures to the size you specify but that will make images smaller than that size look horrible. If you did that there would be no need to check the image size.
Reply With Quote
  #146  
Old 07-05-2005, 04:11 PM
mustang_lex mustang_lex is offline
 
Join Date: May 2005
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack was so promising , and was my favorite. I don't know what happened, but 2 days after this hack was installed, it took longer and longer to load pages with images, so like many others i had to remove it and made another one work 100% (minus the text at the bottom as i liked about this one)

Thanks though. I hope someday this can be revised to be more friendly to larger image forums.
Reply With Quote
  #147  
Old 07-05-2005, 04:23 PM
Steve St.Lauren Steve St.Lauren is offline
 
Join Date: May 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mustang_lex
This hack was so promising , and was my favorite. I don't know what happened, but 2 days after this hack was installed, it took longer and longer to load pages with images, so like many others i had to remove it and made another one work 100% (minus the text at the bottom as i liked about this one)

Thanks though. I hope someday this can be revised to be more friendly to larger image forums.
The more images you have on a post the longer it will take because every image has to be loaded. If there are images on a server that is down or that the server blocks access to it will take even longer because it will have to hit the timeout before continuing. If you have a forum where people put LOTS of images in each thread then it isn't going to work out well for you until I (or someone else) have time to add the optimization recommended by BRC2 above. It'd take me most of a day probably and I just don't have the time right now .
Reply With Quote
  #148  
Old 07-06-2005, 12:00 PM
mustang_lex mustang_lex is offline
 
Join Date: May 2005
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Steve St.Lauren
The more images you have on a post the longer it will take because every image has to be loaded. If there are images on a server that is down or that the server blocks access to it will take even longer because it will have to hit the timeout before continuing. If you have a forum where people put LOTS of images in each thread then it isn't going to work out well for you until I (or someone else) have time to add the optimization recommended by BRC2 above. It'd take me most of a day probably and I just don't have the time right now .
Don't sweat man, you got a top family priority, I hope to have your experience someday with my wife to be
Reply With Quote
  #149  
Old 07-07-2005, 05:55 AM
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It seems to work great, but on some large images, i get, Image link broken. If i got to edit the post, the images are there, but wont show on the forum. Any ideas?? Maybe it cant handle large images?

Images are 1280 x 960 and were already posted before the hack. I tried to edit the post and redo the links but still no good.

????

Actually, its just images that this one user is posting. Some of smaller images coming from cardomain, they show Image Link Broken too.

Not sure why... hrmmm.
Reply With Quote
  #150  
Old 07-07-2005, 12:28 PM
mustang_lex mustang_lex is offline
 
Join Date: May 2005
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your server maybe timing out before the images get resized by the server
Reply With Quote
  #151  
Old 07-08-2005, 02:46 PM
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
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:41 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.05151 seconds
  • Memory Usage 2,313KB
  • 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
  • (6)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