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.

Addon install in WHM and in cPanel

Discussion in 'cPanel Developers' started by lvalics, Jan 8, 2006.

  1. lvalics

    lvalics Active Member

    Joined:
    Sep 30, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    I have a small script which I want to Add to Add-ons section in WHM for ADMIN and also a user part for be in cPanel.
    I need some help, cause I did not saw any good documentation on this.
    Any help will be appreciate.
    I'm interested which files to edit, where to add links etc.
    Also is important that on an update to not be overwritten.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It's actually fairly simple. It's just not documented and you have to hack around to get it working.

    Here's a few pointers (giving away the weeks of work I did getting this up and running) using the cPanel Pro API (so cPanel Pro needs to be installed):

    1. Application in WHM itself:

    Check out existing perl CGI scripts in /usr/local/cpanel/whostmgr/docroot/cgi/addon_*.cgi

    2. Adding a selectable feature for cPanel accounts:

    Create a new file in /usr/local/cpanel/whostmgr/addonsfeatures/ with a unique name as:

    /usr/local/cpanel/whostmgr/addonsfeatures/uniquename

    With:

    Code:
    cpanelpro_unqiuename:This is my cPanel Feature
    To use that feature:

    /usr/local/cpanel/base/frontend/x/cells/uniquename.html

    With:

    Code:
    <cpanelfeature cpanelpro_uniquename>
    <cpanelcell align="center" valign="top">
    <td width="75" nowrap><a href="cells/uniquename/index.html"><img border="0" src="cells/uniquename/myapp.gif" width="32" height="32"></a><br>
    <br>
    <a href="cells/uniquename/index.html">My cPanel Feature</a></td>
    </cpanelcell>
    </cpanelfeature>
    /usr/local/cpanel/base/frontend/x/cells/uniquename/index.html contains the calls to your application depending on how you're going to implement it. I'll leave you to work out that bit :p
     
  3. lvalics

    lvalics Active Member

    Joined:
    Sep 30, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    TX for the help, so far I managed to work, I have some small problems still on user part with links, but I will manage it.
    My strange question is, how can be done it to be applied to all skins??
    I should copy in each one?
    What if Admin will add a new skin?

    Also on upgrade of cPanel (WHM) will be deleted this files (maybe cPanel see it as unknown.

    And the last question but the last painfull ...
    HOW can be that a software like cPanel with thousands of server managed with CP not have a decent API??
     
  4. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    That's cool... thanks for the tip :)
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The simplest way is to symlink the cells/ directory to the x theme. For example:
    Code:
    ln -sv /usr/local/cpanel/base/frontend/x/cells /usr/local/cpanel/base/frontend/x2/cells
    ln -sv /usr/local/cpanel/base/frontend/x/cells /usr/local/cpanel/base/frontend/xmail/cells
    ln -sv /usr/local/cpanel/base/frontend/x/cells /usr/local/cpanel/base/frontend/monsoon/cells
    ln -sv /usr/local/cpanel/base/frontend/x/cells /usr/local/cpanel/base/frontend/bluelagoon/cells
    
    However, that will only work if the theme supports the cPanel Pro API correctly, i.e. the following directive that appears in /usr/local/cpanel/base/frontend/x/index.html:

    <cpanel dynamicinclude="cells/*.html">
     
  6. lvalics

    lvalics Active Member

    Joined:
    Sep 30, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    TX for the hint ...
     
  7. lvalics

    lvalics Active Member

    Joined:
    Sep 30, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Is there a way to get HASH details from somewhere if I run a local file?
    We try to use Accounting.php.inc and require a hash, even from localhost, or we miss something??
     
  8. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    So, does this mean one can add anything (blogs, forums, CMS', etc) to cPanel Addons?
     
  9. rejected

    rejected Well-Known Member

    Joined:
    Sep 19, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Remote Access Key left hand side of WHM
     
  10. lvalics

    lvalics Active Member

    Joined:
    Sep 30, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    We want it to get it without ask for users to enter it, somewhere automatically should be keeped.
     
  11. ganesh.rao

    ganesh.rao Member

    Joined:
    Sep 13, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    The aim of security is lost then. I doubt there is a way to get that hash automatically.:eek:
     
  12. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    I am agree with you? there was nothing like security........
     
  13. ctrlogic

    ctrlogic Member

    Joined:
    Nov 4, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    The thing is, maybe this thread is too old to answer my questions today, as cpanel may have changed, but I can't find a /usr/local/cpanel/base/frontend/x/cells/ directory.
     
  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
    The frontend is for the cPanel interface. If you are looking to add a new icon to the cPanel interface, you can just use our cPanel Plugin Installation File Generator: http://cpanel.net/developer/overview.html
     
  15. ctrlogic

    ctrlogic Member

    Joined:
    Nov 4, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I have used the plugin generator already, I can see the new plugin in my customers feature list but there's no icon added in their cpanel... (Don't know why because I have browsed an icon in the generator)...
     
  16. ctrlogic

    ctrlogic Member

    Joined:
    Nov 4, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Also I can't seem to figure out, with what I've read, the difference between a plugin and an addon...
     
  17. 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
    This thread is very old, so that could be assisting with the confusion. We haven't supported cPanel add-ons (not to be confused with cPAddons) for a number of years now. cPanel Plug-ins is the way to add new functionality to the cPanel interface now.
     
    #17 cPanelDavidG, Apr 28, 2009
    Last edited: Apr 28, 2009
  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
    Try running the following command via SSH as root:

    Code:
    /usr/local/cpanel/bin/rebuild_sprites
     
  19. ctrlogic

    ctrlogic Member

    Joined:
    Nov 4, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Still nothing available in their cpanel

    Ant by the way thanks for helping me with this :)
     
  20. ctrlogic

    ctrlogic Member

    Joined:
    Nov 4, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I'm using the x theme
     
Loading...

Share This Page