PDA

View Full Version : Forum Display Enhancements - Very simple image resize (CSS only)


OsMoSiS.it
22 Sep 2006, 16:50
Simply put this piece of code into "Additional CSS Definitions" under Style Manager -> Main CSS of the template you want this mod apply to.

/* 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
22 Sep 2006, 17:28
screenshot???

Thanks!

Allan
22 Sep 2006, 17:51
Demo please ?

Icheb
22 Sep 2006, 18:06
screenshot???

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

bashy
22 Sep 2006, 18:09
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
22 Sep 2006, 18:14
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
22 Sep 2006, 19:15
Works fine !!! Excellent !!!
Thank you

pauloo
22 Sep 2006, 19:33
Thanks ! nice job

works with Firefox 1.5 but and not IE 6.0

hnjco
22 Sep 2006, 23:02
Thanx for this

Work fine in Firefox 1.5 and IE 7.0

OsMoSiS.it
25 Sep 2006, 14:04
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
25 Sep 2006, 14:09
Thanks ! nice job

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

Do you see the image resized?

transitbus
25 Sep 2006, 17:52
If I may...

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

/* 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
30 Sep 2006, 10:24
Thanks transitbus, it's very well ;)

principino1984
30 Sep 2006, 13:20
finally a hack that works great... could you just add a code to restore the original size in a popup?

thanks

Marco

MarsNIIT
02 Oct 2006, 09:44
If I may...

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

/* 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
04 Oct 2006, 03:25
I found how to restore the original size in a new windows

1) Open class_bbcode.php
2) line 1884 change
return '<img src="' . $link . '" border="0" alt="" />';

to return '<a target="_blank" href="' . $link . '"><img src="' . $link . '" border="0" alt="" /></a>';

OK??? :P

smsmasters
04 Oct 2006, 20:55
Works great, how do I get this to work with posts shown on the vbadvanced news page?

R.Solutions
08 Oct 2006, 11:40
Seems like i cant get it to work, sames images break up my post width.

Endurer
12 Oct 2006, 17:33
Thank you :) It works like a charm.

Capper5016
14 Oct 2006, 21:08
hmmmmm, the original seemed to work okay, but the one added later in the thread makes avatars in the posts disappear

Pinky30
16 Oct 2006, 11:05
If I may...

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

/* 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
22 Oct 2006, 00:35
Great!

Installed

Mentch
22 Oct 2006, 17:53
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
04 Nov 2006, 16:50
So Thank :)
Good Job . Installed !

Frapegliko
06 Nov 2006, 20:48
you are the king

keyness
07 Nov 2006, 14:21
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 Nov 2006, 19:57
the code below makes the editing of posts look like this:

55796


/* 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
18 Nov 2006, 01:17
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
20 Nov 2006, 23:45
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
25 Nov 2006, 21:06
That's great hack but waste the CSS validation
just try it here: http://jigsaw.w3.org/css-validator/

Bieddos
07 Dec 2006, 22:48
great resize :D

anzo
27 Dec 2006, 00:04
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
31 Dec 2006, 00:42
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,

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
31 Dec 2006, 00:44
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;

/* 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
31 Dec 2006, 23:30
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
08 Jan 2007, 07:23
This is still the best method out there. PERIOD.

MikeWarner
20 Jan 2007, 18:07
Would it be possible to make each image a link which will open the full size version in a seperate browser?

Zolo
22 Jan 2007, 18:18
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
22 Jan 2007, 18:22
I hope your mod will kill image resizing issue :D

taydu
26 Jan 2007, 19:43
I try every piece of code suggested here, non of there are working neither on IF of FF :(

Smoothie
13 Feb 2007, 03:10
works great!

TheFrienzNet
26 Feb 2007, 18:07
It is not working on Firefox 2.

mp34play
01 Mar 2007, 03:30
This is awesome. It's exactly what I have been looking for. Installed and loving it.

Thank you:)

madsun
10 Jun 2007, 08:10
Just what I was looking for.... all these people breaking my tables... lol... Thanks!

PennylessZ28
10 Aug 2007, 22:15
The orginal still works perfectly, in IE7 and Firefox

sybakaos
12 Aug 2007, 16:03
It resizes quick edit toolbar icons to like 0 pixels?

skepticality
12 Aug 2007, 19:31
I've tried installing it twice on our system, v.3.6.8 and nothing happens.

Is there something more to it?

josepheseven
16 Aug 2007, 22:32
it works fine on 3.6.8 for me :)

IE 7 = Fine
Firefox 2+ = Fine

thanks!

Expat
18 Aug 2007, 23:13
Just what the doctor ordered. Someone started a zoom lens photo thread and it as getting out of hand. Thanks!

anhvienls
19 Aug 2007, 12:31
Very useful but all bbcode in quick reply resize too.

setoshi
08 Oct 2007, 00:34
Excellent. Keep it up, my friend.

Screamin'04
07 Dec 2007, 14:47
Awsome!

This is exactly what I was looking for, a no b.s. way to set and enforce a "maximum" image size for posts!

"Installed"

Screamin'04
07 Dec 2007, 15:47
Is there any way to use this indepently of the postbit for use with signatures images?

leon7000
16 Dec 2007, 00:24
good one but there some threads come to slow

Dave Hybrid
21 Jul 2009, 03:29
Anyone know the css to make this also resize pictures uploaded to members albums?

Would really be helping me out.

columbusgeek
21 Jan 2010, 00:23
so much nicer and simpler then the hundreds of heavy .js solutions. thanks.