UberBots Website Documentation

Module Template


Module Documentation

/* Module Name
 * version
 * Developed by 
 * Module description, as well as any other relevent information
 */

class mod_modName {
	
	/* This class is for the calendar module */
	
	public $title = 'Module Title'; //title of the module
	public $description = 'Module Description'; //description of the module 
	public $path = 'mod_modName'; //path to module files 
                                       (from /omni/modules)

	public function render($properties) {
		
		/* render function is the function that is called whenever the 
                   module needs to be drawn
		 * it contains all code necessary to display the module
		 * it takes the $properties array, which contains all 
                   properties for the module (page, instance, etc.)
		 * $properties is defined in 'module.php' and contains all 
                   info in the 'moduleProps' table assosciated with the module,
                   as well as page ID and instance ID
		 */

		//include global variables
		//$root_path = /home1/uberbots/public_html/omni - use for URLs
		//$current skin is the name of the current skin - use for skin stuff
		//$user is user related data
		//$db is phpbb SQL stuff
		global $root_path, $currentSkin, $user,$db;
		 
	}

	public function renderEdit($properties) {
		
		/* function renderEdit is called when a user selects 
                   this module to edit
		 * it displays forms and such for editing the module
		 * renderEdit works with the function 'edit' to update modules
		 * takes the $properties array for an arguement
		 */
		 
	}

	public function edit($properties) {
		
		/* edit is what actually updates the 'moduleProps' table to 
                   contain new information
		 * it should only have the SQL necessary to update the module,
                   all visual elements should be in the renderEdit function
		 * takes the $properties array for an arguement
		*/
		
	}
	
	//defines variables for default options (for when a new module is added)
	var $sqlNames, $sqlDefaults;
	
	public function setup() {
		/* the setup function is called after a module is added
		 * these values are inserted into the 'moduleProps' table for default values
		 * the calendar defaults to a one month calendar
		 */
		$this->sqlNames = array(""); //name of SQL field for a module property
		$this->sqlDefaults = array(""); //corresponding values for above fields
	}
}

Upcoming Events

Events in the next week:

No upcoming events.

Connect With Us

Follow us on Twitter! Connect with us on Facebook! Add us to your circles on Google+