custom bbcodes-matured. what's next?

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

custom bbcodes-matured. what's next?

Post by code reader »

it is nice to see that custom bbcodes have come of age.
there are a few tiny things that i think need to be done in order for this system to be complete.

-- first and foremost, i think that most of the existing bbodes should be taken out of the code, and added back as custom-bbcode through the schema_data.sql file.
this can be done for ALMOST all the existing bbcodes, except the [*] (singleton), and font size and color.
i would seriously consider either adding support for a singleton bbcode, or adding a close-tag ([/*] which will translate to </li>) to the list-item.

-- some missing features in the custom bbcodes system are:
  1. currently, custom bbcode legend (what appears on the button) is exactly the contents of the bbcode itself. this is not right. the custom bbcode table should contain the legend, in addition to the bbcode (some thought about translations is in order)
  2. it would be nice to be able to define some hierarchy, for instance: list item must be inside a list, table row bbcode must be inside a table bbcode, etc.
  3. it would be nice to allow selection controls as custom bbcodes, (similar to the way the text-size control works now), for instance, define a text-align control with legal values of <left, center, right>
  4. it would be mighty nice (and quite easy) to allow for bbcode button images, as to make the interface more similar to what the users are familiar with
  5. there should be a simple way to "package" some custom bbcodes, and load them to a site in a similar manner to what is done today with smiley packs. this will create a new type of mod. in addition to the existing kinds: "mod", "style", "language pack", and "smiley pack", we should also have a "custom bbcode pak".
the list above is mainly niceties, but i think the main thing is to convert, wherever possible, the existing hard-coded bbcodes to "custom" bbcodes. this will make the code shorter (on the expanse of schema_data.sql) and clearer, and will allow board admins a way to control all bbcodes, including the default ones that come with the system.

i don't think my suggestions should be considered "feature request". (i do think, however, that i should have posted it in the "new feature" forum rather than the "discussion". oh well...)

User avatar
damnian
Registered User
Posts: 14
Joined: Fri Jan 06, 2006 8:36 pm
Contact:

Re: custom bbcodes-matured. what's next?

Post by damnian »

All those would be really nice, but wouldn't it be nicer to see a release someday soon? :lol:
code reader wrote: the custom bbcode table should contain the legend, in addition to the bbcode

How about lang['BBCODE_'.$bbcode]?
code reader wrote: it would be nice to be able to define some hierarchy

How would you implement that?
code reader wrote: button images, as to make the interface more similar to what the users are familiar with

What are talking about? The users are familiar with phpBB2 plaintext! ;)
code reader wrote: in addition to the existing kinds: "mod", "style", "language pack", and "smiley pack"

You forgot "auth". But then again, it doesn't really qualify as a package.
i don't think my suggestions should be considered "feature request".


Of course not, this is all basic board functionality ;)

User avatar
Nicholas the Italian
Registered User
Posts: 659
Joined: Mon Nov 20, 2006 11:19 pm
Location: 46°8' N, 12°13' E
Contact:

Re: custom bbcodes-matured. what's next?

Post by Nicholas the Italian »

I personally agree on points 1 and 5, and making the current tags included in the original package but as optional as any addition (therefore deactivable, etc.).
Points 2-3-4 might be good but I don't think they're a priority.
The main problem are really the list/* buttons, but I don't like the idea of having a [*][/*] button: pretty complex and, what if we have something like

[list]Hey
[*]Item 1[/*]
Something else
[*]Item 2[/*][/list]

code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

Re: custom bbcodes-matured. what's next?

Post by code reader »

one problem with today's code, as far as lists are concerned, is that it creates non-compliant html.
if you try to create a list in olympus (i am not talking about phpbb 2: 2 is html 4.01 transitional, while olympus is xhtml 1.0, which has stricter rules, especially regarding tag-closing), you will find that there are some problems.
specifically, if you have any text between the {list} and the first {*}, it creates illegal html. also, the current bbcode parser does not place all the </li> it should, so the result is that messages with lists generate non-compliant pages.

as to hierarchy: unfortunately, there are some strict rules which today's code can not test or enforce, resulting in non compliant pages. examples are <ul> and <table> tags:
the only thing that can be contained between <ul> (or <ol>) and the corresponding </ul> are <li> .... </li> segments. free text or other elements are not allowed.
same with tables: there is a wider variety of elements which may be contained in a table, but it's still quite limited, and the same goes for table rows.

it would be nice, for instance, when defining a [table] custom bbcode, to define that it can only contain [row] elements, and no free text.

this will not be an extremely complex addition to the current message parser.

damnian wrote: How about lang['BBCODE_'.$bbcode]?
the whole idea of custom bbcodes is to allow the user (=board admin) to add bbcode/html functionality without having to touch any of the source files, by using the database and the tools provided with the system.
having to add anything to the lang[] global will require to edit the language files, which defeats this purpose, so i don't think this is a viable option.

User avatar
damnian
Registered User
Posts: 14
Joined: Fri Jan 06, 2006 8:36 pm
Contact:

Re: custom bbcodes-matured. what's next?

Post by damnian »

code reader wrote: this will not be an extremely complex addition to the current message parser.

Well, there is a workaround. Include \n in the regexp for [*], and you got yourself a </li>.
damnian wrote: having to add anything to the lang[] global will require to edit the language files, which defeats this purpose, so i don't think this is a viable option.

Lang editor is a part of Olympus ACP.

JRSweets
Registered User
Posts: 14
Joined: Tue Oct 12, 2004 4:48 pm
Contact:

Re: custom bbcodes-matured. what's next?

Post by JRSweets »

What about the ability for you to enter what will be displayed on the button. Notice how the default bbcodes are all lowercase, however the text in displayed in the button has the first letter capitalized. If you create a custom bbcode the button displays in whatever case the bbcode is in.

code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

Re: custom bbcodes-matured. what's next?

Post by code reader »

by adding a "legend" field to the database (as i suggested), you will be able to display anything you want on the button. uppercase, lowercase, whatever.
allowing image buttons will be one more step forward, with absolutely minimal change to the code, and very handsome return.
if/when image buttons are supported, the existing legend should be moved to the tooltip (html "title").

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

Re: custom bbcodes-matured. what's next?

Post by EXreaction »

code reader wrote: first and foremost, i think that most of the existing bbodes should be taken out of the code, and added back as custom-bbcode through the schema_data.sql file.


I agree! :mrgreen:

It makes it much harder with certain things to make it work for all the custom and hardcodded BBCodes. The hardcodded ones should be removed IMHO. :)

code reader wrote: there should be a simple way to "package" some custom bbcodes, and load them to a site in a similar manner to what is done today with smiley packs. this will create a new type of mod. in addition to the existing kinds: "mod", "style", "language pack", and "smiley pack", we should also have a "custom bbcode pak".


That would be awesome, but I wouldn't hold your breath. :)

User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: custom bbcodes-matured. what's next?

Post by Acyd Burn »

This is something for 3.2 really. ;)

Image

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

Re: custom bbcodes-matured. what's next?

Post by EXreaction »

Acyd Burn wrote: This is something for 3.2 really. ;)


But you should think about how hard or easy it would be to remove the hardcodded BBCodes for 3.0. :P

From what I have seen it should only be moderately difficult and would make things much easier for bbcode related things later on. :)

Post Reply