registerDashlet('KTUserTutorialDashlet', 'ktcore.dashlet.usertutorial', __FILE__); $this->registerDashlet('KTAdminTutorialDashlet', 'ktcore.dashlet.admintutorial', __FILE__); $this->registerPage('kt3b1-what-is-a-beta', 'KTUserAssistB1WhatIs', __FILE__); $this->registerPage('kt-bug-reporting-guide', 'KTUserAssistBugReportingGUide', __FILE__); $this->registerPage('admin-quickguide', 'KTUserAssistAdminQuickguide', __FILE__); $this->registerPage('admin-guide-whats-new-in-kt3', 'KTUserAssistAdminGuideWhatsNew', __FILE__); } } $oRegistry =& KTPluginRegistry::getSingleton(); $oRegistry->registerPlugin('KTUserAssistance', 'ktcore.userassistance', __FILE__); // ultra simple skeleton for the user tutorial // FIXME do we want to store the namespace inside the dashlet? class KTUserTutorialDashlet extends KTBaseDashlet { function is_active($oUser) { $namespace = 'ktcore.dashlet.usertutorial'; $disables = KTDashletDisable::getForUserAndDashlet($oUser->getId(), $namespace); if (!empty($disables)) { return false; } else { return true; } } function render() { $oTemplating = new KTTemplating; $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/usertutorial"); $aTemplateData = array( ); return $oTemplate->render($aTemplateData); } } // ultra simple skeleton for the admin tutorial class KTAdminTutorialDashlet extends KTBaseDashlet { function is_active($oUser) { $namespace = 'ktcore.dashlet.admintutorial'; if (!Permission::userIsSystemAdministrator($oUser->getId())) { return false; // quickest disable. } $disables = KTDashletDisable::getForUserAndDashlet($oUser->getId(), $namespace); if (!empty($disables)) { return false; } else { return true; } } function render() { $oTemplating = new KTTemplating; $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/admintutorial"); $aTemplateData = array( ); return $oTemplate->render($aTemplateData); } } class KTUserAssistBasePage extends KTStandardDispatcher { var $sSection = 'help'; var $aBreadcrumbs = array( array('action' => 'dashboard', 'name' => 'Dashboard'), array('name' => 'User Assistance') ); var $pagefile = 'base'; var $title = 'User Assistance'; function do_main() { $this->oPage->setBreadcrumbDetails($this->title); $contents = @file_get_contents(dirname(__FILE__) . '/docs/' . $this->pagefile); if ($contents === false) { $contents = '
Unable to find requested documentation.