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

Reply
 
Thread Tools
Image Resizer Javascript Details »»
Image Resizer Javascript
Version: 1.00, by yoyoyoyo yoyoyoyo is offline
Developer Last Online: Sep 2008 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.8 Rating:
Released: 11-07-2007 Last Update: Never Installs: 56
Template Edits Auto-Templates
Re-useable Code Translations  
No support by the author.

Image Resizer Javascript

With this simple javascript, if an image posted in your forum in a thread has a width that is larger then 80% of your browser resolution, it will be automagically resized. The image will also resize as you increase or decrease your browser size, so it is great for fluid styles. This javascript only affects images that are shown when viewing showthread.

NOTE: This is only a simple javascript to resize the image, there is no option to view the image at it's original size, etc., if you want to do that all you need to do is right-click on the image and choose "View Image." It does not do server side resizing of images, since everything is done client side. It also does not prevent long loading times, since the images have to be downloaded by the user before the script can resize them. If a user does not have javascript enabled then the image will not be resized - however if a person is browsing the internet, and do not have javascript enabled then an image that is too large will be the least of their worries.

This should work with all versions of vbulletin

Unlike other image resizing mods, this mod only requires one simple template edit, and no additional files , plugins, database changes or file edits.

DEMO LINK: CLICK HERE

Screenshots:
Imagine a picture that is too large, now imagine it smaller.

Installation:
If you have TMS (Template Modification System) installed, then download the templateedits-resizeimage.xml and upload it via TMS, and it will automatically edit the template.

If you do not have TMS installed, then download the image_resizer.txt file and follow the directions.

If you find this useful, please click install.
If you REALLY like it then please nominate it as Mod of the Month.

Supporters / CoAuthors

Show Your Support

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

Comments
  #22  
Old 11-11-2007, 11:11 AM
abhimation's Avatar
abhimation abhimation is offline
 
Join Date: Dec 2006
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its really handy. Thnx Yoyo.. marked as Installed !
Reply With Quote
  #23  
Old 11-11-2007, 04:14 PM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo View Post
read the first post
My bad... i didn't read that carefully.
Reply With Quote
  #24  
Old 11-12-2007, 12:18 PM
livethedream livethedream is offline
 
Join Date: Oct 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Livethedream clicks *installed*
Reply With Quote
  #25  
Old 11-12-2007, 02:57 PM
Calash's Avatar
Calash Calash is offline
 
Join Date: Jun 2006
Location: East Coast, USA
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is not working on IE 6 where I work. Firefox it is working fine. It is a nice effect, simple but it gets the job done.
Reply With Quote
  #26  
Old 11-12-2007, 04:08 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Calash View Post
It is not working on IE 6 where I work. Firefox it is working fine. It is a nice effect, simple but it gets the job done.
I have tested it in safari, IE6, IE7, opera and firefox and it works fine in all of them. Make sure you have javascript enabled at your work browser - your sysadmin may have disabled it for some reason.
Reply With Quote
  #27  
Old 11-12-2007, 07:47 PM
Calash's Avatar
Calash Calash is offline
 
Join Date: Jun 2006
Location: East Coast, USA
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm in the IT group, so I know it is not disabled. It may be the version the Java VM that we have installed, though I have not see issues before. I will troubleshoot it a bit more and let you know if I find what the cause it.
Reply With Quote
  #28  
Old 11-13-2007, 12:36 AM
stan111 stan111 is offline
 
Join Date: Aug 2005
Location: CA
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is awsome, love it
here is another suggestion:
if you would make the the image in the quote would show only the link, it would be awesome
Reply With Quote
  #29  
Old 11-13-2007, 12:52 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stan111 View Post
this is awsome, love it
here is another suggestion:
if you would make the the image in the quote would show only the link, it would be awesome
Glad you like it, but I do not plan on extending or modifying this hack at this point - it is a simple javascript, and it works in all major browsers that I have tested. I see no need for extra features, especially ones that would require file edits.
Reply With Quote
  #30  
Old 11-13-2007, 02:55 PM
agitated agitated is offline
 
Join Date: Jan 2005
Location: U.K.
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo works fine in firefox but not in IE7. .
Unfortunately IE7 is still the most popular browser.
Reply With Quote
  #31  
Old 11-13-2007, 03:51 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by agitated View Post
Demo works fine in firefox but not in IE7. .
make sure you have javascript enabled in IE7 - I am testing it right now and it works for me.

JavaScript - to enable this in:

IE Tools/Internet Options/Security/Custom Level button/Settings/Scripting/
Ensure the "Active Scripting" radio button selected.

Netscape Edit/Preferences/Category Advanced/Scripts and Plugins/
Under "Enable JavaScript for", tick the "Navigator" setting.
Under "Allow script to", tick "Change images" and "Change status bar".

Firefox Tools/Options/Web Features/
Ensure the "Enable JavaScript" radio button selected.
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 07:57 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.09187 seconds
  • Memory Usage 2,309KB
  • Queries Executed 26 (?)
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
  • (4)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
  • (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