summaryrefslogtreecommitdiff
path: root/smartyplugins/function.bithelp.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/function.bithelp.php')
-rw-r--r--smartyplugins/function.bithelp.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/smartyplugins/function.bithelp.php b/smartyplugins/function.bithelp.php
new file mode 100644
index 0000000..19c31fc
--- /dev/null
+++ b/smartyplugins/function.bithelp.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * source elements
+ */
+require_once('function.biticon.php');
+/**
+* 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_biticon(array('ipackage'=>'icons', 'iname'=>'preferences-system', 'iexplain'=>'Administration Menu'),$gBitSmarty)."</a> ";
+ }
+ if( $helpInfo = $gBitSmarty->get_template_vars('TikiHelpInfo') ) {
+ $outstr .= "<a href=\"".$helpInfo["URL"]."\" >".smarty_function_biticon(array('ipackage'=>'icons', 'iname'=>'help-browser', 'iexplain'=>(empty($helpInfo["Desc"])?"help":$helpInfo["Desc"])),$gBitSmarty)."</a>";
+ }
+ }
+ return $outstr;
+}