Exposing bbcode to the plugin manager

Online Arantor

  • Wedgeward
  • Posts: 10,364
  • The Twelve Tasks of Asterix is awesome.
    • View profile
    • Innovate, not Imitate
Re: Exposing bbcode to the plugin manager
« Reply #15 on January 13th, 08:11 AM »
Offhand I actually don't know. I'll try it out later today.
   computer-aided
   community building
             

Other stuff:

Online Arantor

  • Wedgeward
  • Posts: 10,364
  • The Twelve Tasks of Asterix is awesome.
    • View profile
    • Innovate, not Imitate
Re: Exposing bbcode to the plugin manager
« Reply #16 on February 8th, 04:10 PM »
XenForo's facilities in this department are functional but confusing and not that wonderful to work with, IMO. Trying to write a bbcode that has any callback is a PITA of the first water.

I've been thinking about this, though, and the much rumoured bbcode editor and thinking that I might have to up-end how things are done, especially if a user ever wants to edit a bbcode that a plugin has issued (because right now, enabling/disabling a plugin causes it to be added/removed directly from the table)

So I've been thinking about having an 'active' parameter in the table, and querying against that, which would allow removal of the existing 'big list of bbcode' tickboxes and allow for per-code disabling (potentially) but it would also require non-trivial changes to the bbc parser, and I'm not sure I'm up to that right now.
   computer-aided
   community building
             

Other stuff:

Online Nao

  • Wedgeward
  • Posts: 10,276
  • Reality check: I just discovered that Wedge already has a 'Mark unread' button for PMs, a feature in my to-do. Uh. It just isn't in the 'right' place...
    • View profile
    • Cynacittà @ noisen
Re: Exposing bbcode to the plugin manager
« Reply #17 on February 8th, 07:50 PM »
...Me neither! :^^;:
  I say Wedge Wedge (in the butt)
« Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Online Arantor

  • Wedgeward
  • Posts: 10,364
  • The Twelve Tasks of Asterix is awesome.
    • View profile
    • Innovate, not Imitate
Re: Exposing bbcode to the plugin manager
« Reply #18 on February 8th, 08:29 PM »
That said, I don't *have* to gut the existing logic (around what gets set in $disabled), I can make it work by figuring it out from other stuff, I guess.
   computer-aided
   community building
             

Other stuff:

Online Nao

  • Wedgeward
  • Posts: 10,276
  • Reality check: I just discovered that Wedge already has a 'Mark unread' button for PMs, a feature in my to-do. Uh. It just isn't in the 'right' place...
    • View profile
    • Cynacittà @ noisen
Re: Exposing bbcode to the plugin manager
« Reply #19 on February 8th, 11:29 PM »
Would it have a noticeable effect on parse_bbc?
  I say Wedge Wedge (in the butt)
« Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Online Arantor

  • Wedgeward
  • Posts: 10,364
  • The Twelve Tasks of Asterix is awesome.
    • View profile
    • Innovate, not Imitate
Re: Exposing bbcode to the plugin manager
« Reply #20 on February 8th, 11:42 PM »
I'm not thinking it would, generally.

Here's the thing: disabled has 3 uses, all sort of related.

Firstly, it's extracted from the master modSettings entry, and that's done on first entering parse_bbc. Now, it's used once by the print code to turn off certain codes, then it's used to check whether certain codes are active or not, and add other codes (e.g. the mutant list codes) and lastly it's actually used to ignore tags when parsing.

The key point is that it isn't cached, so that the master list of tags is always consistent, even if you switch between normal and print-page within the cache lifetime, you won't get mashed up tags.

Ignoring the master modSetting and rebuilding it from the main tag list should be a one-per-page affair (when the master bbcodes are loaded, after cache retrieval occurs), so the hit should not be that serious at all.

Really, though, a lot more of it is figuring out how the UI should interact so that the loading can handle everything it's supposed to and set disabled appropriately - setting 'url' to disabled takes out all variants on the url bbcode, not just any one particular style.
   computer-aided
   community building
             

Other stuff: