Commit 4a0ad2ffbaedfd0c956140376a4696eb3e462146
1 parent
8fee98b3
KTS-3698
"The welcome dashlet replaces all occurrences of KnowledgeTree with the APP_Name" Fixed. The dashlet and help replacement now scans for #APP_NAME# and replaces that with the APP_Name. Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9308 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
84 additions
and
86 deletions
kthelp/ktcore/EN/welcome.html
| 1 | 1 | <html> |
| 2 | 2 | <head> |
| 3 | -<title>Welcome to KnowledgeTree</title> | |
| 3 | +<title>Welcome to #APP_NAME#</title> | |
| 4 | 4 | </head> |
| 5 | 5 | <body> |
| 6 | -<p class="descriptiveText"><b>KnowledgeTree is Document Management Made Simple.</b></p><br> | |
| 7 | -<p class="descriptiveText">Easily and securely | |
| 8 | - manage your company's document creation, editing, versioning, and sharing - all from | |
| 6 | +<p class="descriptiveText"><b>#APP_NAME# is Document Management Made Simple.</b></p><br> | |
| 7 | +<p class="descriptiveText">Easily and securely | |
| 8 | + manage your company's document creation, editing, versioning, and sharing - all from | |
| 9 | 9 | a powerful Web interface and Microsoft® Office® and Windows® Explorer® tools.</p> |
| 10 | -<br> | |
| 11 | -<p class="descriptiveText"><b>KnowledgeTree Community Edition is licensed free of charge and supplied with | |
| 12 | -<a href="http://www.knowledgetree.com/commercial_support" target="_blank">no support</a>, <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no maintenance</a>, | |
| 10 | +<br> | |
| 11 | +<p class="descriptiveText"><b>#APP_NAME# Community Edition is licensed free of charge and supplied with | |
| 12 | +<a href="http://www.knowledgetree.com/commercial_support" target="_blank">no support</a>, <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no maintenance</a>, | |
| 13 | 13 | and <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no warranty</a>.</b></p> |
| 14 | 14 | <br> |
| 15 | 15 | |
| 16 | -<p class="descriptiveText">Commercially supported and feature-enhanced editions of | |
| 17 | - KnowledgeTree are available:</p> | |
| 16 | +<p class="descriptiveText">Commercially supported and feature-enhanced editions of | |
| 17 | + #APP_NAME# are available:</p> | |
| 18 | 18 | |
| 19 | -<ul class="descriptiveText"><li><a href="http://www.knowledgetree.com/live" target="_blank">KnowledgeTreeLive</a> is an easy to use and powerful online | |
| 20 | - document management service based on the KnowledgeTree application you're currently | |
| 21 | - using. KnowledgeTreeLive provides you with all the powerful features of the premium | |
| 22 | - editions of KnowledgeTree without requiring you to invest in, and maintain, your own | |
| 19 | +<ul class="descriptiveText"><li><a href="http://www.knowledgetree.com/live" target="_blank">KnowledgeTreeLive</a> is an easy to use and powerful online | |
| 20 | + document management service based on the #APP_NAME# application you're currently | |
| 21 | + using. KnowledgeTreeLive provides you with all the powerful features of the premium | |
| 22 | + editions of #APP_NAME# without requiring you to invest in, and maintain, your own | |
| 23 | 23 | servers.</li> |
| 24 | - <li><a href="http://www.knowledgetree.com/products/knowledgetree_editions_feature_matrix" target="_blank">KnowledgeTree Premium, Plus and Basic</a> editions are commercially supported and | |
| 25 | - feature-enhanced editions of KnowledgeTree, providing your organization with the | |
| 26 | - peace of mind that you will always have access to our support engineers, powerful | |
| 24 | + <li><a href="http://www.knowledgetree.com/products/knowledgetree_editions_feature_matrix" target="_blank">#APP_NAME# Premium, Plus and Basic</a> editions are commercially supported and | |
| 25 | + feature-enhanced editions of #APP_NAME#, providing your organization with the | |
| 26 | + peace of mind that you will always have access to our support engineers, powerful | |
| 27 | 27 | desktop and Microsoft® Office® integration and other document management features.</li> |
| 28 | - | |
| 29 | -</ul> | |
| 28 | + | |
| 29 | +</ul> | |
| 30 | 30 | <br> |
| 31 | 31 | |
| 32 | 32 | </body> | ... | ... |
kthelp/ktcore/EN/welcomeCommercial.html
| 1 | 1 | <html> |
| 2 | 2 | <head> |
| 3 | -<title>Welcome to KnowledgeTree</title> | |
| 3 | +<title>Welcome to #APP_NAME#</title> | |
| 4 | 4 | </head> |
| 5 | 5 | <body> |
| 6 | -<p class="descriptiveText"><b>KnowledgeTree is Document Management Made Simple.</b></p> <br> | |
| 7 | - | |
| 8 | -<p class="descriptiveText">Easily and securely manage your company's document creation, editing, versioning, and sharing - all from a powerful Web interface and Microsoft® Office® and Windows® Explorer® tools.</p> <br> | |
| 9 | - | |
| 10 | -<p class="descriptiveText">A subscription to KnowledgeTree provides your organization with product updates, enhanced document management features, and commercial support. Please view your welcome mailer for information on accessing these services.</p> <br> | |
| 6 | +<p class="descriptiveText"><b>#APP_NAME# is Document Management Made Simple.</b></p> <br> | |
| 11 | 7 | |
| 8 | +<p class="descriptiveText">Easily and securely manage your company's document creation, editing, versioning, and sharing - all from a powerful Web interface and Microsoft® Office® and Windows® Explorer® tools.</p> <br> | |
| 12 | 9 | |
| 10 | +<p class="descriptiveText">A subscription to #APP_NAME# provides your organization with product updates, enhanced document management features, and commercial support. Please view your welcome mailer for information on accessing these services.</p> <br> | |
| 13 | 11 | |
| 14 | 12 | </body> |
| 15 | 13 | </html> |
| 16 | 14 | \ No newline at end of file | ... | ... |
lib/help/helpreplacement.inc.php
| ... | ... | @@ -6,31 +6,31 @@ |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2008 KnowledgeTree Inc. |
| 8 | 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 12 | * Free Software Foundation. |
| 13 | - * | |
| 13 | + * | |
| 14 | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 17 | * details. |
| 18 | - * | |
| 18 | + * | |
| 19 | 19 | * You should have received a copy of the GNU General Public License |
| 20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 21 | + * | |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 23 | 23 | * California 94120-7775, or email info@knowledgetree.com. |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 28 | + * | |
| 29 | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 30 | * these Appropriate Legal Notices must retain the display of the "Powered by |
| 31 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | 34 | * copyright notice. |
| 35 | 35 | * Contributor( s): ______________________________________ |
| 36 | 36 | * |
| ... | ... | @@ -59,8 +59,8 @@ class KTHelpReplacement extends KTEntity { |
| 59 | 59 | |
| 60 | 60 | function getID() { return $this->iId; } |
| 61 | 61 | function getName() { return sanitizeForSQLtoHTML($this->sName); } |
| 62 | - function getDescription() { return sanitizeForSQLtoHTML($this->sDescription); } | |
| 63 | - function getTitle() { return sanitizeForSQLtoHTML($this->sTitle); } | |
| 62 | + function getDescription() { return str_replace('#APP_NAME#', APP_NAME, $this->sDescription); } | |
| 63 | + function getTitle() { return str_replace('#APP_NAME#', APP_NAME, $this->sTitle); } | |
| 64 | 64 | function setID($iId) { $this->iId = $iId; } |
| 65 | 65 | function setName($sName) { $this->sName = $sName; } |
| 66 | 66 | function setDescription($sDescription) { $this->sDescription = $sDescription; } | ... | ... |
plugins/ktcore/KTDashlets.php
| ... | ... | @@ -6,31 +6,31 @@ |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2008 KnowledgeTree Inc. |
| 8 | 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 12 | * Free Software Foundation. |
| 13 | - * | |
| 13 | + * | |
| 14 | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 17 | * details. |
| 18 | - * | |
| 18 | + * | |
| 19 | 19 | * You should have received a copy of the GNU General Public License |
| 20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 21 | + * | |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 23 | 23 | * California 94120-7775, or email info@knowledgetree.com. |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 28 | + * | |
| 29 | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 30 | * these Appropriate Legal Notices must retain the display of the "Powered by |
| 31 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | 34 | * copyright notice. |
| 35 | 35 | * Contributor( s): ______________________________________ |
| 36 | 36 | * |
| ... | ... | @@ -55,14 +55,14 @@ class KTInfoDashlet extends KTBaseDashlet { |
| 55 | 55 | global $default; |
| 56 | 56 | $this->sTitle = sprintf(_kt('Welcome to %s'), APP_NAME); |
| 57 | 57 | $versionName = substr($default->versionName, -17); |
| 58 | - | |
| 58 | + | |
| 59 | 59 | if($versionName != 'Community Edition') |
| 60 | 60 | { |
| 61 | 61 | $this->helpLocation = 'ktcore/welcomeCommercial.html'; |
| 62 | 62 | } |
| 63 | - | |
| 63 | + | |
| 64 | 64 | //This check is for non english language packs which might not have |
| 65 | - //a commercial welcome page. | |
| 65 | + //a commercial welcome page. | |
| 66 | 66 | $oHelpCheck = KTHelp::getHelpInfo($this->helpLocation); |
| 67 | 67 | if(PEAR::isError($oHelpCheck)) |
| 68 | 68 | { |
| ... | ... | @@ -74,11 +74,11 @@ class KTInfoDashlet extends KTBaseDashlet { |
| 74 | 74 | // FIXME help is a little too mixed. |
| 75 | 75 | $aHelpInfo = array(); |
| 76 | 76 | $can_edit = Permission::userIsSystemAdministrator($_SESSION['userID']); |
| 77 | - | |
| 77 | + | |
| 78 | 78 | $help_path = KTHelp::_getLocationInfo($this->helpLocation, null, true); |
| 79 | - | |
| 79 | + | |
| 80 | 80 | //var_dump($help_path); |
| 81 | - | |
| 81 | + | |
| 82 | 82 | if (PEAR::isError($help_path) || empty($help_path['external'])) { |
| 83 | 83 | if ($can_edit) { |
| 84 | 84 | // give it a go. |
| ... | ... | @@ -102,28 +102,28 @@ class KTInfoDashlet extends KTBaseDashlet { |
| 102 | 102 | return false; |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | - | |
| 105 | + | |
| 106 | 106 | // NORMAL users never see edit-option. |
| 107 | 107 | if (!$can_edit) { |
| 108 | 108 | if (empty($aHelpInfo)) { |
| 109 | 109 | return false; |
| 110 | 110 | } |
| 111 | - } | |
| 112 | - | |
| 111 | + } | |
| 112 | + | |
| 113 | 113 | $this->aHelpInfo = $aHelpInfo; |
| 114 | 114 | $this->canEdit = $can_edit; |
| 115 | - $this->sTitle = str_replace('KnowledgeTree', APP_NAME, $this->aHelpInfo['title']); | |
| 116 | - | |
| 115 | + $this->sTitle = str_replace('#APP_NAME#', APP_NAME, $this->aHelpInfo['title']); | |
| 116 | + | |
| 117 | 117 | return true; |
| 118 | 118 | } |
| 119 | - | |
| 119 | + | |
| 120 | 120 | function render() { |
| 121 | 121 | $oTemplating =& KTTemplating::getSingleton(); |
| 122 | 122 | $oTemplate = $oTemplating->loadTemplate('ktcore/dashlets/kt3release'); |
| 123 | - | |
| 123 | + | |
| 124 | 124 | $aTemplateData = array( |
| 125 | - 'title' => str_replace('KnowledgeTree', APP_NAME, $this->aHelpInfo['title']), | |
| 126 | - 'body' => str_replace('KnowledgeTree', APP_NAME, $this->aHelpInfo['body']), | |
| 125 | + 'title' => str_replace('#APP_NAME#', APP_NAME, $this->aHelpInfo['title']), | |
| 126 | + 'body' => str_replace('#APP_NAME#', APP_NAME, $this->aHelpInfo['body']), | |
| 127 | 127 | 'can_edit' => $this->canEdit, |
| 128 | 128 | 'target_name' => $this->helpLocation, |
| 129 | 129 | 'help_id' => $this->aHelpInfo['help_id'], |
| ... | ... | @@ -135,7 +135,7 @@ class KTInfoDashlet extends KTBaseDashlet { |
| 135 | 135 | |
| 136 | 136 | class KTNotificationDashlet extends KTBaseDashlet { |
| 137 | 137 | var $oUser; |
| 138 | - | |
| 138 | + | |
| 139 | 139 | function KTNotificationDashlet() { |
| 140 | 140 | $this->sTitle = _kt('Items that require your attention'); |
| 141 | 141 | } |
| ... | ... | @@ -146,23 +146,23 @@ class KTNotificationDashlet extends KTBaseDashlet { |
| 146 | 146 | if (empty($notifications)) { return false; } |
| 147 | 147 | return true; |
| 148 | 148 | } |
| 149 | - | |
| 149 | + | |
| 150 | 150 | function render() { |
| 151 | - | |
| 151 | + | |
| 152 | 152 | $notifications = KTNotification::getList(array('user_id = ?', $this->oUser->getId())); |
| 153 | 153 | $num_notifications = count($notifications); |
| 154 | - | |
| 154 | + | |
| 155 | 155 | $_MAX_NOTIFICATIONS = 5; |
| 156 | - | |
| 156 | + | |
| 157 | 157 | // FIXME in lieu of pagination, we slice. |
| 158 | 158 | if ($num_notifications > $_MAX_NOTIFICATIONS) { |
| 159 | 159 | $notifications = array_slice($notifications, 0, $_MAX_NOTIFICATIONS); |
| 160 | 160 | } |
| 161 | - | |
| 161 | + | |
| 162 | 162 | $oPluginRegistry =& KTPluginRegistry::getSingleton(); |
| 163 | 163 | $oPlugin =& $oPluginRegistry->getPlugin('ktcore.plugin'); |
| 164 | 164 | $link = $oPlugin->getPagePath('notifications'); |
| 165 | - | |
| 165 | + | |
| 166 | 166 | $oTemplating =& KTTemplating::getSingleton(); |
| 167 | 167 | $oTemplate = $oTemplating->loadTemplate('ktcore/dashlets/notifications'); |
| 168 | 168 | $aTemplateData = array( |
| ... | ... | @@ -181,7 +181,7 @@ class KTNotificationDashlet extends KTBaseDashlet { |
| 181 | 181 | class KTCheckoutDashlet extends KTBaseDashlet { |
| 182 | 182 | |
| 183 | 183 | var $oUser; |
| 184 | - | |
| 184 | + | |
| 185 | 185 | function KTCheckoutDashlet() { |
| 186 | 186 | $this->sTitle = _kt('Your Checked-out Documents'); |
| 187 | 187 | } |
| ... | ... | @@ -194,17 +194,17 @@ class KTCheckoutDashlet extends KTBaseDashlet { |
| 194 | 194 | global $default; |
| 195 | 195 | $oConfig =& KTConfig::getSingleton(); |
| 196 | 196 | if($oConfig->get('dashboard/alwaysShowYCOD')) return true; |
| 197 | - | |
| 197 | + | |
| 198 | 198 | return (!empty($this->checked_out_documents)); |
| 199 | 199 | } |
| 200 | - | |
| 200 | + | |
| 201 | 201 | function getDocumentLink($oDocument) { |
| 202 | 202 | return generateControllerLink('viewDocument', 'fDocumentId=' . $oDocument->getId()); |
| 203 | 203 | } |
| 204 | - | |
| 204 | + | |
| 205 | 205 | function render() { |
| 206 | - | |
| 207 | - | |
| 206 | + | |
| 207 | + | |
| 208 | 208 | $oTemplating =& KTTemplating::getSingleton(); |
| 209 | 209 | $oTemplate = $oTemplating->loadTemplate('ktcore/dashlets/checkedout'); |
| 210 | 210 | $aTemplateData = array( |
| ... | ... | @@ -230,11 +230,11 @@ class KTIndexerStatusDashlet extends KTBaseDashlet { |
| 230 | 230 | if (!Permission::userIsSystemAdministrator($oUser)) { |
| 231 | 231 | return false; |
| 232 | 232 | } |
| 233 | - | |
| 233 | + | |
| 234 | 234 | require_once(KT_LIB_DIR . '/triggers/triggerregistry.inc.php'); |
| 235 | - | |
| 235 | + | |
| 236 | 236 | $noTransforms = false; |
| 237 | - | |
| 237 | + | |
| 238 | 238 | $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); |
| 239 | 239 | $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'transform'); |
| 240 | 240 | $aTriggerSet = array(); |
| ... | ... | @@ -247,13 +247,13 @@ class KTIndexerStatusDashlet extends KTBaseDashlet { |
| 247 | 247 | require_once($aTrigger[1]); |
| 248 | 248 | } |
| 249 | 249 | $oTrigger = new $sTrigger; |
| 250 | - | |
| 250 | + | |
| 251 | 251 | $sDiagnostic = $oTrigger->getDiagnostic(); |
| 252 | 252 | // empty is OK. |
| 253 | 253 | if (is_null($sDiagnostic) || ($sDiagnostic == false)) { |
| 254 | 254 | continue; |
| 255 | 255 | } |
| 256 | - | |
| 256 | + | |
| 257 | 257 | $aTypes = (array) $oTrigger->mimetypes; |
| 258 | 258 | $aTypesStr = array(); |
| 259 | 259 | foreach ($aTypes as $sTypeName => $v) { |
| ... | ... | @@ -261,19 +261,19 @@ class KTIndexerStatusDashlet extends KTBaseDashlet { |
| 261 | 261 | $aTypesStr[KTMime::getFriendlyNameForString($sTypeName)] = 1; |
| 262 | 262 | //} |
| 263 | 263 | } |
| 264 | - | |
| 264 | + | |
| 265 | 265 | $aTriggerSet[] = array('types' => $aTypesStr, 'diagnostic' => $sDiagnostic); |
| 266 | 266 | } |
| 267 | - } | |
| 267 | + } | |
| 268 | 268 | $this->aTriggerSet = $aTriggerSet; |
| 269 | - $this->noTransforms = $noTransforms; | |
| 269 | + $this->noTransforms = $noTransforms; | |
| 270 | 270 | |
| 271 | 271 | return ($noTransforms || !empty($aTriggerSet)); // no diags and have some transforms. |
| 272 | 272 | } |
| 273 | - | |
| 274 | - function render() { | |
| 275 | - | |
| 276 | - | |
| 273 | + | |
| 274 | + function render() { | |
| 275 | + | |
| 276 | + | |
| 277 | 277 | $oTemplating =& KTTemplating::getSingleton(); |
| 278 | 278 | $oTemplate = $oTemplating->loadTemplate('ktcore/dashlets/indexer_status'); |
| 279 | 279 | $aTemplateData = array( |
| ... | ... | @@ -304,8 +304,8 @@ class KTMailServerDashlet extends KTBaseDashlet { |
| 304 | 304 | } |
| 305 | 305 | return false; |
| 306 | 306 | } |
| 307 | - | |
| 308 | - function render() { | |
| 307 | + | |
| 308 | + function render() { | |
| 309 | 309 | $oTemplating =& KTTemplating::getSingleton(); |
| 310 | 310 | $oTemplate = $oTemplating->loadTemplate('ktcore/dashlets/mailserver'); |
| 311 | 311 | $admin = Permission::userIsSystemAdministrator($_SESSION['userID']); | ... | ... |