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.legend.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.legend.php')
| -rw-r--r-- | smartyplugins/block.legend.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/smartyplugins/block.legend.php b/smartyplugins/block.legend.php new file mode 100644 index 0000000..3842769 --- /dev/null +++ b/smartyplugins/block.legend.php @@ -0,0 +1,27 @@ +<?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty {form} block plugin + * + * Type: block + * Name: form + * Input: + * - legend (optional) - text that appears in the legend + */ +function smarty_block_legend($params, $content, &$gBitSmarty) { + if( $content ) { + $attributes = ''; + $attributes .= !empty( $params['class'] ) ? ' class="'.$params['class'].'" ' : '' ; + $attributes .= !empty( $params['id'] ) ? ' id="'.$params['id'].'" ' : '' ; + $ret = '<fieldset '.$attributes.'><legend>'.tra( $params['legend'] ).'</legend>'; + $ret .= $content; + $ret .= '<div class="clear"></div></fieldset>'; + return $ret; + } +} +?> |
