.pdf)
WHM Plugins
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | cPAddons::mainpg( ) |
| Description: | This function can: 1. Retrieve a list of cPAddons available for install. 2. Display the particular cPAddon creation interface once one is selected. 3. Install a cPAddon. 4. Change the account's cPAddon notification status. If this function is called without any arguments, the first option above is taken. |
| Form Data: | |
| action (string) | |
| Setting this parameter to 'notify' checks the 'on' parameter and sets the appropriate notification status. Setting this parameter to 'install' causes the function to install a particular cPAddon. In this case, the function will require the parameters needed by the application. Please remember that the needs of applications may vary. A typical set of extra parameters could resemble the following: $VAR1 = { 'addon' => 'cPanel::CMS::Xoops', 'action' => 'install', 'auser' => 'adminuser', 'apass' => 'adminpass', 'apass2' => 'adminpass', 'email' => 'test@example.com', 'subdomain' => '', 'installdir' => 'xoops', 'admin_display' => 'admindisplayname', 'use_persistent' => 0, 'table_prefix' => 'xoops', 'existing_mysql' => '' }; Each cPAddon has its own requirements. The 'addon' parameter can generate the necessary { action => install } parameters. |
|
| addon (string) | |
| If this argument is supplied, the function will display the configuration GUI for the addon. The argument will refer to the cPAddon name as the cPAddon namespace (e.g. 'cPanel::CMS::Geeklog'). A full list of available names resides in /usr/local/cpanel/cpaddons/cPAddonsAvailable.pm. | |
| asuser (string) | |
| The administrative user for the cPAddon. | |
| on (boolean) | |
| Specifying 1 to this parameter enables notifications if the 'action' parameter is set to 'notify'. | |
| Returns: | |
The output of this function will vary dramatically, depending on the input.
|