Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Feb 2003
    Posts
    252

    Default Add a Menu

    Does anyone know how to add a menu to the x3 theme in cpanel? The Mail, Security, File, Domains....etc menus.

    Thanks,
    Mike

  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 Sash View Post
    Does anyone know how to add a menu to the x3 theme in cpanel? The Mail, Security, File, Domains....etc menus.

    Thanks,
    Mike
    There's no official support for this at this time. However, there is a kludge that would work in the meantime.

    By using the Branding Editor, you can edit index.html (the entry page that has those menus/groups) and add your own section either above or below all of the pre-existing sections. The following code can be inserted at the beginning of the boxes "div" and before <cp Branding:applist() > to place your custom group above all other groups:

    HTML Code:
    <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>
    You can place any HTML or API1/API2 code inside the body of the section.

    Note, this is a kludge since if the user drags the box, there is no method of saving that placement at this time so the box will always appear at the top (or at the bottom if you place it before the boxes "/div").

  3. #3
    Member
    Join Date
    Feb 2003
    Posts
    252

    Default

    Quote Originally Posted by cPanelDavidG View Post
    Note, this is a kludge since if the user drags the box, there is no method of saving that placement at this time so the box will always appear at the top (or at the bottom if you place it before the boxes "/div").
    Thank you...

    I was able to put the custom box at the top. I'd like to put the box at the bottom, but I'm having trouble.

    Can you tell me what line the boxes "/div" code is on?

    Thanks,
    Mike
    Last edited by Sash; 08-17-2008 at 02:46 AM.

  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 Sash View Post
    Thank you...

    I was able to put the custom box at the top. I'd like to put the box at the bottom, but I'm having trouble.

    Can you tell me what line the boxes "/div" code is on?

    Thanks,
    Mike
    Given customizations you may have performed, I wouldn't have an exact line number for you. However, in the default version of the file, the first </div> after the API call that displays the individual groups of icons (starts with <?cp Branding::applist and ends with ?>) is the closing tag for the boxes div.

    Therefore, to always place your box at the bottom, simply place it between the the ?> and </div>.

  5. #5
    Member
    Join Date
    Feb 2003
    Posts
    252

    Default

    Quote Originally Posted by cPanelDavidG View Post
    Given customizations you may have performed, I wouldn't have an exact line number for you. However, in the default version of the file, the first </div> after the API call that displays the individual groups of icons (starts with <?cp Branding::applist and ends with ?>) is the closing tag for the boxes div.

    Therefore, to always place your box at the bottom, simply place it between the the ?> and </div>.
    David,

    I still seem to be having trouble.

    In a default version of the index file, I placed the code on line 226, right after <?cp Branding::applist([div id="%" class="itembox"] and before [div id="%-bdrop" class="celldrop"] [/div], although I receive a bunch of errors when I tried to load cpanel.

    Can you confirm the line number where the custom code should be placed?

    Thanks,
    Mike

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

    Root Administrator

    Default

    You don't place the HTML/CSS code inside the API2 code. You put it after the API2 code (after ?>) not inside the API2 code (indicated by the provided code using [div] instead of <div>).

    On the default version of the file (with no modifications), this code should be placed on line 245.

    Note, this code is subject to change to this exact line number may change in the future.

  7. #7
    Member
    Join Date
    Feb 2003
    Posts
    252

    Default

    Quote Originally Posted by cPanelDavidG View Post
    You don't place the HTML/CSS code inside the API2 code. You put it after the API2 code (after ?>) not inside the API2 code (indicated by the provided code using [div] instead of <div>).

    On the default version of the file (with no modifications), this code should be placed on line 245.

    Note, this code is subject to change to this exact line number may change in the future.
    Thanks.....that worked.

    Mike

Similar Threads & Tags
Similar threads

  1. Add link to Interact Menu of cPanel.net to Documentation Suggestions site
    By inetbizo in forum Feature Requests for cPanel/WHM
    Replies: 1
    Last Post: 12-01-2010, 08:03 AM
  2. new menu
    By evrynet in forum cPanel Developers
    Replies: 3
    Last Post: 08-08-2007, 08:26 AM
  3. IP functions menu
    By darjohn in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-11-2006, 09:28 AM
  4. Add-ons menu doesn't appear!!
    By Fbarajas in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-13-2005, 08:21 PM
  5. Add a custom link to your Cpanel menu
    By glassjoe in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-14-2004, 03:16 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube