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.

Writing a custom cPanel plugin

Discussion in 'cPanel Developers' started by chumxzrv, Feb 16, 2015.

  1. chumxzrv

    chumxzrv Registered

    Joined:
    Feb 11, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I've written a custom plugin and it's working well. The PHP code is in /usr/local/cpanel/base/frontend/paper_lantern/... and I created a tarball with everything in it and when I run the install_plugin script it adds the icon to cPanel as it should.

    But I have to manually copy the PHP file into /usr/local/cpanel/base/frontend/paper_lantern/...

    Is there not a way to include the PHP code in the tarball and reference it in install.json such that the install_plugin script will copy it to the right location?

    According to the SDK docs:

    and

    So I'm assuming it shouldn't be necessary to create an install script.

    If I want to make this plugin available to others, do they really have to run the install_plugin AND manually copy the scripts?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The install.json/install_plugin scripts only add the item to the UI, and additional actions would require custom code/installation scripts. Internal case number 155073 is open with our documentation for information about to create a distributable cPanel plugin, which seems to be what you are aiming for.

    Thank you.
     
Loading...

Share This Page