How To Create a Module

There are a couple ways to create a Module but this is the main structure.

Step:
Create a new php file and make sure to include the following

<?php

if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

/**********************************/
/* Configuration */
/* */
/* You can change this: */
/* $index = 0; (right side off) */
/**********************************/
$index = 1; //Turn on side blocks
/**********************************/

these are all required to let nuke recognize the page. It is self explanatory but the thing to note is $ index = 0; . Changing the 0 to 1 adds the left blocks to the page. Add your content after include("header.php"); then finish your file by adding the following

include("footer.php");
?>

You can also add tables to enclose your content by using OpenTable(); and CloseTable(); . Save your file as index.php and create a folder in your Modules directory with the name of your new module. Place the index.php inside that folder then activate your new module from your Admin panel.

Note: To create your content it's easier if your create the page in html then convert it to php. You can also include a html page by using an Iframe.

A complete module would look like the following:

<?php
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

/**********************************/
/* Configuration */
/* */
/* You can change this: */
/* $index = 0; (right side off) */
/**********************************/
$index = 1;
/**********************************/


OpenTable();

Your content here

CloseTable();
include("footer.php");

?>