Jump to content

[SOLVED] Something Wrong With My Modules Coding?


Jon

Recommended Posts

I have been making some modules for the site www.usaflightclub.com however, even though my code is in the right place etc.The modules won't show just getting a "Te Module ____ Doesn't exisit@ My modules code for example:





<?php

class east extends CodonModule
{

       public function index()
       {                       

       Template::Show('east_region.tpl');

       }
}
?>





You Help is most welcome,

Thanks,

Jon

Link to comment
Share on other sites

  • Administrators

Make sure your modules folder is within the modules folder and your file is within it:

/core/modules/East/East.php

You really should start all class files with a capital and also use a capital in the class declaration in your file

class East extends CodonModule

Some servers get a little picky with case and it usually can be tracked down to the naming of classes.

You will save yourself some headaches with "headers already sent" errors by removing the closing php tag (?>) from your module files as well.

Just a heads up also, Nabeel has started to transition the structure to the use of $this-> for commands within the files.

$this->show('mytemplate.tpl'); or
$this->render('mytemplate.tpl');

and to set data

$this->set('data', $data);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...