You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

Table of Contents

Installing cPanel

  1. Visit [Settings] > [Company] > [Modules] > Available.
  2.  Click the "Install" button within the cPanel module listing.

When the module is installed, it should automatically load the "Manage" screen for the module. You can get back here any time by visiting [Settings] > [Company] > [Modules] > Installed and by clicking the "Manage" button for the module.

cPanel Overview

The "Manage" screen displays an overview of all of your cPanel servers and server groups, and lists all servers and server groups that are configured for cPanel.

Adding a cPanel/WHM Server

  1. From the "Manage" screen, click the "Add Server" button.
  2. Fill out the following options and  click the "Add Server" button:
OptionDetails
Server LabelA friendly name for this server, i.e. "Server 1".
HostnameThe hostname of your cPanel/WHM server, i.e. "server1.hostname.com".
User Name

The username associated with your WHM login credentials.

Remote KeyThe remote key found in WHM under Cluster/Remote Access > Setup Remote Access Key.
Use SSL...Select this option to send API requests over SSL (recommended)
Account Limit

The maximum number of cPanel accounts that should be created. Leave blank for unlimited.

Name Servers

Enter the name servers that should be used, tags for these are included in the package welcome email.

Any number of name servers may be added.

NotesAny internal notes pertaining to this server.

 

Adding a Server Group

  1. From the "Manage" screen, click the "Add Server Group" button.
  2. Fill out the following options and click the "Add Group" button:
OptionDetails
Group Name

A friendly name for this server group.

Add OrderChoose how servers in this group will be selected for provisioning.
Assigned ServersSelect servers under "Available Servers" and click to move them to the left column to add them to the group.

 

Welcome Email

When creating or editing a package that uses this module, the following tags will be available:

TagsDescriptionNotes
{module.host_name}The host name of the server that the service was provisioned one.g. "domain.com"
{module.name_servers}An array of available name servers for this module

Array elements must be looped over in the email template. See below for an example.

{package.type}The package meta typee.g. "standard", "user", "reseller", etc.
{package.package}The package meta package namee.g. "Bronze"
{package.acl}The package meta access control list 
{service.cpanel_username}The service field for the cPanel account username 
{service.cpanel_password}The service field for the cPanel account password 
{service.cpanel_domain}The service field for the cPanel domaine.g. "domain.com"

 

 

Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, a dump of the tags are shown below.

 

The {module} object
stdClass Object
(
    [host_name] => domain.com
    [name_servers] => Array
        (
            [0] => ns1.domain.com
            [1] => ns2.domain.com
		)
 )
The {package} object
stdClass Object
(
    [id] => 32
    [id_format] => {num}
    [id_value] => 12
    [module_id] => 4
    [name] => Package Name
    [description] => Package Text Description
    [description_html] => <h1>Package HTML Description</h1>
    [qty] => 3
    [module_row] => 6
    [module_group] => 
    [taxable] => 0
    [status] => active
    [company_id] => 1
    [id_code] => 12
    [email_content] => Array
        (
            [0] => stdClass Object
                (
                    [lang] => en_us
                    [html] => <p>Welcome email html</p>
                    [text] => Welcome email text
                )
        )

    [pricing] => Array
        (
            [0] => stdClass Object
                (
                    [id] => 43
                    [term] => 123
                    [period] => day
                    [price] => 3.0000
                    [setup_fee] => 0.0000
                    [cancel_fee] => 0.0000
                    [currency] => AUD
                )

            [1] => stdClass Object
                (
                    [id] => 42
                    [term] => 0
                    [period] => onetime
                    [price] => 2.0000
                    [setup_fee] => 0.0000
                    [cancel_fee] => 0.0000
                    [currency] => USD
                )

        )

    [meta] => stdClass Object
        (
            [package] => Bronze
            [type] => standard
        )

    [groups] => Array
        (
            [0] => stdClass Object
                (
                    [id] => 2
                    [name] => Standard Group
                    [type] => standard
                )

        )

    [package] => Bronze
    [type] => standard
)
The {service} object
stdClass Object
(
    [id] => 124
    [parent_service_id] => 
    [id_format] => {num}
    [id_value] => 119
    [pricing_id] => 42
    [client_id] => 3
    [module_row_id] => 6
    [coupon_id] => 
    [qty] => 1
    [status] => active
    [date_added] => 2013-03-07 18:57:45
    [date_renews] => 
    [date_last_renewed] => 
    [date_suspended] => 
    [date_canceled] => 
    [id_code] => 119
    [fields] => Array
        (
            [0] => stdClass Object
                (
                    [key] => cpanel_domain
                    [value] => domain.com
                    [serialized] => 0
                    [encrypted] => 0
                )

            [1] => stdClass Object
                (
                    [key] => cpanel_password
                    [value] => password
                    [serialized] => 0
                    [encrypted] => 1
                )

            [2] => stdClass Object
                (
                    [key] => cpanel_username
                    [value] => domainco
                    [serialized] => 0
                    [encrypted] => 0
                )

        )

    [package_pricing] => stdClass Object
        (
            [id] => 42
            [package_id] => 32
            [term] => 0
            [period] => One time
            [price] => $2.00
            [setup_fee] => $0.00
            [cancel_fee] => $0.00
            [currency] => USD
        )

    [package] => stdClass Object
        (
            [id] => 32
            [id_format] => {num}
            [id_value] => 12
            [module_id] => 4
            [name] => Package Name
            [description] => Package Text Description
            [description_html] => <h1>Package HTML Description</h1>
            [qty] => 3
            [module_row] => 6
            [module_group] => 
            [taxable] => 0
            [status] => active
            [company_id] => 1
        )

    [name] => domain.com
    [cpanel_domain] => domain.com
    [cpanel_password] => password
    [cpanel_username] => domainco
)

 

Displaying Name Servers in the Welcome Email

The {module.name_servers} tag must be looped through to display the name servers.

Consider an example where the module has two name servers set, named "ns1.domain.com" and "ns2.domain.com". The following can be added to the email template to output the name servers:

{% for name_server in module.name_servers %}
Name server: {name_server}{% endfor %}

The welcome email will display this as:

Name server: ns1.domain.com
Name server: ns2.domain.com
  • No labels