1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add-on Reddit-esque Spoiler Tagging

Discussion in 'Resource and Add-on Requests' started by JABRONI, Mar 11, 2013.


    JABRONI Well-Known Member

    I'm looking to get an add-on that allows for spoilering like the site, Reddit.com uses. Willing to pay. Being able to spoiler the titles of threads would be the biggest part I'd need. Here is an example of what I need,

    Screen Shot 2013-03-11 at 10.05.33 AM.png

    Screen Shot 2013-03-11 at 10.05.57 AM.png
  2. cclaerhout

    cclaerhout Well-Known Member

    Why not use a spoiler Bb Code?

    JABRONI Well-Known Member

    I run a wrestling site & using the regular big spoiler code isn't practical when writing in paragraphs. We just need to spoiler out small tidbits like the name of the winner or anything like that.

    Being able to spoiler the titles of threads would be the biggest part I'd need.


    Last night at TNA's big pay-per-view, Lockdown, we saw
    win his match against
    & we had one of the biggest reveals in the history of the company. The outcome of that match really sets the tone for TNA going forward. I think a lot of people saw it coming, but were still surprised. I, personally, was very surprised at the amount of beer bottles & cans thrown into the ring after the reveal. It was an absolutely incredible moment for TNA, and for the fans that have been supporting TNA in the past year.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    A quick workaround would be to colour the text the same as the background - members can do this manually or you could create a BB Code tag to do it.

    Of course, if you have more than one style with different background colours that won't work.

    Although if you use an @style_property in the BB Code tag it might - I haven't tested whether that would work.
  5. cclaerhout

    cclaerhout Well-Known Member

    No it will, your solution is the good one. Jabroni just needs a basic spoiler bbcode wrapped inside a span tag to avoid line breaks and use the xen property @contentBackground both on the background & on the text color on the normal state, then on the hover state, use the @contentText property on the text.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    I had a similar BB Code in the past but I also used characters so members were aware there was hidden text - like so: > hidden text <

    JABRONI Well-Known Member

    This will work on thread titles also?
  8. Brogan

    Brogan XenForo Moderator Staff Member

    BB Code doesn't work on thread titles.

    JABRONI Well-Known Member

    You wouldn't happen to have that code on file would you? :love:
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Unfortunately not, I deleted it a long time ago but it would be fairly easy to create one using BBCM.
  11. cclaerhout

    cclaerhout Well-Known Member

    I'm not going to create an addon for this, so here are the steps to create what you need:

    1) create a template called bbcode_mini_spoiler
    Copy this code in it:
    <xen:require css="bbcode_mini_spoiler.css" />
    <span class="bb_mini_spoiler">{xen:raw $content}</span>

    2) create a template called bbcode_mini_spoiler.css
    Copy this code in it:
        border:1px dotted @contentText;
        background-color: @contentBackground;
        color: @contentBackground;
        cursor: pointer;

    3) Create a Custom Bb Code with the Bbcm (use this version to be able to use templates)
    First page
    Title: Mini spoiler
    Description:This is a mini spoiler
    Example: The killer is [minispoiler]Jason[/minispoiler]

    Second page (parser methods)
    Template Method: enable
    Template Name:bbcode_mini_spoiler

    It's done.

    Attached Files:

  12. Qwest

    Qwest Member

    Followed this to the letter.

    Text still shows up as The killer is [minispoiler]Jason[/minispoiler]
  13. cclaerhout

    cclaerhout Well-Known Member

    Can you show me a capture of your tag configuration and please continue this topic here where I'm allowed to edit & update my posts freely.
  14. Qwest

    Qwest Member

    Hi thanks, never mind. I hadn't changed the BBM folder name so BBCode listening was disabled.

    It's working great now.

Share This Page