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

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

/**
 * smarty_function_rcontent
 */
function smarty_function_rcontent($params, &$gBitSmarty)
{
	global $gBitSystem;
	include_once( DCS_PKG_PATH.'dcs_lib.php' );
	extract($params);
	// Param = zone

	if (empty($id)) {
		$gBitSmarty->trigger_error("assign: missing 'zone' parameter");
		return;
	}
	$data = $dcslib->get_random_content($id);
	print($data);
}

/* vim: set expandtab: */