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

Reply
 
Thread Tools
auto resize huge images Details »»
auto resize huge images
Version: 1.00, by Tradjick Tradjick is offline
Developer Last Online: Jan 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 12-19-2004 Last Update: Never Installs: 20
 
No support by the author.

This Hack has been published by mr.gamesbay in this thread at vbulletin-germany.com who let me translate this hack for vb.org.

It resizes the pictures from the [img] tag after showthread.php has been loaded. It doesn?t need any editing of php files.

Other similar hacks:

https://vborg.vbsupport.ru/showthread.php?t=67743 from St.Lauren which has the drawback of beeing slow.
https://vborg.vbsupport.ru/showthread.php?t=68677 fron 007pig which doesn?t always cut down the img size of each picture and makes each picture as a link.
and the hack from Aurous: an ideal version, very fast and no problems with broken links. But there are problems with the use of the WYSIWYG editor and caching. (BTW, this hack doesn?t solve the WYSIWYG thingy. If you find a solution, feel free to share it with the rest)

Advantages of this version:

-fast
-works with cache enabled
-no editing of php files, just template edits

Here?s what you need to do:

Styles & Templates > Style Manager > All Style options > Additional CSS Definitions:
go to the bottom of it and add the following:

.imglimit {cursor: pointer;border: dotted 1px black;}

Styles & Templates > Style Manager > Common Templates > headinclude:
Find:

HTML Code:
<script type="text/javascript"><!--var SESSIONURL = "$session[sessionurl]";var IMGDIR_MISC = "$stylevar[imgdir_misc]";// --></script>


Behind that, add the following code:

HTML Code:
<script type="text/javascript" src="clientscript/resizeall.js"></script>


Styles & Templates > Edit Templates > showthread:

Find:

HTML Code:
<body onload="$onload">


Replace with:

HTML Code:
<body onload="$onload; fiImageResize()">


Then, you will have to updload resizeall.js to your clientscript directory and that?s all.

In the file resizeall.js you have the option to choose the size for the images.


Demo: http://www.gamesbay.de/showthread.php?t=3316

Show Your Support

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

Comments
  #32  
Old 03-17-2006, 10:04 AM
joker2040 joker2040 is offline
 
Join Date: Jan 2006
Location: Kentucky
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I've got the same problem with clear.gif. I fixed it everywhere except for when you are actually inside of a post.

Thoughts?
Reply With Quote
  #33  
Old 03-17-2006, 10:15 AM
joker2040 joker2040 is offline
 
Join Date: Jan 2006
Location: Kentucky
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I fixed it... I'm retarded... There was a very skinny black line in my style that was causing the problem. I'm all good now.

Nice mod by the way!
Reply With Quote
  #34  
Old 03-23-2006, 01:35 PM
J82980BA3E43 J82980BA3E43 is offline
 
Join Date: May 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mustang_lex
Is there a way in the resizeall.js clientscript so any resized photos will have text under it saying something like "this photo has been resized automatically, click for full view"

Thanks
Help
is this possible to make this with this script?
Reply With Quote
  #35  
Old 05-31-2008, 04:09 AM
nesh nesh is offline
 
Join Date: Mar 2008
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Superb. Thank you
Reply With Quote
  #36  
Old 06-12-2008, 02:02 PM
angelpie angelpie is offline
 
Join Date: May 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this only resize photos? we have icons too just dont want to add this and it make them larger then we want...
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 09:11 AM.


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.04425 seconds
  • Memory Usage 2,252KB
  • Queries Executed 20 (?)
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
  • (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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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