[Solved] Skeleton to new module > Fatal error in defaultadmin

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Chris
Forum Members
Forum Members
Posts: 49
Joined: Tue Mar 22, 2005 6:59 pm

[Solved] Skeleton to new module > Fatal error in defaultadmin

Post by Chris »

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!!!
Last edited by Chris on Tue Nov 11, 2008 2:08 pm, edited 1 time in total.
Locked

Return to “Modules/Add-Ons”