diff options
Diffstat (limited to 'smartyplugins/function.rcontent.php')
| -rw-r--r-- | smartyplugins/function.rcontent.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/smartyplugins/function.rcontent.php b/smartyplugins/function.rcontent.php new file mode 100644 index 0000000..90b5d2c --- /dev/null +++ b/smartyplugins/function.rcontent.php @@ -0,0 +1,28 @@ +<?php +/** + * 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: */ + +?> |
