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
Auto Resize large images in an IMG tag Details »»
Auto Resize large images in an IMG tag
Version: 1.00, by mr.gamesbay mr.gamesbay is offline
Developer Last Online: Dec 2009 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.4 Rating:
Released: 08-31-2006 Last Update: Never Installs: 272
Template Edits
Code Changes Additional Files  
No support by the author.

First, sorry about my bad english

With this small hack, all large images in an IMG Tag will be resized after the site has loaded. With a click on the resized imge, it will open in an new window with the original size. Works in Firefox, Opera, IE and i think in all other browser.
Here is a Demo: Link

Work with vB 3.6.0 - 3.6.4

INSTALLATION:

--------------------------------

- Copy the file resizevbimg.js in the dir clientscript.

--------------------------------

Open the file includes/class_bbcode.php
Search the line(~line 1887 ):

Code:
return '<img src="' .  $link . '" border="0" alt="" />';
and replace with:
Code:
return '<img src="' .  $link . '" border="0" alt="" id="vBCodeIMG" />';
Save and upload.

--------------------------------

Styles & Templates > Search the SHOWTHREAD Template
Seach:
Code:
<body onload="$onload">
Replace with:
Code:
<body onload="$onload;vbImageResize()">
Save the template.

--------------------------------

Styles & Templates > Search the NEWREPLY Template
Search:
Code:
 <body$onload>
Replace with:
Code:
<body onload="$onload;vbImageResize()">
Save the template.

--------------------------------

- Styles & Templates > Style Manager > Common Templates > headinclude
Search:
Code:
<!-- / CSS Stylesheet -->
After, add:
Code:
<script type="text/javascript" src="clientscript/resizevbimg.js"></script>
Save the template.

--------------------------------

Styles & Templates > Style Manager > Main CSS > Additional CSS Definitions

After, add:
Code:
.vbimgcodelimit {
        cursor: pointer;
        border: dotted 1px black;
}
Save.
--------------------------------

Done

Show Your Support

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

Comments
  #122  
Old 08-24-2007, 02:05 PM
Kadi Kadi is offline
 
Join Date: Sep 2006
Location: Hijaz
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

Installed.

Thanks.
Reply With Quote
  #123  
Old 09-05-2007, 01:15 PM
redslush redslush is offline
 
Join Date: Feb 2007
Location: Round Rock, Tx
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

has anyone gotten this to work with 3.6.8? I had it working previously but now it no longer works after the upgrade.
Reply With Quote
  #124  
Old 10-03-2007, 03:58 PM
edgecutioner edgecutioner is offline
 
Join Date: Jul 2007
Location: Qatar
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow it's working on 3.6.8 except for the Additional CSS defintions... but it works fine! thanks!
Reply With Quote
  #125  
Old 10-14-2007, 03:26 AM
rapidphim rapidphim is offline
 
Join Date: Feb 2007
Posts: 733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can anyone tell if there is any modification for this mod to have thick/ darken background when click on the resize image to see full size?
Reply With Quote
  #126  
Old 10-23-2007, 08:43 AM
LlanMan LlanMan is offline
 
Join Date: Oct 2007
Location: Anglesey
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, just what I was looking for only a hell of a lot better, muchos kudos.
Reply With Quote
  #127  
Old 10-28-2007, 09:16 PM
TouranMan TouranMan is offline
 
Join Date: Oct 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by edgecutioner View Post
wow it's working on 3.6.8 except for the Additional CSS defintions... but it works fine! thanks!
I have it working on 3.6.8 also and the CSS definitions work!
Reply With Quote
  #128  
Old 12-20-2007, 07:06 AM
harlita harlita is offline
 
Join Date: Dec 2006
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

3.6.8 and CSS defs work as well.

Marking as installed. great hack. I used to have a different one running on a 3.6.5 board, but no longer functioned after a couple updates. This one works swell.
Reply With Quote
  #129  
Old 01-26-2008, 07:57 AM
urdu urdu is offline
 
Join Date: Apr 2007
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks ... installed in 3.6.8
Reply With Quote
  #130  
Old 01-30-2008, 03:14 PM
kronnos kronnos is offline
 
Join Date: Apr 2006
Posts: 241
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems very nice.. is there a way to resize to different sized for different user groups?
Reply With Quote
  #131  
Old 02-02-2008, 10:18 AM
BatMNet BatMNet is offline
 
Join Date: Jan 2008
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work.. To let you know I have it working on vBul 3.7 Beta4

Also worked out how to get it running on Blog
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 10:31 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.05144 seconds
  • Memory Usage 2,308KB
  • 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
  • (9)bbcode_code
  • (1)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