[SOLVED] CMSMS Development Cookbook Module not working
Posted: Sun Mar 23, 2014 4:12 pm
I've just bought the CMSMS Development cookbook as I need to write a module and there seems to be a paucity of information available online as to how to go about this.
I've tried the very first exercise, writing the following code and saving as HelloWorld.module.php in the HelloWorld directory, but when I go to Extensions > Modules, it seems to cause an error. Am I doing something wrong, or, is the Development Cookbook too old and have I made a mistake buying it?
I've tried the very first exercise, writing the following code and saving as HelloWorld.module.php in the HelloWorld directory, but when I go to Extensions > Modules, it seems to cause an error. Am I doing something wrong, or, is the Development Cookbook too old and have I made a mistake buying it?
Code: Select all
<?php
class HelloWorld extends CMSModule {
functionGetName() {
return 'HelloWorld';
}
functionIsPluginModule() {
return true;
}
functionDoAction($action, $id, $params, $returnid=-1) {
echo 'Hello World. Welcome to the '.$this->GetName().' module (version '.$this->GetVersion();
echo ') running in CMS Made Simple version '.CMS_VERSION;
}
}
?>