Custom Buttons: custombutton.exe

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:

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.

>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.

>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:

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

or

>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 Parallels Plesk Panel database.

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

>custombutton.exe --info 14

or

>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:

>custombutton.exe --remove 4,5

or

>custombutton.exe -r 4,5

--list or -l

 

Displays a list of all custom buttons.

To view the list of all custom buttons:

>custombutton.exe --list

or

>custombutton.exe -l

--help or -h

 

Displays help on the use of the utility.

To view help on the use of the utility:

>custombutton.exe --help

or

>custombutton.exe -h

--man or -m

 

Displays detailed help on the use of the utility with examples.

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

>custombutton.exe --man

or

>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:

>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:

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

-place

client|domain|navigation

Sets a custom button location.

The following locations are available: Client home page, Domain administrator home page, and Navigation pane.

Is client by default.

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

>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:

>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:

>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:

>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:

>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:

>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:

>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 Parallels Plesk Panel own frame or in a new window.

Is false by default.

To enable opening the custom button's URL in the Parallels Plesk Panel own frame:

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

-print-id

 

Prints the Parallels Plesk Panel database ID of a created custom button.

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

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

-siteapp-link

 

Links a custom button with a Web application installed on a domain.

Required with --create when custom button linked to Web applications is created.

Used only with -siteapp-domain option.

To create the custom button osCom linked to a Web application installed on the domain example.com (if there is only a single application installed on a domain):

>custombutton.exe -c -text osCom -siteapp-link -siteapp-domain example.com

If there are more than one application installed on a domain, specify more options to identify the Web application of interest.

-siteapp-domain

<domain>

Specifies a domain on which a Web application to be linked to a custom button is installed.

Required with -siteapp-link option.

To create the custom button osCom linked to a Web application osCommerce installed on the domain example.com:

>custombutton.exe -c -text osCom -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce

-siteapp-id

<ID>

Specifies the Parallels Plesk Panel database ID of a Web application to be linked to a custom button.

Used only with -siteapp-link option.

To create the custom button which ID is 12 linked to the Web application installed on the domain example.com:

>custombutton.exe -c -siteapp-link -siteapp-domain example.com -siteapp-id 12

-siteapp-name

<name>

Specifies a name of a Web application to be linked to a custom button.

Used only with -siteapp-link option.

To create the custom button osCom linked to the Web application osCommerce installed on the domain example.com:

>custombutton.exe -c -text osCom -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce

-siteapp-version

<string>

Specifies a version of a Web application to be linked to a custom button.

Used only with -siteapp-link option.

To create the custom button linked to a Web application osCommerce v.1.1 installed on the domain example.com:

>custombutton.exe -c -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce -siteapp-version 1.1

-siteapp-release

<string>

Specifies a release number of a Web application to be linked to a custom button.

Used only with -siteapp-link option.

To create the custom button osCom linked to the Web application osCommerce with release number 10 installed on the domain example.com:

>custombutton.exe -c -text osCom -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce -siteapp-release 10

-siteapp-prefix

<directory>

Specifies a path to a directory where the application is installed relative to the httpdocs directory.

Used only with -siteapp-link option.

To create the custom button osCom linked to the Web application osCommerce which is installed in directory /httpdocs/siteapplication/OSC on the domain example.com:

>custombutton.exe -c -text osCom -url http://example.com/osCommerce -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce -siteapp-prefix osCommerce/OSC

-siteapp-subdomain

<subdomain_name>

Specifies a name of a subdomain if a Web application is installed on the subdomain.

Used only with -siteapp-link option.

To create the custom button osCom linked to the Web application osCommerce which is installed on the subdomain webstore of the domain example.com:

>custombutton.exe -c -text osCom -url http://webstore.example.com/osCommerce -siteapp-link -siteapp-domain example.com -siteapp-name osCommerce -siteapp-subdomain webstore