dailysudoku.com Forum Index dailysudoku.com
Discussion of Daily Sudoku puzzles
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to hide text (e.g. "spoilers") in forum messag

 
Post new topic   Reply to topic    dailysudoku.com Forum Index -> Site help
View previous topic :: View next topic  
Author Message
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Tue Jul 22, 2008 7:15 am    Post subject: How to hide text (e.g. "spoilers") in forum messag Reply with quote

Using the [color] tag, it is possible to make text disappear for the "casual" viewer. This is useful when you are posting a solution for a puzzle, but do not want to spoil the fun for others.

In order to view the text, one has only to highlight the area (click and drag the mouse over the post) and the text reappears.

In order to hide text, simply highlight the words in the edit window and select "white" from the dropdown box "Font colour" right above the edit window.




The result will look like this in the edit window: [color=white]highlighted text[/color]

And it will display like this in your post (use the mouse to make the text visible):
highlighted text

That is all well and good for everyday use. Unfortunately (well, actually it is a good idea because it makes it easier to identify individual posts), the background color alternates between light and very light, so in every other post, the white color stands out a bit too well.

Remedy:
It is possible to use the [color] tag with a color code instead of a color name. The color codes for the default "silver" appearance of this forum are:

#efefef ... very light grey
#dee3e7 ... darker blue/grey

Simply substitute the appropriate color code for "white".
This is what it looks like in the edit window:

[color=#efefef]very light grey text[/color]
[color=#dee3e7]darker blue/grey text[/color]

And this is the result:
very light grey text
darker blue/grey text


Last edited by nataraj on Wed Jul 23, 2008 5:34 am; edited 3 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Tue Jul 22, 2008 7:18 am    Post subject: Reply with quote

This is the same example as before, but now on the darker blue background:

This is what it looks like in the edit window:

[color=white]using white on grey or grey/blue[/color]
[color=#efefef]very light grey text[/color]
[color=#dee3e7]darker blue/grey text[/color]

And this is the result (use the mouse to make visible):

using white on grey or grey/blue
very light grey text
darker blue/grey text
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Tue Jul 22, 2008 7:42 am    Post subject: Reply with quote

Some among us might want a code that is easier to remember, here goes:

- arithmetic mean between efefef and dee3e7 is e6e9eb,
- rounded (well, almost...): #eaeaea

This is what it looks like in the edit window:

[color=#efefef]very light grey text[/color]
[color=#eaeaea]using #eaeaea on grey or grey/blue[/color]
[color=#dee3e7]darker blue/grey text[/color]

And this is the result (use the mouse to make visible):

very light grey text
using #eaeaea on grey or grey/blue
darker blue/grey text


Last edited by nataraj on Tue Jul 22, 2008 1:51 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Tue Jul 22, 2008 7:43 am    Post subject: Reply with quote

And the same on the darker background...

This is what it looks like in the edit window:

[color=#efefef]very light grey text[/color]
[color=#eaeaea]using #eaeaea on grey or grey/blue[/color]
[color=#dee3e7]darker blue/grey text[/color]

And this is the result (use the mouse to make visible):

very light grey text
using #eaeaea on grey or grey/blue
darker blue/grey text
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ravel



Joined: 21 Apr 2006
Posts: 536

PostPosted: Tue Jul 22, 2008 3:26 pm    Post subject: Reply with quote

Wow,

how could you mix BBCode and non.BBCode in one post ?
Back to top
View user's profile Send private message
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Tue Jul 22, 2008 5:17 pm    Post subject: Reply with quote

I used

[ (Left square bracket)

for the first character of the [color] tag. BTW a tag that is syntactically incorrect will always show up as text (e.g. the "color" tag without parameters, or the end tag [/color] without preceding [color])

So in fact I only used it in those instances where I wanted to show the "source code" (i.e. the contents of the edit window) for the different color codes.

What is weird: I had to edit my initial post (to correct some typos) and it lost my [ constants - with the unwanted effect that those lines disappeared (instead of showing how to do it) ... took me a while to get everything in order again
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Tue Jul 22, 2008 5:25 pm    Post subject: Reply with quote

Reference: Hypertext Markup Language - 2.0
September 22, 1995
T. Berners-Lee (1)
D. Connolly (1)
(1) MIT/W3C


Appendix: The HTML Coded Character Set
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ravel



Joined: 21 Apr 2006
Posts: 536

PostPosted: Wed Jul 23, 2008 7:30 am    Post subject: Reply with quote

Thanks, nice trick
[color=#dee3e7]Thanks, nice trick[/color]
Back to top
View user's profile Send private message
nataraj



Joined: 03 Aug 2007
Posts: 1048
Location: near Vienna, Austria

PostPosted: Wed Jul 23, 2008 6:54 pm    Post subject: Reply with quote

Careful experimentation by Asellus made it obvious that there was a mistake in my calculations. Embarassed

The correct arithmetic mean for the two colors #efefef and #dee3e7 is #e6e9eb, which is best approximated by

#e9e9e9 (and not #eaeaea)

Sorry!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    dailysudoku.com Forum Index -> Site help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group