summaryrefslogtreecommitdiff
path: root/smarty_bit/block.textarea.php
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2006-11-30 12:48:38 +0000
committerNick Palmer <nick@sluggardy.net>2006-11-30 12:48:38 +0000
commitb1239726573f113a0df065fed840ec56e7b32619 (patch)
tree65e8fd247ad44d63ca78718ff68c0380ac6f8ed4 /smarty_bit/block.textarea.php
parentd1d95332b533ea18d9713f3bf26c2652890f1b0f (diff)
downloadkernel-b1239726573f113a0df065fed840ec56e7b32619.tar.gz
kernel-b1239726573f113a0df065fed840ec56e7b32619.tar.bz2
kernel-b1239726573f113a0df065fed840ec56e7b32619.zip
Added textarea block tag to facilitate fckeditor integration.
Diffstat (limited to 'smarty_bit/block.textarea.php')
-rw-r--r--smarty_bit/block.textarea.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/smarty_bit/block.textarea.php b/smarty_bit/block.textarea.php
new file mode 100644
index 0000000..fc204c2
--- /dev/null
+++ b/smarty_bit/block.textarea.php
@@ -0,0 +1,34 @@
+<?php
+ /**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+ /**
+ * Smarty block plugin
+ * Requires PHP >= 4.3.0
+ * -------------------------------------------------------------
+ * Type: block
+ * Name: textarea
+ * Version: 1.0
+ * Author: WaterDragon (nick at sluggardy dot net)
+ * Purpose: Creates a textarea
+ * -------------------------------------------------------------
+ */
+function smarty_block_textarea($params, $content, &$smarty)
+{
+ global $gBitSystem;
+
+ if ($content) {
+ $out = '<textarea ';
+
+ foreach ($params as $key => $value) {
+ $out = $out . $key . '="' . $value . '" ';
+ }
+
+ $out = $out . ">" . $content . "</textarea>";
+ }
+
+ return $out;
+}