Page 1 of 2

Quoted image as thumbnail

Posted: Thu Dec 11, 2014 4:55 pm
by HiFiKabin
I have adapted viewtopic.php?t=1282765 to show the quoted image as a thumbnail for 3.0.x viewtopic.php?f=70&t=2276211 but I can not get my head rounds extensions to port this for 3.1.x

Would anyone like to attempt it?

TiA

Image
image post

Re: Quoted image as thumbnail

Posted: Thu Dec 11, 2014 5:56 pm
by Wolfsblvt
Why not doing this with a simple css style?

Code: Select all

blockquote img {
    max-width: 200px;
    max-height: 200px;
} 
Should be the one for prosilver.
(untested)

Re: Quoted image as thumbnail

Posted: Thu Dec 11, 2014 6:30 pm
by HiFiKabin
Wolfsblvt wrote:Why not doing this with a simple css style?

Code: Select all

blockquote img {
    max-width: 200px;
    max-height: 200px;
}
Should be the one for prosilver.
(untested)
:oops: Maybe because I think of the complex way rather than the simple way. Where exactly would I put that bit of CSS?

Re: Quoted image as thumbnail

Posted: Thu Dec 11, 2014 8:27 pm
by Wolfsblvt
HiFiKabin wrote: :oops: Maybe because I think of the complex way rather than the simple way. Where exactly would I put that bit of CSS?
In the stylesheet of the style you use.
It is at (phpbb root folder)/styles/(yourstyle)/theme/(fittingfile).css

Wich style do you use?

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 9:56 am
by HiFiKabin
Wolfsblvt wrote:
HiFiKabin wrote: :oops: Maybe because I think of the complex way rather than the simple way. Where exactly would I put that bit of CSS?
In the stylesheet of the style you use.
It is at (phpbb root folder)/styles/(yourstyle)/theme/(fittingfile).css

Wich style do you use?
I am using prosilver. I'll have a play with it later

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 10:32 am
by HiFiKabin
I have put that in common.css (where the other blockquote is) and it works perfectly.

Many thanks

I have added it to subsilver2/theme/stylesheet.css and it doesn't work there. Any ideas?

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 12:34 pm
by Wolfsblvt
HiFiKabin wrote:I have added it to subsilver2/theme/stylesheet.css and it doesn't work there. Any ideas?
Yes. subsilver2 has another layout for everything. You can inscept the html of a quote in the browser.
If I am right, subsilver2 quotes should be inside a div with the "quotecontent" class.

So just replace the selector with .quotecontent img.

Looks like

Code: Select all

.quotecontent img {
    max-width: 200px;
    max-height: 200px;
} 

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 12:56 pm
by HiFiKabin
Brilliant! Many thanks for sorting me out, it's much appreciated.

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 1:01 pm
by Wolfsblvt
No problem. I try to help where I can :D

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 1:11 pm
by HiFiKabin
Just thought of another question. Oversized images are auto scaled to fit the forum in prosilver, but in subsilver2 they still break out of the forum as they did in 3.0.X and 2.0.X

I am not expecting to be able to autoscale in subsilver, but is there an easy way to resize all posted images to (say) 600pix wide, and still allow the smaller thumbnail in quoted posts?

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 2:18 pm
by Wolfsblvt
Yeah, you can limit the size of all images in posts the same like you have done with the quote.

Just use the class .postbody for subsilver2.

So maybe something like this:

Code: Select all

.postbody img {
    max-width: 600px;
}  

Re: Quoted image as thumbnail

Posted: Fri Dec 12, 2014 4:20 pm
by HiFiKabin
Perfect!

Thats going to stop the 'I love subsilver' crowd moaning about oversized images.

Re: Quoted image as thumbnail

Posted: Wed Jan 14, 2015 11:20 pm
by Dragosvr92
I have opened a RFC at area51 to include this in the core.
https://area51.phpbb.com/phpBB/viewtopi ... 08&t=46576

Re: Quoted image as thumbnail

Posted: Thu Jan 15, 2015 6:09 am
by MattF
Here it is as an extension for you all.

Edit: Updated the attachment

Re: Quoted image as thumbnail

Posted: Thu Jan 15, 2015 11:37 am
by Holger
Woah! Thanks a lot!