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.

How to build a plugin???

Discussion in 'cPanel Developers' started by danielrostenne, Sep 25, 2007.

  1. danielrostenne

    Joined:
    Sep 24, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Are there any resources to help teach how to build a plugin for cPanel. Better yet... anybody out there wanna do it on contract?
     
  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
    cPanel Plugins are developed using API2. You can find documentation on API2 on our website at:

    http://www.cpanel.net/plugins/devel/
     
  3. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the info. However, the documentation only shows how to 1) generate an install file, 2) install cpanel plugins, and 3) API docs. (which shows how to create a hosting account for example. But, we don't need to know how to create an account, as our plugin won't run without an account being created!) There are no details on how all of this works together. It would be good to get the source code for a working plugin. For example, PHPBB works in cpanel. The hosting account user can login to cpanel and install PHPBB if they want. Is this a plugin? If so, where can we get the complete source for it? In the install file generator, it asks for the access URL, but there is no documentation on how our actual program that does the installation of our own custom script has to work. There seems to be a lot missing from the documentation of Plugins. If you can point us to some sample source or more documentation that would be perfect.


    Thank you.
     
  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
    Actually phpBB is a cPAddon, not a cPanel Plugin. There's documentation on how to create cPAddons at:

    http://www.cpanel.net/docs/cpaddons/

    It also includes examples :).
     
  5. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ok. Thank you. I already created an add on with an older version of cpanel for our script, and it worked fine. But, cPanel came out with a new version that was not backward compatible with all cpanel addons written for the new version. So, basically, I have to rewrite it all again, and the documentation you mentioned was probably for the old system, and doesn't have any complete example source. I'm sure some developers have access to the proper documentation for this, but so far I haven't found anything on cpanel.net about this. There are also several methods of having additional features in cpanel: addons, plugins, and I believe 2 other names of basically doing the same thing (why is this?). But, where is the documentation for all of this?
     
  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
    All of our textual documentation is available at http://www.cPanel.net/support/docs - including the link to developer resources for using hooks, API2 and the XML-API (successor to the WHM API from version 10).

    Note that WHM Add-ons are now called WHM Plugins to avoid possible confusion with cPAddons.

    Additionally, while the underlying cPAddons system has changed from version 10 to 11, I am unaware of any incompatibility issues about individual cPAddons. The main issue people were reporting in early builds of version 11 was the inability to install to ~/public_html and being forced to install to a subdirectory within public_html.
     
  7. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    The old version of addons simply don't work with the new system. Why do they simply not show up in cpanel at all? Users shouldn't have to be forced to install to a subdirectory, they should be able to install to the root if they want. So, how can we make this work?
     
  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
    Does the plugin show in X/X2 but not X3 or not in any of those themes? If it is not showing in any of the themes, have you double-checked your feature lists to ensure your plugin is enabled?

    The requirement for installing to a subdirectory has been removed in later builds of cPanel 11: http://bugzilla.cpanel.net/show_bug.cgi?id=5591
     
  9. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    cPanel Plugin Icon Size?

    Anyone know what size the icon is supposed to be? There is no mention of it anywhere in the docs, and the Install File Generator keeps erroring out on the icon file size no matter what size we try. We need to know the magic numbers ASAP; this is holding back a significant deployment. We can't believe cPanel moved to this new system and points everyone to this new tool without providing sufficient docs; not a smooth move. We've had an app we had integrated into cPanel 10 offline while we've been wasting our time trying to figure this darn thing out; customers aren't happy.
     
  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
    Are you sure you are uploading a .gif, .jpg or .png image as the icon? If so, what is the error that is being generated by the Install File Generator?

    I just took a random image (my avatar here on the forums) and it worked just fine.
     
  11. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Yes, it is the same GIF image we use in the cPanel 10 control panel.

    Error is (for a test of 40x40):

    (/dev/stdin: GIF image data, version 89a, 40 x 40 is not valid)
     
  12. 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
    Thank you, I was able to replicate this issue and will bring it to the attention of our website team.
     
  13. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Has this gotten anywhere? We've gotten the ultimatum email from cPanel that all servers have to be using cPanel 11 beginning 12/1. If this issue isn't resolved by then (actually with enough time for implementation and test/debugging, which by my count is now only 10 days and that includes the holiday), smelly brown stuff is gonna hit the fan big time.

     
  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 verbiage has been updated as to note only support for JPG and PNG images.
     
Loading...

Share This Page