Announcement

Collapse
No announcement yet.

Spoiler BBCode

Collapse
X
Collapse
First Prev Next Last
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    loading to test

    Comment


      #17
      it's great and work

      Comment


        #18
        Thank you for this Cup of coffee headed your way!

        Comment


        • glennrocksvb
          glennrocksvb commented
          Editing a comment
          Thank you very much!

        #19
        I spent several hours tinkering with a spoiler tag code last night, I'm not using yours currently but I'm curious to know how difficult it is to add the ability to change the text on the spoiler tag to a user-defined text?

        [spoiler=example]spoiler here[/spoiler]

        Would yield the word "spoiler" on the tag being replaced with "example" instead.

        I've tried messing around with {param} and {option} but can't seem to get it functioning. x.x

        -edit-

        Just to be clear about the use for it and why I'd like to be able to do this. Other than hiding spoilers, we use an expandable/collapsable spoiler tag to condense longer posts and large images as well. It would be useful to name the spoiler tag with a brief description of the contents as opposed to having to type it out below it. I was on another website about 5 years ago that had this option, and it was pretty great.

        Comment


          #20
          Do you want something like thisthat does exactly this kind of Spoiler BBCode? If so, here is the codeyou just have to replace "SPOILER" with {option} in the original replacement code in the first post and enable "Use {option}" setting. See the code below.
          HTML Code:
          <span style="cursor:pointer; border:1px solid red;padding:2px; color:red" onclick="this.nextSibling.style.display='';this.style.display='none'" title="Click to show content">{option}</span><span style="display:none; cursor:pointer; border:1px dotted #000; padding:2px" onclick="this.previousSibling.style.display='';this.style.display='none'" title="Click to hide content">{param}</span>
          Read this important noteNote: If user doesn't provide the {option} text in the spoiler BBCode tag, then the spoiler will not be displayed and there is nothing to click to show it.
          Last edited by glennrocksvb; 08-28-2018, 07:52 AM.

          Comment


          • jkotlowski
            jkotlowski commented
            Editing a comment
            Dang, it was that easy. I was severely overcomplicating it! Thanks much Glenn. ^_^

          • glennrocksvb
            glennrocksvb commented
            Editing a comment
            Glad to help
        Working...
        X