I think we should have spoiler tags. At I wrote some clever code - can the comment "defuse" it? I used a table with black background and a black font to conceal a part of the post. diotalevi commented that “people who don’t see formatting aren’t getting whatever you tried to communicate by doing that”. It is something that has irked me before. A much more elegant solution to what we have now might be to have a <spoiler> tag. The reason I post here is because I’m wondering how it would best be implemented. Using colours makes it convenient to peek at the spoiler, but it won’t work for everyone.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: RFC: Spoiler tags
by theorbtwo (Prior) on Jun 18, 2003 at 01:49 UTC

    Hmm... How do these semantics work for people: if the "show spoilers with formatting" setting is set, the spoiler tag is rendered as a table with black background, black text, and class="spoiler" (the former two with legacy HTML attributes, the last so it can be overruled with CSS). If it is unchecked, they render like readmores, but with a twist: they're only visable when the ;spoiled=(true value) attribute is given (with links written to do that, of course).

    For those who wondered: Yes, I'm volunteering. Of course, the gods have final say.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      You wouldn't be addressing my statement at all. You'd have changed nothing. Any attempted solutions using formatting have no impact on this issue. That includes table colors, css classes or any other attribute you can think of. When I said the only way to get the spoiler effect would be to put it in an HTML comment I was serious.

        Uh, keep reading. You missed the "if the setting is unset" section. That /will/ work for browersers that don't follow presentation attributes, of HTML or CSS varieties. In that case, the text isn't just a comment, it's simply not there -- you have to follow the link.

        If you want the XML view to transform the node text from what the author wrote into a comment, then your wishes are broken, OTOH. It's the responsiblity of the client to render the node text into whatever form it wants in the XML case.

        I'm really not clear on what it is you want the spoiler tag to do, I guess.


        Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: RFC: Spoiler tags
by Nkuvu (Priest) on Jun 17, 2003 at 22:25 UTC

    Hmm, could be CSS. A spoiler class could have an attribute with font and background color the same, until the mouse hovers over it, in which case it could change to default colors -- or the default paragraph style. So user-defined CSS styles would be applied for spoiler text with the mouse over it. Just a thought.

      I thought of CSS - but that's still just using formatting, and will not work for everyone. Hmm.. maybe there could be a user setting that turns SPOILER into HTML comments as diotalevi had suggested I do - so that the majority surfing with a regular graphical browser can conveniently reveal the text by selecting it, and those using more "exotical" means have it concealed before the view the source. That would probably cover all bases.

      Makeshifts last the longest.

Re: RFC: Spoiler tags
by Theo (Priest) on Jun 17, 2003 at 22:22 UTC
    At first I didn't have any idea what you meant by <spoiler>. After re-reading it several times, I'm wondering if using the readmore tag wouldn't do the same thing as a <spoiler> tag.

    -ted-

      No, not quite. SPOILER should conceal text even when you're looking directly at the node in question - unlike READMORE which reveals the text at that point. You are right that for someone reading the front page or the section pages, or seeing a note in the context of a different node, READMORE does that job. However for those of us using Newest Nodes (or its ticker, in some form), that isn't very helpful, as you will then routinely be looking at nodes (and not only root nodes) directly.

      Makeshifts last the longest.

Re: RFC: Spoiler tags
by diotalevi (Canon) on Jun 18, 2003 at 15:05 UTC

    Just as an FYI for those that wonder. I use Mozilla on Windows most of the time. A few months back I was having some eye issues and had to adapt the look and feel of my software to be high contrast at a larger size. I settled on black backgrounds with white text. I left the formatting override in place when I found it makes more of the internet's crappy web developer's pages look decent. So as is my entire internet "experience" looks mostly like the "Dark" theme here except without all the neon. It is pleasant on my (now better) eyes and I never get assaulted with weird formatting, ever.

    Here's my local CSS file that overrides everything. It turns out that complying with this sort of thing also makes the site friendlier to other sight impaired people. So... if you want to be nice to people who can't see right, make sure your markup works when passed through this.

    * { color: white !important; background-color: black !important; FONT-FAMILY: sans-serif; FONT-SIZE: 13px; FONT-WEIGHT: normal; } a { text-decoration: underline; } a:link { background-color: #000; } a:visited { background-color: #131; text-decoration: strikethrough; } form { display: inline; } textarea { width: 100%; height: 25em; } pre { font-family: monospace; } tt * { font-family: monospace; color: green; }
(jeffa) Re: RFC: Spoiler tags
by jeffa (Bishop) on Jun 18, 2003 at 14:39 UTC
    There is a work around, but put the emphasis on work. I have used this before in the past ... what you do is put HTML comments around the code tags, and make a link to your post. Of course, you have to post first to find out what node number your post will be. Here is an example: SPOILER

    and here is the text that made that possible:

    <!--
    <code>
    secret message here
    </code>
    -->
    <a href="/?node_id=266841&displaytype=displaycode">SPOILER</a>
    
    I like the idea of a spoiler tag ... maybe instead of investigating CSS solutions, we should create a new displaytype. That way a new page is loaded, user setting colors won't matter.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      It is long after the fact, and this is nowadays a very nice and viable solution to circumvent the problem of spoiler content, because we now have a "d/l code" link next to the "reply" link on replies. I came back across this thread of mine more or less accidentally but wanted to leave a remark here for the record and for the benefit of future readers to note that that feature didn't exist back when I started this thread.

      Makeshifts last the longest.