Can't make the "Spoiler=" bbcode anymore

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
cholo981
Registered User
Posts: 62
Joined: Mon Nov 10, 2014 9:40 am

Can't make the "Spoiler=" bbcode anymore

Post by cholo981 »

I have two spoiler custom bbcode:

Code: Select all

[spoiler]{TEXT}[/spoiler]
[spoiler={TEXT1}]{TEXT2}[/spoiler]
The first one works as an inline spoiler tag and become:

Code: Select all

<span class="spoiler"> {TEXT}</span>
The second is meant to be used when you want to specify what the spoiler is related to.
The second is supposed to be trasformed like this:

Code: Select all

<div class="spoiler"><small> {TEXT1}</small>{TEXT2}</div>
This was working fine before the 3.2 update. Now the second one doesn't work anymore. Both get transformed to:

Code: Select all

<span class="spoiler"> {TEXT}</span> 
User avatar
cholo981
Registered User
Posts: 62
Joined: Mon Nov 10, 2014 9:40 am

Re: Can't make the "Spoiler=" bbcode anymore

Post by cholo981 »

May I have at least an explanation why I can never get an answer in this forum?
Looks like I'm the only one in a couple of pages...
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Can't make the "Spoiler=" bbcode anymore

Post by david63 »

cholo981 wrote: Wed Mar 29, 2017 8:36 pm May I have at least an explanation why I can never get an answer in this forum?
Possibly because none of the volunteers that may know the answer have visited this forum in the last three hours.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2348
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Can't make the "Spoiler=" bbcode anymore

Post by P_I »

Search turned up viewtopic.php?f=556&t=2400941 which seems similar to your issue.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
cholo981
Registered User
Posts: 62
Joined: Mon Nov 10, 2014 9:40 am

Re: Can't make the "Spoiler=" bbcode anymore

Post by cholo981 »

david63 wrote: Wed Mar 29, 2017 8:46 pm Possibly because none of the volunteers that may know the answer have visited this forum in the last three hours.
Try 2 months:
viewtopic.php?f=466&t=2408556&p=14652636#p14652636
"I don't know" would be a perfectly accepted answer btw.

P_I wrote: Wed Mar 29, 2017 8:47 pm Search turned up viewtopic.php?f=556&t=2400941 which seems similar to your issue.
It's not... a completely different problem. The only thing in common it's the bbcode tag.
User avatar
Anișor
Translator
Posts: 273
Joined: Tue Jan 08, 2013 9:36 pm
Location: Arbroath, Angus, Scotland
Contact:

Re: Can't make the "Spoiler=" bbcode anymore

Post by Anișor »

Works fine for me.
http://prntscr.com/eq3393

Try to delete the BB code and add it again maybe?
Formerly known as Neculai Anisor
Discord: Criminus#1996
User avatar
JoshyPHP
Code Contributor
Posts: 1288
Joined: Mon Jul 11, 2011 12:28 am

Re: Can't make the "Spoiler=" bbcode anymore

Post by JoshyPHP »

cholo981 wrote: Wed Mar 29, 2017 9:03 pm "I don't know" would be a perfectly accepted answer btw.
That's the default state. If no one replies it means either that nobody knows or nobody can handle it.

As for the issue at hand, I do know but the best I can offer at the moment are pointers to a related discussion: http://area51.phpbb.com/phpBB/viewtopic ... 06#p298506 and http://area51.phpbb.com/phpBB/viewtopic ... 31#p298531

You need to replace those two BBCodes with one BBCode that handles both cases. You'll end up with something like that:

Code: Select all

[spoiler={TEXT1;optional}]{TEXT2}[/ref]

Code: Select all

<xsl:choose>
	<xsl:when test="@*">
		<span>{TEXT1}: {TEXT2}</span>
	</xsl:when>
	<xsl:otherwise>
		<span>{TEXT2}</span>
	</xsl:otherwise>
</xsl:choose>
I wrote the library that handles markup in phpBB 3.2+.
User avatar
RiTz21
Registered User
Posts: 213
Joined: Tue May 31, 2005 5:20 pm

Re: Can't make the "Spoiler=" bbcode anymore

Post by RiTz21 »

cholo981 wrote: Wed Mar 29, 2017 5:38 pm ...This was working fine before the 3.2 update. Now the second one doesn't work anymore. Both get transformed to...
FYI:
I had the exact same issue with my dual-[Spoiler] tags... and found the solution here by installing that extension. Problem solved!!

RiTz21
Post Reply

Return to “[3.2.x] Support Forum”