The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding a New Menu Box

Discussion in 'User Experience' started by Solokron, Jan 16, 2009.

  1. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    How would I go about adding a new menu box. A section called "Tools" for example where I can place icons there?

    I am seeing dynamicui.conf and the lang but no where else at the moment. Is there a creation tool for this?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:


    Maybe one of these would be better. Not sure about a creation tool, but the docs seem to suggest that moving or editing the icons is not that tough to do.
    http://www.cpanel.net/support/docs/11/cpanel/branding_edit_advanced_html.html
    http://www.mybrandedhost.com/branding-docs.html

    From that second link:

     
  5. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    At this time, there is no good nor supported way of creating new menu box areas.

    One kludge I usually offer is using the branding editor to insert the appropriate HTML so the CSS will theme it as a new menu box section. Unfortunately, doing this means your box will be either at the to or bottom of the page after the user refreshes/re-visits that screen.

    If you need this HTML, let me know. It should already be on an older forum post on these forums though.
     
  7. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Actually that sounds fine! Can you provide that?

    Thank you!



     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    To have a section that is always at the top, place the following HTML after <div id="boxes">

    HTML:
    <div id="myGroup" class="itembox">
      <div id="myGroup-bdrop" class="celldrop"> </div>
      <div class="cellbox">
        <h6   
          id="myGroup-header" 
          title="Double click to collapse/expand.  Click to drag." 
          style="clear:none;" ondblclick="rollbox(this);" class="ie-hover">
          <div id="myGroup-expander"  class="box-collapse-control" 
              style="float:right" onClick="rollbox(this);"> </div>
          myGroup Section Title
        </h6>
        <div id="myGroup-body">
          HTML to go in this custom section.
          <div class="clearit"> </div>
        </div>
      </div>
      <div id="myGroup-adrop" class="celldrop"> </div>
    </div>
    I just used myGroup as an arbitrary name. You can use any name as long as it isn't used by any of the pre-existing sections.

    If you want to place it at the bottom of the list, put it after the API2 call that is after <div id="boxes">.
     
  9. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Thank you David! Since it always moves back to the top or bottom... is there a way to make it static, meaning the hover over to drag it is not an option? That way it is always at the top and there is no option to drag it down?

    Thank you!
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Offhand, I'm not aware of a way to prevent the drag/drop. Perhaps you may want to look at the Javascript that powers that page to see how that is handled or experiment with different HTML/CSS using a utility like Firebug for Firefox.
     
  11. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I found it. H6 tag and itembox. Thanks!

     
  12. salvatore333

    salvatore333 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    can you please tell me what exact file and path i add this to to make the box not collapse and stay at the top of my customers cpanel theme?

    also what do i have to change in the h6 tag and item box to make it static?

    thanks so much

    <div id="myGroup" class="itembox">
    <div id="myGroup-bdrop" class="celldrop"> </div>
    <div class="cellbox">
    <h6
    id="myGroup-header"
    title="Double click to collapse/expand. Click to drag."
    style="clear:none;" ondblclick="rollbox(this);" class="ie-hover">
    <div id="myGroup-expander" class="box-collapse-control"
    style="float:right" onClick="rollbox(this);"> </div>
    myGroup Section Title
    </h6>
    <div id="myGroup-body">
    HTML to go in this custom section.
    <div class="clearit"> </div>
    </div>
    </div>
    <div id="myGroup-adrop" class="celldrop"> </div>
    </div>
     
  13. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    This sort of works...


    David, I used the code above to add the menu (title) box and it works like a charm. Then I used the cpanelplugin utility to create my icons. But when running /usr/local/cpanel/bin/register_cpanelplugin <pluginname> it creates a brand new section under my new menu group.

    Anyway to make this work correctly???

    Thanks,
    Peter
     
  14. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you make things work correctly, you will sacrifice the ability to force your section to always be visible and at the top of the screen. Matt Dees has some awesome instructions on how to implement custom groups correctly (rather than using my old workaround) at:

    Spotlight On: The cPanel Interface - Icons, Groups and Variables - cPanel Integration
     
  15. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    That's fantastic... But.. (you knew there'd be a but)...

    Small problem with this section:

    Adding Groups to the x3 Interface

    In the cPanel interface, groups refer to groups of icons that link to similar features, such as the Mail or Domains sections.

    Adding a group to an x3 interface requires a few keys and associated values. For a list of required key pairs, click here. here to hide.

    No permission to view Sandbox.DynamicUIRefGroups

    PICK Remember: At this time, there are no themes that display group icons; however, it is very possible that group icons will be used in the future.

    To add an icon to your group, you will need to use the same system of paired keys and values. For a list of required key pairs, click here.

    The 2 links that say "click here" don't work... I get a message that says:

    No permission to view Sandbox.DynamicUIRefGroups
    and the link for Sandbox.DynamicUIRefGroups goes to your 404 not found page...

    But this is a great start. I'll post here when I get stuck (notice I said when and not if) :)

    Thanks,
    Peter
     
  16. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Sorry about that Peter. I talked to our documentation folks and that should be fixed now.
     
  17. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Thank you very much. Ok, next problem... The example right below that (on how to add a group), says:

    To add a group of icons to the cPanel interface, you will need to add the following to a dynamicui file:

    groupdesc=>Support,
    description=>Grouping for support icons,
    grouporder=>-10,
    group=>support_menu,
    imgtype=>icon,
    subtype=>img,
    type=>image,
    file=>support,
    height=>32,
    width=>32

    dynamicui files are processed on a per-line basis, meaning that the file would need to have the new lines stripped to resemble the following:

    groupdesc=>Support,description=>Grouping for support icons,grouporder=>-10,group=>
    support_menu,imgtype=>icon,subtype=>img,type=>image,file=>support,height=>32,
    width=>32,

    Where exactly do I put this dynamicui file ??? And how should it be named?

    dynamicui_groupname.conf or what???

    Thanks,
    Peter
     
  18. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That all depends on how you want to implement it: AddingIconsAndGroup < DeveloperResources < TWiki

    For example, you could have: /usr/local/cpanel/base/frontend/x3/dynamicui/dynamicui_groupname.conf
     
  19. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Well, then there is a problem. Because I have that.

    I created

    /usr/local/cpanel/base/frontend/GKG_X3_PERSONAL/dynamicui/dynamicui_manage_services_menu.conf

    With the following contents in it.

    groupdesc=>Manage Your Services,description=>Manage Your Services,grouporder=>-10,group=>manage_services_menu,imgtype=>icon,subtype=>img,type=>image,file=>support,height=>32,width=>32
    groupdesc=>Support,description=>Grouping for support icons,grouporder=>-10,group=>support_menu,imgtype=>icon,subtype=>img,type=>image,file=>support,height=>32,width=>32

    Yet, the group does not show up in my cPanel interface.

    The only difference from your example and my set up is the theme: x3 vs GKG_X3_PERSONAL

    I have also rebuilt the sprites by running:

    /usr/local/cpanel/bin/rebuild_sprites

    Still no luck.

    It says "After completing this process, your group should appear in the cPanel interface."

    But that's apparently not the case...

    Thanks,
    Peter
     
  20. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Got it!

    I figured it out.

    You have to manually modify the dynamicui.conf file to include not only the items for your new menu box, but also add under the dynamicui/ directory create a dynamicui_menuname.conf file.

    In addition, you have to edit the lang/english file to add new variables for the items you want.

    Also any icons must be uploaded to the themename/branding directory...

    With this information, I was able to create exactly what I wanted on one of our new cPanel servers (not yet live), and it works perfectly.

    Now, I made the same exact changes to the other cPanel boxes and each of my new items has a message "Missing language key ..." error on it. Seems all the keys I entered in lang/english are not being found (even though they are there).

    Can't figure this one out. Any help would be appreciated.

    Thanks,
    Peter
     
Loading...

Share This Page