Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2009-09-10 16:53:24

Koos
Member
Registered: 2008-05-09
Posts: 71
Website

fluxbb 1.4 bbcode and new parser

1. Creating lists

Why deviate from the norm?

In fluxbb 1.4 to create lists:

[list=*]
[*]Example list item 1.[/*]
[*]Example list item 2.[/*]
[*]Example list item 3.[/*]
[/list]

in most other forum software:

[list]
[*]List Item #1
[*]List Item #2
[*]List Item #3
[/list]

Also, please rather make use of solid bullets as used in most other forum software. Currently they look like this:
2povdxu.jpg

This would look much better:

v8h1c0.png

And do we really need [.list=a] and [.list=1]  lists? fluxbb 1.4 is supposed to include only the essential features.

2. The need to close tags

It's really irritating when you want to mention a bbcode tag in your post (e.g. blah blah blah [.img] and get a warning that the tag was not closed. That's why I had to include a dot in the above mentioned list tags([.list=a] and [.list=1]). I feel this warning is really unnecessary, and most other major forum software won't give this warning.

3. alt attribute not needed

I know that Paul said that this is useful for those who use screen readers etc, but I just can't see this being used very often, and I have never seen another forum that includes this. Once again: fluxbb is supposed to a bare-bones system - why include unnecessary features?

4. New parser

I really preferred the old parser. As ridgerunner mentioned, it was smaller and cleaner - and I feel the extra added BBCode is unnecessary. Paul mentioned here:

Paul wrote:

It doesn't handle the alt attribute properly on images and uses linebreaks instead of paragraphs. To me thats broken.

But why the need to used paragraphs within the message? There will still be linebreaks. The old parser did contain the message in a paragraph, but did no use to use it within the message parts. I can't really see the point of having everything in paragraphs, not even vb and ipb does that.
example:
old parser output:

<p>blah blah<br /><br />blah blah<br /><br /><br />blah blah<br /><br /><br /><br /><br />blah blah<br /><br />blah blah<br />blah blah<br /><br />blah blah<br /><br />blah blah<br />blah blah</p>

new parser output:

<p>blah blah</p><p>blah blah</p><br /><p>blah blah</p><br /><br /><br /><p>blah blah</p><p>blah blah<br />blah blah</p><p>blah blah</p><p>blah blah<br />blah blah</p>

As far as I can tell, the new parser also forced Paul to drop the use of vertical scrolling in code blocks, which I think is a bad idea (as I mentioned here). If I was the fluxbb developer, I would bring back the old parser, and try to improve it slightly (make it more efficient/faster) - maybe with the help from someone like ridgerunner.

Last edited by Koos (2009-09-10 16:55:14)

Offline

#2 2009-09-10 17:21:34

Reines
Lead developer
From: Scotland
Registered: 2008-05-11
Posts: 3,165
Website

Re: fluxbb 1.4 bbcode and new parser

1. FluxBB supports both styles, the "in most other forum software" style you showed works fine too.

2. I agree though I'm not sure how easy it'll be to change, I'll take a look.

3. The alt attribute is optional when using the img bbcode, you don't need to specify it so I don't see why it matters. I wouldn't call it unnecessary though, according to the HTML spec the alt attribute is mandatory with image tags, so if you want to debate that you'll need to talk to them tongue

4. The old one may be slightly easier to follow in certain places, but other than that I don't see any advantages to it. The new one adds new bbcode, which even if you personally don't feel is needed, it was requested a number of times by the community (especially lists).

Offline

#3 2009-09-10 18:31:40

Paul
Developer
From: Wales, UK
Registered: 2008-04-27
Posts: 1,630

Re: fluxbb 1.4 bbcode and new parser

1. The list style would seem to be a mistake (if mine I apologise). The outer list item should certainly be a solid disc and a nested list a circle. This conforms to most browser defaults. The css should read:

DIV.postmsg UL LI {LIST-STYLE-TYPE: disc}
DIV.postmsg UL LI LI {LIST-STYLE-TYPE: circle}

As for creating lists, I can seem to create list items with just the opening tag, the parser then inserts the closing tag.

3. Either you believe in accessibility and standards or you don't. If you don't thats kind of tough since thats the way the web is moving.

4. If lack of vertical scrolling is going to present a problem there is a simple solution. All you do is add a bit of code to the parser which counts the number of lines the code text occupies (just count newlines). If over a certain number of lines (say 20) you assign an additonal class to the codebox e.g. scrollbox. In the stylesheet you then set .pun .scrollbox pre {height: 30em}. That works in all browsers and doesn't rely on max-height. Its roughly the way 1.2 does it.


The only thing worse than finding a bug is knowing I created it in the first place.

Offline

#4 2009-09-10 19:10:08

Koos
Member
Registered: 2008-05-09
Posts: 71
Website

Re: fluxbb 1.4 bbcode and new parser

1. @Reiners: I've noticed, but the tags will then still be parsed to something like this:

[list=*]
[*]Example list item 1.[/*]
[*]Example list item 2.[/*]
[*]Example list item 3.[/*]
[/list]

If I was the dev I would get rid of [.list=a] and [.list=1] lists, use solid bullets and use the "standard" method of creating lists:

[list]
[*]List Item #1
[*]List Item #2
[*]List Item #3
[/list]

2. ok, thanks.

3. I also belief in accessibility, but what's wrong with the way the old parser did it? The old parser used the image URL for the alt attribute, which makes it even more obvious that it's an image.

4. @Paul, that would be great (to update the parser to use an inline style for code blocks as is done in the old parser).

Last edited by Koos (2009-09-10 19:21:30)

Offline

#5 2009-09-10 19:18:45

Reines
Lead developer
From: Scotland
Registered: 2008-05-11
Posts: 3,165
Website

Re: fluxbb 1.4 bbcode and new parser

1. The reason the preparser changes them, if I remember correctly, was because it makes them faster to parse (when viewing the post). I'm not sure if any actual benchmarks were done though, this was back before I joined the team.

3. Using the url is pretty much useless. The alt is meant to give a textual alternative to the image, the url means next to nothing. Though as I said the alt attribute in bbcode is optional so I really don't see why it's a problem.

Offline

#6 2009-09-10 19:23:08

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

My personal opinion:

1. That's semantically invalid BBCode (no closing [./*]). You have an opening tag without a closing tag. Just because other people do it that way doesn't mean FluxBB should. Also, I don't see a good reason to remove the ability to have an ordered list.

2. Again, it gets back to the idea of BBCode being semantically valid. It's the same thing with HTML and the same thing with XML. You can't just embed random tags, you have to escape them.  In HTML, you would have encoded <>s or code inside <pre></pre>. In XML, you have CDATA. In FluxBB's BBCode, the "escape" method is a code tag. An inline method of escaping (ie: a [nobbcode] tag) would be useful as well. Again, other people doing it one way is not by itself a good reason for FluxBB to change its way of doing things.

3. Why is it wrong? Because the alt tag is supposed to be a textual description of the image, not a URL to the image. One helps accessibility, one doesn't. FluxBB could default to something like "Image from <url>" but the ideal would still be to have alt tags filled in.

Offline

#7 2009-09-10 19:38:53

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 4,071
Website

Re: fluxbb 1.4 bbcode and new parser

Smartys wrote:

Just because other people do it that way doesn't mean FluxBB should.

Thank you. I hate that argument. If FluxBB would do everything like the others, it would be bloated with features, too. Actually, it wouldn't be needed anymore. That's why there are more alternatives out there. You have to look for what suits your needs best.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#8 2009-09-10 20:11:09

Paul
Developer
From: Wales, UK
Registered: 2008-04-27
Posts: 1,630

Re: fluxbb 1.4 bbcode and new parser

3. As others have said, using the url for the alt attribute helps nobody except in the unlikely event of the image having an extremely descriptive file name. It would actually make more sense for the default, if the poster doesn't provide a description, to say alt="No description provided". Then if the screenreader user was desperate to know what the image was they could always report the post asking for a desciption to be inserted. You don't need to tell a screenreader user that its an image, the screenreader does that.

The bottom line is and always has been that whether a feature is good, bad, essential or pointless is largely in the eye of the beholder. For example I would choose to scrap jump menu, board description, user ranks, signatures and several other things that many users would consider a necessity.


The only thing worse than finding a bug is knowing I created it in the first place.

Offline

#9 2009-09-10 21:05:33

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

Agreed.

Offline

#10 2009-09-10 21:22:44

hcgtv
Member
From: Charlotte, NC
Registered: 2008-05-07
Posts: 419
Website

Re: fluxbb 1.4 bbcode and new parser

Paul wrote:

The bottom line is and always has been that whether a feature is good, bad, essential or pointless is largely in the eye of the beholder. For example I would choose to scrap jump menu, board description, user ranks, signatures and several other things that many users would consider a necessity.

One person's junk is another person's treasure wink

I've never used the jump menu, in all the time I've used Pun. User ranks is another feature I leave alone, but board description and signatures I do use quite often.

Not to deviate this thread, but since we're talking about BBCode, I'd like to see an option one day where we could have a toolbar to assist us in creating posts. I'm very familiar with BBCode but there are days that I wish I could just highlight text and press a button. Yes, there are many mods out there but having something ship with the core, would not be a bad thing in my opinion. Of all the BBCode toolbars I've used on forums, the one in Phorum feels right.


Bert Garcia - When all you have is a keyboard

Offline

#11 2009-09-11 15:09:14

Koos
Member
Registered: 2008-05-09
Posts: 71
Website

Re: fluxbb 1.4 bbcode and new parser

Smartys wrote:

Just because other people do it that way doesn't mean FluxBB should.

That doesn't mean one shouldn't look at what is done in other forum software. Forums like vbulletin and ipb are still some of the most popular forums on the net, and I feel that when it comes to things like BBCode one should try to follow some kind of standard (that's familiar to most users).

Offline

#12 2009-09-11 15:17:31

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

Very true.  I was just saying that other software's implementation of features should not be the sole dictator of FluxBB's implementation. wink

However, in this case, FluxBB does follow their "standard" (I question the use of the word standard here, hence the quotes). It allows people to input the BBCode in that format. However, it smartly transforms that input into a semantically valid output. I don't see a problem with that: I can't even think it would confuse people.

Offline

#13 2009-09-11 18:18:55

Mpok
Member
From: France
Registered: 2008-05-12
Posts: 350

Re: fluxbb 1.4 bbcode and new parser

hcgtv wrote:

Not to deviate this thread, but since we're talking about BBCode, I'd like to see an option one day where we could have a toolbar to assist us in creating posts.

Agreed. The PunToolBar is far beyond the most used mod (in France), and very often THE FIRST to be installed on new forums.

Offline

#14 2009-09-15 12:05:35

Koos
Member
Registered: 2008-05-09
Posts: 71
Website

Re: fluxbb 1.4 bbcode and new parser

Smartys wrote:

However, in this case, FluxBB does follow their "standard" (I question the use of the word standard here, hence the quotes). It allows people to input the BBCode in that format. However, it smartly transforms that input into a semantically valid output. I don't see a problem with that: I can't even think it would confuse people.

But since the help page shows a different format for lists, and because it's transformed to the semantically valid output, users would tend to use this format, rather than the "standard" format. And users don't care about what is semantically valid. I say, stick with the most used format.

Mpok wrote:

The PunToolBar is far beyond the most used mod (in France), and very often THE FIRST to be installed on new forums.

I also make use of PunToolBar. Pity it doesn't work with fluxbb 1.4's new parser.

Offline

#15 2009-09-15 18:39:00

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

But since the help page shows a different format for lists, and because it's transformed to the semantically valid output, users would tend to use this format, rather than the "standard" format. And users don't care about what is semantically valid. I say, stick with the most used format.

I'm afraid I don't understand.

  1. FluxBB accepts either format. You seem to be saying that's a bad thing but you never say why it's bad.

  2. Users don't care about a lot of things. Again, I don't see why that matters.

  3. Again, anybody who wants to can use the "standard" format. Why is accepting and promoting another superior format bad?

[This post was created using the list BBCode wink]

Offline

#16 2009-09-16 18:41:24

Koos
Member
Registered: 2008-05-09
Posts: 71
Website

Re: fluxbb 1.4 bbcode and new parser

I can't see the point of promoting a new format if all other forum software use the "standard" format. I know that both formats work in fluxbb, but some users might not notice, since they would turn to the help page for instructions on how to use BBCode (most newbie users do). If the fluxbb help page tells the user to use the closing [./*] tag for lists, that's what he’ll use. And now when he visits a vb or ipb forum, the user would think that's the way of creating lists and try to use the same format there as well.

Offline

#17 2009-09-16 20:04:09

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

http://www.phpbb.com/community/faq.php?mode=bbcode
http://www.vbulletin.com/forum/misc.php?do=bbcode

By your logic, FluxBB should have a [size] tag. No thank you. wink


If there were actual standards I would agree with you. However, there is no standard for what is and isn't BBCode. People are free to add custom tags that have whatever behavior they want. Thus, you can't expect two pieces of software to implement BBCode in the same way, unlike how you would expect two pieces of software to parse HTML in the same way.

Offline

#18 2009-09-16 21:56:23

Reines
Lead developer
From: Scotland
Registered: 2008-05-11
Posts: 3,165
Website

Re: fluxbb 1.4 bbcode and new parser

It seems SMF does it differently too, they want [li] tags instead and they must be closed. http://docs.simplemachines.org/index.php?topic=696

Offline

#19 2009-09-17 00:05:35

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

Reines wrote:

It seems SMF does it differently too, they want [li] tags instead and they must be closed. http://docs.simplemachines.org/index.php?topic=696

"Although the best way to specify bullet formats is through the type property of the list, you can give each list item an individual style. Note that these do not have corresponding closing tags."

So they also support the "standard" format. But hurrah for someone else generating semantically sound BBCode

Offline

#20 2009-09-17 00:21:02

Mpok
Member
From: France
Registered: 2008-05-12
Posts: 350

Re: fluxbb 1.4 bbcode and new parser

Koos wrote:

I also make use of PunToolBar. Pity it doesn't work with fluxbb 1.4's new parser.

smile  I've been talking the devs about THAT, they did say they would look at... (can't find the post but it exists..)..

Anyway, i will migrate the toolbar when 1.4 final release is on... (as i am one of the contributors of this mod, so best aware).

Just a pity the devs don't take "usages" in account...
This mod is well-programmed, fully standard (my contribution), and SO useful.
It's not a big deal to integrate it into the core, but it seems that only "principles" reasons are on..

Offline

#21 2009-09-17 00:26:16

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: fluxbb 1.4 bbcode and new parser

Yes, it's so sad that FluxBB's development is guided by an underlying design philosophy. If it weren't, each new version could just have some new modifications randomly thrown in!
</sarcasm>

Seriously. The popularity of a modification is not a primary consideration for a feature.

Offline

#22 2009-09-17 02:01:38

Vinny14
Member
Registered: 2009-09-16
Posts: 4

Re: fluxbb 1.4 bbcode and new parser

I don't see a problem with it making you close the tags.  It makes your posts cleaner.
That's just my opinion though.

Offline

#23 2009-09-17 23:55:49

ridgerunner
Developer
Registered: 2008-06-24
Posts: 182
Website

Re: fluxbb 1.4 bbcode and new parser

Koos wrote:

... If I was the fluxbb developer, I would bring back the old parser ...

So would I. The "new and improved" 1.3/1.4B parser is in my opinion, inferior (code-wise) to the old 1.2 version.

After analyzing (and fixing) the first two regexs in the new parser.php, I looked further into the heart of the beast, but just one look at the spaghetti code in the preparse_tags() function had me running for shelter (to put it mildly this 400+ line function is virtually indecipherable). And after looking closer at both versions, I would now bet money (if I had any), that for many cases, the old 1.2 version is in fact, significantly faster than the new version (but who has time to measure?) There are some other problems/inefficiencies with the new parser that I found, but for the moment I don't have any more time to spend on this.

Obviously, either version can be made to work well, but IMHO it would be safer and easier to upgrade 1.2 rather than overhaul 1.3/1.4B (and would cause less headaches for the updating of parser related mods). That said, as time permits, I will try to provide positive input to whichever version goes to press...

p.s. I would also vote for a BBCode tag for in-line CODE (i.e. one that generates monospace type a-la: <tt>teletype text</tt> or <kbd>keyboard input</kbd> or <samp>sample output</samp>).

Offline

#24 2009-10-12 21:46:05

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 4,071
Website

Re: fluxbb 1.4 bbcode and new parser

Paul wrote:

4. If lack of vertical scrolling is going to present a problem there is a simple solution. All you do is add a bit of code to the parser which counts the number of lines the code text occupies (just count newlines). If over a certain number of lines (say 20) you assign an additonal class to the codebox e.g. scrollbox. In the stylesheet you then set .pun .scrollbox pre {height: 30em}. That works in all browsers and doesn't rely on max-height. Its roughly the way 1.2 does it.

Maybe that is an better option, because it really is hard to find something at the end of a long line now...


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

Board footer

Powered by FluxBB 1.5.0