[RFC|Accepted] Updated BBcode engine

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC|Accepted] Updated BBcode engine

Post by callumacrae »

They're not advantages, they're just differences.
Made by developers, for developers!
My blog

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by brunoais »

More flexibility is an advantage, per-se.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by imkingdavid »

callumacrae wrote:
brunoais wrote:Why mine is better:
  • Mine supports parameterized BBcodes. It is already prepared to allow a quote tag like this. jBBCode supports only as much as phpBB currently supports. A single parameter or no parameter.
  • Mine is faster even if I'm not using it in it's most optimized way.
  • Mine is prepared for stuff like (the extra spaces are for this forum not to parse it): [ name=abc]def]ghi[/ name] You just need to use the other option of making it: [ name="abc]def"]ghi[/ name] you can also use [ name="\"abc\"]def"]ghi[/ name] without any problems (it creates <tagname att="\"abc\"]def">ghi</tagname> . With jBBCode with this [ name=abc]def]ghi[/ name] you are stuck to <tagname att="abc">def]ghi</tagname>
I don't see how any of them are important
Why would extensibility, speed, and intelligent/correct parsing of tags not be important?
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by brunoais »

Meanwhile, I already found another bug that exists in nbbc, jbbcode and in this BBCode parser (it was already known that existed in this parser, anyway). Which is this:
  • This text should not exist.
  • This text can exist
As you can see "This text should not exist." appears as a child of <ul>. I'm solving that in my parser.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by imkingdavid »

Actually, I have used that as a way to indent, and I'm sure others have done likewise. IMO it should remain for consistency; otherwise people could "lose" parts of their posts.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC|Accepted] Updated BBcode engine

Post by EXreaction »

That could only happen if they upgrade and someone edits the post after the upgrade.

Allowing hacks to format text because of a bug in the parser that existed shouldn't be allowed IMO.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by imkingdavid »

EXreaction wrote:That could only happen if they upgrade and someone edits the post after the upgrade.

Allowing hacks to format text because of a bug in the parser that existed shouldn't be allowed IMO.
Well, we should at least prep the Support team for support requests about parts of a post not being displayed anymore.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by JoshyPHP »

By the way, are there any existing tests for the current engine? All I see is one test in tests/bbcode/parser_test.php and a few cases in tests/bbcode/url_bbcode_test.php. I've looked into master and develop.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by imkingdavid »

JoshyPHP wrote:By the way, are there any existing tests for the current engine? All I see is one test in tests/bbcode/parser_test.php and a few cases in tests/bbcode/url_bbcode_test.php. I've looked into master and develop.
What you see is what you get; at the moment, that's all I'm aware of.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC|Accepted] Updated BBcode engine

Post by JoshyPHP »

Ok, thanks. It would be nice if someone was able to compile a list of desirable characteristics, if not specs, for the current engine or future solution. It would be even better to sort them out as "essentials" (e.g. "needs to allow custom BBCodes"), "nice-to-haves", and perhaps even features that could be phased out such as per-style custom BBCode templates.

Perhaps the fine people over at the 3.0.x Support Forum could chime in with the most common grievance about phpBB's BBCodes, or about the whole text formatting for that matter? MOD authors such as the authors of Advanced BBCode Box 3 may have some valuable input as well.

Post Reply