diff --git a/plugins/ktcore/KTCorePlugin.php b/plugins/ktcore/KTCorePlugin.php index 10a4060..f8a240c 100644 --- a/plugins/ktcore/KTCorePlugin.php +++ b/plugins/ktcore/KTCorePlugin.php @@ -18,9 +18,11 @@ require_once('KTPermissions.php'); require_once('KTAdminPlugins.php'); require_once('KTDashletPlugins.php'); -$oPlugin->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', 'Authentication', 'FIXME: describe authentication', 'authentication/authenticationadminpage.inc.php'); +$oPlugin->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', 'Authentication', 'FIXME: describe authentication', 'authentication/authenticationadminpage.inc.php'); $oPlugin->register(); +require_once('assistance/KTUserAssistance.php'); + require_once(KT_LIB_DIR . '/storage/ondiskpathstoragemanager.inc.php'); diff --git a/plugins/ktcore/KTDashletPlugins.php b/plugins/ktcore/KTDashletPlugins.php index 6e19f2d..d0be5c9 100644 --- a/plugins/ktcore/KTDashletPlugins.php +++ b/plugins/ktcore/KTDashletPlugins.php @@ -5,6 +5,11 @@ require_once(KT_LIB_DIR . '/plugins/plugin.inc.php'); require_once(KT_LIB_DIR . '/dashboard/dashlet.inc.php'); require_once(KT_LIB_DIR . "/templating/templating.inc.php"); require_once(KT_LIB_DIR . "/dashboard/Notification.inc.php"); +require_once(KT_LIB_DIR . "/security/Permission.inc"); + + +$oRegistry =& KTPluginRegistry::getSingleton(); +$oPlugin =& $oRegistry->getPlugin('ktcore.plugin'); /* * The registration hooks. @@ -13,6 +18,23 @@ require_once(KT_LIB_DIR . "/dashboard/Notification.inc.php"); * */ +// ultra simple skeleton for the admin tutorial +class KTBeta1InfoDashlet extends KTBaseDashlet { + function is_active($oUser) { + return true; + } + + function render() { + $oTemplating = new KTTemplating; + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/beta1info"); + $aTemplateData = array( + ); + return $oTemplate->render($aTemplateData); + } +} + +$oPlugin->registerDashlet('KTBeta1InfoDashlet', 'ktcore.dashlet.beta1info', __FILE__); + class KTNotificationDashlet extends KTBaseDashlet { var $oUser; @@ -36,10 +58,33 @@ class KTNotificationDashlet extends KTBaseDashlet { } } -$oRegistry =& KTPluginRegistry::getSingleton(); -$oPlugin =& $oRegistry->getPlugin('ktcore.plugin'); -$oPlugin->registerDashlet('KTNotificationDashlet', 'ktcore.notifications.dashlet', __FILE__); +$oPlugin->registerDashlet('KTNotificationDashlet', 'ktcore.dashlet.notifications', __FILE__); + +// replace the old checked-out docs. +class KTCheckoutDashlet extends KTBaseDashlet { + + var $oUser; + + function is_active($oUser) { + $this->oUser = $oUser; + return true; + } + + function render() { + + $checked_out_documents = Document::getList(array("checked_out_user_id = ?", $this->oUser->getId())); + + $oTemplating = new KTTemplating; + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/checkedout"); + $aTemplateData = array( + "documents" => $checked_out_documents, + ); + return $oTemplate->render($aTemplateData); + } +} + +$oPlugin->registerDashlet('KTCheckoutDashlet', 'ktcore.dashlet.checkout', __FILE__); ?> \ No newline at end of file diff --git a/plugins/ktcore/assistance/KTUserAssistance.php b/plugins/ktcore/assistance/KTUserAssistance.php new file mode 100644 index 0000000..e5ae3e6 --- /dev/null +++ b/plugins/ktcore/assistance/KTUserAssistance.php @@ -0,0 +1,98 @@ +registerPlugin('KTUserAssistance', 'ktcore.userassistance', __FILE__); +$oPlugin =& $oRegistry->getPlugin('ktcore.userassistance'); + +// ultra simple skeleton for the user tutorial +class KTUserTutorialDashlet extends KTBaseDashlet { + function is_active($oUser) { + // FIXME check if the user has "turned this off" for themselves. + return true; + } + + function render() { + $oTemplating = new KTTemplating; + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/usertutorial"); + $aTemplateData = array( + ); + return $oTemplate->render($aTemplateData); + } +} + +$oPlugin->registerDashlet('KTUserTutorialDashlet', 'ktcore.dashlet.usertutorial', __FILE__); + +// ultra simple skeleton for the admin tutorial +class KTAdminTutorialDashlet extends KTBaseDashlet { + function is_active($oUser) { + // FIXME check if the user has "turned this off" for themselves. + return Permission::userIsSystemAdministrator($oUser->getId()); + return true; + } + + function render() { + $oTemplating = new KTTemplating; + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/admintutorial"); + $aTemplateData = array( + ); + return $oTemplate->render($aTemplateData); + } +} +$oPlugin->registerDashlet('KTAdminTutorialDashlet', 'ktcore.dashlet.admintutorial', __FILE__); + +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.

'; + } + $this->oPage->setTitle($this->title); + $this->oPage->setShowPortlets(false); + return $contents; + } +} + +class KTUserAssistB1WhatIs extends KTUserAssistBasePage { var $pagefile = 'kt3b1-what-is-a-beta'; var $title = 'What is a Beta?'; } +$oPlugin->registerPage('kt3b1-what-is-a-beta', 'KTUserAssistB1WhatIs', __FILE__); + +class KTUserAssistBugReportingGUide extends KTUserAssistBasePage { var $pagefile = 'kt-bug-reporting-guide'; var $title = 'Help! Something went wrong'; } +$oPlugin->registerPage('kt-bug-reporting-guide', 'KTUserAssistBugReportingGUide', __FILE__); + +class KTUserAssistAdminQuickguide extends KTUserAssistBasePage { var $pagefile = 'admin-quickguide'; var $title = 'Quickstart Guide for Administrators'; } +$oPlugin->registerPage('admin-quickguide', 'KTUserAssistAdminQuickguide', __FILE__); + +class KTUserAssistAdminGuideWhatsNew extends KTUserAssistBasePage { var $pagefile = 'admin-guide-whats-new-in-kt3'; var $title = 'What\'s new in KT3 for Administrators'; } +$oPlugin->registerPage('admin-guide-whats-new-in-kt3', 'KTUserAssistAdminGuideWhatsNew', __FILE__); + + +$oPlugin->register(); + +?> \ No newline at end of file diff --git a/plugins/ktcore/assistance/docs/admin-guide-whats-new-in-kt3 b/plugins/ktcore/assistance/docs/admin-guide-whats-new-in-kt3 new file mode 100644 index 0000000..fc3557d --- /dev/null +++ b/plugins/ktcore/assistance/docs/admin-guide-whats-new-in-kt3 @@ -0,0 +1,17 @@ +

What's different in KT3

+ +

Almost Everything. We have rewritten almost all of the KnowledgeTree DMS, and hope that the changes +will be good.

+ +

Things you need to be aware of in terms of major changes for administrators:

+ + + diff --git a/plugins/ktcore/assistance/docs/admin-quickguide b/plugins/ktcore/assistance/docs/admin-quickguide new file mode 100644 index 0000000..77f7667 --- /dev/null +++ b/plugins/ktcore/assistance/docs/admin-quickguide @@ -0,0 +1,5 @@ +

Admin Quickguide

+ +

FIXME we need a guide to getting started as an administrator. Since this is Beta1, we +assume that you have some history with KnowledgeTree™, so we ask that you start at +the "what's new for administrators" page.

diff --git a/plugins/ktcore/assistance/docs/base b/plugins/ktcore/assistance/docs/base new file mode 100644 index 0000000..85a26a2 --- /dev/null +++ b/plugins/ktcore/assistance/docs/base @@ -0,0 +1 @@ +OI! This doesn't work. diff --git a/plugins/ktcore/assistance/docs/kt-bug-reporting-guide b/plugins/ktcore/assistance/docs/kt-bug-reporting-guide new file mode 100644 index 0000000..a906676 --- /dev/null +++ b/plugins/ktcore/assistance/docs/kt-bug-reporting-guide @@ -0,0 +1,16 @@ +

Help! Something went wrong!

+ +

Our community forums are a good place to ask questions about installing, +configuring or using KnowledgeTree. Our developers, along with other +members of the open source community and our partner network, will +endeavour to answer your questions.

+ +

Find the KnowledgeTree forums online at forum.ktdms.com

+ +

You can report bugs in the open source KnowledgeTree server software by +accessing our online ticketing system. The ticketing system will also +provide feedback on the status of the issue. You may view issues +reported by other people and search the system to determine if your +issue has already been reported.

+ +

Access the KnowledgeTree support website online at support.ktdms.com.

diff --git a/plugins/ktcore/assistance/docs/kt3b1-what-is-a-beta b/plugins/ktcore/assistance/docs/kt3b1-what-is-a-beta new file mode 100644 index 0000000..db9c180 --- /dev/null +++ b/plugins/ktcore/assistance/docs/kt3b1-what-is-a-beta @@ -0,0 +1,13 @@ +

What is a beta?

+ +

Beta software is pre-production quality software. It is released with +the intention of providing the software's users with insight into where +the software feature-set is going for a particular release cycle, +getting as wide a base of testers for the release as possible and +gauging the uptake of new features.

+ +

The software may not be entirely complete yet and may be buggy. We +highly value your input and urge you to evaluate the software in a test +environment. We do however strongly suggest you do not to implement this +version of KnowledgeTree in a production environment as we can't warrant +it functioning correctly.

diff --git a/templates/ktcore/dashlets/admintutorial.smarty b/templates/ktcore/dashlets/admintutorial.smarty new file mode 100644 index 0000000..c898563 --- /dev/null +++ b/templates/ktcore/dashlets/admintutorial.smarty @@ -0,0 +1,10 @@ +

KnowledgeTree administrator's Guide

+

If this is your first KnowledgeTree installation, +or if you've just upgraded from KnowledgeTree 2.x, we've put together some information +which might help you get to grips with the new system.

+ +

FIXME This currently doesn't work.

+ +Read the admin introduction. | +Find out what's different in KT 3. | +Don't show me this again. diff --git a/templates/ktcore/dashlets/beta1info.smarty b/templates/ktcore/dashlets/beta1info.smarty new file mode 100644 index 0000000..15f3beb --- /dev/null +++ b/templates/ktcore/dashlets/beta1info.smarty @@ -0,0 +1,7 @@ +

Welcome to the KnowledgeTree 3 Beta

+

If this is your first KnowledgeTree installation, +or if you've just upgraded from KnowledgeTree 2.x, we've put together some information +which might help you get to grips with the new system.

+ +What's a Beta? | +Help! Something went wrong! diff --git a/templates/ktcore/dashlets/checkedout.smarty b/templates/ktcore/dashlets/checkedout.smarty new file mode 100644 index 0000000..df543c1 --- /dev/null +++ b/templates/ktcore/dashlets/checkedout.smarty @@ -0,0 +1,14 @@ +

Your Checked-out Documents

+

Since a document +which is checked out cannot be modified by anyone else, +it is important to check them back in as soon as you have made +the apppriate changes.

+{if (!empty($documents))} +
+{foreach item=oNotification from=$notifications} +{$oNotification->render()} +{/foreach} +
+{else} +

You have no documents which are currently checked out.

+{/if} \ No newline at end of file diff --git a/templates/ktcore/dashlets/usertutorial.smarty b/templates/ktcore/dashlets/usertutorial.smarty new file mode 100644 index 0000000..5b04f50 --- /dev/null +++ b/templates/ktcore/dashlets/usertutorial.smarty @@ -0,0 +1,9 @@ +

Crash Course in KnowledgeTree

+

New to Document Management, or to +KnowledgeTree™ 3? We've written some quick documentation

+ +

FIXME This currently doesn't work.

+ +Take the crash course. | +Learn about KnowledgeTree 3. | +Don't show me this again. diff --git a/thirdparty/.htaccess b/thirdparty/.htaccess index 93169e4..ea77a0d 100644 --- a/thirdparty/.htaccess +++ b/thirdparty/.htaccess @@ -1,2 +1,4 @@ Order deny,allow Deny from all + +Options +FollowSymlinks