Introduction
cPanel & WHM version 11.42 and earlier requires you to manually add items to the dynamicui
files.dynamicui
files contain information for each icon in the cPanel Home interface. When you add a plugin manually, the plugin will only be available in x3.
Note:
For our newest features, use the Paper Lantern theme and its install.json
method to add items to the dynamicui
files.
Add dynamicui
entries manually
To add a plugin directly to the dynamicui
files, perform the following steps:
- Write one or more group
dynamicui
file entries. - Write one or more icon
dynamicui
file entries. - Add the entries to the appropriate group's
dynamicui_*.conf
file.- For example, add the Support group's entry, and the entries for any Support group icons, to the
/usr/local/cpanel/base/frontend/x3/dynamicui/dynamicui_support.conf
file.
- For example, add the Support group's entry, and the entries for any Support group icons, to the
-
Save icon image files to the
Run the/usr/local/cpanel/base/frontend/theme/branding/
directory, wheretheme
isx3
./usr/local/cpanel/bin/rebuild_sprites
command to rebuild the cPanel interface's sprite map.- Icon files must use the
.png
,.gif
, or.jpg
file formats. We strongly recommend that you use.png
files. - Icons must be 32x32 pixels.
- Icon files must use the
Add groups
Each group entry in a dynamicui
file will resemble the following example:
groupdesc=>Support,group=>support_menu,grouporder=>-10,description=>Group for support icons |
Notes:
- Entries in
dynamicui
files cannot include line breaks. - We strongly recommend that you localize any strings that you add to
dynamicui
files.
dynamicui
file entries include the following data, in the key=>value
format:
Key |
Type |
Description |
Possible values |
Example |
groupdesc |
string |
Required The name of the group, as it will display in the cPanel interface. |
|
Support |
group |
string |
Required The group name. Individual icon entries use this name with thegroup_ prefix. |
A string value. |
support_menu |
grouporder |
integer |
Required The group's order in the cPanel interface. |
An integer that represents the order in which the group displays. Note: Groups with a lowergrouporder value display first. |
10 |
description |
string |
Required The group's description in cPanel's Branding Editor interface (Home >> Preferences >> Branding Editor). |
|
Group for support icons |
Add icons
Each icon entry in a dynamicui
file will resemble the following example:
itemdesc=>Support,itemorder=>-100,group=>group_pref,url=>http://support.example.com,description=>support link,imgtype=>icon,subtype=>img,type=>image,file=>support,height=>32,width=>32 |
Notes:
- Entries in
dynamicui
files cannot include line breaks. - We strongly recommend that you localize any strings that you add to
dynamicui
files.
dynamicui
file entries include the following data, in the key=>value
format:
Key |
Type |
Description |
Possible values |
Example |
itemdesc |
string |
Required The name of the item, as it will display in the cPanel interface. |
|
Support |
itemorder |
integer |
Required The item's order in the cPanel interface. |
An integer that represents the order in which the item displays. Note: Items with a lower itemorder value will display first. |
-100 |
group |
string |
Required The icon group in which the item will appear. |
The prefix group_ and a valid group name. Note: Group entries include the group name, without the group_ prefix, as the groupkey's value. |
group_pref |
url |
string |
Required The location to which the item links. |
A valid URL. |
http://support.example.com/ |
description |
string |
Required The item's description in cPanel's Branding Editorinterface (Home >> Preferences >> Branding Editor). |
|
support link |
if |
string |
A conditional value that checks configuration settings to determine whether the item displays. This key is useful to limit access to an item. |
One or more cPanel variables.
|
!$CONF{'skipawstats'} $CPDATA{'FEATURE-AWSTATS'} |
searchtext |
string |
A list of keywords for the item. The Quick Find feature uses these keywords. |
|
support |
feature |
string |
A feature that the user musthave access to in order for the item to display. |
A valid feature name. |
support |
acontent |
string |
Additional attributes to include in the item's <a> HTML tag. |
One or more valid HTML attributes. |
target="_blank" |
onclick |
string |
JavaScript to execute when a user clicks on the item's link. |
Valid JavaScript code. |
show_optionselect('leechprotect'); return false; |
module |
string |
A module that must exist in the/usr/local/cpanel/Cpanel/directory for the item to appear. |
A valid module name. |
ImageManager |
touch |
string |
A touch file that must exist in the/var/cpanel/dynamicui/directory for the item to appear. Note: This key is only available in cPanel & WHM version 11.40 and later. |
A valid filename. |
filename |
imgtype |
string |
The icon type. |
Important: You must set this value to icon. |
icon |
subtype |
string |
The icon subtype. |
Important: You must set this value to img. |
img |
type |
string |
The item type. |
Important: You must set this value to image. |
image |
file |
string |
The icon file name. |
The icon's filename relative to the/usr/local/cpanel/base/frontend/x3/brandingdirectory, without a file extension. |
support |
height |
integer |
The icon's height. |
A positive integer that represents the icon's height, in pixels. Remember: You must set this value to 32. |
32 |
width |
integer |
The icon's width. |
A positive integer that represents the icon's width, in pixels. Remember: You must set this value to 32. |
3 |