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.

Install own scripts on new cPanel version

Discussion in 'cPanel Developers' started by bidware, Mar 11, 2007.

  1. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    i had my addon scripts working fine in cPanel. But, then, cPanel changed their version and didn't allow any addon scripts to be backword compatible. So, now, I have to write them all again. There is no documentation as I can see, and other posts seem to be only about creating the scripts for the old version of cPanel. So, how exactly would I create my addon scripts and set it up in cPanel?

    Thank you.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I can see in WHM, there are 3 options for cpanel addons. One is fantastico, one is relative to the old version of cpanel, as when I enable the scripts in WHM, they don't show up anywhere on cpanel, and the third seems to be for the new version of cpanel. Now, there's a fourth called plug-ins? Will this show up as it's own icon in cpanel (beside the fantastico icon for example.) Or will this be displayed in the script library menu? Is there a working example that we can use? That's much faster than following the documentation. Thanks.
     
  4. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    So, there are several different ways to get our custom scripts onto cpanel, and in WHM. But, anyone have any examples or more documentation? As, there doesn't seem to be a lot to go on.

    thanks.
     
  5. attackrabbit

    attackrabbit Registered
    PartnerNOC

    Joined:
    Apr 5, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    WHM and cPanel Custom Plugins

    This seems to be a common problem. I've been following the instructions at http://www.cpanel.net/plugins/devel/installgen.html for installing a custom plugin but my version apparently lacks the necessary /usr/local/cpanel/bin contains register_cpanelplugin program for registering a new plugin.

    Can anyone point out either 1) documentation around these version versus addon versus plugin points of confusion or 2) link us to a download site or procedures for acquiring the necessary setup to do custom plugins?

    Thanks!:eek:
     
  6. attackrabbit

    attackrabbit Registered
    PartnerNOC

    Joined:
    Apr 5, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    RELEASE vs EDGE build

    Today I received word from support that the reason why I don't see the following necessary files for the latest (fastest?) way to register cpanel plugins is, in fact, version related. The following are not installed in the RELEASE build, only the EDGE build:

    ====
    register_cpaneladdonmodule
    register_cpanelplugin
    unregister_cpaneladdonmodule
    unregister_cpanelplugin
    ===

    Unfortunately, EDGE is not recommended for production servers. Does anyone have documentation on an older process for this (installing custom plugins) that s/he would recommend?:confused:
     
  7. attackrabbit

    attackrabbit Registered
    PartnerNOC

    Joined:
    Apr 5, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
  8. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    I'm following instructions at http://www.cpanel.net/plugins/devel/install.html

    I entered following data


    Name of the Plugin. asspdeluxe
    Module Description: Spam and Antivirus protection (ASSP Deluxe for Cpanel)
    Feature Manager? unchecked
    Display Name: Spam and Antivirus protection (ASSP Deluxe for Cpanel)
    Display Group: Mail
    Display Order: 999
    Access URL: asspdeluxe/index.php
    Plugin Icon:F:\icon.jpg


    I generated asspdeluxe.cpanelplugin which contains this

    Code:
    #cpanel plugin file 1.0 (for use with /usr/local/cpanel/bin/register_cpanelplugin)
    version: 1.0
    name:asspdeluxe
    description:Spam and Antivirus protection (ASSP Deluxe for Cpanel)
    featuremanager:0
    url:asspdeluxeindex.php
    if:
    itemorder:999
    itemdesc:SpamandAntivirusprotection(ASSPDeluxeforCpanel)
    group:mail
    image:/9j/4AAQSkZJRgABAQAAAQABAAD//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcg
    
    
    ..... all the image code here .. I cannot post all since over 10000 chars
    
    
    blWl3b7PQdsX0/U/40UUVPsqf/PuH/gEf8vJfce9HZei/I//2Q==
    
    I uploaded it on /usr/local/cpanel/bin/asspdeluxe.cpanelplugin

    When I execute

    /usr/local/cpanel/bin/register_cpanelplugin asspdeluxe.cpanelplugin

    I receive this


    (internal death) Thu Apr 19 08:41:26 2007 [20256] error: Usage /usr/local/cpanel/bin/register_cpanelplugin <cpanelplugin config file> at /usr/local/cpanel/bin/register_cpanelplugin line 16.
    at /usr/local/cpanel/bin/register_cpanelplugin line 16
    Usage /usr/local/cpanel/bin/register_cpanelplugin <cpanelplugin config file> at /usr/local/cpanel/bin/register_cpanelplugin line 16.
    [a fatal error or timeout occurred while processing this directive]


    What's wrong ?

    Thanks!
     
  9. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider

    You have to have the full path to the plugin file probably:

    ex:

    /usr/local/cpanel/bin/register_cpanelplugin /usr/local/cpanel/bin/sample.cpanelplugin
     
  10. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    it works perfectly ! .


    Thanks!
     
    #10 Radio_Head, Apr 19, 2007
    Last edited: Apr 19, 2007
  11. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    Please what to do to install the plugin also on x3mail ?

    Thanks
     
  12. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Is your example code for addons (or plugins) that was already written? Also, what do you mean when you mentioned 'image code'. I need to write my own code to get it to install a script on a user's hosting account. But, there's no mention of any documentation or anything like that so far in this thread. so what gives? Cpanel 'support' is non-existant, as you can't submit a ticket directly to the cPanel support ticket system, as they refer you to your datacenter. But, the datacenter says they don't support 'custom' addon-scripts. So, why is there no example to follow? Our 'experts' in this forum don't seem to know anything about it either.
     
  13. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Maybe my questions are not clear. I need to find documentation or sample code to interface with cpanel and take as input the users directory, password, etc. then copy the base script files to the users hosting account, then install the mySQL database and configure the database and configuration files with the proper values. Before, half of that was done by Cpanel in the 'addon' scripts (Not Plugins), and half was done by myself as I didn't have a lot of control on what I could do with it. I am assuming that your 'plugins' are just an interface to 'tell' cpanel that my addon exists. But, what about the rest of the code to actually do the installation of the script into the users hosting account?
     
  14. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    Please what to do to install the plugin also on x3mail ?
    Edge is out but the installation on x3mail still does not work.


    Thanks
     
Loading...

Share This Page