Custom Modules

From AWBS Wiki
Revision as of 16:44, February 2, 2009 by Samdrams (Talk | contribs)

Jump to: navigation, search

If you would like to create a module for a payment gateway, hosting control panel or registrar that is currently unsupported (not integrated) in AWBS, you will first need our devkit (available upon request).


Custom Payment Processors

Custom Offsite processors:

For custom offsite processors (processors that take the customer to their website to gather the credit card information), you will use the includes/cp3.php already in AWBS along with the samplecallback.zip from the devkit.

The cp3.php file is where you will edit the information that gets passed to the processor.

The samplecallback page can be renamed as desired and should be placed in your AWBS web directory. Setup the return url to point at this page at your processor or in the cp3.php file if the processor supports passing in the return page.

More information is given in the devkit....


Make sure you have selected 'custom offsite' module in the system setup, module setup of AWBS.


Custom Onsite processors:

For custom onsite processors (processors where the credit card information is gathered on your website), you will need to use the includes/cp2.php file already in AWBS along with the ccfunctions.php file in the devkit. The ccfunctions.php file goes in the includes/customonsite directory.

More information is in the devkit....


Make sure you have selected 'custom onsite' module in the system setup, module setup of AWBS.


Custom Registrar Module

Custom Hosting Control Panel Module

Built in Variables

Most available $params are set as:

  • $params['uname']= Username for new account (This is the username that will be used by the Hosting Panel)
  • $params['pass']= Password for new account (This is the password that will be assigned to the above username)
  • $params['ownerid']= Users AWBS username
  • $params['userid']= Users ID in users table
  • $params['term']= Term for new account
  • $params['seed']= Package identifier (OrderID)
  • $params['cTld']= TLD
  • $params['cSld']= SLD
  • $params['realdomain']= If idn, the encoded domain SLD (you should always use this variable);
  • $params['idn']= Is IDN ( 1 or 0 )
  • $params['idnname']= idn name;
  • $params['idndomain'] = "$idnname.$cTld";
  • $params['cpid']= Package ID
  • $params['plan']= Local plan name
  • $params['realplan']= Server plan name
  • $params['servernewip']= IP
  • $params['server']= Server
  • $params['servertype']= Server type
  • $params['domain']= Full domain name;
  • $params['dns1']= dns1
  • $params['dns2']= dns2
  • $params['dns3']= dns3
  • $params['dns4']= dns4
  • $params['uemail']= Users email;
  • $params['regtype']= Queue type

You can also create your own variables and pull information directly from the AWBS Database. Example:

$this_user = sqlarray("select id,fname,lname from users where username='".$params['ownerid']."'");

Starting your Custom Module

Download the V3 devkit from http://www.awbs.com or your authorized reseller.

For creating a custom hosting module you will need to use the file yourmodulenamev3.php from the /hosting/includes/yourmodulename folder of the zip.

Save this file somewhere that you can access it. Rename it to what you would like to name your module. You MUST keep the v3 at the end of the file name. Example: cpanelv3.php

Open the file for editing.

You will notice that there is already predefined functions created. These are ONLY an example and will not work out of the box.

Defined Functions

Package Specifics

Using Custom Fields in Package Specifics

Example Functions

Custom Forum Module

Edit the user_forums.php file in the includes/forum directory with your custom forum account create code.

In the AWBS Configuration area, enter the Forum Setup Configuration page. Select Custom Forum 1 as your Forum Type. Complete all configuration fields as per your forum software/installation.