summaryrefslogtreecommitdiff
path: root/smartyplugins/function.displaycomment.php
blob: 16b02f169c3d08625e80228e8b9d0989bc4a5e92 (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
<?php
namespace Bitweaver\Plugins;

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * smarty_function_displaycomment
 */
function smarty_function_displaycomment( $pParams, &$pSmarty ) {
	global $gBitSmarty;

	if (!empty($pParams['comment'])) {
		$comment = $pParams['comment'];
		$gBitSmarty->assign('comment', $comment);
		$ret = ( empty( $pParams['template'] ) )
			? $gBitSmarty->fetch( 'bitpackage:liberty/display_comment.tpl' )
			: $gBitSmarty->fetch( $pParams['template'] );
	}

	return $ret;
}