Install own scripts on new cPanel version

bidware

Active Member
Sep 2, 2005
31
0
156
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.
 

bidware

Active Member
Sep 2, 2005
31
0
156
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.
 

bidware

Active Member
Sep 2, 2005
31
0
156
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.
 

attackrabbit

Registered
PartnerNOC
Apr 5, 2007
3
0
151
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:
 

attackrabbit

Registered
PartnerNOC
Apr 5, 2007
3
0
151
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:
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
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!
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
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!

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
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
it works perfectly ! .


Thanks!
 
Last edited:

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
Please what to do to install the plugin also on x3mail ?

Thanks
 

bidware

Active Member
Sep 2, 2005
31
0
156
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.
 

bidware

Active Member
Sep 2, 2005
31
0
156
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?
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
Please what to do to install the plugin also on x3mail ?
Edge is out but the installation on x3mail still does not work.


Thanks