Custom Display Groups in cPanel

RSimoes

Member
PartnerNOC
Oct 9, 2008
18
0
51
Austin, TX
I was interested in placing a custom cPanel plugin in its own x3 display group. Are these display groups hard-coded, or can I add one?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I was interested in placing a custom cPanel plugin in its own x3 display group. Are these display groups hard-coded, or can I add one?
Very long story short, there is no good way to add your own custom display group at this time.

One method I use essentially forces the group to always default to being at the top or bottom of the page. I just copy the HTML generated by API2 to trigger the appropriate CSS. I paste this code into index.html of my style.

I can get you a code sample if you desire.
 

RSimoes

Member
PartnerNOC
Oct 9, 2008
18
0
51
Austin, TX
Thanks for the response, David. What you describe is exactly what I had in mind as a last resort. :)
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Very long story short, there is no good way to add your own custom display group at this time....
Assuming this is still the case. We have found a way to do this, however the title of the custom section disappears with every cPanel update. Thus my question:

Do you see any harm in doing the following?

chattr +i /usr/local/cpanel/base/frontend/x3/dynamicui.conf
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Assuming this is still the case. We have found a way to do this, however the title of the custom section disappears with every cPanel update. Thus my question:

Do you see any harm in doing the following?

chattr +i /usr/local/cpanel/base/frontend/x3/dynamicui.conf
+i can cause difficult to diagnose issues in the long-term (when one forgets what files were set to +i) and the cPanel update mechanism often ignores +i. I recommend creating a shell script /scripts/preupcp which backs up your dynamicui.conf and a /scripts/postupcp shell script to restore your backup. This way in the future if this causes abnormal behavior, the presence of preupcp and postupcp will remind you about the customization that was done.

However, once we do support custom sections, I recommend using that support instead. This should only be treated as an interim solution.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Thanks for the very good advice.

Any idea about when cPanel will support custom groups? Seems like this has been in discussion for a great long while at this point.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
Just drop a .conf file in /usr/local/cpanel/base/frontend/x3/dynamicui/

Add anything you like in the same format as /usr/local/cpanel/base/frontend/x3/dynamicui.conf


Sample Line

description=>MyGroup,file=>group_mygroup,group=>mygroup,groupdesc=>MyGroup,grouporder=>20,imgtype=>icon,subtype=>img,height=>32,type=>image,width=>32
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Just drop a .conf file in /usr/local/cpanel/base/frontend/x3/dynamicui/

Add anything you like in the same format as /usr/local/cpanel/base/frontend/x3/dynamicui.conf


Sample Line

description=>MyGroup,file=>group_mygroup,group=>mygroup,groupdesc=>MyGroup,grouporder=>20,imgtype=>icon,subtype=>img,height=>32,type=>image,width=>32
cpanelnick, thanks a ton for this tip!
 

volex

Member
PartnerNOC
Feb 5, 2008
19
10
53
cPanel Access Level
DataCenter Provider
Is there any way I can get the group to appear above the "preferences" group? I tried setting grouporder=>1 and grouporder=>0 to see if this worked, the group still shows up second though after preferences, thanks.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Is there any way I can get the group to appear above the "preferences" group? I tried setting grouporder=>1 and grouporder=>0 to see if this worked, the group still shows up second though after preferences, thanks.
grouporder dictates the default location.

What you can do is set grouporder to a very negative number (e.g. -99) to ensure this group is always at the top. After you change the file, click "reset box order" located at the bottom of the cPanel interface's homepage, then reload the page in your browser to see your new default.
 

Solokron

Well-Known Member
Aug 8, 2003
852
2
168
Seattle
cPanel Access Level
DataCenter Provider
Got it working.


vi /usr/local/cpanel/base/frontend/theme/dynamicui/dynamicui_support_menu.conf

groupdesc=>Support,description=>grouping of support icons,file=>support_menu,group=>support_menu,grouporder=>-10,imgtype=>icon,subtype=>img,type=>image,height=>32,width=>32
 
Last edited: