Are you ready to switch to HTML parsing permanently?

83.3% 65
1.3% 1
15.4% 12

78 Date 2010-04-14 00:49

Forums / Cotonti / Development / Poll: A global switch to HTML parsing

<<<123456>>>

Are you ready?

Kilandor
#31 2010-04-17 21:55
Right, see if we add a config so you can turn off nl2br

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.





[right]Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.[right]




Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Even that would output exactly the same as your first one

nl2br is a problem for anyone who wants to have 100% control and formatting over your text like you wish to. Which isn't relative to bbcode at all, let me show you a demo here on cotonti.com

Added 1 hour 12 minutes later:

Ok, well here is the demo. I tried to show many possible combination's and the results.

http://www.cotonti.com/plug.php?e=parserdemo

I think the real grief everyone is having is with nl2br not bbcode itself. I tried to show in the demo, how bbcode does not effect typography at all. Its simply nl2br.
This post was edited by Kilandor (2010-04-17 23:10, 14 years ago)
Kort Online
#32 2010-04-17 23:52
The code is getting more complicated & less user-friendly. Second, none of your examples is able to give me i.e. .4em paragraph spacing (like here). Its either extra line (ugly) or none (unreadable). Third, with html I can use any style declared in the skin css-file without messing with bbcode config (example).
SED.by - создание сайтов, разработка плагинов и тем для Котонти
Kilandor
#33 2010-04-18 00:24
Second, none of your examples is able to give me i.e. .4em paragraph spacing (like here). Its either extra line (ugly) or none (unreadable).

The examples can do that very thing. That is the one of the things I was trying to show you. They can be completely readable, even with extra lines. Without breaking the actual output formatting simply by having nl2br disabled.

BBcode has 0 effect on typography. Its purely nl2br. I can show you what you want with a .4em paragraph spacing or anything you want.

Each sample provided the sample text that was used in the outputs, before running it through any parsing.

Third, with html I can use any style declared in the skin css-file without messing with bbcode config

Yes you can do that perfectly fine, I just went for quick examples. My point was BBCode is NOT the issue with typography complaints. Its nl2br thats causing unexpected results.

I will update the demo with a section to insert whatever you want for page data, and have it parse (normal) and then without nl2br

Added 18 minutes later:

Ok its there and working. Just remember if you insert HTML that works off your CSS, incluse a link to your CSS file. And it still has to be formatted properly.

(This "Self Demo" will not be open to Regular members or guests)

Added 8 minutes later:

Anyways as I said before. We will include HTML support as people are wanting it. My only point is there is 0 reason to remove BBcode. It has no Ill effects. The big grief is clearly with nl2br which I can see and totaly agree for it to be an option to disable, and or auto-disabled with HTML parsing.

Admins will be able to choose what happens on their site with editors and what method they want.

If You chose a method that does not involve BBcode, Your database will not have 2 entries such as "page_text" and "page_html" You would only have data in (say for example) "page_html". Since yes it would be a waste of your resources to have it stored twice.
This post was edited by Kilandor (2010-04-18 00:52, 14 years ago)
donP
#34 2010-04-18 02:43
# Kilandor : ...I would never expect my users to remember large amounts of HTML when they can remember as simple BBcode line.
No one wants to teach HTML instead of BBCodes to his own users!
If we will adopt HTML we'll do only with a good WYSIWYG editor like CKeditor or tinyMCE. If we would adopt HTML parsing it will be to save our users to learn ANY code.
I fact, for level 1 users I'd suggest to disable "HTML source code viewing" in those editors.
Most users are only searching a place to write simply like in MS Word, not a complicated war with differents codes ad square brackets, no?
For experienced users HTML (and absolutely not BBCodes) would be the best and only way to do what they want.
in [color=#729FCF][b]BLUES[/b][/color] I trust
urlkiller
#35 2010-04-18 09:22
to be true i will let this in your capable hands.
i have faith that you guys will surprise me with a cool innovative new "Textboxer"
but with a factor of 1000 ;)

and i think someone who needs to administrate a site should be at least aware of some html knowledge.
and if he needs a pointer some fancy wysiwyg editor with premade tables and picture size etc. (i think the current table feature sucks to be true, cool for rudimentry formatting but the old one could do widths) so some tables visualised with red borders like in thunderbird would be cool.

i dont know why this should be such a problem having the user choose at installation or via config wich parser they would like to use? Migration is easy i think so everything should be ok with the HTML solution for me... there is no realy difference then.
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
donP
#36 2010-04-18 17:55
# urlkiller :i dont know why this should be such a problem having the user choose at installation or via config wich parser they would like to use? Migration is easy i think so everything should be ok with the HTML solution for me... there is no realy difference then.
The problem is that a few guys won't abandon BBCodes in favor of HTML and so, the presence of two parsing methods (to preserve compatibility) would suck, only increasing database and slowing down the Core. For that reason I think we have to make te ability to choose parsing method in config.php and let go the core and database with only ONE parser...

urlkiller:
i have faith that you guys will surprise me with a cool innovative new "Textboxer"
CKEditor is a very very good WYSIWYG editor, and with HTML parsing I wouldn't need other tools.
in [color=#729FCF][b]BLUES[/b][/color] I trust
Kilandor
#37 2010-04-18 20:39
As I stated before, there will be no increase in database size, and no slowdown in core by keeping BBcode. If people chose to HTML only they will have a decrease in database side, People who chose to use BBcode still will have the exact same database size as before.

If you want pure HTML your data will only be stored once, as there is no need for a parsed and unparsed version. If anything HTML purifier will slow down (submissions/edits), but that's the tradeoff for using it and keeping things safe. Even then its minor and nothing to worry about.

Only thing that will change by allow HTML is improvement in the core allow additional options.

You have to remember. BBcode isn't for everyone's site, Nor is HTML. The admin should choose what they want or don't want. So that's what we are going to let them do. The people have spoken and they want a way to use HTML better. So that is what we are giving them, without taking away anything from anyone else either.
urlkiller
#38 2010-04-18 21:24
Kilandor:
As I stated before, there will be no increase in database size, and no slowdown in core by keeping BBcode. If people chose to HTML only they will have a decrease in database side, People who chose to use BBcode still will have the exact same database size as before.

So i get this right. i was for HTML and BBCODE to choose from the beginning ...
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
GHengeveld
#39 2010-04-18 22:57
According to general good front-end development practices, nl2br is not preferable. The <br/> tag should only be used if absolutely necessary or the logical choice, and NOT for seperating paragraphs. The <p> tag is the only acceptable and flexible way to do this. Since BBcodes uses <br> tags it is yet another reason to make the switch.

In general, I try to follow the Dutch government Web Standards as much as possible. These standards also include guidelines for paragraphs.
donP
#40 2010-04-18 23:14
Furthermore, speaking of W3C and WCAG and SEO friendly websites, a pure HTML parser through a good WYSIWYG editor (like CKeditor or tinyMCE) is the ONLY way to properly fill id, title, alt attributes for images, anchors, urls etc...
in [color=#729FCF][b]BLUES[/b][/color] I trust
Trustmaster
#41 2010-04-19 00:00
OK, guys, this has been a hot discussion and I'll try to summarize some conclusions I've made out of it:
  1. Multiple parser support is still required
  2. World-class HTML parser/purifier/editor is preferable for pages/contents. In most places bbcodes are being phased out.
  3. BBcodes are still good for community sites
  4. But nl2br has to go for good, a more versatile bbcode parser with correct paragraphs is required

Considering this, I have proposals such as:
  • Keep the system multi-parser
  • Provide multiple parsers and editors attached to them
  • Let users choose parsing mode and customize parsing/filtering settings on global level and for some specific modules
  • HTML parser and WYSIWIG-capable editor should be default in new installations
  • BBcode parser needs a smart paragraph-aware replacement for nl2br

I was also worried about the fact that including HTML purifier and CKEditor into Cotonti package would increase the 7z size by more than 500kB. So far the survey shows that we can afford it.
May the Source be with you!
foxhound
#42 2010-04-19 01:28
I first voted no, after that I read this topic. I would like to support the ideas presented above after reading everything.
Its essential bbcode is supported. I can only speak for my own situation and the current site I am running.
Have an active forum with hundreds of visitors every hour and see how your forum looks with only html support.......many people have enough troubles with bbcode already.

This does not mean I would go for a bbcode editor for for example my business site, there html would be just fine. But in this case I vote for the option to choose.
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Kort Online
#43 2010-04-19 02:43
This is all about falling between two stools. Cotonti is a framework and is designed for website developers, not for gamer communities where switching colors via spans is the biggest requirement. Imho, the problem of conversion can be solved easily if there is a wish, whereas "voting for both options" will definitely cause big delays in the overall development through the increased amount of work, compatibility issues etc.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
urlkiller
#44 2010-04-19 03:06
what about having the editor as an plugin so the user could use regular html if he can do it from scratch but if you want that nice editor you would need to dl the plugin.

this way you could get around the additional 500kb so far i voted for a package less than 500 kb...
there should be enough hooks in the header for inserting the plugin the easy an smooth way.
it could be in the release version but maybe also as a additonal plugin.

is the "bbcode"-Editor after that still available? i mean this is a nice solution for inserting easy things like youtube videos, or a slideshow for users, etc. i really liked that feature.

Added 1 minute later:

and maybe its a good idea to think about splitting the usage from forums & pages because i think most forum useres know bbcodes these days and are used to it.

for the pages i would like to see the html editor so you could have insane possibilities to layout a cool page.
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
Kort Online
#45 2010-04-19 03:23
Cotonti is not built around the forums (good news its being removed from the core). Neither it is built around gaming sites or some specific sites with 10000+ pages. The reason to switch to or not to switch shall not include following:
- I got 10000 pages in bbcodes, that is why we keep it
- bbcodes are good for forums
- bbcodes are enough to color words and insert youtube videos: what else do you need?
Give some really good reasons!
SED.by - создание сайтов, разработка плагинов и тем для Котонти

<<<123456>>>