BBC Code handling

Started by Illori, September 19, 2011, 06:11:15 AM

Previous topic - Next topic

Illori

The development team is considering ways to better handle the BBC code in future versions. Some have suggested

  • storing the BBC code in the database
  • They have also suggested using a Wiki parse style
What do you all think?

Robert.

I couldn't agree more :) It's a great idea to have a bbc code manager ;)

Matthew K.

BBC should be handled the same way as the Menu would/should/will be in 2.1, as a flat-file, that is re-populated whenever a BBC is modified.

Although I think the parse_bbc(); function could be partially re-written to increase performance with this function.

live627

Quotestoring the BBC code in the database
Nice idea. It would allow for eeasy BB code additions or removals.

QuoteBBC should be handled the same way as the Menu would/should/will be in 2.1, as a flat-file, that is re-populated whenever a BBC is modified
Might as well leave it as-is, with the hook.

QuoteAlthough I think the parse_bbc(); function could be partially re-written to increase performance
Rewritten in what way? That douche bag of a function is quite complicated and not too easy to understand.

Matthew K.

The hook doesn't allow Administrators who don't know code to modify BBC items though, which would be the point.

Re-written for performance...

Xarcell

I'm not sure on what your suggesting, but I can suggest a BBC manager. We need one.

Matthew K.

@Xarcell - It would be handled the same way the Menu Editor for 2.1 would be handled, a flat file re-populated whenever a BBC is modified, it would be a full BBC Editor / Management system.
Quote from: Labradoodle-360 on September 20, 2011, 06:25:37 PM
BBC should be handled the same way as the Menu would/should/will be in 2.1, as a flat-file, that is re-populated whenever a BBC is modified.

Although I think the parse_bbc(); function could be partially re-written to increase performance with this function.

Fustrate

I'd much rather have options for different editors, and store the resulting HTML in the database (after being purified by something like HTMLPurifier) which allows the post to be immediately displayed without waiting on a BBC parser every time.
Steven Hoffman
Former Team Member, 2009-2012

SleePy

Fustrate,
Downside to that is you either have outdated html when a bbc changes or is added/removed, you have to update all those cached entries or you have to invalidate all of those requiring them to be recached on next page view.

Ideally the last one would be the method I would prefer be done if that is how we do it.  Honestly, if we did store data like this, I would prefer a separate table from the messages table.  A simple id_msg and body.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Fustrate

If a BBC or other type of markdown changes, that doesn't bother me. The post will display as it did when it was written. You could also store the type and version of what it was created with (in that separate table) so that they can be upgraded as the editors are upgraded.
Steven Hoffman
Former Team Member, 2009-2012

Antes


Advertisement: