打开config_override.php
并添加custom_help_url
一个PARAM指向顶层页面在您找到的网站上。
以下是我发现:
的糖,几乎任何你在屏幕上阅读保存在本地化和翻译的目的,一些语言文件。因此,我们可以通过使用grep
搜索系统,该位翻译文本的开始:
[MKP01] [~/Sites/sugar] > grep -r 'to learn more about the' include/
include//language/en_us.lang.php: 'MSG_EMPTY_LIST_VIEW_NO_RESULTS_SUBMSG' => "<item4> to learn more about the <item1> module. In order to access more information, use the user menu drop down located on the main navigation bar to access Help.",
现在我们知道标签的名称,我们可以搜索在使用时的情况:
[MKP01] [~/Sites/nemrace] > grep -r 'MSG_EMPTY_LIST_VIEW_NO_RESULTS_SUBMSG' include/
include//language/en_us.lang.php: 'MSG_EMPTY_LIST_VIEW_NO_RESULTS_SUBMSG' => "<item4> to learn more about the <item1> module. In order to access more information, use the user menu drop down located on the main navigation bar to access Help.",
include//ListView/ListViewGeneric.tpl: {$APP.MSG_EMPTY_LIST_VIEW_NO_RESULTS_SUBMSG|replace:"<item1>":$moduleName|replace:"<item4>":$helpLink}
我们已经知道的第一个结果,但第二个结果是你所追求的:它是所有列表视图的默认Smarty模板。如果我们在文本编辑器打开该文件,我们可以跟踪变量$helpLink
的定义是只有几行上面它的使用,其中:
{capture assign="helpLink"}<a target="_blank" href='?module=Administration&action=SupportPortal&view=documentation&version={$sugar_info.sugar_version}&edition={$sugar_info.sugar_flavor}&lang=&help_module={$currentModule}&help_action=&key='>{$APP.LBL_CLICK_HERE}</a>{/capture}
然后,你知道要挖到modules/Administration/SupportPortal.php
和读取逻辑,知道找函数get_help_url
的定义。我们发现它在include/utils.php
function get_help_url($send_edition = '', $send_version = '', $send_lang = '', $send_module = '', $send_action = '', $dev_status = '', $send_key = '', $send_anchor = '') {
global $sugar_config;
if (!empty($sugar_config['custom_help_url'])) {
$sendUrl = $sugar_config['custom_help_url'];
} else {
if (!empty($sugar_config['custom_help_base_url'])) {
$baseUrl= $sugar_config['custom_help_base_url'];
} else {
$baseUrl = "http://www.sugarcrm.com/crm/product_doc.php";
}
$sendUrl = $baseUrl . "?edition={$send_edition}&version={$send_version}&lang={$send_lang}&module={$send_module}&help_action={$send_action}&status={$dev_status}&key={$ send_key}";
if(!empty($send_anchor)) {
$sendUrl .= "&anchor=".$send_anchor;
}
}
return $sendUrl;
}
这是一个好消息 - 糖了解到,一些系统管理员都希望自己提供的帮助网址或基本URL,所以我的建议,你会开config_override.php
并添加参数有关custom_help_url
指向您找到的网站的顶级页面。
感谢Matthew您的快速修复和您的逻辑浏览语言def,smarty,php和模块中的代码是非常有用的。我将这一行添加到config_override.php以获得满意的解决方案:'$ sugar_config ['custom_help_url'] ='http://support.sugarcrm.com/02_Documentation01_Sugar_Editions/05_Sugar_Community_Edition/Sugar_Community_Edition_6.5/Sugar_Community_Edition_Application_Guide_6.5.0/';' – LectureMaker 2014-10-07 19:29:24
我也把这个问题发布到SugarCRM社区论坛。社区经理已将此问题标记为一个错误:{link}(https://community.sugarcrm.com/sugarcrm/topics/application-guide-broken-help-links) – LectureMaker 2014-10-07 22:40:03