I recently needed to add some actions to be performed by the OS when Shell users are activated or deactivated, and a plugin seemed to be the way to go.
In the end it was relatively simple, because I could just make a copy of the supplied “Event Hooks” plugin and edit same to create a new plugin.
I did, however, have to “guess” the Controller names and actions, based on the API docs. Thanks to consistent naming (bless you…) that, too, was easy, and my first “guess” of:
Once I could trigger the event scripts to run, dumping the environment variables passed through to find what I needed for the script was trivial ($iw-users).
My only question was, is there a document I failed to find detailing this, and other aspects of creating plugins ?
Incidentally, my compliments on the simplicity and scope of this plugin approach - I think it will be extremely useful, and makes an already great CP even more configurable and versatile.
Unfortunately the plugin documentation doesn’t exist yet because plugins were originally added as a system for integrating 3rd party software (like softaculous) and for custom paid plugins and not for “public” use. This stance has since changed but as a result we still don’t have any documentation :(. If you have a specific question about something you can always shoot us a support ticket that a developer can take a look at to try and help you out. The example plugins that are there are a great resource and as you mentioned, the naming of controllers is consistent with how they are named in the API.
[QUOTE=IWorx-Dan;18578]Unfortunately the plugin documentation doesn’t exist yet because plugins were originally added as a system for integrating 3rd party software (like softaculous) and for custom paid plugins and not for “public” use. This stance has since changed but as a result we still don’t have any documentation :(.
[/quote]
No problem - just wanted to be sure I hadn’t missed something…
If you have a specific question about something you can always shoot us a support ticket that a developer can take a look at to try and help you out.
If there’s anything that stumps me I’ll take you up on that kind offer - there’s nothing I haven’t been able to work out so far. (That’s more a tribute to the logical way the plugin system works than anything else…)
The example plugins that are there are a great resource and as you mentioned, the naming of controllers is consistent with how they are named in the API.
They are a great resource, and the consistent naming between API and plugin saved me a lot of “guessing” in the plugin I created.