[Solved] Skeleton to new module > Fatal error in defaultadmin
Posted: Tue Nov 11, 2008 1:32 pm
Hi everybody,
I'm trying to create a now module starting with the skeleton module. I renamed skeleton to EventReg and uncommented the action part in the EventReg.module.php file. But the default action even don't work... I get this error
Fatal error: Call to undefined method EventReg::DisplayAdminPanel() in /var/www/vhosts/mydomain.com/httpdocs/modules/EventReg/EventReg.module.php on line 443. The code:
SOLUTION: the doaction funcion overwrites the normal handling so don't comment it out if you're a n00b like me
DisplayModuleOutput($action, $id, $params);
break;
}
case 'defaultadmin':
{
// only let people access module preferences if they have permission
if ($this->CheckPermission('Use EventReg'))
{
$this->DisplayAdminPanel($id, $params, $returnid); // LINE 443
}
else
{
$this->DisplayErrorPage($id, $params, $returnid,
$this->Lang('accessdenied'));
}
break;
}
case 'save_admin_prefs':
{
// only let people save module preferences if they have permission
if ($this->CheckPermission('Use Event Reg'))
{
$this->SaveAdminPrefs($id, $params, $returnid);
}
break;
}
}
}
?>
Thanks in advance!!!
I'm trying to create a now module starting with the skeleton module. I renamed skeleton to EventReg and uncommented the action part in the EventReg.module.php file. But the default action even don't work... I get this error
Fatal error: Call to undefined method EventReg::DisplayAdminPanel() in /var/www/vhosts/mydomain.com/httpdocs/modules/EventReg/EventReg.module.php on line 443. The code:
SOLUTION: the doaction funcion overwrites the normal handling so don't comment it out if you're a n00b like me

DisplayModuleOutput($action, $id, $params);
break;
}
case 'defaultadmin':
{
// only let people access module preferences if they have permission
if ($this->CheckPermission('Use EventReg'))
{
$this->DisplayAdminPanel($id, $params, $returnid); // LINE 443
}
else
{
$this->DisplayErrorPage($id, $params, $returnid,
$this->Lang('accessdenied'));
}
break;
}
case 'save_admin_prefs':
{
// only let people save module preferences if they have permission
if ($this->CheckPermission('Use Event Reg'))
{
$this->SaveAdminPrefs($id, $params, $returnid);
}
break;
}
}
}
?>
Thanks in advance!!!