chamithlkml

Member
Apr 2, 2014
22
0
1
cPanel Access Level
DataCenter Provider
Hi all,
I'm facing an issue in installing an addon using cPanel sync server. It was successfully installed in whm. But I couldn't find it anywhere available to access. It can be seen installed in Install cPAddons Site Software, but no way to access the addon. Please correct my way. Any help is highly appreciated. Thanks.
 

chamithlkml

Member
Apr 2, 2014
22
0
1
cPanel Access Level
DataCenter Provider
Hi,
I installed it at cPanel->Install cPAddons Site Software and I can see it there. It is a sample plugin written in Vendor:CMC:myplugin
namespace. Where can I access it..? Please help.
Thanks.

Could you clarify the exact locations you are expecting to see it, or where you have looked and failed to find it?

Thanks.
 

chamithlkml

Member
Apr 2, 2014
22
0
1
cPanel Access Level
DataCenter Provider
How to make plugin available in Home-> cPanel-> Manage Plugin

Hi all,
I'm developing a sample cPanel plugin and I want to make it apear in WHM Home -> cPanel -> Manage Plugin (Like an internally available plugin). Please let me know is that possible? And how can I do that?
Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
You should be able to browse to the "Site Software" option within cPanel and see the cPAddons that you have installed and made available.

Thank you.
 

chamithlkml

Member
Apr 2, 2014
22
0
1
cPanel Access Level
DataCenter Provider
That's great. Thanks for the tip. But I have one more thing to clarify.

I used following script in .pm file in distributed cpanel sync server.

Code:
package dms_inc::CMS::dms;

# always use these modules here:
use strict;
use warnings;

our $VERSION = '0.0.1';    # version of Foo.pm *not* the addon script's version

my $pkg = __PACKAGE__;     # leave this as is

our $meta_info =
  {    # see "$meta_info hash reference table" for details about this hashref
    'version' => '1.0',
    'description' => 'Foo is a tool to do Bar and Baz',
  };

sub install {

    print "sub install was called.";

}


sub upgrade {
    
    print "sub upgrade was called.";

}

sub uninstall {
    
    print "sub uninstall was called.";

}

#### non action functions ##

sub installform {

    print "sub installform was called.";

}

sub upgradeform {

    print "sub upgradeform was called.";

}

sub uninstallform {
    
    print "sub uninstallform was called.";

}


1;
I can see "sub installform was called" is shown under install. Please tell me how can I access install() method through that. Shall I display a form and pass the request through submit of that form..? What is the best way to handle this..?
 

chamithlkml

Member
Apr 2, 2014
22
0
1
cPanel Access Level
DataCenter Provider
How to introduce installform in cPaddon scripts

I'm building a cPaddon script to install a plugin. I could see that
Code:
print shift->{installform}
in installform sub. Please help me how to write installform. Do I need to include them in the installation folder..? So how should I do that..? Please help.