Plugin System (SKINS)

Version 1.22

Feature
Finished

Ability to add plugins without needing to change the skin for each update. http://www.directadmin.com/forum/showthread.php?s=&postid=18334#post18334 Plugins will be placed in: /usr/local/directadmin/plugins Each plugin will have a name (go figure :) ) ... inside that: (eg. plug_name) /usr/local/directadmin/plugins/plug_name inside the plug_name directory, we'll have a plugin.conf file with the following (example): name=Hello World id=hello_world author=JBMC-Software version=1.0 update_url=http://www.directadmin.com/hello_world.tar.gz active=yes installed=yes Most of it is self explanitory, but the update_url, if you have it in that file will allow DA to update the script when the admin clicks an "update" button in the plugins manager page. active=yes or no would be to turn it on and off. installed=yes or no would be to figure out if it's been installed yet.(or uninstalled) inside the plug_name directory will be 4 directories: user reseller admin images inside those directories will store the actual files to be viewed. The output of those files should only be html snippets as they will be inserted into an |OUTPUT| token on a plugins.html page in the skin. Users will only be able to acces the files that are available at their level. user, reseller, and admin must have an index.html file with the html snippet code for DA to start with when viewing the plugin at the respective access level. The images directory will store images. The files for the plugin (index.html etc).. but be executable (755) by the user calling it (user logged into da). They must be scripts with the proper interpreter lines at the top, eg: #!/usr/local/bin/php DA wil not tokenize these scripts so all data is passed via the environment. All output on the stdout is inserted into the |OUTPUT| token on the skins page. No data from the strerr will be retrieved. The return value of the script isn't not checked, so errors should be directed to the stdout. There are no file_user.conf files like in the skins. The plugins system will allow files to be accessed directly, eg: domain.com:2222/CMD_PLUGINS/plug_name/index.html SKINS: admin/content_main.html: |PLUGIN_0_ADMIN_TXT| |PLUGIN_1_ADMIN_TXT| |PLUGIN_2_ADMIN_TXT| |PLUGIN_3_ADMIN_TXT| OR for image based skins with icons: |PLUGIN_0_ADMIN_IMG| |PLUGIN_1_ADMIN_IMG| |PLUGIN_2_ADMIN_IMG| |PLUGIN_3_ADMIN_IMG| reseller/content_main.html |PLUGIN_0_RESELLER_IMG| ... |PLUGIN_0_RESELLER_TXT| ... user/show_domain.html or user/show_domain_advanced.html |PLUGIN_0_IMG| |PLUGIN_1_IMG| ... or |PLUGIN_0_TXT| |PLUGIN_1_TXT| ... Those tokens will be added add global tokens, so you can really add them anywhere. files_user.conf CMD_PLUGINS=user/plugin.html see included skins for details.. main token: |OUTPUT|

Interested to try DirectAdmin? Get a 30-day Free Trial!