The custombutton.exe utility is designed to create custom buttons, and to manage their properties (interface location, button names, context help messages, and other parameters).

Custom buttons of the following types can be created and managed by using this utility:

  • custom button pointing to a URL
  • custom button linked to Web applications

Location

%plesk_cli%

Usage

custombutton.exe <command> [<param>][
<option 1> <param> [<option 2> <param>] ... [<option N> <param>]
]

Example 1

The following command creates custom button Statistics that opens URL http://example.com/site-statistics, places the custom button on the 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 site-statistics, and makes the button available in control panels of all domain users.

plesk bin custombutton.exe --create -text Statistics -url http://example.com/site-statistics -url_comp dom_id,dom_name,cl_id -conhelp "Click to go to site-statistics" -place domain -public true

Example 2

The following command creates custom button named osCom linked to Web application osCommerce installed on the domain example.com, and sets the context help message for the button as Click to open osCommerce.

plesk bin custombutton.exe --create -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce -text osCom -conhelp "Click to open osCommerce"

Commands

Command Parameter Description Example
--create or -c  

Creates a new custom button.

Requires either -siteapp-link or -url option.

To create the new custom button Statistics (to open URL http://example.com/site-statistics) and print its database ID number:

plesk bin custombutton.exe --create -text Statistics -url http://example.com/site-statistics -print-id

or

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -print-id

--info or -i <ID>

Displays a custom button’s properties.

Parameter ID is the custom button ID in Plesk database.

To view properties of a custom button which ID is 14:

plesk bin custombutton.exe --info 14

or

plesk bin custombutton.exe -i 14

--remove or -r <ID,ID,...>

Deletes one or more custom buttons.

Parameter ID is the custom button ID in Plesk database.

To delete the custom buttons which ID numbers are 4 and 5:

plesk bin custombutton.exe --remove 4,5

or

plesk bin custombutton.exe -r 4,5

--list or -l   Displays a list of all custom buttons.

To view the list of all custom buttons:

plesk bin custombutton.exe --list

or

plesk bin custombutton.exe -l

--help or -h   Displays help on the use of the utility.

To view help on the use of the utility:

plesk bin custombutton.exe --help

or

plesk bin custombutton.exe -h

--man or -m   Displays detailed help page on the use of the utility with examples.

To view detailed help with examples on the use of the utility:

plesk bin custombutton.exe --man

or

plesk bin custombutton.exe -m

Options

Option Parameter Description Example
-owner admin|<user_login_name>|<domain name>

Assigns ownership of a custom button to a Plesk client.

Is admin by default.

To set the client with the login name JohnDoe the owner of the custom button Statistics to be created:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -owner JohnDoe

-sort_key <integer>

Sets a custom button priority.

(The lower is the number - the higher is priority.)

Is 100 by default.

To set the priority of the custom button Statistics to 3:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -sort_key 3

-place client|domain|domain-properties|navigation|admin|admin-settings|reseller|reseller-settings

Sets a custom button location. The following locations are available:

The Home tab in the Control Panel, visible to the hosting service customers and their users who are allowed to log in to the Control Panel This can be done using the client option.

The Websites & Domains tab in the Control Panel, visible to the hosting service customers and their users who are allowed to log in to the Control Panel. This can be done using the domain option.

The Home page in the Server Administration Panel, visible only to the administrator and to the users logged in under additional administrator accounts. This can be done using the admin option.

The Home page in the Server Administration Panel, visible only to resellers. This can be done using the reseller option.

The Tools & Settings page in the Server Administration Panel, visible only to the administrator and to the users logged in under additional administrator accounts. This can be done using the admin-settings option.

The Tools & Utilities page in the Server Administration Panel, visible only to resellers. This can be done using the reseller-settings option.

The client option is selected by default.

To set the custom button location to Domain administrator home page:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -place domain

-text <string>

Specifies a text accompanying a custom button.

Required with -url option.

To set the text accompanying the custom button to Statistics:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics

-url <URL>

Specifies a URL to which a custom button to be created will point.

Required with --create when custom button pointing to URLs is created.

Requires -text option.

To set the URL to which the custom button Statistics will point to example.com/site-statistics:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics

-url_comp <dom_id>|<dom_name>|<ftp_user>|<ftp_pass>|<cl_id>|<cname>|<pname>|<email>

Specifies various parameters to be included with a custom button’s URL in browser requests.

The following parameters can be included:

dom_id - domain ID

dom_name - domain name

ftp_user - FTP user name

ftp_pass - FTP user password

cl_id - client ID

cname - client’s company name

pname - client’s contact name

email - client’s email

To include the domain ID, domain name, and client ID parameters in the browser requests generated by using the custom button Statistics:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -url_comp dom_id,dom_name,cl_id

-conhelp <string> Specifies a text of a contextual help message associated with a custom button.

To set the context help message for the custom button Statistics to Click to go to site-statistics:

plesk bin custombutton.exe -c -text Statistics -url http://example.com -conhelp "Click to go to site-statistics"

-file <path> Specifies a path to an image file that will be used as a custom button icon.

To set the file Stat.gif as the custom button Statistics icon:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -file "C:\Program Files\Images\PleskInterface\Stat.gif"

-public true|false

Specifies whether a custom button appears in control panels of users subordinate to the custom button’s owner.

Is false by default.

To display custom button Statistics that has the Domain Administrator home page location in control panels of all users on this domain:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -place domain -public true

-internal true|false

Specify if a button’s URL is opened in Plesk own frame or in a new window.

Is false by default.

To enable opening the custom button’s URL in the Plesk own frame:

plesk bin custombutton.exe -c -text Statistics -url http://example.com/site-statistics -place domain -internal true

-noframe true|false If a custom button leads to a Plesk extension or web app, this option specifies how the extension/app should be displayed on the Plesk page: in a frame (false) or as a part of the Plesk GUI (true).

To create the custom button My_App to a website app which should be opened as a part of the Plesk GUI:

plesk bin custombutton.exe -c -text My_App -url http://example.com/my_app -place domain -internal true -noframe true

 -print-id   Prints the Plesk database ID of a created custom button.

To create the new custom button Statistics (to open example.com/site-statistics) and print its Plesk database ID:

plesk bin custombutton.exe --create -text Statistics -url http://example.com/site-statistics -print-id