My first module doesn't work

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
oranocha

My first module doesn't work

Post 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
dazu
New Member
New Member
Posts: 7
Joined: Tue Dec 02, 2008 8:14 am
Location: Switzerland

Re: My first module doesn't work

Post 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!
Post Reply

Return to “Developers Discussion”