Add-on Reddit-esque Spoiler Tagging

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.webp

Screen Shot 2013-03-11 at 10.05.57 AM.webp
 
Why not use a spoiler Bb Code?

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.

i.e

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.
 
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.
 
Of course, if you have more than one style with different background colours that won't work.

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.
 
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 <
 
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.

This will work on thread titles also?
 
Unfortunately not, I deleted it a long time ago but it would be fairly easy to create one using BBCM.
 
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:
Code:
<xen:require css="bbcode_mini_spoiler.css" />
 
<span class="bb_mini_spoiler">{xen:raw $content}</span>
Save

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

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
Tag:minispoiler
Example: The killer is [minispoiler]Jason[/minispoiler]

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

It's done.
 

Attachments

  • present.webp
    present.webp
    20.1 KB · Views: 46
Hi thanks, never mind. I hadn't changed the BBM folder name so BBCode listening was disabled.

It's working great now.
 
Back
Top Bottom