custombutton.exe: Custom Buttons
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.
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 |
---|---|---|---|
|
|
Creates a new custom button. Requires either |
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 |
|
|
Displays a custom button's properties. Parameter |
To view properties of a custom button which ID is 14: custombutton.exe --info 14 or custombutton.exe -i 14 |
|
|
Deletes one or more custom buttons. Parameter |
To delete the custom buttons which ID numbers are 4 and 5: custombutton.exe --remove 4,5 or custombutton.exe -r 4,5 |
|
|
Displays a list of all custom buttons. |
To view the list of all custom buttons: custombutton.exe --list or custombutton.exe -l |
|
|
Displays help on the use of the utility. |
To view help on the use of the utility: custombutton.exe --help or custombutton.exe -h |
|
|
Displays detailed help page 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 |
---|---|---|---|
|
|
Assigns ownership of a custom button to a Plesk client. Is |
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 |
|
|
Sets a custom button priority. (The lower is the number - the higher is priority.) Is |
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 |
|
|
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 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 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 The Home page in the Server Administration Panel, visible only to resellers. This can be done using the 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 The Tools & Utilities page in the Server Administration Panel, visible only to resellers. This can be done using the The |
To set the custom button location to Domain administrator home page: custombutton.exe -c -text Statistics -url http://example.com/site-statistics -place domain |
|
|
Specifies a text accompanying a custom button. Required with |
To set the text accompanying the custom button to Statistics: custombutton.exe -c -text Statistics -url http://example.com/site-statistics |
|
|
Specifies a URL to which a custom button to be created will point. Required with Requires |
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 |
|
|
Specifies various parameters to be included with a custom button's URL in browser requests. The following parameters can be included:
|
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 |
|
|
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" |
|
|
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" |
|
|
Specifies whether a custom button appears in control panels of users subordinate to the custom button's owner. Is |
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 |
|
|
Specify if a button's URL is opened in Plesk own frame or in a new window. Is |
To enable opening the custom button's URL in the Plesk own frame: custombutton.exe -c -text Statistics -url http://example.com/site-statistics -place domain -internal true |
|
|
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: custombutton.exe -c -text My_App -url http://example.com/my_app -place domain -internal true -noframe true |
|
|
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: custombutton.exe --create -text Statistics -url http://example.com/site-statistics -print-id |