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 Additional Icons and Links

Discussion in 'cPanel Developers' started by mwaraitch, Apr 18, 2009.

  1. mwaraitch

    mwaraitch Active Member

    Joined:
    Jan 28, 2007
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Islamabad
    cPanel Access Level:
    Root Administrator
    Hi,
    1. If some can advice steps needed to add additional box containing links / icons for on top of the existing boxes in x3 theme.

    2. Same way I plan to add a box containing links to important pages of my web site in left column of the theme. Some thing like http://74.52.116.98:2082/frontend/x3/index.php

    What are steps needed in this.?
    I think its not covered in branding, its like changing a bit of structure and CSS and changes to pages, but I am not sure where these are located and how to edit these.

    An assistance will be appreciated.

    Regards
     
  2. 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
    There is no official method for doing this at this time.

    The easiest thing to do is to duplicate the HTML generated by the APIs for creating those boxes then placing it above/below the API code in the <div id="boxes"> section:

    HTML:
    <div id="YourNameHere" class="itembox">
      <div id="YourNameHere-bdrop" class="celldrop"> </div>
      <div class="cellbox">
      			
                <h6   id="YourNameHere-header" title="Double click to collapse/expand.  Click to drag." style="clear:none;" ondblclick="rollbox(this);" class="ie-hover"><div id="YourNameHere-expander"  class="box-collapse-control" style="float:right" onClick="rollbox(this);"> </div>Your Name Here</h6>
                <div id="YourNameHere-body">
                    Your Content Here
           <div class="clearit"> </div>
       </div>
      </div>
      <div id="YourNameHere-adrop" class="celldrop"> </div>
    </div>
    If you're just linking to pages, an easy way to do this is go to WHM -> cPanel -> Modify cPanel/WHM News. You can use HTML tags here. This will be displayed above the sidebar on the left side of the screen.

    If you still prefer to manually code this into your style - this can be done via the Branding Editor. Just let me know if you want to do this instead and I'll assist you.
     
  3. mwaraitch

    mwaraitch Active Member

    Joined:
    Jan 28, 2007
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Islamabad
    cPanel Access Level:
    Root Administrator
    Thanks a lot for your advice.
    Could you please let me know whats the starting point on accessing html generated by the APIs, ie any document / related link which I can study to work on it.

    Regards
     
  4. 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
    A code sample with the HTML code you are looking for is immediately below the line of text you quoted.
     
  5. mwaraitch

    mwaraitch Active Member

    Joined:
    Jan 28, 2007
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Islamabad
    cPanel Access Level:
    Root Administrator
    Thanks, I was referring to API referred in you post, where I can get to know more about it, like how to access / manage it.

    Regards
     
  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
    Well there are only a few things in the code for the cPanel interface, they are:

    - HTML
    - Plain Javascript
    - The YUI library (Javascript that handles the AJAX items in the user interface)
    - API1 and API2

    The specific API call I was referring to is rather inflexible. All it does is display the sections and icons that are supposed to be displayed for that account. If you're looking to disable icons for the cPanel interface, just use Feature Manager in WHM.

    To use cPanel API1 and API2, just insert the raw API1 and API2 tags into your banding and cpsrvd (the cPanel/WHM/Webmail daemon) will process them accordingly.

    I covered the syntax of API2 tags in my Customizing cPanel presentation at the 2007 cPanel Conference: http://twiki.cpanel.net/twiki/pub/A...urces/TrainingSlides07/Customizing_cPanel.pdf

    You can find some limited documentation on API2 at: http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ApiTwo

    Further API documentation is currently being worked on. In the meantime, the easiest way to find additional API calls is by analyzing the contents of the cPanel theme at /usr/local/cpanel/base/frontend/x3/. I advise against editing the contents of the theme itself, please use the Branding editor instead.
     
  7. aditya

    aditya Registered

    Joined:
    May 18, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hi,

    I also wish to add icon to my main site in the Cpanel, If anybody could please help me out.

    I have seen many site have included their own section in Cpanel above the Preferences section. If anybody could tell me how do I add it in my Cpanel then I will be highly thankful.

    I am having a reseller account with access to WHM also. So if it can be done by WHM then also please tell me the steps.

    Thanks a lot.
     
Loading...

Share This Page