Difference between revisions of "Custom Modules"

From AWBS Wiki
Jump to: navigation, search
m (Protected "Custom Modules" [edit=sysop:move=sysop])
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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).
+
__NOTOC__
 +
[[#Adding/creating a Custom Module|Adding New Modules using the Devkit]]<br />
 +
[[#Custom Forum Module|Custom Forum Module]]
  
 +
== Adding/creating a Custom Module ==
  
== Custom Payment Processors ==
+
Custom modules can be added for;
 +
* Domain registrars
 +
* Hosting control panels
 +
* Offsite credit card processor (customer is taken to processor for cc information/payment)
 +
* Onsite credit card processor (customer enters cc information on your website)
 +
* Payment gateways (such as paypal)
  
+
1. Create a directory in your includes directory. Name it as desired.<br />(will be how it displays in your AWBS admin area, english alpha numeric no capital letters is recommended)
  
=== Custom Offsite processors: ===
+
2. Download the v3 devkit from your download area where you purchased AWBS. If you do not find it there, make sure your support contract is active.
  
   
+
3. Selecting the appropriate devkit, copy the file within it's includes/yourmodulename directory to your newly created directory as per step 1 above.<br />
 +
Rename the file to match your directory name and add v3 to the end.
 +
  Example:
 +
If you created includes/myccproc in step 1 above,<br />you would rename yourmodulenamev3.php to myccprocv3.php
  
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.
+
4. Edit your file replacing all instances of 'yourmodulename' with your directory name as per the directory name created in step 1 above.
  
The cp3.php file is where you will edit the information that gets passed to the processor.
+
5. Edit the code as per your third party's API as needed to create your module.
  
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.
+
6. Edit the $res= add_module line in the module install function as per the remarked example provided.
  
More information is given in the devkit....
+
7. In AWBS, go to Configuration, Module Setup and click the Add New Module link at the top right of that page.
 +
Enter the directory name exactly as it appears in the includes directory. Save.
  
+
8. Locate your new module in the appropriate section of the module setup page and enable/configure as per fields provided.
  
Make sure you have selected 'custom offsite' module in the system setup, module setup of AWBS.
+
NOTES:
 +
Offsite cc processors and payment gateway processors will have a callbacksample.php file.<br />Rename that file as desired and place it into your AWBS site's web directory.<br />Edit code as per your processor.<br />
 +
Domain Registrar devkit contains a templates directory with sample files for your<br />member's domain manage interface. Rename yourmodulename to your directory name as per step 1 above<br />and place into the common_files directory.<br />Edit as needed.
  
+
== Custom Forum Module ==
  
=== Custom Onsite processors: ===
+
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.
 
+
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 ==
+
 
+
 
+
== Custom Forum Module ==
+

Latest revision as of 17:18, February 2, 2009

Adding New Modules using the Devkit
Custom Forum Module

Adding/creating a Custom Module

Custom modules can be added for;

  • Domain registrars
  • Hosting control panels
  • Offsite credit card processor (customer is taken to processor for cc information/payment)
  • Onsite credit card processor (customer enters cc information on your website)
  • Payment gateways (such as paypal)

1. Create a directory in your includes directory. Name it as desired.
(will be how it displays in your AWBS admin area, english alpha numeric no capital letters is recommended)

2. Download the v3 devkit from your download area where you purchased AWBS. If you do not find it there, make sure your support contract is active.

3. Selecting the appropriate devkit, copy the file within it's includes/yourmodulename directory to your newly created directory as per step 1 above.
Rename the file to match your directory name and add v3 to the end.

Example:
If you created includes/myccproc in step 1 above,
you would rename yourmodulenamev3.php to myccprocv3.php

4. Edit your file replacing all instances of 'yourmodulename' with your directory name as per the directory name created in step 1 above.

5. Edit the code as per your third party's API as needed to create your module.

6. Edit the $res= add_module line in the module install function as per the remarked example provided.

7. In AWBS, go to Configuration, Module Setup and click the Add New Module link at the top right of that page. Enter the directory name exactly as it appears in the includes directory. Save.

8. Locate your new module in the appropriate section of the module setup page and enable/configure as per fields provided.

NOTES:
Offsite cc processors and payment gateway processors will have a callbacksample.php file.
Rename that file as desired and place it into your AWBS site's web directory.
Edit code as per your processor.
Domain Registrar devkit contains a templates directory with sample files for your
member's domain manage interface. Rename yourmodulename to your directory name as per step 1 above
and place into the common_files directory.
Edit as needed.

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.