Child pages
  • cPanel API 1 Functions - cPAddons::mainpg

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Description


Excerpt

This function provides tools to install a cPAddon.

 This function performs the following actions:

  1. Retrieves a list of installable cPAddons.
  2. Displays the cPAddon creation interface.
  3. Installs a cPAddon.
  4. Changes the account's cPAddon notification status.

Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$show_disk_usage = $cpanel->api1('cPAddons', 'mainpg', array('install') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

 


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $retrieve_port = $cpliveapi->api1('cPAddons', 'mainpg', ['install']); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 


Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="cPAddon::mainpg ( $FORM('install'))">



Expand
titleCommand Line


Code Block
languagebash
cpapi1 --user=username cPAddons mainpg 


Note
titleNote:

For more information and additional output options, read our Guide to cPanel API 1 documentation or run the cpapi1 --help command.  



Expand
titleOutput (Text)
This function's output varies dramatically based on the account's files and the input parameters that you pass.



Parameters


Note
titleNote:

If you call this function without parameters, the system retrieves a list of available cPAddons.


ParameterTypeDescriptionPossible valuesExample
actionstringThe action to perform.

Each cPAddon has its own requirements. The addon parameter can generate the necessary { action => install } parameters.

Code Block
languagetext
linenumberstrue
$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' => ''
 };


install
addonstring

Whether to display the cPAddon's configuration GUI.

Note
titleNote:

If you use this parameter, the function displays the cPAddon's configuration GUI.


Any cPAddon name.cPanel::CMS::Geeklog
asuserstringThe cPAddon's administrator.The cPAddon administrator's username.adminuser
onBoolean

Whether to enable notifications.

Use this parameter if you set the action parameter to notify.

  • 0 — Disable notifications.
  • 1 — Enable notifications.
1

 

Returns

This function returns output that varies dramatically based on the input parameters that you pass.