bbPress

Simple, fast, elegant

bbPress Plugin Browser »

Spoiler Tags (0.4)

How can I change the colors?

Straight CSS, baby!

.spoiler
{
        background: #000000;
        color: #000000;
}

How can I integrate with QuickTags

Quick Tags are those neat-o buttons that let users click to add HTML.

In commentQT4_bbpress.php

Find:

    edButtons.push(
        new edButton(
            'ed_img'
            ,'IMG'
            ,''
            ,''
            ,'m'
            ,-1
        )
    );

Add below:

// Added for spoiler tags
    edButtons.push(
        new edButton(
            'ed_spoiler'
            ,'SPOILER'
            ,'<spoiler>'
            ,'</spoiler>'
            ,'s'
        )
    );

In js_quicktags.js

Find:

        new edButton(
            'ed_img'
            ,'IMG'
            ,''
            ,''
            ,'m'
            ,-1
        )
    ); // special case

Add below:

        new edButton(
            'ed_spoiler'
            ,'SPOILER'
            ,'<spoiler>'
            ,'</spoiler>'
            ,'s'
        )
    );

How do I integrate with bbCode Buttons?

BBcode Buttons are the buttons for BBcode (rather than HTML, glad you followed me there).

In BBcode-buttons.php

Find: BBcodeButtons.push(new BBcodeButton('ed_li','LI','[]','[/]','l','','list item'));";

Add below: BBcodeButtons.push(new BBcodeButton('ed_spoiler','SPOILER','[spoiler]','[/spoiler]','r','','spoiler'));";

In BBcode-buttons.js

There's probably some change here, but I'm not sure what as I don't use BBCode.

Code is Poetry.