Advertisement:

Author Topic: BBC Code handling  (Read 11204 times)

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,077
BBC Code handling
« on: September 19, 2011, 06:11:15 AM »
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?
« Last Edit: September 19, 2011, 09:41:46 AM by Illori »

Offline Kryzen

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 4,046
  • Gender: Male
    • nedroden on GitHub
Re: BBC Code handling
« Reply #1 on: September 19, 2011, 10:47:40 AM »
I couldn't agree more :) It's a great idea to have a bbc code manager ;)
Amateur PHP & Java developer
DraiWiki | Project Alpha

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: BBC Code handling
« Reply #2 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.

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,265
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: BBC Code handling
« Reply #3 on: September 20, 2011, 06:44:45 PM »
Quote
storing the BBC code in the database
Nice idea. It would allow for eeasy BB code additions or removals.

Quote
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
Might as well leave it as-is, with the hook.

Quote
Although 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.
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: BBC Code handling
« Reply #4 on: September 20, 2011, 06:47:08 PM »
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...

Offline Xarcell

  • SMF Hero
  • ******
  • Posts: 1,684
  • Gender: Male
  • SMF-DP Supporter
Re: BBC Code handling
« Reply #5 on: October 05, 2011, 01:15:42 PM »
I'm not sure on what your suggesting, but I can suggest a BBC manager. We need one.

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: BBC Code handling
« Reply #6 on: October 05, 2011, 01:47:27 PM »
@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.
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.

Offline Fustrate

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,474
  • Gender: Male
  • Controller of the rum budget
    • Fustrate on GitHub
    • @Fustrate on Twitter
    • Fustrate
Re: BBC Code handling
« Reply #7 on: October 05, 2011, 07:11:33 PM »
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

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,936
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: BBC Code handling
« Reply #8 on: October 05, 2011, 07:17:13 PM »
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
Support the SMF Support team!
Profiles:
GitHub

Offline Fustrate

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,474
  • Gender: Male
  • Controller of the rum budget
    • Fustrate on GitHub
    • @Fustrate on Twitter
    • Fustrate
Re: BBC Code handling
« Reply #9 on: October 05, 2011, 07:20:57 PM »
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

Offline Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,648
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @antesistan on Twitter
    • Lunarfall
Re: BBC Code handling
« Reply #10 on: May 18, 2014, 12:09:06 PM »
To keep things bit more clean, moved other two topics other discussion(s) can be found here.

- http://www.simplemachines.org/community/index.php?topic=360152.0
- http://www.simplemachines.org/community/index.php?topic=454077.0
Active Project(s): [ SimpleDesk ] # [ Lunarfall ] # [ CoreStore ]

Past Project(s): [ ezPortal ]