1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Do Add-on Developers Still Create "Enable Add-on" Options?

Discussion in 'General XenForo Discussion and Feedback' started by James, Jul 21, 2011.

?

Do Add-on Developers Still Create "Enable Add-on" Options?

  1. Yes

    63.6%
  2. No

    36.4%
  1. James

    James Well-Known Member

    Just a question I was wondering. Considering it's so much easier to disable an add-on than it is to go to Options -> Optgroup -> Enable/Disable Add-on - do add-on developers still actually create enable add-on options?
     
    soloarquitectura likes this.
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    The idea of Enable Add-on options can be multi-purposed. Yeah, they may be just an on off switch, but if used correctly it could disable nearly everything, but allow groups with certain permissions to get in. Mainly in "Maint." mode. They have a use when used properly. If you disable it and don't give a way for somebody to access it, you're doing it wrong in my opinion.
     
  3. James

    James Well-Known Member

    Yeah, but a lot of add-ons (I remember a whole lot of vBulletin add-ons for starters) just incorporate an enable add-on option then wrap it with if($vboptions->myaddon['isenabled']) and run the code which is stupid IMO.

    A maintenance mode is something that's worth an enable/disable switch, but just as a general on/off switch do people do that any more?
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    I bet there are still people. Plus, in some of the older days of developing when there weren't easy add-on management, these were extremely helpful. Now a days, I see a maint. mode type thing working, but other than that no.
     
  5. Jaxel

    Jaxel Well-Known Member

    I dont think such a switch is as feasible as it used to be.

    Since XenForo is object oriented, while vBulletin3 was procedural, its a bit harder to have a blanket "disable". With procedural programming, you can just put a simple escape at the top and call it a day. With XenForo, you would pretty much have to escape every single hook, extension and object.

    Its a lot easier to just disable it via the add-on options; as XenForo takes care of that stuff for you.
     
  6. James

    James Well-Known Member

    It's a lot quicker too. The ACP home screen presents me with a sidebar block of my installed add-ons that I can enable/disable by ticking!
     
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    XenForo_Controller::_preDispatch($action)

    It is designed for something just like this. You could even separate it so that you can use a simple helper (template useable) to check to see if its enabled and/or have permissions to access it. It actually seems rather simple. You'd just need to do it per-controller.
     
    Kier likes this.

Share This Page