diff options
| author | Will James <will@onnyturf.com> | 2010-06-13 22:22:32 -0400 |
|---|---|---|
| committer | Will James <will@onnyturf.com> | 2010-06-13 22:28:13 -0400 |
| commit | 4dac9171db44be0a1f696a81f167713ad043fb17 (patch) | |
| tree | f0ded954837de74e1d33475a85c529c55196b9ba /smartyplugins/block.box.php | |
| parent | 6749e1edb9ab91649401f69ff71776ae7ee9de02 (diff) | |
| download | themes-4dac9171db44be0a1f696a81f167713ad043fb17.tar.gz themes-4dac9171db44be0a1f696a81f167713ad043fb17.tar.bz2 themes-4dac9171db44be0a1f696a81f167713ad043fb17.zip | |
move smarty to themes
Diffstat (limited to 'smartyplugins/block.box.php')
| -rw-r--r-- | smartyplugins/block.box.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/smartyplugins/block.box.php b/smartyplugins/block.box.php new file mode 100644 index 0000000..aba05be --- /dev/null +++ b/smartyplugins/block.box.php @@ -0,0 +1,45 @@ +<?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty {box} block plugin + * + * Type: block + * Name: box + * Input: + * - title (optional) box title + * - class (optional) overrides the default class 'box' + * - biticon values (optional) see function.biticon.php for details + * - idiv (optional) name of class of div that surrounds icon (if not set, no div is created) + * @uses smarty_function_escape_special_chars() + * @todo somehow make the variable that is contained within $iselect global --> this will allow importing of outside variables not set in $_REQUEST + */ +function smarty_block_box($params, $content, &$gBitSmarty) { + $atts = ''; + foreach( $params as $key => $val ) { + switch( $key ) { + case 'title': + $gBitSmarty->assign( $key, tra( $val ) ); + break; + case 'class': + case 'iclass': + case 'ipackage': + case 'iname': + case 'iexplain': + case 'idiv': + $gBitSmarty->assign( $key,$val ); + break; + default: + $atts .= $key.'="'.$val.'" '; + break; + } + } + $gBitSmarty->assign( 'content',$content ); + $gBitSmarty->assign( 'atts',$atts ); + return $gBitSmarty->fetch( 'bitpackage:kernel/box.tpl' ); +} +?> |
