Page 1 of 1

My first module doesn't work

Posted: Sun Feb 15, 2009 7:34 am
by oranocha
Hi,

I'm a new user of CMSMS. It seems very niceto use and I want to try to make a first "Hello world" module to see if all is OK.
I have a problem w/ this first module.

I have follow the insctruction of Elijah Lofgren (http://docs.google.com/Doc?id=dc295wpf_236gqf4f6d3) to create the first module and it doesn't work.

Here my code :

/modules/OlivierR/OlivierR.module.php

Code: Select all

<?

class OlivierR extends CMSModule 
{
    function GetName()
    {
        return 'OlivierR';
    }
    
    function GetVersion()
    {
        return '0.1';
    }
    
    function IsPluginModue()
    {
        return true;
    }
}
/modules/OlivierR/action.default.php

Code: Select all

<?

if (!isset($gCms)) exit;

echo 'Welcome to my test !';
Then, in the default template, used by my homepage, I have insert this code :

Code: Select all

{cms_module module="OlivierR"}
When I go to my homepage, I don't see anything.  No error message but nothing appears.

I don't understand why ...

Could someone help me?

Thank you,
Olivier

Re: My first module doesn't work

Posted: Sun Feb 15, 2009 10:21 am
by dazu
I used the Skeleton Module as starting point. Maybe you want to try from there.
One problem (well ist a feature) I found is that the CMS (Smarty) 'swallows' errors, you need to get to the log or use the debugging (see the developer documentation).
Good luck!