hi i tried to create module but i fail i follow the instructure in doc how to create module but i didn't know what i miss here what i do in config.php PHP: $data['module']['name'] = "review"; $data['module']['displayname'] = "Listing Review"; $data['module']['description'] = "Allows members to write review on listing."; $data['module']['version'] = "v1"; $data['module']['admin_capable'] = "1"; $data['module']['user_capable'] = "0"; init.php PHP: function install() { global $db, $class_tpl; $sSQL = "DROP TABLE IF EXISTS " . PREFIX . "review"; $db->query($sSQL); $sSQL = "CREATE TABLE " . PREFIX . "review ( `reid` INT( 255 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `lid` INT( 255 ) NOT NULL , `uid` INT( 255 ) NOT NULL , `username` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , `review` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ) ENGINE = MYISAM ;"; $db->query($sSQL); $class_tpl->assign('msg', 'Everything installed successfully.'); } function uninstall() { global $db, $class_tpl; $sSQL="DROP TABLE IF EXISTS ".PREFIX."review"; $db->query($sSQL); if ( $db->isError() ) { $class_tpl->assign('msg', 'ERROR dropping the database.'); } else { $class_tpl->assign('msg', 'Everything removed successfully.'); } } in hooks.php PHP: class review { function review(&$modules) { global $db, $class_tpl, $modules; $modules->register('showReviewInHome', $this, 'showReview'); } function showReview() { echo "hello world"; } } so when i tried to put {modulehook function="showReviewInHome" options=""} it didnot work so any idea or some help to know what i miss thank in advance
thanks a lot i don't know how it passed over me i am working on reviewing the module of listing which would allow the members to write their reviews on it. and i would be proud to share the module here.
If you don't plan on selling it, you should create a github account and put it there, this way people can contribute to it and you can link directly to your source.