Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]

Modules and Plugins [+] Modules and Plugins [-]

cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]

cPAddons (Site Software) [+] cPAddons (Site Software) [-]

System Administration [+] System Administration [-]

Developer Software [+] Developer Software [-]

Back to All Documentation

Invisible cPAddon Scripts

If you create a cPAddon that is in some way associated with another cPAddon, or should otherwise not be "advertised" to all users, you can make it not show up in cPanel until at least one is installed on the user's site.

This is useful only if you make a link to it in the description of the regular cPAddon it is associated with, or otherwise reference it for whoever might need to use it (for example, in a document to your server techs or in an email to a customer informing them of a special option they have that is otherwise hidden).

For example, if you created a patched version of phpBB that adds some special functionality such as a new theme, you may only want to make this patched version available if the user is already using phpBB.

You can make "invisible" addons by prefacing the name with an underscore: 3rdParty::Whatever::_phpBB_with_foo_patch

Here is an example of a cPAddon that references 2 "invisible" related cPAddons.

package Vendor::CMS::FooPro

  use strict;
use warnings;

our $VERSION = '1.0.1';

my $pkg = __PACKAGE__;

our $meta_info =
  {    # see "$meta_info hash reference table" for details about this hashref
    'version' => '1.0',
    'description' =>
q(This are also two specialized verisions of FooPro with additional functionality. You can install these )
      . qq(themes by clicking here: [<a href="$ENV{'SCRIPT_NAME'}?addon::Vendor::CMS::_FooProLite">Foo Pro Lite</a>])
      . qq( [<a href="$ENV{'SCRIPT_NAME'}?addon::Vendor::CMS::_FooProInt">Foo Pro International</a>]);

#### action functions ##
sub install   { shift->stdinstall(@_) }
sub upgrade   { shift->stdupgrade(@_) }
sub uninstall { shift->stduninstall(@_) }

#### non action functions ##
sub installform   { print shift->{installform} }
sub upgradeform   { print shift->{upgradeform} }
sub uninstallform { print shift->{uninstallform} }

#### addon specific special functions ##

You might find these useful for:

  • Temporary installations (maybe a troubleshooting or diagnostic system for a tech to use to resolve a problem of some sort or use for testing).
  • cPAddons that might interact with each other in some way (ie, one that installs drop-in modules to an existing installation).
  • Alternate versions (Lite, Pro, Ecommerce addition, Romanian Centric).
  • Scripts that an admin may want readily available for use but does not want to advertise as available.
  • Specialized scripts that most people would have no use for and perhaps find confusing (Development, Astrophysics, Quantum Physics, DNA Sequencing, etc).

Topic revision: r8 - 19 Feb 2011 - 01:03:46 - Main.JustinSchaefer
CpanelAddons.InvisibleAddonScripts moved from Sandbox.InvisibleAddonScripts on 18 May 2009 - 17:08 by Main.JustinSchaefer