summaryrefslogtreecommitdiff
path: root/smartyplugins/function.displaycomment.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/function.displaycomment.php')
-rw-r--r--smartyplugins/function.displaycomment.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/smartyplugins/function.displaycomment.php b/smartyplugins/function.displaycomment.php
new file mode 100644
index 0000000..e338117
--- /dev/null
+++ b/smartyplugins/function.displaycomment.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * smarty_function_displaycomment
+ */
+function smarty_function_displaycomment($params) {
+ global $gBitSmarty;
+
+ if (!empty($params['comment'])) {
+ $comment = $params['comment'];
+ $gBitSmarty->assign('comment', $comment);
+ if (empty($params['template'])) {
+ $gBitSmarty->display('bitpackage:liberty/display_comment.tpl');
+ } else {
+ $gBitSmarty->display($params['template']);
+ }
+ }
+}
+
+?>