4 issues with bbcodes

Get help developing custom BBCodes or request one.
Post Reply
Zanzazaar
Registered User
Posts: 57
Joined: Fri Jan 15, 2016 2:14 pm

4 issues with bbcodes

Post by Zanzazaar »

So, I found 4 issues with bbcodes on phpbb3.2.2. Because of that I changed the title of this topic. If there is no workaround for them should I tell about them somebody from phpbb team or nobody give a 'you know what' about this?

First issue: BBcode with html 'code' does not parse bbcode that user put inside even if they are used outside html 'code'

Code: Select all

[test]{TEXT}[/test]

Code: Select all

<div style="border: 5px solid red;">{TEXT}</div>
<div style="border: 5px solid red;"><code>{TEXT}</code></div>
I tried 'span' in place of 'div, I tried exact the same html like for normal bbcode 'code', but it does not parse anything event in div that does not contain html 'code'. In phpbb3.1.x and phpbb3.2.x there was other problem, but not like that.

Second issue: User cannot create bbcode in to variants like 'test' and 'test='

Code: Select all

[test]{TEXT}[/test]

Code: Select all

[test='{TEXT2}']{TEXT}[/test]
That was possible for previous version of phpbb3; now both bbcodes would have the same name. This is a feature or some bug? If this is a feature how to add both varians for one bbcode?
Also, even if user create bbcode like 'test=', durign posting bbcode button put only 'test'.

Third issue: When user create bbcode with multiple tokens, other bbcodes cannot be parsed in this custom bbcode.
BBcodes like that:

Code: Select all

[test]{TEXT}[sometext]{TEXT2}[/test]
or that:

Code: Select all

[test]{TEXT}&{TEXT2}[/test]
with html like that:

Code: Select all

<div style="border: 5px solid red;">{TEXT}</div>
<div style="border: 5px solid red;">{TEXT2}</div>
Does not parse bbcodes for text that is typed as a TEXT or TEXT2. Something like that:

Code: Select all

[test]Zz[b]z[/b]zz[sometext]Yy[b]y[/b][/test]
BBcode like

Code: Select all

[test={TEXT}]{TEXT2}[/test]
Will parse bbcodes but only in TEXT2.

Fourth issue: If admin create bbcode with multiple TOKENS user needs to type something in place of every token or bbcode wont be parsed.
BBcodes like that:

Code: Select all

[test]{TEXT}[sometext]{TEXT2}[/test]
or that:

Code: Select all

[test]{TEXT}&{TEXT2}[/test]
with html like that:

Code: Select all

<div style="border: 5px solid red;">{TEXT}</div>
Those need text in every token or entire bbcode wont be parsed. 
This wont happen if there is only one token or when user create bbcode like:
[code][test={TEXT}]{TEXT2}[/test]



So, First and third issues are important for me. Third is critical, without this I need to back to phpbb3.1.
Last edited by Zanzazaar on Fri Mar 30, 2018 6:14 pm, edited 3 times in total.
User avatar
cprgolds
Registered User
Posts: 459
Joined: Thu Oct 11, 2007 5:49 am
Location: Portland, Oregon

Re: My own bbcode code

Post by cprgolds »

Why are you using a division?

For your first example, this works fine:

Code: Select all

<span style="border: 5px solid red;">{TEXT}</span>
I don't have time to check into the second example right now, but you might work on it based on this snippet.
Zanzazaar
Registered User
Posts: 57
Joined: Fri Jan 15, 2016 2:14 pm

Re: My own bbcode code

Post by Zanzazaar »

Thanks, but sadly it still does not work.Weird thing somebody move topic to 3.1.x version, but on 3.1.x there was other problem that everywhere bbcodes were parsed, even in code ;)


EDIT: There is little problem, as I see now even if I dont use html code it does not parse other bbcodes in my bbcodes for "divs". Is this normal? Is phpbb3.2.x working? Without that entire forum is useless for me...

Also, another problem. If I use

Code: Select all

[test2]{TEXT}[x]{TEXT2}[/test2]
It also does not parse inside bbcodes. In previous versions of phpbb (phpbb3.1.x) there was no problem with that. What is a change in current version? They no longer allow to do two version of bbcode (like 'list' and 'list=') because it does not read = in the bbcode name, and that is problematic enought, but all of this...
Is phpbb3.2 worth it? Or should I back to 3.1?
Zanzazaar
Registered User
Posts: 57
Joined: Fri Jan 15, 2016 2:14 pm

Re: 4 issues with bbcodes

Post by Zanzazaar »

I'm sorry for a double post, but I update this topic for another issues that I checked today. I have a hope that even if I will be forced to back to phpbb3.1 that topic will inform somebody about problems with current phpbb3.2 version :)
User avatar
JoshyPHP
Code Contributor
Posts: 1281
Joined: Mon Jul 11, 2011 12:28 am

Re: 4 issues with bbcodes

Post by JoshyPHP »

You can't really have text interpreted both as markup and as plain text at the same time. You can use something like the following but it's more reliable to use one BBCode for normal text and another for code.

Code: Select all

[xxx code={TEXT1;useContent}]{TEXT2}[/xxx]

Code: Select all

<div style="border: 5px solid red;">{TEXT2}</div>
<pre style="border: 5px solid red;"><code>{TEXT1}</code></pre>
I wrote the library that handles markup in phpBB 3.2+.
Zanzazaar
Registered User
Posts: 57
Joined: Fri Jan 15, 2016 2:14 pm

Re: 4 issues with bbcodes

Post by Zanzazaar »

Well I can. Or it was possible before 3.2.x.
There is no problem to use {TEXT} in html in two places, I have done things like that before for other people. I need exact the same value in both, div and code. div to let people see content and code to copy that content. One Value in div and other in code, this is kind of useless. This would force me to write the same value of TEXT two times. This is the same like using one bbcode to div and another, normal bbcode 'code'.

But what about

Code: Select all

[test]{TEXT}[sometext]{TEXT2}[/test]
Is this possible in some way to still create bbcodes like that (any extension that would make this possible or something)? I need to know that, if not I will back to phpbb3.1 after this weekend :)
User avatar
Mick
Support Team Member
Support Team Member
Posts: 24094
Joined: Fri Aug 29, 2008 9:49 am
Contact:

Re: My own bbcode code

Post by Mick »

Zanzazaar wrote: Fri Mar 30, 2018 1:16 pmsomebody move topic to 3.1.x version
This isn’t specifically for 3.1 it’s universal for BBCode development, unfortunately this is where it lives ATM.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
JoshyPHP
Code Contributor
Posts: 1281
Joined: Mon Jul 11, 2011 12:28 am

Re: My own bbcode code

Post by JoshyPHP »

Zanzazaar wrote: Fri Mar 30, 2018 11:45 pm Is this possible in some way to still create bbcodes like that
I don't know what you mean so I'll err on the side of caution and say no, it's probably not possible to do what you want to do the way you want to do it. Have you tried the BBCode I posted above?
Mick wrote: Sat Mar 31, 2018 7:55 am This isn’t specifically for 3.1 it’s universal for BBCode development, unfortunately this is where it lives ATM.
Is there a reason for that? Why not create a forum in the 3.2 section?
I wrote the library that handles markup in phpBB 3.2+.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 24094
Joined: Fri Aug 29, 2008 9:49 am
Contact:

Re: 4 issues with bbcodes

Post by Mick »

JoshyPHP wrote: Sat Mar 31, 2018 11:46 pmIs there a reason for that? Why not create a forum in the 3.2 section?
I made a request yesterday.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Zanzazaar
Registered User
Posts: 57
Joined: Fri Jan 15, 2016 2:14 pm

Re: My own bbcode code

Post by Zanzazaar »

JoshyPHP wrote: Sat Mar 31, 2018 11:46 pm
Zanzazaar wrote: Fri Mar 30, 2018 11:45 pm Is this possible in some way to still create bbcodes like that
I don't know what you mean so I'll err on the side of caution and say no, it's probably not possible to do what you want to do the way you want to do it. Have you tried the BBCode I posted above?
Mick wrote: Sat Mar 31, 2018 7:55 am This isn’t specifically for 3.1 it’s universal for BBCode development, unfortunately this is where it lives ATM.
Is there a reason for that? Why not create a forum in the 3.2 section?
Because 3.2 does not allow me to create bbcodes like that:

Code: Select all

|[cecha]{TEXT}[nazwa]{TEXT1}[/nazwa]{TEXT}[rodzaj]{TEXT2}[/rodzaj]{TEXT}[typ]{TEXT3}[/typ]{TEXT}[opis]{TEXT5}[/opis]{TEXT}[koszt]{TEXT6}[/koszt]{TEXT}[wymagania]{TEXT4}[/wymagania]{TEXT}[/cecha]{TEXT7}|
And i every token I need to use other bbcodes that I need to be parsed. And this is the easy one, I also used more complecated bbcodes. Your bbcode allow me to use only two tokens and only one will parse inside bbcodes. Older versions of phpbb3 allow me to do that, so phpbb3.2.x is a downgrade for me if this is not possible ;)

As for now I just need to know if it is a bug and if there is a chance to repair that soon, if on any of this questions answer is 'no' I need older versions of script.
User avatar
JoshyPHP
Code Contributor
Posts: 1281
Joined: Mon Jul 11, 2011 12:28 am

Re: 4 issues with bbcodes

Post by JoshyPHP »

No, I don't think something like that will ever be supported as a single BBCode.
I wrote the library that handles markup in phpBB 3.2+.
Zanzazaar
Registered User
Posts: 57
Joined: Fri Jan 15, 2016 2:14 pm

Re: 4 issues with bbcodes

Post by Zanzazaar »

Well it WAS supported as a single bbcode. Im still using it on older phpbb3. Older versions of phpbb3 allow me to do miracles with bbcodes, automatic character sheets for rpg games. Now making it with two tokens is impossible if I wanna format text with bbcodes in both tokens. Its something that I cannot understand, as for now only thing better on phpbb3.2 is few extensions. I was thinking about keeping my forum with current versions of phpbb3, so it isn't my laziness, just bbcodes on older version are better :)

It would be possible for me to create stadard bbcodes if I could do something with first issue from this topic. That would allow me to make the same thing with few bbcodes instead of one.
Post Reply

Return to “Custom BBCode Development and Requests”