vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Forum Display Enhancements - Very simple image resize (CSS only) (https://vborg.vbsupport.ru/showthread.php?t=127266)

OsMoSiS.it 09-21-2006 10:00 PM

Very simple image resize (CSS only)
 
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.

PabloAM 09-22-2006 03:28 PM

screenshot???

Thanks!

Allan 09-22-2006 03:51 PM

Demo please ?

Icheb 09-22-2006 04:06 PM

Quote:

Originally Posted by PabloAM
screenshot???

Thanks!

Don't you people have any imagination? It's a resized image fcol. :tired:

bashy 09-22-2006 04:09 PM

Demo? it just resizes the images dont it, surely you wont any thing from a demo or screener

I take it this resizes the image regardless?
Does this effect signatures like some of the other image sizers have in the past?
Des it effect other images that maybe on the site, such as in the navbar?

oh bugger it, i will just try it out myself lol

bashy 09-22-2006 04:14 PM

Installed anyway, I dont think it actually does out on my site due to using a lightbox mod, but hell its in there and stay nowing, /me clicks install!

Thanks!!

gael11 09-22-2006 05:15 PM

Works fine !!! Excellent !!!
Thank you

pauloo 09-22-2006 05:33 PM

Thanks ! nice job

works with Firefox 1.5 but and not IE 6.0

hnjco 09-22-2006 09:02 PM

Thanx for this

Work fine in Firefox 1.5 and IE 7.0

OsMoSiS.it 09-25-2006 12:04 PM

Quote:

Originally Posted by bashy
I take it this resizes the image regardless?
Does this effect signatures like some of the other image sizers have in the past?
Des it effect other images that maybe on the site, such as in the navbar?

It resizes ONLY images within postbit, so the answers are "yes" and "no" :)

Why do you allow large images in signatures but not in posts? Wide signature images increase also post width, so allowing that is useless.



I don't have lightbox mod, can you post me a link to see it in action?

OsMoSiS.it 09-25-2006 12:09 PM

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?

transitbus 09-25-2006 03:52 PM

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 */


pauloo 09-30-2006 08:24 AM

Thanks transitbus, it's very well ;)

principino1984 09-30-2006 11:20 AM

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

thanks

Marco

MarsNIIT 10-02-2006 07:44 AM

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 :D
All version're Okey :D !! So thx

But could you just add a code to restore the original size in a popup?

MarsNIIT 10-04-2006 01:25 AM

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

smsmasters 10-04-2006 06:55 PM

Works great, how do I get this to work with posts shown on the vbadvanced news page?

R.Solutions 10-08-2006 09:40 AM

Seems like i cant get it to work, sames images break up my post width.

Endurer 10-12-2006 03:33 PM

Thank you :) It works like a charm.

Capper5016 10-14-2006 07:08 PM

hmmmmm, the original seemed to work okay, but the one added later in the thread makes avatars in the posts disappear

Pinky30 10-16-2006 09:05 AM

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 */


By Quickedit no Symbols visible!

HAVOK USA 10-21-2006 10:35 PM

Great!

Installed

Mentch 10-22-2006 03:53 PM

Works Like a charm.

IE 6.0 Works
Firefox 1.5.0.7 Works

Also the line number in version 3.6.1 to get the link to the original image is line 1879.

tinnktp123 11-04-2006 02:50 PM

So Thank :)
Good Job . Installed !

Frapegliko 11-06-2006 06:48 PM

you are the king

keyness 11-07-2006 12:21 PM

This is a very good code but it unfortunately ruins internet explorer browsing in my site. When I'm sliding down the scrollbar it looks slower, also it gives response later when I'm trying to copy texts in messages. :(

kalleball 11-11-2006 05:57 PM

the code below makes the editing of posts look like this:

Attachment 55796


HTML 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 */


jdebler 11-17-2006 11:17 PM

To the OP...thanks for this! I like it!

I implemented it and one user said that using Safari on a Mac doesn't change the vertical size, only the horizontal. Any thoughts on this? (Other than, "tell him to not use a Mac".) ;)

Crazy Serb 11-20-2006 09:45 PM

for some reason when I edit the class_bbcode.php and add the link to the image, nothing changes whatsoever...

I am using vbadvanced with a vb3.6.3 but even in this case class_bbcode.php should be the one responsible for displaying images, right?

when I change the code in it, upload it, refresh the page, look at the source, there are no changes reflected whatsoever... what a heck?!

Masiello 11-25-2006 07:06 PM

That's great hack but waste the CSS validation
just try it here: http://jigsaw.w3.org/css-validator/

Bieddos 12-07-2006 08:48 PM

great resize :D

anzo 12-26-2006 10:04 PM

sorry, but this last version works fine in FF, but doesn't work in my IE 6.0 :(
http://latforums.lv/showthread.php?t=635&page=32

I've set max-width to 600px instead of 95%, but still nothing...
any advice?

Funky Diver 12-30-2006 10:42 PM

Quote:

Originally Posted by MarsNIIT (Post 1089560)
I found how to restore the original size in a new windows

1) Open class_bbcode.php
2) line 1884 change


to

OK??? :P

I have the Lightbox Mod installed also, so I edited it to be the following,

PHP Code:

return '<a target="_blank" rel="lightbox" href="' $link '"><img src="' $link '" border="0" alt="" /></a>'

NOT ONLY do my images resize in the forum, now they transition cool as cucumbers from a fridge on a hot day. TOP NOTCH.

Funky Diver 12-30-2006 10:44 PM

Quote:

Originally Posted by anzo (Post 1145508)
sorry, but this last version works fine in FF, but doesn't work in my IE 6.0 :(
http://latforums.lv/showthread.php?t=635&page=32

I've set max-width to 600px instead of 95%, but still nothing...
any advice?

Then your code needs to read;

Code:

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

#collapseobj_threadreview IMG {
    max-width: 600px;
    height: expression(this.height > 1024 ? "1024px" : true);
    width: expression(this.width > 768 ? "768px" : true);
}
/* END Image resize */


smoknz28 12-31-2006 09:30 PM

Installed on vB 3.6.4 :up:

Working under:
- Firefox v 1.5.0.9
- Internet Explorer 7.0.5730.11

Thanks for making this hack simple. ;)

PennylessZ28 01-08-2007 05:23 AM

This is still the best method out there. PERIOD.

MikeWarner 01-20-2007 04:07 PM

Would it be possible to make each image a link which will open the full size version in a seperate browser?

Zolo 01-22-2007 04:18 PM

Quote:

Simply put this piece of code into "Additional CSS Definitions" under Style Manager -> Main CSS of the template you want this mod apply to.
- there are many additional CSS defintions .. which one should be used?

- will this work with Firefox 2.0.0.1


Thank you & appreciate your help gents :up:

Zolo 01-22-2007 04:22 PM

I hope your mod will kill image resizing issue :D

taydu 01-26-2007 05:43 PM

I try every piece of code suggested here, non of there are working neither on IF of FF :(


All times are GMT. The time now is 05:19 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.01931 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete