Lang('friendlyname'); } /*--------------------------------------------------------- GetVersion() ---------------------------------------------------------*/ function GetVersion() { return '1.5.5'; } /*--------------------------------------------------------- GetHelp() ---------------------------------------------------------*/ function GetHelp() { return $this->Lang('help'); } /*--------------------------------------------------------- GetAuthor() ---------------------------------------------------------*/ function GetAuthor() { return 'calguy1000'; } /*--------------------------------------------------------- GetAuthorEmail() ---------------------------------------------------------*/ function GetAuthorEmail() { return 'calguy1000@hotmail.com'; } /*--------------------------------------------------------- GetChangeLog() ---------------------------------------------------------*/ function GetChangeLog() { return $this->Lang('changelog'); } /*--------------------------------------------------------- IsPluginModule() ---------------------------------------------------------*/ function IsPluginModule() { return false; } /*--------------------------------------------------------- HasAdmin() ---------------------------------------------------------*/ function HasAdmin() { return true; } /*--------------------------------------------------------- IsAdminOnly() ---------------------------------------------------------*/ function IsAdminOnly() { return true; } /*--------------------------------------------------------- GetAdminSection() ---------------------------------------------------------*/ function GetAdminSection() { return 'extensions'; } /*--------------------------------------------------------- GetAdminDescription() ---------------------------------------------------------*/ function GetAdminDescription() { return $this->Lang('admindescription'); } function LazyLoadAdmin() { return TRUE; } /*--------------------------------------------------------- VisibleToAdminUser() ---------------------------------------------------------*/ function VisibleToAdminUser() { if( $this->CheckPermission('Modify Site Preferences') || $this->CheckPermission('Modify Modules') ) { return true; } return false; } /*--------------------------------------------------------- CheckAccess() ---------------------------------------------------------*/ function CheckAccess($id, $params, $returnid,$perm = 'Modify Modules') { if (! $this->CheckPermission($perm)) { $this->_DisplayErrorPage($id, $params, $returnid, $this->Lang('accessdenied')); return false; } return true; } /*--------------------------------------------------------- _DisplayErrorPage() This is a simple function for generating error pages. ---------------------------------------------------------*/ function _DisplayErrorPage($id, &$params, $returnid, $message='') { $this->smarty->assign('title_error', $this->Lang('error')); $this->smarty->assign_by_ref('message', $message); $this->smarty->assign('link_back',$this->CreateLink($id,'defaultadmin',$returnid, $this->Lang('back_to_module_manager'))); // Display the populated template echo $this->ProcessTemplate('error.tpl'); } /*--------------------------------------------------------- MinimumCMSVersion() ---------------------------------------------------------*/ function MinimumCMSVersion() { return "1.10-beta0"; } /*--------------------------------------------------------- Install() ---------------------------------------------------------*/ function Install() { $this->SetPreference('module_repository',ModuleManager::_dflt_request_url); } /*--------------------------------------------------------- InstallPostMessage() ---------------------------------------------------------*/ function InstallPostMessage() { return $this->Lang('postinstall'); } /*--------------------------------------------------------- UninstallPostMessage() ---------------------------------------------------------*/ function UninstallPostMessage() { return $this->Lang('postuninstall'); } /*--------------------------------------------------------- Upgrade() ---------------------------------------------------------*/ function Upgrade($oldversion, $newversion) { $current_version = $oldversion; switch($current_version) { case "1.0": $this->SetPreference('module_repository','http://modules.cmsmadesimple.org/soap.php?module=ModuleRepository'); break; } if( version_compare($oldversion,'1.5') < 0 ) { $this->SetPreference('module_repository',ModuleManager::_dflt_request_url); } } /** * UninstallPreMessage() */ function UninstallPreMessage() { return $this->Lang('really_uninstall'); } /*--------------------------------------------------------- Uninstall() ---------------------------------------------------------*/ function Uninstall() { $this->RemovePreference(); } /*--------------------------------------------------------- DoAction($action, $id, $params, $returnid) ---------------------------------------------------------*/ function DoAction($action, $id, $params, $returnid=-1) { @set_time_limit(9999); switch ($action) { case 'recurseinstall': { die('call installmodule action'); } // fallback through to call the action.xxxx.php file default: parent::DoAction( $action, $id, $params, $returnid ); break; } } } // end of class # # EOF # ?>