diff --git a/action.php b/action.php
index 8737fdd..5bc09a4 100644
--- a/action.php
+++ b/action.php
@@ -59,7 +59,7 @@ class KTActionDispatcher extends KTStandardDispatcher {
$aActionInfo = $oRegistry->getActionByNsname($action);
if (empty($aActionInfo)) {
$this->error = true;
- $this->errorPage(_kt('No such action exists in KnowledgeTree'));
+ $this->errorPage(_kt('No such action exists in '.APP_NAME.'KnowledgeTree'));
}
$sFilename = $aActionInfo[1];
if (!empty($sFilename)) {
diff --git a/config/config.ini b/config/config.ini
index c9eb138..d42386a 100644
--- a/config/config.ini
+++ b/config/config.ini
@@ -76,6 +76,12 @@ useNewDashboard = default
manager = default
[ui]
+;Main application name
+;appName = KnowledgeTree
+; Enable Morph
+;morphEnabled = 0
+; Morph Theme
+;morphTo = blue
; add the logo of your company to the site's appearance.
; this logo MUST be 50px tall, and on a white background.
companyLogo = ${rootUrl}/resources/companylogo.png
@@ -84,19 +90,19 @@ companyLogoWidth = 313px
; ALT text - for accessibility purposes.
companyLogoTitle = ACME Corporation
; Main logo
-mainLogo =
+;mainLogo =
; the logo's width in pixels
-mainLogoWidth = 219px
+;mainLogoWidth = 219px
; ALT text - for accessibility purposes.
-mainLogoTitle = Pinnacle Knowledge Management Systems
+;mainLogoTitle = Pinnacle Knowledge Management Systems
; enable/disable powered by kt logo
-poweredByDisabled = 1
+;poweredByDisabled = 1
; powered by kt logo
-powerLogo = ${rootUrl}/resources/powered-by-kt.png
+;powerLogo = ${rootUrl}/resources/powered-by-kt.gif
; the logo's width in pixels
-powerLogoWidth = 130px
+;powerLogoWidth = 130px
; ALT text - for accessibility purposes.
-powerLogoTitle = Powered by KnowledgeTree
+;powerLogoTitle = Powered by KnowledgeTree
; use the additional IE specific GIF theme overrides.
; using this means that arbitrary theme packs may not work without
diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php
index b6d9403..859876e 100644
--- a/config/dmsDefaults.php
+++ b/config/dmsDefaults.php
@@ -76,12 +76,15 @@ class KTInit {
ini_set('include_path', $path . PATH_SEPARATOR . $include_path);
}
// }}}
-
// {{{ setupLogging()
function setupLogging () {
global $default;
require_once(KT_LIB_DIR . '/Log.inc');
$oKTConfig =& KTConfig::getSingleton();
+
+ if(!defined('APP_NAME')) {
+ define('APP_NAME', $oKTConfig->get('ui/appName', 'KnowledgeTree'));
+ }
$logLevel = $default->logLevel;
if (!is_numeric($logLevel)) {
$logLevel = @constant($logLevel);
@@ -393,7 +396,8 @@ class KTInit {
}
} else {
$oKTConfig =& KTConfig::getSingleton();
-
+
+ $oKTConfig->setdefaultns('ui', 'appName', 'KnowledgeTree');
$oKTConfig->setdefaultns('KnowledgeTree', 'fileSystemRoot', KT_DIR);
$oKTConfig->setdefaultns('KnowledgeTree', 'serverName', KTUtil::arrayGet($_SERVER, 'HTTP_HOST', 'localhost'));
$oKTConfig->setdefaultns('KnowledgeTree', 'sslEnabled', false);
diff --git a/lib/dashboard/Notification.inc.php b/lib/dashboard/Notification.inc.php
index 1be7c37..66811b1 100644
--- a/lib/dashboard/Notification.inc.php
+++ b/lib/dashboard/Notification.inc.php
@@ -350,7 +350,7 @@ class KTSubscriptionNotification extends KTNotificationHandler {
exit(redirect($url));
}
}
- $_SESSION['KTErrorMessage'][] = 'This notification has no "target". Please inform the KnowledgeTree developers that there is a target bug with type: ' . $info['event_type'];
+ $_SESSION['KTErrorMessage'][] = 'This notification has no "target". Please inform the '.APP_NAME.' developers that there is a target bug with type: ' . $info['event_type'];
exit(redirect(generateControllerLink('dashboard')));
}
diff --git a/lib/templating/kt3template.inc.php b/lib/templating/kt3template.inc.php
index 1d2cc00..0cccda1 100644
--- a/lib/templating/kt3template.inc.php
+++ b/lib/templating/kt3template.inc.php
@@ -45,7 +45,9 @@ class KTPage {
/** resources are "filename"->1 to allow subcomponents to require items. */
var $js_resources = Array();
var $css_resources = Array();
+ var $theme_css_resources = Array();
var $ie_only_css = Array();
+ var $theme_ie_only_css = Array();
var $js_standalone = Array();
var $css_standalone = Array();
@@ -57,7 +59,7 @@ class KTPage {
/** miscellaneous items */
var $title = '';
- var $systemName = 'KnowledgeTree';
+ var $systemName = APP_NAME;
var $systemURL = 'http://www.knowledgetree.com/';
var $breadcrumbs = false;
var $breadcrumbDetails = false;
@@ -82,6 +84,9 @@ class KTPage {
/* further initialisation */
function KTPage() {
+ global $default;
+ $oConfig = KTConfig::getSingleton();
+
/* default css files initialisation */
$aCSS = Array(
"resources/css/kt-framing.css",
@@ -90,8 +95,14 @@ class KTPage {
);
$this->requireCSSResources($aCSS);
+ if($oConfig->get('ui/morphEnabled') == '1'){
+ $morphTheme = $oConfig->get('ui/morphTo');
+ $this->requireThemeCSSResource('skins/kts_'.$oConfig->get('ui/morphTo').'/kt-morph.css');
+ $this->requireThemeCSSResource('skins/kts_'.$oConfig->get('ui/morphTo').'/kt-ie-morph.css', true);
+ }
// IE only
$this->requireCSSResource("resources/css/kt-ie-icons.css", true);
+
/* default js files initialisation */
$aJS = Array();
@@ -180,6 +191,15 @@ class KTPage {
}
}
+ // require that the specified CSS file is referenced.
+ function requireThemeCSSResource($sResourceURL, $ieOnly = false) {
+ if ($ieOnly !== true) {
+ $this->theme_css_resources[$sResourceURL] = 1; // use the keys to prevent multiple copies.
+ } else {
+ $this->theme_ie_only_css[$sResourceURL] = 1;
+ }
+ }
+
// require that the specified CSS files are referenced.
function requireCSSResources($aResourceURLs) {
foreach ($aResourceURLs as $sResourceURL) {
@@ -191,10 +211,19 @@ class KTPage {
function getCSSResources() {
return array_keys($this->css_resources);
}
+
+ // list the distinct CSS resources.
+ function getThemeCSSResources() {
+ return array_keys($this->theme_css_resources);
+ }
function getCSSResourcesForIE() {
return array_keys($this->ie_only_css);
}
+
+ function getThemeCSSResourcesForIE() {
+ return array_keys($this->theme_ie_only_css);
+ }
function requireCSSStandalone($sCSS) {
$this->css_standalone[$sCSS] = 1;
diff --git a/lib/templating/smartytemplate.inc.php b/lib/templating/smartytemplate.inc.php
index f36daec..05eed9c 100644
--- a/lib/templating/smartytemplate.inc.php
+++ b/lib/templating/smartytemplate.inc.php
@@ -76,6 +76,7 @@ class KTSmartyTemplate extends KTTemplate {
$absroot .= $KTConfig->get("KnowledgeTree/rootUrl");
$smarty->assign("config", $KTConfig);
+ $smarty->assign("appname", $KTConfig->get("ui/appName", "KnowledgeTree"));
$smarty->assign("rootUrl", $KTConfig->get("KnowledgeTree/rootUrl"));
$smarty->assign("absoluteRootUrl", $absroot);
$smarty->caching = false;
diff --git a/lib/widgets/fieldsetDisplay.inc.php b/lib/widgets/fieldsetDisplay.inc.php
index 8c4ca78..6f9295d 100644
--- a/lib/widgets/fieldsetDisplay.inc.php
+++ b/lib/widgets/fieldsetDisplay.inc.php
@@ -332,7 +332,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
function renderEdit($document_data) {
global $main; // FIXME remove direct access to $main
$oField = new KTBaseWidget(_kt("Document Title"),
- _kt("The document title is used as the main name of a document throughout KnowledgeTree™."),
+ _kt("The document title is used as the main name of a document throughout ".APP_NAME."™."),
"generic_title", $document_data["document"]->getName(), $main, true, null, array());
$aFields = array($oField); // its the only one editable from the basic set (currently).
diff --git a/plugins/ktcore/KTCorePlugin.php b/plugins/ktcore/KTCorePlugin.php
index 3fe1c2a..06218c3 100644
--- a/plugins/ktcore/KTCorePlugin.php
+++ b/plugins/ktcore/KTCorePlugin.php
@@ -93,7 +93,7 @@ class KTCorePlugin extends KTPlugin {
$this->registerDashlet('KTIndexerStatusDashlet', 'ktcore.dashlet.indexer_status', 'KTDashlets.php');
$this->registerDashlet('KTMailServerDashlet', 'ktcore.dashlet.mail_server', 'KTDashlets.php');
- $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', _kt('Authentication'), _kt('By default, KnowledgeTree controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. These Authentication Sources allow the system administrator to specify additional sources of authentication data.'), 'authentication/authenticationadminpage.inc.php');
+ $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', _kt('Authentication'), _kt('By default, '.APP_NAME.' controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. These Authentication Sources allow the system administrator to specify additional sources of authentication data.'), 'authentication/authenticationadminpage.inc.php');
$this->registerPortlet(array('browse'),
'KTAdminModePortlet', 'ktcore.portlets.admin_mode',
diff --git a/plugins/ktcore/KTDashlets.php b/plugins/ktcore/KTDashlets.php
index 2037ada..7498065 100644
--- a/plugins/ktcore/KTDashlets.php
+++ b/plugins/ktcore/KTDashlets.php
@@ -40,7 +40,7 @@ class KTInfoDashlet extends KTBaseDashlet {
var $help_id;
function KTInfoDashlet() {
- $this->sTitle = _kt('Welcome to KnowledgeTree');
+ $this->sTitle = _kt('Welcome to '.APP_NAME);
}
function is_active($oUser) {
@@ -80,7 +80,7 @@ class KTInfoDashlet extends KTBaseDashlet {
$this->aHelpInfo = $aHelpInfo;
$this->canEdit = $can_edit;
- $this->sTitle = $this->aHelpInfo['title'];
+ $this->sTitle = str_replace('KnowledgeTree', APP_NAME, $this->aHelpInfo['title']);
return true;
}
@@ -90,8 +90,8 @@ class KTInfoDashlet extends KTBaseDashlet {
$oTemplate = $oTemplating->loadTemplate('ktcore/dashlets/kt3release');
$aTemplateData = array(
- 'title' => $this->aHelpInfo['title'],
- 'body' => $this->aHelpInfo['body'],
+ 'title' => str_replace('KnowledgeTree', APP_NAME, $this->aHelpInfo['title']),
+ 'body' => str_replace('KnowledgeTree', APP_NAME, $this->aHelpInfo['body']),
'can_edit' => $this->canEdit,
'target_name' => $this->helpLocation,
'help_id' => $this->aHelpInfo['help_id'],
diff --git a/plugins/ktcore/document/edit.php b/plugins/ktcore/document/edit.php
index 6363ba0..b003ce3 100644
--- a/plugins/ktcore/document/edit.php
+++ b/plugins/ktcore/document/edit.php
@@ -88,7 +88,7 @@ class KTDocumentEditAction extends KTDocumentAction {
$widgets = array(
array('ktcore.widgets.string', array(
'label' => _kt("Document Title"),
- 'description' => _kt("The document title is used as the main name of a document throughout KnowledgeTree."),
+ 'description' => _kt("The document title is used as the main name of a document throughout ".APP_NAME."."),
'name' => 'document_title',
'required' => true,
'value' => $this->oDocument->getName(),
diff --git a/plugins/ktcore/folder/addDocument.php b/plugins/ktcore/folder/addDocument.php
index 821b02b..180728b 100644
--- a/plugins/ktcore/folder/addDocument.php
+++ b/plugins/ktcore/folder/addDocument.php
@@ -92,7 +92,7 @@ class KTFolderAddDocumentAction extends KTFolderAction {
)),
array('ktcore.widgets.string',array(
'label' => _kt('Document Title'),
- 'description' => _kt('The document title is used as the main name of a document throughout KnowledgeTree.'),
+ 'description' => _kt('The document title is used as the main name of a document throughout '.APP_NAME.'.'),
'name' => 'document_name',
'required' => true,
)),
diff --git a/plugins/ktstandard/contents/OpenDocumentIndexer.php b/plugins/ktstandard/contents/OpenDocumentIndexer.php
index a171b6a..7aa17a3 100644
--- a/plugins/ktstandard/contents/OpenDocumentIndexer.php
+++ b/plugins/ktstandard/contents/OpenDocumentIndexer.php
@@ -96,7 +96,7 @@ class KTOpenDocumentIndexerTrigger extends KTBaseIndexerTrigger {
// can't find the local command.
if (empty($sCommand)) {
- return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the KnowledgeTree Path. For more information on indexers and helper applications, please visit the KnowledgeTree site.'), $this->command, $this->support_url);
+ return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the '.APP_NAME.' Path. For more information on indexers and helper applications, please visit the '.APP_NAME.' site.'), $this->command, $this->support_url);
}
return null;
diff --git a/plugins/ktstandard/contents/PdfIndexer.php b/plugins/ktstandard/contents/PdfIndexer.php
index 4e82d87..cae71bc 100644
--- a/plugins/ktstandard/contents/PdfIndexer.php
+++ b/plugins/ktstandard/contents/PdfIndexer.php
@@ -47,7 +47,7 @@ class KTPdfIndexerTrigger extends KTBaseIndexerTrigger {
// can't find the local command.
if (empty($sCommand)) {
- return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the KnowledgeTree Path. For more information on indexers and helper applications, please visit the KnowledgeTree site.'), $this->command, $this->support_url);
+ return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the '.APP_NAME.' Path. For more information on indexers and helper applications, please visit the '.APP_NAME.' site.'), $this->command, $this->support_url);
}
return null;
diff --git a/plugins/ktstandard/contents/PowerpointIndexer.php b/plugins/ktstandard/contents/PowerpointIndexer.php
index fa38522..b82a118 100644
--- a/plugins/ktstandard/contents/PowerpointIndexer.php
+++ b/plugins/ktstandard/contents/PowerpointIndexer.php
@@ -43,7 +43,7 @@ class KTPowerpointIndexerTrigger extends KTBaseIndexerTrigger {
// can't find the local command.
if (empty($sCommand)) {
- return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the KnowledgeTree Path. For more information on indexers and helper applications, please visit the KnowledgeTree site.'), $this->command, $this->support_url);
+ return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the '.APP_NAME.' Path. For more information on indexers and helper applications, please visit the '.APP_NAME.' site.'), $this->command, $this->support_url);
}
return null;
diff --git a/plugins/ktstandard/contents/RtfIndexer.php b/plugins/ktstandard/contents/RtfIndexer.php
index 6646ff2..22c9a60 100644
--- a/plugins/ktstandard/contents/RtfIndexer.php
+++ b/plugins/ktstandard/contents/RtfIndexer.php
@@ -49,7 +49,7 @@ class KTRtfIndexerTrigger extends KTBaseIndexerTrigger {
// can't find the local command.
if (empty($sCommand)) {
- return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the KnowledgeTree Path. For more information on indexers and helper applications, please visit the KnowledgeTree site.'), $this->command, $this->support_url);
+ return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the '.APP_NAME.' Path. For more information on indexers and helper applications, please visit the '.APP_NAME.' site.'), $this->command, $this->support_url);
}
return null;
diff --git a/plugins/ktstandard/contents/WordIndexer.php b/plugins/ktstandard/contents/WordIndexer.php
index b3a7889..03b84be 100644
--- a/plugins/ktstandard/contents/WordIndexer.php
+++ b/plugins/ktstandard/contents/WordIndexer.php
@@ -64,7 +64,7 @@ class KTWordIndexerTrigger extends KTBaseIndexerTrigger {
// can't find the local command.
if (empty($sCommand)) {
- return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the KnowledgeTree Path. For more information on indexers and helper applications, please visit the KnowledgeTree site.'), $this->command, $this->support_url);
+ return sprintf(_kt('Unable to find required command for indexing. Please ensure that %s is installed and in the '.APP_NAME.' Path. For more information on indexers and helper applications, please visit the '.APP_NAME.' site.'), $this->command, $this->support_url);
}
return null;
diff --git a/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php b/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
index 2094024..977b871 100644
--- a/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
+++ b/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
@@ -232,7 +232,7 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider {
$fields = array();
$fields[] = new KTStaticTextWidget(_kt('LDAP DN'), _kt('The location of the user within the LDAP directory.'), 'dn', $id, $this->oPage);
- $fields[] = new KTStringWidget(_kt('Username'), _kt('The username the user will enter to gain access to KnowledgeTree. e.g. jsmith'), 'ldap_username', $aResults[$this->aAttributes[1]], $this->oPage, true);
+ $fields[] = new KTStringWidget(_kt('Username'), _kt('The username the user will enter to gain access to '.APP_NAME.'. e.g. jsmith'), 'ldap_username', $aResults[$this->aAttributes[1]], $this->oPage, true);
$fields[] = new KTStringWidget(_kt('Name'), _kt('The full name of the user. This is shown in reports and listings. e.g. John Smith'), 'name', $aResults[$this->aAttributes[0]], $this->oPage, true);
$fields[] = new KTStringWidget(_kt('Email Address'), _kt('The email address of the user. Notifications and alerts are mailed to this address if email notifications is set below. e.g. jsmith@acme.com'), 'email_address', $aResults[$this->aAttributes[4]], $this->oPage, false);
$fields[] = new KTCheckboxWidget(_kt('Email Notifications'), _kt('If this is specified then the user will have notifications sent to the email address entered above. If it is not set, then the user will only see notifications on the Dashboard'), 'email_notifications', true, $this->oPage, false);
@@ -439,7 +439,7 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider {
$fields = array();
$fields[] = new KTStaticTextWidget(_kt('LDAP DN'), _kt('The location of the group within the LDAP directory.'), 'dn', $aAttributes['dn'], $this->oPage);
- $fields[] = new KTStringWidget(_kt('Group Name'), _kt('The name the group will enter to gain access to KnowledgeTree. e.g. accountants'), 'ldap_groupname', $aAttributes['cn'], $this->oPage, true);
+ $fields[] = new KTStringWidget(_kt('Group Name'), _kt('The name the group will enter to gain access to '.APP_NAME.'. e.g. accountants'), 'ldap_groupname', $aAttributes['cn'], $this->oPage, true);
$fields[] = new KTCheckboxWidget(_kt('Unit Administrators'), _kt('Should all the members of this group be given unit administration privileges?'), 'is_unitadmin', false, $this->oPage, false);
$fields[] = new KTCheckboxWidget(_kt('System Administrators'), _kt('Should all the members of this group be given system administration privileges?'), 'is_sysadmin', false, $this->oPage, false);
diff --git a/plugins/rssplugin/KTrss.inc.php b/plugins/rssplugin/KTrss.inc.php
index 3bf929e..f18081d 100644
--- a/plugins/rssplugin/KTrss.inc.php
+++ b/plugins/rssplugin/KTrss.inc.php
@@ -197,7 +197,7 @@ class KTrss{
$feed = "\n";
$feed .= "
{i18n}By default, KnowledgeTree controls its +
{i18n}By default, {$appname} controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. diff --git a/templates/ktcore/dashlets/mailserver.smarty b/templates/ktcore/dashlets/mailserver.smarty index 9eda27e..750c299 100644 --- a/templates/ktcore/dashlets/mailserver.smarty +++ b/templates/ktcore/dashlets/mailserver.smarty @@ -3,5 +3,5 @@ documents and sending of notifications are disabled.{/i18n}
{if $admin}{i18n}Edit the [email] section of the config.ini file to set your email -server and the sending address of the KnowledgeTree server.{/i18n}
+server and the sending address of the {$appname} server.{/i18n} {/if} diff --git a/templates/ktcore/document/admin/linktypesadmin.smarty b/templates/ktcore/document/admin/linktypesadmin.smarty index a37b0d2..467f579 100644 --- a/templates/ktcore/document/admin/linktypesadmin.smarty +++ b/templates/ktcore/document/admin/linktypesadmin.smarty @@ -1,6 +1,6 @@{i18n}Within KnowledgeTree it is possible for users to create links between related documents. Link types may include constructs such as "associated with" and "duplicated by". Please create link types required by your organisation below.{/i18n}
+{i18n}Within {$appname} it is possible for users to create links between related documents. Link types may include constructs such as "associated with" and "duplicated by". Please create link types required by your organisation below.{/i18n}
{if ($add_form)} diff --git a/templates/ktcore/document/compare.smarty b/templates/ktcore/document/compare.smarty index 2b6db80..e9b51b2 100644 --- a/templates/ktcore/document/compare.smarty +++ b/templates/ktcore/document/compare.smarty @@ -15,14 +15,14 @@ {if ($document_data.is_manufactured)}{i18n}Please note{/i18n}: {i18n arg_version=$from}the information for version -#version# comes from an older version of KnowledgeTree and may be +#version# comes from an older version of {$appname} and may be incorrect.{/i18n} {/if} {if ($comparison_data.is_manufactured)}
{i18n}Please note{/i18n}: {i18n arg_version=$to}the information for version -#version# comes from an older version of KnowledgeTree and may be +#version# comes from an older version of {$appname} and may be incorrect.{/i18n} {/if} diff --git a/templates/ktcore/document/comparison_version_select.smarty b/templates/ktcore/document/comparison_version_select.smarty index 899329e..9dfb334 100644 --- a/templates/ktcore/document/comparison_version_select.smarty +++ b/templates/ktcore/document/comparison_version_select.smarty @@ -2,7 +2,7 @@
{i18n}This page lists versions of document metadata and allows you to compare a metadata version with the current metadata content.{/i18n}
-