Problem with a BBcode

Get help developing custom BBCodes or request one.
Post Reply
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Problem with a BBcode

Post by zorni » Mon Jun 26, 2017 7:30 am

Hi,

in our current, running board (3.0.12) we're using 2 custom BBcodes for hiding some special informations.

Let's call it MI.

We're upgrading the forum to 3.2 soonish, but one of the left problems ist that BBcode.

We're using 2 versions of this BBcode:

Code: Select all

[MI]{TEXT}[/MI]

Code: Select all

<span style="color:red;">MI:</span> <span style="color:#F6EFE2;">{TEXT}</span>
and

Code: Select all

[MI={TEXT2}]{TEXT1}[/MI]

Code: Select all

<span style="color:red;">MI for: "{TEXT2}":</span> <span style="color:#F6EFE2;">{TEXT1}</span>
The problem is, in 3.2 they're both pictured identical without that TEXT2 identifier. What's wrong with that code?

https://imgur.com/a/eQCwO

Thanks for your support!

zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Problem with a BBcode

Post by zorni » Mon Jun 26, 2017 11:13 am

It's a 3.2 problem ... with the older versions it works fine. So pls re-move it to the 3.2 support forum :)

User avatar
Toxyy
Registered User
Posts: 594
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Problem with a BBcode

Post by Toxyy » Mon Jun 26, 2017 4:00 pm

How are you adding the TEXT2 variable to the board?
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][RC] Show User Activity

User avatar
JoshyPHP
Code Contributor
Posts: 972
Joined: Mon Jul 11, 2011 12:28 am

Re: Problem with a BBcode

Post by JoshyPHP » Mon Jun 26, 2017 4:21 pm

It's a known issue with multiple BBCode definitions for the same name. There's a ticket describing it but I can't find it atm.

You'd need to remove the second definition and replace the first one with this, preferably before upgrading:

Code: Select all

[MI for={TEXT2;optional}]{TEXT1}[/MI]

Code: Select all

<span style="color:red;">MI<xsl:if test="@for"> for: "{TEXT2}"</xsl:if>:</span> <span style="color:#F6EFE2;">{TEXT1}</span>
I wrote the thing that does BBCodes in 3.2.

zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Problem with a BBcode

Post by zorni » Tue Jun 27, 2017 6:48 am

Thanks Joshy!

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 6 guests