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;
}
}
?>