Thread: [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.
|
|
From: <ts...@us...> - 2010-03-18 18:13:01
|
Revision: 365
http://openupload.svn.sourceforge.net/openupload/?rev=365&view=rev
Author: tsdogs
Date: 2010-03-18 18:12:52 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
minor changes
Modified Paths:
--------------
trunk/lib/smarty_plugins/block.tr.php
trunk/lib/smarty_plugins/function.db_table.php
Modified: trunk/lib/smarty_plugins/block.tr.php
===================================================================
--- trunk/lib/smarty_plugins/block.tr.php 2009-11-07 23:54:47 UTC (rev 364)
+++ trunk/lib/smarty_plugins/block.tr.php 2010-03-18 18:12:52 UTC (rev 365)
@@ -23,7 +23,7 @@
if(!$repeat){
if (isset($content)) {
- return translate($content, 'template',$params);
+ return translate($content, 'template', $params);
} else {
return '';
}
Modified: trunk/lib/smarty_plugins/function.db_table.php
===================================================================
--- trunk/lib/smarty_plugins/function.db_table.php 2009-11-07 23:54:47 UTC (rev 364)
+++ trunk/lib/smarty_plugins/function.db_table.php 2010-03-18 18:12:52 UTC (rev 365)
@@ -1,7 +1,5 @@
<?php
-
-
function smarty_function_db_table($params, &$smarty){
$data = $params['data'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:13:54
|
Revision: 366
http://openupload.svn.sourceforge.net/openupload/?rev=366&view=rev
Author: tsdogs
Date: 2010-03-18 18:13:47 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
Add content handling plugins
Added Paths:
-----------
trunk/lib/smarty_plugins/block.addcontent.php
trunk/lib/smarty_plugins/function.content.php
Added: trunk/lib/smarty_plugins/block.addcontent.php
===================================================================
--- trunk/lib/smarty_plugins/block.addcontent.php (rev 0)
+++ trunk/lib/smarty_plugins/block.addcontent.php 2010-03-18 18:13:47 UTC (rev 366)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {addcontent} block plugin
+ *
+ * Type: block
+ * Name: addcontent
+ * Purpose: Adds the content to the corresponding section
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app()->addContent();
+ */
+
+function smarty_block_addcontent($params, $content = null, &$smarty, &$repeat) {
+
+ if(!$repeat){
+ if (isset($content)) {
+ $name = 'page';
+ $priority = 999;
+ if (isset($params['name']))
+ $name = $params['name'];
+ if (isset($params['priority']))
+ $priority = $params['priority'];
+ return app()->addContent($content,$name,$priority);
+ }
+ }
+ return '';
+}
\ No newline at end of file
Added: trunk/lib/smarty_plugins/function.content.php
===================================================================
--- trunk/lib/smarty_plugins/function.content.php (rev 0)
+++ trunk/lib/smarty_plugins/function.content.php 2010-03-18 18:13:47 UTC (rev 366)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {content} function plugin
+ *
+ * Type: function
+ * Name: content
+ * Purpose: Display the content previously populated by the application
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app()->addContent();
+ */
+
+function smarty_function_content($params, &$smarty) {
+
+ $name = 'page';
+ if (isset($params['name']))
+ $name = $params['name'];
+ return app()->getContent($name);
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|