blob: a174e77d8217192e10873e1bf52f47cb6a97dca4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
namespace Bitweaver\Plugins;
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* source elements
*/
/**
* smarty_function_bithelp
*/
function smarty_function_bithelp($params, &$gBitSmarty) {
global $gBitSystem, $gBitUser;
$outstr = "";
if( $gBitSystem->isFeatureActive('site_online_help') ){
if($gBitUser->hasPermission( 'p_admin' )){
$outstr .= "<a href=\"".KERNEL_PKG_URL."admin/index.php\">".smarty_function_booticon(['ipackage'=>'icons', 'iname'=>'icon-cogs', 'iexplain'=>'Administration Menu'] )."</a> ";
}
if( $helpInfo = $gBitSmarty->getTemplateVars('TikiHelpInfo') ) {
$outstr .= "<a href=\"".$helpInfo["URL"]."\" >".smarty_function_booticon(['ipackage'=>'icons', 'iname'=>'icon-question-sign', 'iexplain'=>(empty($helpInfo["Desc"])?"help":$helpInfo["Desc"])] )."</a>";
}
}
return $outstr;
}
|