Suggestion to resize images in quote boxes

Please post any issues with the website or forums in here
User avatar
Broscar
Early Supporter 6
Early Supporter 6
Posts: 650
Joined: Wed Jul 01, 2015 2:35 pm
Location: ur mom #shrekt
Contact:

Suggestion to resize images in quote boxes

Postby Broscar » Thu Dec 10, 2015 4:57 pm

Right now, whenever a message which has an image embedded is quoted, that image gets displayed at it's full size a 2nd/3rd/4th etc time.
Example.
Taking the effort to move my index finger a few more times over the scroll wheel doesn't make me break out in sweat, but it's unnecessary and annoying nevertheless.

I suggest to shrink or thumbnail images in quotation boxes.
One possible method is simply adding the following to the forum stylesheet:

Code: Select all

blockquote img {
max-height:200px;
}

With a tiny modification to viewtopic.php it's possible to turn the images into clickable thumbnails, which return to their original size once they're clicked on, but I doubt anyone wants/needs that (you can still right-click and open the images at their original size in a new tab anyway).

User avatar
Tiakh
Early Supporter 5
Early Supporter 5
Posts: 149
Joined: Sat Jul 11, 2015 11:52 am
Location: Germany

Re: Suggestion to resize images in quote boxes

Postby Tiakh » Fri Dec 11, 2015 9:34 am

i would just like to see a option to make a spoiler in the forum. this would help also in this case, cause you can pack the images in spoilers, then they would only be loaded when you open the spoiler.
Resizing is also a option.

User avatar
Broscar
Early Supporter 6
Early Supporter 6
Posts: 650
Joined: Wed Jul 01, 2015 2:35 pm
Location: ur mom #shrekt
Contact:

Re: Suggestion to resize images in quote boxes

Postby Broscar » Fri Dec 11, 2015 3:16 pm

For Chris:

How to create spoilers:
Go to the Administration Control Panel, to the tab 'POSTING'. It'll default to the BB-code view, but if it doesn't, select BBCodes from the sidebar.
Add a new BBCode.
In the text box for 'BBCode usage', add the following:

Code: Select all

[spoiler]{TEXT}[/spoiler]

In the text box for 'HTML replacement', add the following:

Code: Select all

<dl class="codebox"><dt>Spoiler: <a href="javascript&#058; void(0);" onClick="var spoiler = this.parentNode.parentNode.getElementsByTagName('dd')[0]; if ( spoiler.style.display == 'none' ) { spoiler.style.display = 'block'; this.innerHTML = 'hide'; } else { spoiler.style.display = 'none'; this.innerHTML = 'show'; };">show</a></dt><dd style="display: none;">{TEXT}</dd></dl>
'Help line' contains the text that will be displayed as a tooltip when someone hovers over the tag in the post edit screen.
Make sure to tick the box that says 'Display on posting page'.

Example: http://rollcage.broscar.nl/viewtopic.php?f=7&t=29&p=64#p64
The spoiler box should be stylized like the forum if the theme creator did a decent job, but we might have to make some changes if it turns out to be ugly.

How to add the maximum height to images embedded in quotes:
You remember this sh*t?
You need to edit the same file again you made changes to before to fix the colouring of nested quote blocks.
Just copy and paste this at the end of the file (change 200 to whatever height you want. 200 is good though, imo):

Code: Select all

  blockquote img {    max-height: 200px; }
Shouldn't matter whether it's on the same line or on a new line.

Don't forget to recompile the style.
ACP -> 'GENERAL' tab -> 'Load settings' in sidebar -> Set 'Recompile stale style components' to yes -> Just F5 somewhere on the forum so that PHPBB3 updates the style -> Set 'Recompile stale style components' to no again to avoid unnecessary excess I/O and CPUtime.


Another BBCode I figure worth adding is strikethrough text, though that's up to you of course.

Code: Select all

[s]{TEXT}[/s]

Code: Select all

<span style="text-decoration: line-through;">{TEXT}</span>

User avatar
Chris_CE
Grip Developer
Grip Developer
Posts: 2175
Joined: Tue Jun 30, 2015 4:44 pm
Contact:

Re: Suggestion to resize images in quote boxes

Postby Chris_CE » Fri Dec 11, 2015 7:54 pm

Thanks buddy, will do this tomorrow.
Game Director
GRIP

User avatar
Chris_CE
Grip Developer
Grip Developer
Posts: 2175
Joined: Tue Jun 30, 2015 4:44 pm
Contact:

Re: Suggestion to resize images in quote boxes

Postby Chris_CE » Sat Dec 12, 2015 11:17 am

Spoiler: show
I've yet to figure out the IMG stuff but have the other stuff figured out
Game Director
GRIP

User avatar
Chris_CE
Grip Developer
Grip Developer
Posts: 2175
Joined: Tue Jun 30, 2015 4:44 pm
Contact:

Re: Suggestion to resize images in quote boxes

Postby Chris_CE » Sat Dec 12, 2015 11:19 am

test
Game Director
GRIP


Return to “Grip Website & Forum Issues”

Who is online

Users browsing this forum: No registered users and 1 guest

cron