Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Member
    Join Date
    Feb 2006
    Posts
    73

    Default How to create custom groups/sections in cPanel?

    Trying to find out how to create my own groups/sections, like the Preferences, Mail etc.. groups that have the icons in them.

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Funkadelic View Post
    Trying to find out how to create my own groups/sections, like the Preferences, Mail etc.. groups that have the icons in them.
    If you want the custom groups to look/behave like other sections in the cPanel interface, the only way to do that right now is with a custom theme where the appropriate YUI hooks are implemented to accommodate your new sections.

  3. #3
    Member
    Join Date
    Feb 2006
    Posts
    73

    Default

    and thats exactly what I've done David...

    However the problem is, I don't know which files I need to edit in order to have this done, there is no other post on this forum where you have given instructions on how to create your own section/group.

    I have already used: http://www.cpanel.net/plugins/devel/installgen.html to generate an icon and I put that plugin into a group that doesn't exist, so now I have a bunch of icons in a box for the name 'partners' and that box does not have a title attached to it, so I need to find out how to add a title to this box.

    Additionally the problem I encounter is that when I use the 'unregister' command to unregister an icon, it says it is successful and all but the icons aren't deleted from the theme and I don't really know why.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Funkadelic View Post
    and thats exactly what I've done David...

    However the problem is, I don't know which files I need to edit in order to have this done, there is no other post on this forum where you have given instructions on how to create your own section/group.

    I have already used: http://www.cpanel.net/plugins/devel/installgen.html to generate an icon and I put that plugin into a group that doesn't exist, so now I have a bunch of icons in a box for the name 'partners' and that box does not have a title attached to it, so I need to find out how to add a title to this box.

    Additionally the problem I encounter is that when I use the 'unregister' command to unregister an icon, it says it is successful and all but the icons aren't deleted from the theme and I don't really know why.
    There's a difference between making a plug-in and making a theme.

    When you uninstall a plug-in, you may wish to refresh the sprites to ensure the icon is fully removed. If that is not working for you, you may wish to submit a support ticket at: http://tickets.cpanel.net/submit

    As for creating a theme, I recommend copying the contents of /usr/local/cpanel/base/frontend/x3 to another folder at the same level (for example: /usr/local/cpanel/base/frontend/my-x3) and editing the files in the copy to suit your needs. It's just a series of HTML pages and the code is fairly simple to understand.

  5. #5
    Member
    Join Date
    Feb 2006
    Posts
    73

    Default

    David, yes I have already done everything you have stated previously.

    It would be great if you could answer my question though.

    Step by step, how do I add another section?
    Last edited by Funkadelic; 03-06-2008 at 02:48 PM.

  6. #6
    Member
    Join Date
    Feb 2006
    Posts
    73

    Default

    Additionally, what files outside of the theme does the unregister_plugin remove when you run it? I have been studying it trying to understand as it does not appear to be working correctly.
    Last edited by Funkadelic; 03-06-2008 at 02:47 PM.

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    33

    Default

    Quote Originally Posted by cPanelDavidG View Post
    If you want the custom groups to look/behave like other sections in the cPanel interface, the only way to do that right now is with a custom theme where the appropriate YUI hooks are implemented to accommodate your new sections.
    Any hints on where to start digging? Is display groups list stored somewhere in theme files? Can't seem to find it.

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by s.a. View Post
    Any hints on where to start digging? Is display groups list stored somewhere in theme files? Can't seem to find it.
    I started to tinker with things and I found actually it is possible to incorporate this into branding rather than themes.

    In the Branding Editor go to Edit HTML pages then edit index.html.

    At line 224 (assuming you have not previously customizing this file) you will see

    HTML Code:
    <div id="boxes">
    The boxes section is where you see the feature boxes (sections) of the X3 interface on the homepage (a simple check with Firebug will confirm this).

    Looking below that line of code is the API code for inserting all the icons from plugins and whatnot. However, if you just want to hard-code some items, you can create a custom section by simply using this code.

    HTML Code:
    <!-- custom code here -->
    <div id="davidg" class="itembox">
    <div id="davidg-bdrop" class="celldrop"> </div>
    <div class="cellbox">
    <h6 id="davidg-header" class="itembox" title="Double click to collapse/expand. Click to drag." style="clear:none;" ondblclick="rollbox(this);" class="ie-hover"><div id="davidg-expander" class="box-collapse-control" style="float:right" onClick="rollbox(this);"> </div>My custom section</h6>
    <div id="davidg-body">
    Let's see what we can put here...
    <div class="clearit"> </div>
    </div>
    </div>
    <div id="davidg-adrop" class="celldrop"> </div>
    </div>
    <!-- end of custom code -->
    Known issues with this code as it stands right now:
    - The location is not stored like the other feature boxes (as this is not using the APIs that access and use that information)
    - You can't add icons for plug-ins to this feature box.

    I figure it's a good running start for those that want this functionality.

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    33

    Default

    Awesome! This will work even better than creating a custom theme - no worries if some theme need to be updated.

    Thanks David!

  10. #10
    Member
    Join Date
    Feb 2006
    Posts
    73

    Default

    Maybe we should all just ask bluehost how they did it?

    http://www.bluehost.com/dm/main_cp.h...&lpass=demo123

  11. #11
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    33

    Default

    Yeah, right. They're going to give it all up along with process manager plugin code and cpu limits implementation (oh, how i'd like to have this on my servers!).

  12. #12
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    33

    Default

    Found something while poking theme files:

    http://domainname.com:2082/frontend/...nts/index.html

    Doesn't work, but looks promising.

  13. #13
    Member
    Join Date
    Feb 2006
    Posts
    73

    Default

    I got it...

    1. Edit Attic/english.orig
    Insert the name of the group
    example:
    headset=Account Settings

    2. Edit dynamicui.conf

    At the top of the file are the different group settings, just copy and paste another group and paste it where you want your section to be.
    example:
    description=>$LANG{'headset'},file=>group_headset,group=>headset,groupdesc=>$LANG{'headset'},grouporder=>1,imgtype=>icon,subtype=>img,height=>32,type=>image,width=>32
    change the 'headset' to the variable that you entered in for the first file. Additionally feel free to modify the group order number to specify where you want the section to be.

    3. Edit lang/english and if you want, lang/english-utf8
    Insert the same info you inserted into the first file in step #1.
    example:
    headset=Account Settings
    If you are using other languages then you should edit the appropiate language file.

    4. Upload and your all done!

    Note: If you are going to be using http://www.cpanel.net/plugins/devel/installgen.html

    Make sure you edit the group variable to the group you want your icon to be in, for example, the above setup would lead me to put the group being 'headset' and therefore any plugins I make would appear under a title that says 'Account Settings'.

  14. #14
    Member handsonhosting's Avatar
    Join Date
    Feb 2002
    Location
    Omaha, NE
    Posts
    150
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    tried, tested and works like a charm.

    Thanks for adding the extra info that cPanel seemed to leave out of their install instructions page

  15. #15
    cPanel Staff cpanelnick's Avatar
    Join Date
    Feb 2003
    Location
    Houston, TX
    Posts
    4,597
    -Nick
    cPanel Inc.

    Need support? Submit a request here. Complimentary support is available to all license holders regardless of where you purchased your license.
    Need a complimentary support account? Create one here.

Similar Threads & Tags
Similar threads

  1. remove sections of cpanel features for one domain but not others
    By AceOfJames in forum Themes and Branding
    Replies: 2
    Last Post: 03-21-2011, 08:26 AM
  2. how to add new sections in cpanel?
    By devGOD in forum Themes and Branding
    Replies: 1
    Last Post: 09-16-2010, 12:38 PM
  3. create custom UI page
    By B12Org in forum cPanel Developers
    Replies: 9
    Last Post: 08-26-2010, 07:54 AM
  4. Custom Display Groups in cPanel
    By RSimoes in forum cPanel Developers
    Replies: 11
    Last Post: 01-03-2010, 03:07 AM
  5. Questions about customizing cPanel groups and plugins (Help!)
    By Mander in forum Themes and Branding
    Replies: 0
    Last Post: 10-12-2009, 02:43 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube