Page 1 of 2

SPOILER bbcode... SMF forum type

Posted: Mon Jun 16, 2008 9:47 am
by vellatechie
http://www.nextgenblog.com/

click on show under GT video... i have seen similar bbcode in smf but it had show/hide buttons instead of text... its better than just marking entire text black

can we have that type of spoiler mod in phpbb 3??

Re: SPOILER bbcode... SMF forum type

Posted: Mon Jun 16, 2008 5:35 pm
by tommekemc
I use this code:

Code: Select all

[spoiler]{TEXT}[/spoiler]

Code: Select all

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';        this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
show on posting page needs to be ticked on :p

Re: SPOILER bbcode... SMF forum type

Posted: Wed Jun 18, 2008 7:15 pm
by vellatechie
thanks a tonnnn :mrgreen:

Re: SPOILER bbcode... SMF forum type

Posted: Sun Jun 29, 2008 1:28 pm
by Seiryuu
Amazing work, works perfectly with my forum right away. Thanks for this. :D

Re: SPOILER bbcode... SMF forum type

Posted: Mon Jun 30, 2008 5:25 am
by Mahogany Rush
I miss the SPOIL tag which is different than this one. The SPOIL tag hid the video or pix with a little box that needed to be clicked on which allowed pages to load faster.

I can't find that one for phpbb3.01

Thanx

Re: SPOILER bbcode... SMF forum type

Posted: Mon Jun 30, 2008 7:23 am
by tommekemc
so you mean: only load the contents if clicked?

Re: SPOILER bbcode... SMF forum type

Posted: Mon Jun 30, 2008 4:24 pm
by opalelement
I am working on a custom hide bbcode for someone here: viewtopic.php?f=72&t=1039235

Its different but allows more customization.

Re: SPOILER bbcode... SMF forum type

Posted: Wed Oct 14, 2009 4:38 pm
by Ac1ds0ld13r
I knew there had to be BBCode for this!

Thanks for putting it together. I <3 when my boards look clean.

Re: SPOILER bbcode... SMF forum type

Posted: Thu Oct 15, 2009 2:46 pm
by Dragosvr92
i need this also
but when i click the spoiler it dos not show up the text

Re: SPOILER bbcode... SMF forum type

Posted: Sat Jan 30, 2010 3:23 am
by Ac1ds0ld13r
Double check you got the code copied correctly (assuming you havent figured it out by now). I didnt have any issues with it.

Re: SPOILER bbcode... SMF forum type

Posted: Sat Jan 30, 2010 12:22 pm
by Dragosvr92
Ac1ds0ld13r would you look when was that posted ;)

Re: SPOILER bbcode... SMF forum type

Posted: Thu Sep 19, 2013 11:38 am
by Ghislain
tommekemc does that code go in the HTML replacement box?

I have put this into my BBcode and it submitted ok.

The result I'm getting is:
here is some text [spoiler]and this is the spoiler text[/spoiler]
Is there something I'm missing?

Re: SPOILER bbcode... SMF forum type

Posted: Thu Sep 19, 2013 2:18 pm
by Lumpy Burgertushie
Ghislain wrote:tommekemc does that code go in the HTML replacement box?

I have put this into my BBcode and it submitted ok.

The result I'm getting is:
here is some text [spoiler]and this is the spoiler text[/spoiler]
Is there something I'm missing?
instead of bringing up such an old post that may or may not even be relevant any more, please start a new one and describe your problem in detail. we need to know exactly what you have for bbcode, html replacement etc.
and exactly what you expect to happen when using this bbcode.

robert

Re: SPOILER bbcode... SMF forum type

Posted: Thu Sep 19, 2013 4:21 pm
by Ghislain
Robert

I posted here because I used the code in tommekemc's post above, but it didnt work for me.

I placed it in the BBcode section of the ACP/Posting/add a new BBcode in the "HTML replacement" box.

Code: Select all

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';        this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
I placed [spoiler]{text}[/spoiler] in the "BBcode usage" box

and the result I got from entering the text, "here is some text [spoiler]and this is the spoiler text[/spoiler]",
was:
here is some text [spoiler]and this is the spoiler text[/spoiler]
I'm using phpBB3, and what I wanted to happen was a button to appear which would reveal or hide the text between [spoiler] and [/spoiler]

Thanks

Ghislain

P.S. should I still start a new post...and if so what would be a good heading?

Re: SPOILER bbcode... SMF forum type

Posted: Thu Sep 19, 2013 4:23 pm
by Brf
Ghislain wrote: I placed [spoiler]{text}[/spoiler] in the "BBcode usage" box

Try

Code: Select all

[spoiler]{TEXT}[/spoiler]