function.sugar_help.php
来自「SugarCRM5.1 开源PHP客户关系管理系统」· PHP 代码 · 共 44 行
PHP
44 行
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*
* This is a Smarty plugin to handle the creation of overlib popups for inline help
*
* NOTE: Be sure to include the following code somewhere on the page you'll be using this on.
* {overlib_includes}
*
*
* @author John Mertic {jmertic@sugarcrm.com}
*/
/**
* smarty_function_sugar_help
* This is the constructor for the Smarty plugin.
*
* @param $params The runtime Smarty key/value arguments
* @param $smarty The reference to the Smarty object used in this invocation
*/
function smarty_function_sugar_help($params, &$smarty)
{
$text = htmlspecialchars($params['text'], ENT_QUOTES);
//append any additional parameters.
$onmouseover = "return overlib('$text', FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass', WIDTH, -1, NOFOLLOW, 'ol_nofollow'";
if (count( $params) > 1){
unset($params['text']);
foreach($params as $prop => $value){
$onmouseover .=",".$prop.",".$value;
}
}
$onmouseover .= " );" ;
return <<<EOHTML
<img border="0" onmouseout="return nd();"
onmouseover="$onmouseover"
src="themes/default/images/help.gif"/>
EOHTML;
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?