Hooks or Actions in ISPConfig

Discussion in 'Developers' Forum' started by jesin, Sep 26, 2014.

  1. jesin

    jesin New Member

    Are there any PHP hooks that are triggered at certain points in the ISPConfig Control panel?

    I would like to run some code when a new site is added or deleted.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, the server and the interface part use events and plugins. Do you want to run your code in the interface or in the server part?
     
  3. jesin

    jesin New Member

    Thanks for the quick reply Till.

    I would like to run it on the server side.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then all you have to do is to write a new plugin and attach it to the web_domain_insert, web_domain_update and web_domain_delete events. Take alook at the apache and nginx plugin for an example. the name of your plugin should be after the apache and nginx plugin in alphabet to ensure that it gets launched after the website has been added.
     
  5. jesin

    jesin New Member

    I checked the ispconfig3_install/server/plugins-available/nginx_plugin.inc.php and got a lot of information.

    So my plugin will be called in whatever events I register in its onLoad() function right?

    Where can I find a developer manual for ISPConfig? This one only gives an example for a front end module.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    yes.

    There is no more dev documentation available yet.
     

Share This Page