Announcement

Collapse
No announcement yet.

Spoiler BBCode

Collapse
This is a sticky topic.
X
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.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          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

          #21
          Wonderful, added this !

          Comment


            #22
            SPOILERTestspoiler

            Comment


              #23
              Very good modification. Thank you!

              Comment


                #24
                Hi, I'm using vB 4.2.5

                This works perfectly, however when there is no text above or below it.. it displays it as such:

                Click image for larger version  Name:	2d5bec8c40.png Views:	0 Size:	1.5 KB ID:	21799

                Then if I add any text all at above the spoiler tags

                Click image for larger version

Name:	a74ba734c0.png
Views:	128
Size:	1.7 KB
ID:	21800

                Same applies to the bottom, so basically it works fine as long as there is text both above and below the tags

                Any ideas on how to fix that?

                Comment


                  #25
                  it works perfectly, thank you.
                  in attachment, an image I use as icon in editor.
                  Attached Files

                  Comment


                    #26
                    Thanks a lot for this BBCode

                    Comment


                      #27
                      Thanks, it's useful.

                      Comment

                      Users Viewing This Page

                      Collapse

                      There is 1 user viewing this forum topic.

                      • Guest Guest

                      Latest Posts

                      Collapse

                      Working...
                      X
                      Searching...Please wait.
                      An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                      Please push the back button and reload the previous window.'
                      An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                      Please push the back button and reload the previous window.'
                      An internal error has occurred and the module cannot be displayed.
                      There are no results that meet this criteria.
                      Search Result for "|||"