[Openupload-svn-update] SF.net SVN: openupload:[357] trunk/lib/smarty_plugins
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2009-11-07 22:48:09
|
Revision: 357
http://openupload.svn.sourceforge.net/openupload/?rev=357&view=rev
Author: tsdogs
Date: 2009-11-07 22:48:01 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
new smarty plugins for new version
Added Paths:
-----------
trunk/lib/smarty_plugins/block.message.php
trunk/lib/smarty_plugins/block.tab.php
Added: trunk/lib/smarty_plugins/block.message.php
===================================================================
--- trunk/lib/smarty_plugins/block.message.php (rev 0)
+++ trunk/lib/smarty_plugins/block.message.php 2009-11-07 22:48:01 UTC (rev 357)
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {message} block plugin
+ *
+ * Type: block
+ * Name: message
+ * Purpose: Add a global message to the user
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app()->message
+ */
+
+function smarty_block_message($params, $content = null, &$smarty, &$repeat) {
+
+ if(!$repeat){
+ if (isset($content)) {
+ app()->message($content);
+ }
+ }
+ return '';
+}
\ No newline at end of file
Added: trunk/lib/smarty_plugins/block.tab.php
===================================================================
--- trunk/lib/smarty_plugins/block.tab.php (rev 0)
+++ trunk/lib/smarty_plugins/block.tab.php 2009-11-07 22:48:01 UTC (rev 357)
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {tab} block plugin
+ *
+ * Type: block
+ * Name: tab
+ * Purpose: Display the content within a tab element
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app->tab();
+ */
+
+function smarty_block_tab($params, $content = null, &$smarty, &$repeat) {
+
+ if(!$repeat){
+ if (isset($content)) {
+ $name = 'default';
+ $priority = 999;
+ if (isset($params['name']))
+ $name = $params['name'];
+ if (isset($params['priority']))
+ $priority = $params['priority'];
+ app()->tab($content, $name, $priority);
+ }
+ }
+ return '';
+}
+
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|