The custombutton utility is used to create custom buttons and manage their properties (interface location, button names, URLs, context help messages, and other parameters) through CLI.
Custom buttons of the following types can be created and managed by using this utility:
Syntax
custombutton <command> [
<option_1> [<param>]
[<option_2> [<param>]]
…[<option_N> [<param>]]
]
Example 1
The following command line creates custom button CustomButton that opens URL example.com/webstore, places the custom button on domain administration pages, includes domain ID#, domain name, and client ID# in browser requests generated by clicking on the button, sets the context help message for the button as "Click to go to http://example.com/webstore", and makes the button available in control panels of all domain users.
# ./custombutton --create -text CustomButton -url http://example.com/webstore -url_comp dom_id,dom_name,cl_id -conhelp "Click to go http://example.com/webstore" -location domain -public true
Example 2
The following command line creates custom button named SiteApp linked to site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication, and sets the context help message for the button as "Click to open SiteApplication".
# ./custombutton --create -tex SiteApp -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -conhelp "Click to open SiteApplication"
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates new custom button. Requires the use of the |
To create a new custom button CustomButton (pointing to URL http://example.com) and print its database ID number: # ./custombutton --create -text CustomButton -url http://example.com -print-id or # ./custombutton -c -text CustomButton -url http://example.com -print-id |
|
|
Displays properties of a custom button with the specified ID number. |
To display properties of a custom button with the database ID# 14: # ./custombutton --info 14 or # ./custombutton -i 14 |
|
* |
Deletes one or more custom buttons with the specified ID numbers. |
To delete custom buttons with ID# 14 and ID# 56: # ./custombutton --remove 14,56 or # ./custombutton -r 14,56 |
|
|
Displays help on the use of the utility |
To view help on the use of the utility: # ./custombutton --help or # ./custombutton -h |
|
|
Displays detailed help on the use of the utility with examples |
To view detailed help with examples on the use of the utility: # ./custombutton --man or # ./custombutton -m |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Assigns ownership of a custom button to a Plesk client. Is set to |
To set the client with login name ClientUser the owner of custom button CustomButton to be created: # ./custombutton -c -text CustomButton -url http://example.com -owner ClientUser |
|
|
Sets the Priority parameter. Is set to |
To set the priority of appearance of custom button CustomButton on a Plesk page to 3: # ./custombutton -c -text CustomButton -url http://example.com -sort_key 3 |
|
|
Sets the Location parameter. Is set to |
To select the Domain Owner's Desktop/Home page option for Location parameter for custom button CustomButton: # ./custombutton -c -text CustomButton -url http://example.com -place domain |
|
|
Specifies the text accompanying a custom button (the Button label parameter). Required with the |
To set Button Label for the custom button to be created to CustomButton: # ./custombutton -c -text CustomButton -url http://example.com |
|
|
Specifies the URL that a custom button to be created will point to (the URL parameter). Required for the |
To set the URL parameter to example.com for custom button CustomButton : # ./custombutton -c -text CustomButton -url http://example.com |
|
|
Specifies various parameters to be included with the custom button's URL in browser requests. The following parameters can be included:
|
To include domain ID, domain name, and client ID in the browser requests generated by using custom button CustomButton: # ./custombutton -c -text CustomButton -url http://example.com -url_comp dom_id,dom_name,cl_id |
|
|
Specifies text of a contextual help message associated with a custom button (the Context help tip contents parameter). |
To set the context help tip for the custom button CustomButton to "Click to go to example.com/webstore": # ./custombutton -c -text CustomButton -url http://example.com -conhelp "Click to go to example.com/webstore" |
|
|
Specifies path to the image file that will be used as the Background image for a custom button. |
To set file ButtonImage.gif as the Background image for the custom button CustomButton: # ./custombutton -c -text CustomButton -url http://example.com -file "C:\Program Files\SWsoft\Plesk\ Images\PleskInterface\ ButtonImage.gif" |
|
|
Specifies whether a custom button appears in control panels of users subordinate to the custom button's owner (the Visible to all sub-logins parameter). Set to |
To display custom button CustomButton that has the Location parameter set to Domain Owner's Desktop/Home page in control panels of all users on this domain: # ./custombutton -c -text CustomButton -url http://example.com -place domain -public true |
|
|
Specifies if the button's URL is opened in Plesk's own frame or in the new window (the Open URL in the Control Panel parameter). Set to |
To enable opening of the CustomButton custom button's URL http://example.com in Plesk's own frame: # ./custombutton -c -text CustomButton -url http://example.com -place domain -internal true |
|
|
Prints the database ID number of a created custom button. |
To create new custom button CustomButton with its URL set to example.com and print its database ID number: # ./custombutton -c -text CustomButton -url http://example.com -print-id |
|
|
Links a custom button with a site application installed on a domain. Requires concomitant use of the |
To create a custom button CustomButton linked to a site application (if there is only a single application installed on a domain) that is accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com If there are more than one application installed on a domain, you need to specify more options to identify the site application of interest. |
|
|
Specifies a domain on which a site application to be linked to a custom button is installed. Used in conjunction with the |
To create a custom button CustomButton linked to a site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication |
|
|
Specifies the database ID# of a site application to be linked to a custom button. |
To create a custom button CustomButton linked to a site application with database ID# 12 installed on domain example.com and accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-id 12 |
|
|
Specifies the name of a site application to be linked to a custom button. |
To create a custom button CustomButton linked to a site application SiteApplication installed on domain example.com and accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication |
|
|
Specifies the version of a site application to be linked to a custom button. |
To create a custom button linked to a site application SiteApplication v.13.44.1 installed on domain example.com and accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-version 13.44.1 |
|
|
Specifies the release number of a site application to be linked to a custom button. |
To create a custom button CustomButton linked to a site application SiteApplication with release number 1312.121 installed on domain example.com and accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-version 1312.121 |
|
|
Specifies the path (the Destination directory parameter) to the directory where the application is installed. The Destination directory parameter specifies the site application installation directory relative to the |
To create a custom button CustomButton linked to a site application SiteApplication which is installed in directory /httpdocs/siteapplication/v123 on domain example.com and accessible at URL http://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-prefix siteapplication/123 |
|
|
Set this option to true if a custom button is to be linked to a site application installed in the |
To create a custom button CustomButton linked to a site application SiteApplication which is installed in the httpsdocs directory on domain example.com and accessible at URL https://example.com/SiteApplication: # ./custombutton -c -text CustomButton -url https://example.com/SiteApplication -siteapp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-ssl true |
|
|
Specifies the name of a subdomain if a site application is installed on a subdomain. |
To create a custom button CustomButton linked to a site application SiteApplication which is installed in on the appsubdomain subdomain of domain example.com and accessible at URL http://appsubdomain.example.com/SiteApplication: # ./custombutton -c -text CustomButton -url http://appsubdomain.example.com/SiteApplication -sitepp-link -siteapp-domain example.com -siteapp-name SiteApplication -siteapp-subdomain appsubdomain |