Location: PHPKode > projects > Exero CMS > upload/admin/installers/modules/example.php
<?
// Example Installer

class example {
	var $name = "Example"; // Module Name
	var $version = "1.0.0"; // Module Version
	var $ident = "example"; // Module Ident
	var $directory = "example"; // Location of the module files in the 'modules' directory
	var $block = ""; // If the module has its own block, what is it
	var $indexcapalefiles = ""; // Files that can be used as the index page
	var $author = "Jack Polgar"; // Author of the module
	var $authorurl = "http://www.jackpolgar.com"; // Website of the Author
	
	var $active = "1"; // If the module active when installed?	[1 for yes | 0 for no]
	var $editable = "0"; // Does the module have its own settings or a On and Off feature? [1 for yes | 0 for no]
	
	function _install() {
	global $ecms,$db;
	
		// Example of inserting into the modules table
		$db->query("INSERT INTO ".TABLE_PREFIX."modules VALUES(
			'',
			'".$this->ident."',
			'".$this->name."',
			'".$this->directory."',
			'".$this->block."',
			'".$this->active."',
			'".$this->editable."',
			'".$this->indexcapalefiles."'
			)");
		
		/*
		If your a developer and you know alot about PHP & MySQL you should know how to do other querys
		like make its own items, add blocks with items, install plugins.
		*/
	}
}
?>
Return current item: Exero CMS