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
Very simple image resize (CSS only) Details »»
Very simple image resize (CSS only)
Version: 1.00, by OsMoSiS.it OsMoSiS.it is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.1 Rating:
Released: 09-21-2006 Last Update: Never Installs: 78
Template Edits
 
No support by the author.

Simply put this piece of code into "Additional CSS Definitions" under Style Manager -> Main CSS of the template you want this mod apply to.
Code:
/* BEGIN Image resize */
#posts IMG
{
    max-width: 700px;
    width: expression (this.width > 700 ? "700px" : true);
}

#collapseobj_threadreview IMG {
    max-width: 700px;
    width: expression(this.width > 700 ? 700: true);
}
/* END Image resize */
Tested with Firefox 1.5 and IE 6.0.

This works also with VBulletin > 3.0.0.

Show Your Support

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

Comments
  #12  
Old 09-25-2006, 12:09 PM
OsMoSiS.it OsMoSiS.it is offline
 
Join Date: Sep 2004
Location: Rome, Italy
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pauloo
Thanks ! nice job

works with Firefox 1.5 but and not IE 6.0
Click here (post #829): http://www.elaborare.info/forum/vbul...135646&page=56

Do you see the image resized?
Reply With Quote
  #13  
Old 09-25-2006, 03:52 PM
transitbus transitbus is offline
 
Join Date: Aug 2006
Location: California
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I may...

Try this instead. It works great in IE 6 & 7 and Firefox 1.5x

Code:
/* BEGIN Image resize */
#posts IMG
{
    max-width: 95%;
    height: expression(this.height > 1024 ? "1024px" : true);
    width: expression(this.width > 768 ? "768px" : true);
}

#collapseobj_threadreview IMG {
    max-width: 95%;
    height: expression(this.height > 1024 ? "1024px" : true);
    width: expression(this.width > 768 ? "768px" : true);
}
/* END Image resize */
Reply With Quote
  #14  
Old 09-30-2006, 08:24 AM
pauloo pauloo is offline
 
Join Date: Dec 2004
Location: Belgium
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks transitbus, it's very well
Reply With Quote
  #15  
Old 09-30-2006, 11:20 AM
principino1984 principino1984 is offline
 
Join Date: Jul 2006
Location: Italy
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

finally a hack that works great... could you just add a code to restore the original size in a popup?

thanks

Marco
Reply With Quote
  #16  
Old 10-02-2006, 07:44 AM
MarsNIIT MarsNIIT is offline
 
Join Date: Aug 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by transitbus
If I may...

Try this instead. It works great in IE 6 & 7 and Firefox 1.5x

Code:
/* BEGIN Image resize */
#posts IMG
{
    max-width: 95%;
    height: expression(this.height > 1024 ? "1024px" : true);
    width: expression(this.width > 768 ? "768px" : true);
}

#collapseobj_threadreview IMG {
    max-width: 95%;
    height: expression(this.height > 1024 ? "1024px" : true);
    width: expression(this.width > 768 ? "768px" : true);
}
/* END Image resize */
Fire fox 1.5 : OKey
IE 6.0: Okey
Ie 7.0 : Okey
All version're Okey !! So thx

But could you just add a code to restore the original size in a popup?
Reply With Quote
  #17  
Old 10-04-2006, 01:25 AM
MarsNIIT MarsNIIT is offline
 
Join Date: Aug 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found how to restore the original size in a new windows

1) Open class_bbcode.php
2) line 1884 change
Quote:
return '<img src="' . $link . '" border="0" alt="" />';
to
Quote:
return '<a target="_blank" href="' . $link . '"><img src="' . $link . '" border="0" alt="" /></a>';
OK??? :P
Reply With Quote
  #18  
Old 10-04-2006, 06:55 PM
smsmasters smsmasters is offline
 
Join Date: Apr 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, how do I get this to work with posts shown on the vbadvanced news page?
Reply With Quote
  #19  
Old 10-08-2006, 09:40 AM
R.Solutions's Avatar
R.Solutions R.Solutions is offline
 
Join Date: Mar 2006
Location: Texas
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems like i cant get it to work, sames images break up my post width.
Reply With Quote
  #20  
Old 10-12-2006, 03:33 PM
Endurer Endurer is offline
 
Join Date: Sep 2006
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you It works like a charm.
Reply With Quote
  #21  
Old 10-14-2006, 07:08 PM
Capper5016 Capper5016 is offline
 
Join Date: Sep 2006
Location: Las Vegas, NV
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmmmm, the original seemed to work okay, but the one added later in the thread makes avatars in the posts disappear
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:58 PM.


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.06329 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
  • (3)bbcode_code
  • (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
  • (3)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