summaryrefslogtreecommitdiff
path: root/smartyplugins/block.jstab.php
diff options
context:
space:
mode:
authorWill James <will@onnyturf.com>2010-06-13 22:22:32 -0400
committerWill James <will@onnyturf.com>2010-06-13 22:28:13 -0400
commit4dac9171db44be0a1f696a81f167713ad043fb17 (patch)
treef0ded954837de74e1d33475a85c529c55196b9ba /smartyplugins/block.jstab.php
parent6749e1edb9ab91649401f69ff71776ae7ee9de02 (diff)
downloadthemes-4dac9171db44be0a1f696a81f167713ad043fb17.tar.gz
themes-4dac9171db44be0a1f696a81f167713ad043fb17.tar.bz2
themes-4dac9171db44be0a1f696a81f167713ad043fb17.zip
move smarty to themes
Diffstat (limited to 'smartyplugins/block.jstab.php')
-rw-r--r--smartyplugins/block.jstab.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/smartyplugins/block.jstab.php b/smartyplugins/block.jstab.php
new file mode 100644
index 0000000..7c8ccc9
--- /dev/null
+++ b/smartyplugins/block.jstab.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {jstab} block plugin
+ *
+ * Type: block
+ * Name: jstab
+ * Input:
+ * Abstract: Used to enclose a set of tabs
+ */
+
+function smarty_block_jstab( $pParams, $pContent, &$gBitSmarty ) {
+
+ // if this is modified, please adjust the preg_match_all() pattern in block.jstabs.php
+ $pClass = isset( $pParams['class'] ) ? ' '.$pParams['class'] : '';
+
+ $tClass = isset( $pParams['class'] ) ? ' '.$pParams['class'] : '';
+ $tClick = isset( $pParams['onclick'] ) ? ' onclick="'.$pParams['onclick'].'"' : '';
+ $tTitle = tra( isset( $pParams['title'] ) ? $pParams['title'] : 'No Title' );
+
+ $ret = '<div class="tabpage' . $pClass . '">';
+ $ret .= '<h4 class="tab' . $tClass . '"' . $tClick . '>' . $tTitle . '</h4>';
+ $ret .= $pContent;
+ $ret .= '</div>';
+
+ return $ret;
+}
+?>