I managed to create the install and uninstall part.
After installing the module I file the database with 2 record.
But there is now output in my page
This is my code
Code: Select all
/* Your initial Class declaration. This file's name must be "[class's name].module.php", or, in this case,
Catlist.module.php
*/
class Catlist extends CMSModule
{
function GetName()
{
return 'Scim';
}
function GetFriendlyName()
{
return $this->Lang('friendlyname');
}
function GetVersion()
{
return '0.1';
}
function IsPluginModule()
{
return true;
}
// Install - Unstall Messages
function InstallPostMessage()
{
return $this->Lang('postinstall');
}
function UninstallPreMessage()
{
return $this->Lang('uninstall_confirm');
}
function UninstallPostMessage()
{
return $this->Lang('postuninstall');
}
function DoAction($action, $id, $params, $returnid=-1)
{
if ($action == 'default')
{
$db =& $this->GetDb();
$sql = 'SELECT * FROM ' . cms_db_prefix().'module_scim_players';
$dbresult =& $db->Execute($sql);
$list = "Spelers<br /><br />\n";
$list .= "<ul>\n";
while ($dbresult && $row = $dbresult->FetchRow())
{
$list .= "<li><b>" . $row['voorletters'] . '</b><br />';
$list .= $row['roepnaam'] . '<br />';
$list .= $row['tussenvoegsel'] . '<br />';
$list .= $row['achternaam'] . '<br />';
$list .= "</li>\n";
}
$list .= "</ul>\n";
$list .= "<br /><br />\n";
}
// assign to Smarty
global $gCms;
$this->smarty->assign('list', $list);
/**
*Insert: {cms_module module='Scim'}{$list}
*in your page template
*But there has to be a way for this to work without the {$list} tag...
**/
return;
}
}
?>
What is going wrong. Please help me.
I tryed to use the manual on the documentation page of cmsmadesimple.org
Musicscore