[limb-svn] r6813 - in 3.x/examples: . macro macro/config macro/css macro/examples macro/examples/expressions macro/examples/expressions/templates macro/examples/expressions/templates/1 macro/examples/expressions/templates/2 macro/examples/tags macro/examples/tags/core macro/examples/tags/core/insert macro/examples/tags/core/insert/templates macro/examples/tags/core/insert/templates/dynamic macro/examples/tags/core/insert/templates/include macro/examples/tags/core/insert/templates/multiple_wrap macro/examples/tags/core/insert/templates/nested_wrap macro/examples/tags/core/insert/templates/simple_wrap macro/examples/tags/core/insert/templates/wrap_with_include macro/examples/tags/core/repeat macro/examples/tags/core/repeat/templates macro/examples/tags/form macro/examples/tags/form/basic macro/examples/tags/form/basic/templates macro/examples/tags/form/basic/templates/1 macro/examples/tags/form/basic/templates/2 macro/examples/tags/form/select macro/examples/tags/form/select/temp lates macro/examples/tags/form/select/templates/1 macro/examples/tags/form/select/templates/2 macro/examples/tags/list macro/examples/tags/list/templates macro/examples/tags/list/templates/decorated macro/examples/tags/list/templates/default macro/examples/tags/list/templates/separated macro/examples/tags/list/templates/simple macro/examples/tags/pager macro/examples/tags/pager/templates macro/examples/tags/pager/templates/elipses macro/examples/tags/pager/templates/paginate macro/examples/tags/pager/templates/sections macro/images macro/images/bgr macro/lib macro/lib/XML macro/lib/XML/HTMLSax3 macro/src macro/templates

svn at limb-project.com svn at limb-project.com
Mon Mar 3 11:39:25 MSK 2008


Author: serega
Date: 2008-03-03 11:39:25 +0300 (Mon, 03 Mar 2008)
New Revision: 6813
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6813

Added:
   3.x/examples/macro/
   3.x/examples/macro/config/
   3.x/examples/macro/config/config.ini
   3.x/examples/macro/css/
   3.x/examples/macro/css/style.css
   3.x/examples/macro/examples/
   3.x/examples/macro/examples/expressions/
   3.x/examples/macro/examples/expressions/array_index.php
   3.x/examples/macro/examples/expressions/desc.ini
   3.x/examples/macro/examples/expressions/php_vars.php
   3.x/examples/macro/examples/expressions/templates/
   3.x/examples/macro/examples/expressions/templates/1/
   3.x/examples/macro/examples/expressions/templates/1/page.html
   3.x/examples/macro/examples/expressions/templates/2/
   3.x/examples/macro/examples/expressions/templates/2/page.html
   3.x/examples/macro/examples/tags/
   3.x/examples/macro/examples/tags/core/
   3.x/examples/macro/examples/tags/core/insert/
   3.x/examples/macro/examples/tags/core/insert/desc.ini
   3.x/examples/macro/examples/tags/core/insert/dynamic.php
   3.x/examples/macro/examples/tags/core/insert/include.php
   3.x/examples/macro/examples/tags/core/insert/multiple.php
   3.x/examples/macro/examples/tags/core/insert/multiple_with_include.php
   3.x/examples/macro/examples/tags/core/insert/nested.php
   3.x/examples/macro/examples/tags/core/insert/simple.php
   3.x/examples/macro/examples/tags/core/insert/templates/
   3.x/examples/macro/examples/tags/core/insert/templates/dynamic/
   3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page1.html
   3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page2.html
   3.x/examples/macro/examples/tags/core/insert/templates/dynamic/simple.html
   3.x/examples/macro/examples/tags/core/insert/templates/include/
   3.x/examples/macro/examples/tags/core/insert/templates/include/include_file.html
   3.x/examples/macro/examples/tags/core/insert/templates/include/page.html
   3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/
   3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/multiple.html
   3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/page.html
   3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/
   3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/layout.html
   3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/page.html
   3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/wrap.html
   3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/
   3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/page.html
   3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/simple.html
   3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/
   3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/layout.html
   3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/page.html
   3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/wrap.html
   3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/zones.html
   3.x/examples/macro/examples/tags/core/repeat/
   3.x/examples/macro/examples/tags/core/repeat/desc.ini
   3.x/examples/macro/examples/tags/core/repeat/repeat.php
   3.x/examples/macro/examples/tags/core/repeat/templates/
   3.x/examples/macro/examples/tags/core/repeat/templates/page.html
   3.x/examples/macro/examples/tags/form/
   3.x/examples/macro/examples/tags/form/basic/
   3.x/examples/macro/examples/tags/form/basic/desc.ini
   3.x/examples/macro/examples/tags/form/basic/form.php
   3.x/examples/macro/examples/tags/form/basic/form_errors.php
   3.x/examples/macro/examples/tags/form/basic/templates/
   3.x/examples/macro/examples/tags/form/basic/templates/1/
   3.x/examples/macro/examples/tags/form/basic/templates/1/page.html
   3.x/examples/macro/examples/tags/form/basic/templates/2/
   3.x/examples/macro/examples/tags/form/basic/templates/2/page.html
   3.x/examples/macro/examples/tags/form/select/
   3.x/examples/macro/examples/tags/form/select/desc.ini
   3.x/examples/macro/examples/tags/form/select/select.php
   3.x/examples/macro/examples/tags/form/select/select_options_export.php
   3.x/examples/macro/examples/tags/form/select/templates/
   3.x/examples/macro/examples/tags/form/select/templates/1/
   3.x/examples/macro/examples/tags/form/select/templates/1/page.html
   3.x/examples/macro/examples/tags/form/select/templates/2/
   3.x/examples/macro/examples/tags/form/select/templates/2/page.html
   3.x/examples/macro/examples/tags/list/
   3.x/examples/macro/examples/tags/list/data.inc.php
   3.x/examples/macro/examples/tags/list/desc.ini
   3.x/examples/macro/examples/tags/list/list.php
   3.x/examples/macro/examples/tags/list/list_decorated.php
   3.x/examples/macro/examples/tags/list/list_default.php
   3.x/examples/macro/examples/tags/list/list_separated.php
   3.x/examples/macro/examples/tags/list/templates/
   3.x/examples/macro/examples/tags/list/templates/decorated/
   3.x/examples/macro/examples/tags/list/templates/decorated/page.html
   3.x/examples/macro/examples/tags/list/templates/default/
   3.x/examples/macro/examples/tags/list/templates/default/page.html
   3.x/examples/macro/examples/tags/list/templates/separated/
   3.x/examples/macro/examples/tags/list/templates/separated/page.html
   3.x/examples/macro/examples/tags/list/templates/simple/
   3.x/examples/macro/examples/tags/list/templates/simple/page.html
   3.x/examples/macro/examples/tags/pager/
   3.x/examples/macro/examples/tags/pager/data.inc.php
   3.x/examples/macro/examples/tags/pager/desc.ini
   3.x/examples/macro/examples/tags/pager/pager_with_elipses.php
   3.x/examples/macro/examples/tags/pager/pager_with_sections.php
   3.x/examples/macro/examples/tags/pager/paginate_in_template.php
   3.x/examples/macro/examples/tags/pager/templates/
   3.x/examples/macro/examples/tags/pager/templates/elipses/
   3.x/examples/macro/examples/tags/pager/templates/elipses/page.html
   3.x/examples/macro/examples/tags/pager/templates/paginate/
   3.x/examples/macro/examples/tags/pager/templates/paginate/page.html
   3.x/examples/macro/examples/tags/pager/templates/sections/
   3.x/examples/macro/examples/tags/pager/templates/sections/page.html
   3.x/examples/macro/favicon.ico
   3.x/examples/macro/images/
   3.x/examples/macro/images/bgr/
   3.x/examples/macro/images/bgr/bottom.gif
   3.x/examples/macro/images/bgr/header.gif
   3.x/examples/macro/images/bgr/hr.gif
   3.x/examples/macro/images/bit.gif
   3.x/examples/macro/images/bit_hover.gif
   3.x/examples/macro/images/logo.limb.gif
   3.x/examples/macro/index.php
   3.x/examples/macro/lib/
   3.x/examples/macro/lib/XML/
   3.x/examples/macro/lib/XML/HTMLSax3.php
   3.x/examples/macro/lib/XML/HTMLSax3/
   3.x/examples/macro/lib/XML/HTMLSax3/Decorators.php
   3.x/examples/macro/lib/XML/HTMLSax3/States.php
   3.x/examples/macro/run.php
   3.x/examples/macro/setup.override.php
   3.x/examples/macro/setup.override.php-example
   3.x/examples/macro/setup.php
   3.x/examples/macro/show.php
   3.x/examples/macro/showsource.php
   3.x/examples/macro/showtemplate.php
   3.x/examples/macro/src/
   3.x/examples/macro/src/examples_utils.inc.php
   3.x/examples/macro/src/lmbMacroTemplateHighlightHandler.class.php
   3.x/examples/macro/templates/
   3.x/examples/macro/templates/example.html
   3.x/examples/macro/templates/index.html
   3.x/examples/macro/templates/macrofile.html
   3.x/examples/macro/templates/phpfile.html
   3.x/examples/macro/templates/wrap.html
Log:
-- adding executable {{macro}} template engine examples


Property changes on: 3.x/examples/macro
___________________________________________________________________
Name: svn:ignore
   + var


Added: 3.x/examples/macro/config/config.ini
===================================================================
--- 3.x/examples/macro/config/config.ini	                        (rev 0)
+++ 3.x/examples/macro/config/config.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,23 @@
+# should template compiler scan for tags, filter and properties every time
+force_scan = 0
+
+# should template compiler recompile templates every time
+force_compile = 0
+
+# absolute path to your wact templates cache dir
+cache_dir = ./cache/
+
+# directory where template compiler looks for source templates
+templates_dir = templates/
+
+# directories where all compiler looks for tags, filters and properties
+[scan_directories]
+ 0 = limb/wact/src/tags
+
+# list of sax filters that can be applied to compiled template
+# see limb/wact/src/compiler/sax_filters
+[sax_filters]
+
+
+
+

Added: 3.x/examples/macro/css/style.css
===================================================================
--- 3.x/examples/macro/css/style.css	                        (rev 0)
+++ 3.x/examples/macro/css/style.css	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,66 @@
+/*page*/
+html, body {width:100%;height:100%;}
+body{padding:0; margin:0;}
+/*design*/
+a img{border:0}
+
+/*navigation*/
+a{ font: 9.5pt "Trebuchet MS";color:#5950a1;text-decoration:underline}
+a:hover{text-decoration:none;}
+
+/*=FONTS */
+body, td, table, ul{font:9.5pt "Trebuchet MS";color:#666666}
+#copyright {font:8pt Tahoma;}
+.view_more, .view_more a {color:#FF6600;}
+#limb_links a{font:bold 10pt "Trebuchet MS";color:#666666;}
+
+
+/*=TAGS*/
+h1{font:24pt "Trebuchet MS"; color:#FF6600;letter-spacing:0em;  margin:3px 0 3px 0;}
+h2{font:15pt Tahoma, sans;color:#666666;margin:  0;}
+h3{font:13pt Tahoma, sans;color:#666666;margin: 0;padding: 9px 0 0;}
+h4{font:bold 12pt "Trebuchet MS";color: #666666;margin: 0 ;}
+dl, dt, dd {margin:0;padding: 0;}
+
+/*Misc*/
+.clearing {height: 0;clear: both;}
+.center {width:795px;text-align:left;margin: 0 auto;padding-top: 1px;}
+.center_menu {background:#7d7d7d;text-align:center;}
+.dotted {background: url(../images/bgr/dotted.gif) repeat-x left center;display:block;clear:both;padding:20px 0;}
+.examples
+.hr {background: url(../images/bgr/hr.gif) repeat-x left center;height:16px;margin: 1px 0;}
+.more {display:block;text-align:right}
+.view_more {margin:9px 7px 12px 0; padding-right:9px;float:right}
+
+/*layout*/
+  
+  /*HEADER*/
+    #header {background: url(../images/bgr/header.gif) repeat-x left top;height:106px;padding: 1px 0 0 0;text-align:center;}
+      #logo {margin: 10px 10px 0 0px;}
+  
+    /*BOTTOM*/
+      #bottom {background: url(../images/bgr/bottom.gif) repeat-x left top;height:105px;text-align:center;position:absolute;bottom:0px;width:100%;left:0px}
+        #copyright {display:block;margin: 19px 0 4px 35px;padding-top: 9px;}
+        #bit {display:block;margin-left: 55px;}
+  
+    
+    /*=CONTENT*/
+      #center {text-align:center;position:relative;min-height:100%;}
+      *html #center{height:100%;}
+        #content {text-align:left;width:795px;margin: 0 auto;padding-bottom:120px;}
+        #limb_links {position:absolute;right:5px;top:10px}
+
+  /*TABLE*/
+    table.examples{border:0px;border-left:solid 1px #d7d6d0; width: 100%;margin-bottom: 15px;border-collapse:collapse;}
+    .examples td, .examples th	{padding:0 5px 0 5px;}
+    .examples thead tr			{background-color:#FF6600;}
+    .examples thead	th		{padding:5px; border:solid 1px #d7d6d0; font:bold .8em Tahoma; text-align:center;  white-space:noWrap; text-transform:uppercase;color:#fff}
+    .examples td .img {float:left;margin: 5px 10px 10px 0;}
+    .examples thead	.left	{border-left:solid 2px #7f7f7f;}
+    .examples thead	.right{border-right:solid 2px #7f7f7f;}
+    
+    .examples .left	{border-left:solid 1px #d7d6d0;}
+    .examples td		{border-right:solid 1px #d7d6d0; padding:10px; height:33px; border-bottom: solid 1px #d7d6d0;vertical-align:top;}
+    .examples .odd				{background-color:#f8f8f8; }
+    
+    .examples .top	td			{border-top:solid 1px #d7d6d0;}
\ No newline at end of file

Added: 3.x/examples/macro/examples/expressions/array_index.php
===================================================================
--- 3.x/examples/macro/examples/expressions/array_index.php	                        (rev 0)
+++ 3.x/examples/macro/examples/expressions/array_index.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id$
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('1/page.html');
+$page->set('data', array('first', 'second', 'third'));
+$page->set('nested_data', array(array('title' => 'My Title'), array('first', 'second')));
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/expressions/desc.ini
===================================================================
--- 3.x/examples/macro/examples/expressions/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/expressions/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,12 @@
+title="{{macro}} output expressions examples"
+
+[dbes]
+description=Complex output expressions
+php=array_index.php
+0=templates/1/page.html
+
+[php_vars]
+description=Output expressions with PHP-variables
+php=php_vars.php
+0=templates/2/page.html
+

Added: 3.x/examples/macro/examples/expressions/php_vars.php
===================================================================
--- 3.x/examples/macro/examples/expressions/php_vars.php	                        (rev 0)
+++ 3.x/examples/macro/examples/expressions/php_vars.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id$
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('2/page.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/expressions/templates/1/page.html
===================================================================
--- 3.x/examples/macro/examples/expressions/templates/1/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/expressions/templates/1/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Expressions Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Expressions Example</h1>
+
+{$#data.0}<br/>
+{$#data.1}<br/>
+{$#nested_data.0.title}<br/>
+{$#nested_data.1.1}<br/>
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/expressions/templates/2/page.html
===================================================================
--- 3.x/examples/macro/examples/expressions/templates/2/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/expressions/templates/2/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Expressions Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Expressions Example</h1>
+
+<?php
+  $var1 = "Hi";
+  $var2 = 10;
+?>
+
+var1 = {$var1}<br/>
+var2 = {$var2}<br/>
+var2 + 10 = <?= $var2 + 10; ?><br/>
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/desc.ini
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,41 @@
+title="{{insert}} tag examples"
+
+[include]
+description="Including a file into the current template"
+php=include.php
+0=templates/include/page.html
+1=templates/include/include_file.html
+
+[simple_wrap]
+description="Wrapping the contents of the current template into a single slot of other template"
+php=simple.php
+0=templates/simple_wrap/page.html
+1=templates/simple_wrap/simple.html
+
+[dynamic]
+description="Dynamic wrapping"
+php=dynamic.php
+0=templates/dynamic/simple.html
+4=templates/dynamic/page1.html
+4=templates/dynamic/page2.html
+
+[multiple_wrap]
+description="Wraping parts of the current template into multiple slots of other template"
+php=multiple.php
+0=templates/multiple_wrap/multiple.html
+1=templates/multiple_wrap/page.html
+
+[nested_wrap]
+description="Nested wrapping example"
+php=nested.php
+0=templates/nested_wrap/wrap.html
+1=templates/nested_wrap/layout.html
+2=templates/nested_wrap/page.html
+
+[wrap_with_include]
+description="Example of moving child {{into}} tags into a separate template"
+php=multiple_with_include.php
+0=templates/wrap_with_include/wrap.html
+1=templates/wrap_with_include/zones.html
+2=templates/wrap_with_include/layout.html
+3=templates/wrap_with_include/page.html

Added: 3.x/examples/macro/examples/tags/core/insert/dynamic.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/dynamic.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/dynamic.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: more.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('dynamic/simple.html');
+$page->set('file', 'dynamic/page' . rand(1, 2) . '.html'); 
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/insert/include.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/include.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/include.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: include.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('include/page.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/insert/multiple.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/multiple.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/multiple.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: multiple.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('multiple_wrap/multiple.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/insert/multiple_with_include.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/multiple_with_include.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/multiple_with_include.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: multiple_with_include.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('wrap_with_include/wrap.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/insert/nested.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/nested.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/nested.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: multiple_with_nested.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('nested_wrap/wrap.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/insert/simple.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/simple.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/simple.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: simple.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('simple_wrap/simple.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page1.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page1.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page1.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Dynamic wrapping example with &#123;&#123;insert&#125;&#125; tag</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Dynamic wrapping example with &#123;&#123;insert&#125;&#125; tag</h1>
+This template is a wrapper template.
+<p/>It has a slot (placeholder) in the form of &#123;&#123;slot&#125;&#125; tag which will be replaced with some content using &#123;&#123;insert&#125;&#125; tag.<br/>
+<p/>Try pressing "refresh" several times
+<p/>
+
+<span style="color:red">
+<strong>Before slot</strong><br/>
+<i>{{slot id='content'}}<br/></i>
+<strong>After slot</strong><br/>
+</span>
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page2.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page2.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/page2.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Dynamic wrapping example with &#123;&#123;insert&#125;&#125; tag</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Dynamic wrapping example with &#123;&#123;insert&#125;&#125; tag</h1>
+This template is a wrapper template.
+<p/>It has a slot (placeholder) in the form of &#123;&#123;slot&#125;&#125; tag which will be replaced with some content using &#123;&#123;insert&#125;&#125; tag.<br/>
+
+<p/>Try pressing "refresh" several times
+<p/>
+<span style="color:green">
+<strong>Before slot</strong><br/>
+<i>{{slot id='content'}}<br/></i>
+<strong>After slot</strong><br/>
+</span>
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/simple.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/simple.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/dynamic/simple.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,9 @@
+{{insert into='content' file='{$#file}'}}
+This will be inserted in the slot with id "content" of randomly selected template
+{{/insert}}
+
+
+
+
+
+

Added: 3.x/examples/macro/examples/tags/core/insert/templates/include/include_file.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/include/include_file.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/include/include_file.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1 @@
+This text has been included into the current template from another file.
\ No newline at end of file

Added: 3.x/examples/macro/examples/tags/core/insert/templates/include/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/include/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/include/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>&#123;&#123;insert&#125;&#125; tag example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<body>
+<h1 align="center">&#123;&#123;insert&#125;&#125; tag example</h1>
+{{insert file="include/include_file.html"/}}
+</body>
+
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/multiple.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/multiple.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/multiple.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,10 @@
+{{insert file='multiple_wrap/page.html'}}
+  {{into slot='first'}}This text will be inserted into "first" slot{{/into}}
+  {{into slot='second'}}This text will inserted into "second" slot{{/into}}
+{{/insert}}
+
+
+
+
+
+

Added: 3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/multiple_wrap/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Multiple wrapping example with &#123;&#123;insert&#125;&#125; tag and &#123;&#123;into&#125;&#125;</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Multiple wrapping example with &#123;&#123;insert&#125;&#125; tag and &#123;&#123;into&#125;&#125;</h1>
+
+<h3>Description:</h3>
+This page demonstrates how to use <b>&#123;&#123;insert&#125;&#125;</b> tag with <b>&#123;&#123;into&#125;&#125;</b> to insert different parts of the curent template into slots in other template.
+
+<h4>First slot:</h4>
+<i>{{slot id='first'}}</i>
+
+<h4>Second slot:</h4>
+<b>{{slot id='second'}}</b>
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/layout.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/layout.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/layout.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,13 @@
+<b>This template is a second (layout) wrapper template.</b><br/>
+
+Begin layout<br/>
+
+<u>First placeholder:</u><br/>
+<i>{{slot id='first'}}</i><br/>
+
+Between placeholders<br/>
+
+<u>Second placeholder:</u><br/>
+<b>{{slot id='second'/}}</b><br/>
+
+End layout<br/>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Nested wrapping example with &#123;&#123;insert&#125;&#125; tag and &#123;&#123;into&#125;&#125; tag</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Nested wrapping example with &#123;&#123;insert&#125;&#125; tag and &#123;&#123;into&#125;&#125; tag</h1>
+This example will show you how to effectively reuse templates with  &#123;&#123;insert&#125;&#125; tag.<br/>
+
+This template is a main wrapper template with a single slot (placeholder).<br/>
+
+<strong>Before main placeholder</strong><br/>
+{{slot id='content'}}<br/>
+<strong>After main placeholder</strong><br/>
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/wrap.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/wrap.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/nested_wrap/wrap.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,8 @@
+{{insert into='content' file='nested_wrap/page.html'}}
+
+{{insert file='nested_wrap/layout.html'}}
+  {{into slot='first'}}Text for the first placeholder{{/into}}
+  {{into slot='second'}}Text for the second placeholder{{/into}}
+{{/insert}}
+
+{{/insert}}

Added: 3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Wrapping example with &#123;&#123;insert&#125;&#125; tag</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Wrapping example with &#123;&#123;insert&#125;&#125; tag</h1>
+This template is a wrapper template.
+It has a slot (placeholder) in the form of &#123;&#123;slot&#125;&#125; tag which will be replaced with some content using &#123;&#123;insert&#125;&#125; tag.<br/>
+
+<strong>Before slot</strong><br/>
+<i>{{slot id='content'}}<br/></i>
+<strong>After slot</strong><br/>
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/simple.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/simple.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/simple_wrap/simple.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,9 @@
+{{insert into='content' file='simple_wrap/page.html'}}
+This will be inserted in the slot with id "content"
+{{/insert}}
+
+
+
+
+
+

Added: 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/layout.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/layout.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/layout.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,13 @@
+<b>This template is a second (layout) wrapper template.</b><br/>
+
+Begin layout<br/>
+
+<u>First placeholder:</u><br/>
+{{slot id='first'}}<br/>
+
+Between placeholders<br/>
+
+<u>Second placeholder:</u><br/>
+{{slot id='second'}}<br/>
+
+End layout<br/>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Nested wrapping example with &#123;&#123;insert&#125;&#125; tag and &#123;&#123;into&#125;&#125; tag</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Nested wrapping example with &#123;&#123;insert&#125;&#125; tag and &#123;&#123;into&#125;&#125; tag</h1>
+<p/>This example also shows how to effectively reuse templates with &#123;&#123;insert&#125;&#125; tag.<br/>
+
+<p/>In this case we moved our child &#123;&#123;into&#125;&#125; tags into other template (zones.html) and inlcude it from wrap.html<br/>
+
+<p/>We also has a child &#123;&#123;into&#125;&#125; in zones.html which inserts its contents into a "extra" slot in the main template (page.html)<br/>
+
+<p/>
+<strong>Before main placeholder</strong><br/>
+{{slot id='content'}}<br/>
+<strong>After main placeholder</strong><br/>
+
+<br/>
+<br/>
+<strong>An extra slot</strong><br/>
+{{slot id='extra'}}<br/>
+<strong>An extra slot</strong><br/>
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/wrap.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/wrap.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/wrap.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,16 @@
+{{insert into='content' file='wrap_with_include/page.html'}}
+
+{{insert file='wrap_with_include/layout.html'}}
+  We can also move our child  &#123;&#123;into&#125;&#125; tag into other template.
+
+  {{insert file='wrap_with_include/zones.html'/}}
+
+{{/insert}}
+
+{{/insert}}
+
+
+
+
+
+

Added: 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/zones.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/zones.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/insert/templates/wrap_with_include/zones.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,6 @@
+{{into slot='first'}}Text for "first" slot{{/into}}
+
+{{into slot='second'}}Text for "second" slot{{/into}}
+
+{{into slot='extra'}}Text for "extra" slot in the core template{{/into}}
+

Added: 3.x/examples/macro/examples/tags/core/repeat/desc.ini
===================================================================
--- 3.x/examples/macro/examples/tags/core/repeat/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/repeat/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,7 @@
+title= "{{repeat}} tag examples"
+
+[simple]
+description= "{{repeat}} tag usage example"
+php=repeat.php
+1=templates/page.html
+

Added: 3.x/examples/macro/examples/tags/core/repeat/repeat.php
===================================================================
--- 3.x/examples/macro/examples/tags/core/repeat/repeat.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/repeat/repeat.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: repeat.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('page.html');
+$page->set('times', 4);
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/core/repeat/templates/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/core/repeat/templates/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/core/repeat/templates/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Repeat Tag Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<body>
+<h1 align="center">Repeat Tag Example</h1>
+<p>Demonstrates usage of the &#123;&#123;repeat&#125;&#125; tag.</p>
+{{repeat times="5"}}
+<p>This will be outputed 5 times</p>
+{{/repeat}}
+
+{{repeat times="$#times"}}
+<p>This will be outputed 4 times. The number of repeats is set from php-script at run time.</p>
+{{/repeat}}
+</body>
+</html>
\ No newline at end of file

Added: 3.x/examples/macro/examples/tags/form/basic/desc.ini
===================================================================
--- 3.x/examples/macro/examples/tags/form/basic/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/basic/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,11 @@
+title=Form related tags examples
+
+[simple]
+description="Basic usage of MACRO form tags."
+php=form.php
+0=templates/1/page.html
+
+[errors]
+description="<form:errors> and <form:field_errors> tags example"
+php=form_errors.php
+0=templates/2/page.html

Added: 3.x/examples/macro/examples/tags/form/basic/form.php
===================================================================
--- 3.x/examples/macro/examples/tags/form/basic/form.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/basic/form.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: form.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('1/page.html');
+
+if(isset($_POST['my_input']))
+{
+  $page->set('text', $_POST['my_input']);
+  $page->set('my_form', $_POST);
+}
+
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/form/basic/form_errors.php
===================================================================
--- 3.x/examples/macro/examples/tags/form/basic/form_errors.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/basic/form_errors.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: form_errors.php 5174 2007-03-02 09:53:27Z serega $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+require_once 'limb/macro/src/tags/form/lmbMacroFormErrorList.class.php';
+
+$page = new lmbMacroTemplate('2/page.html');
+
+if($_SERVER['REQUEST_METHOD'] == 'POST')
+  _processPost($page);
+
+echo $page->render();
+
+function _processPost($page)
+{
+  if(isset($_POST['my_input']) && $_POST['my_input'])
+    $page->set('text', $_POST['my_input']);
+  else
+  {
+    
+    $error_list = new lmbMacroFormErrorList();
+    $error_list->addError('"{field1}" must have a value', $fields = array('field1' => 'my_input'));
+    $error_list->addError('Any other form error.');
+    $page->set('form_my_form_error_list', $error_list);
+  }
+}
+?>

Added: 3.x/examples/macro/examples/tags/form/basic/templates/1/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/form/basic/templates/1/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/basic/templates/1/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Form Tag Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Form Tag Example</h1>
+
+<h2>Description:</h2>
+This page demonstrates how to use form tags.
+<P/>After you submit the form, your text will appear above the form.
+
+<? if(isset($this->text)) { ?>
+<p/>You typed: <b>{$#text}</b>
+<? } ?>
+
+{{form name='my_form' id='my_form' from='$#my_form' method='POST'}}
+Type here: {{input type='text' name='my_input'/}}
+
+<input type='submit' name='button' value='Send!'/>
+{{/form}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/form/basic/templates/2/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/form/basic/templates/2/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/basic/templates/2/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Form Tag Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<style type="text/css">
+.error {
+    color: red;
+}
+.error_input {
+    background-color: red;
+}
+</style>
+</head>
+<body>
+<h1 align="center">Form Tag Example</h1>
+
+<h2>Description:</h2>
+This page demonstrates how to use &#123;&#123;form:errors&#125;&#125; &lt; and &#123;&#123;form:field_errors&#125;&#125; &lt; tags.
+<P/>Try to send an empty form and you will see errors list above the form.
+
+Note the <b>title</b> attribute of &#123;&#123;input&#125;&#125; tag - it used in error messages to display correct input field name
+
+<? if(isset($this->text)) { ?>
+<p/>You typed: <b>{$#text}</b>
+<? } ?>
+
+{{form name='my_form' method='POST'}}
+
+{{form:errors to='$errors'}}
+
+{{list using='$errors'}}
+Form errors:<p/>
+<ul>
+ {{list:item}}
+  <li><b>{$item.message}</b></li>
+ {{/list:item}}
+</ul>
+{{/list}}
+
+{{form:field_errors to='$my_field_errors'}}
+
+{{list using="$my_field_errors"}}
+Field errors (you can place field error near form field):<p/>
+<ul>
+ {{list:item}}
+  <li>(for field "{$item.id}")<b>{$item.message}</b></li>
+ {{/list:item}}
+</ul>
+{{/list}}
+
+{{label for='my_input' errorclass='error'}}Type here:<br/>{{/label}}
+{{input type='text' id='my_input' name='my_input' title='Field Full Name' errorclass='error_input'/}}
+
+<input type='submit' name='button' value='Send!'/>
+{{/form}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/form/select/desc.ini
===================================================================
--- 3.x/examples/macro/examples/tags/form/select/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/select/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,11 @@
+title="{{select}} tag related examples"
+
+[simple]
+description="{{select}} tags usage. Demonstates how to fill options for {{select}} tag"
+php=select.php
+0=templates/1/page.html
+
+[errors]
+description="{{select_options_export}} tag example. This tag allows to create options list for {{select}} tag right in MACRO template"
+php=select_options_export.php
+0=templates/2/page.html

Added: 3.x/examples/macro/examples/tags/form/select/select.php
===================================================================
--- 3.x/examples/macro/examples/tags/form/select/select.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/select/select.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: select.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('1/page.html');
+$page->set('my_form1', $_POST);
+$page->set('my_form2', $_POST);
+
+$page->set('options', array('no_value' => '------',
+                            'first' => 'First option',
+                            'second' => 'Second option'));
+
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/form/select/select_options_export.php
===================================================================
--- 3.x/examples/macro/examples/tags/form/select/select_options_export.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/select/select_options_export.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: select_options_source.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('2/page.html');
+
+$data = array(array('id' => 10, 'title' => 'First option'),
+              array('id' => 20, 'title' => 'Second option'));
+$page->set('my_options_source1', $data);
+$page->set('my_options_source2', $data);
+$page->set('my_form1', $_POST);
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/form/select/templates/1/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/form/select/templates/1/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/select/templates/1/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>&#123;&#123;select&#125;&#125; tag example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">&#123;&#123;select&#125;&#125; tag example</h1>
+
+<h2>Description:</h2>
+This page demonstrates how to use &#123;&#123;select&#125;&#125; tag. We will show how to fill options list in different ways.
+
+<h2>Options are listed in the template</h2>
+
+{{form name='my_form1' method='POST' from='$#my_form1'}}
+
+<? if(isset($this->my_form1['my_select1'])) { ?>
+<p>You selected: {$#my_form1.my_select1}</p>
+<? } ?>
+
+Select an option: {{select name='my_select1' type='text'}}
+                     {{option value='no_value' selected='true' }}------{{/option}}
+                     {{option value='first'}}First option{{/option}}
+                     {{option value='second'}}Second option{{/option}}
+                  {{/select}}
+
+<input type='submit' name='button' value='Send!'/>
+{{/form}}
+
+<h2>Options are passed into runtime select helper from php-script</h2>
+
+{{form name='my_form2' method='POST' from='$#my_form2'}}
+
+<? if(isset($this->my_form2['my_select2'])) { ?>
+<p>You selected: {$#my_form2.my_select2}</p>
+<? } ?>
+
+Select an option: {{select name='my_select2' type='text' options='$#options'/}}
+
+<input type='submit' name='button' value='Send!'/>
+{{/form}}
+
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/form/select/templates/2/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/form/select/templates/2/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/form/select/templates/2/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Select Tag With Options Source tag Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Select Tag With Options Source tag Example</h1>
+
+<h2>Description:</h2>
+This page demonstrates how to use&#123;&#123;select_options_export&#125;&#125; tag to create &#123;&#123;select&#125;&#125; tag options variable.
+
+{{form name='my_form1' from='$#my_form1' method='POST'}}
+
+<? if(isset($this->my_form1['my_select1'])) { ?>
+<p>You selected: "{$#my_form1.my_select1}" in the first select</p>
+<? } ?>
+
+<? if(isset($this->my_form1['my_select2'])) { ?>
+<p>You selected: "{$#my_form1.my_select2}" in the second select</p>
+<? } ?>
+
+{{select_options_export from='$#my_options_source1' to='$options1' key_field='id' text_field='title'/}}
+
+Select an option: {{select id='my_select1' name='my_select1' options='$options1'/}}
+                  
+<? if(isset($this->my_form2['my_select2'])) { ?>
+<p>You selected: {$#my_form2.my_select2}</p>
+<? } ?>
+
+<p/>
+
+{{select_options_export from='$#my_options_source2' to='$options2' key_field='id' text_field='title'/}}
+
+Selector with default options: {{select id='my_select2' name='my_select2' options='$options2'}}
+                                 {{option value='nothing' prepend='true'}}--Select something--{{/option}}
+                                 {{option value='everything'}}--Nothing to select?--{{/option}}
+                               {{/select}}
+
+<input type='submit' name='button' value='Send!'/>
+{{/form}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/list/data.inc.php
===================================================================
--- 3.x/examples/macro/examples/tags/list/data.inc.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/data.inc.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: data.inc.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+
+$data = array (
+  0 =>
+  array (
+    'name' => 'Aspell functions',
+    'description' => 'The aspell() functions allows you to check the spelling on a word and offer suggestions.',
+    'url' => 'http://www.php.net/manual/en/ref.aspell.php',
+    'flag' => '--enable-mailparse',
+  ),
+  1 =>
+  array (
+    'name' => 'BCMath Arbitrary Precision Mathematics Functions',
+    'description' => 'For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings.',
+    'url' => 'http://www.php.net/manual/en/ref.bc.php',
+    'flag' => '--enable-bcmath',
+  ),
+  2 =>
+  array (
+    'name' => 'Bzip2 Compression Functions',
+    'description' => 'The bzip2 functions are used to transparently read and write bzip2 (.bz2) compressed files.',
+    'url' => 'http://www.php.net/manual/en/ref.bzip2.php',
+    'flag' => '--with-bz2',
+  ),
+  3 =>
+  array (
+    'name' => 'Calendar functions',
+    'description' => 'The calendar extension presents a series of functions to simplify converting between different calendar formats.',
+    'url' => 'http://www.php.net/manual/en/ref.calendar.php',
+    'flag' => '--enable-calendar',
+  ),
+  4 =>
+  array (
+    'name' => 'CCVS API Functions',
+    'description' => 'These functions interface the CCVS API, allowing you to work directly with CCVS from your PHP scripts.',
+    'url' => 'http://www.php.net/manual/en/ref.dir.php',
+    'flag' => '--with-ccvs',
+  ),
+  5 =>
+  array (
+    'name' => 'COM support functions for Windows',
+    'description' => 'COM encourages versioning, separation of implementation from interface and hiding the implementation details such as executable location and the language it was written in.',
+    'url' => 'http://www.php.net/manual/en/ref.com.php',
+    'flag' => '',
+  ),
+);
+
+?>
\ No newline at end of file

Added: 3.x/examples/macro/examples/tags/list/desc.ini
===================================================================
--- 3.x/examples/macro/examples/tags/list/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,21 @@
+title="List tags examples"
+
+[simple]
+description="Basic {{list}} and {{list:item}} tags usage example."
+php=list.php
+0=templates/simple/page.html
+
+[decorated]
+description="{{list}} tag extra variables like parity and counter usage example. This example also shows how to use {{list:even}} and {{list:odd}} tags."
+php=list_decorated.php
+0=templates/decorated/page.html
+
+[separated]
+description="{{list:glue}} and {{list:fill}} tags example . These tags allow to output multicolumn lists"
+php=list_separated.php
+0=templates/separated/page.html
+
+[default]
+description="{{list:empty}} tag example"
+php=list_default.php
+0=templates/default/page.html

Added: 3.x/examples/macro/examples/tags/list/list.php
===================================================================
--- 3.x/examples/macro/examples/tags/list/list.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/list.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: list.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('simple/page.html');
+include('data.inc.php');
+$page->set('php_modules', $data);
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/list/list_decorated.php
===================================================================
--- 3.x/examples/macro/examples/tags/list/list_decorated.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/list_decorated.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: list_decorated.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('decorated/page.html');
+include('data.inc.php');
+$page->set('php_modules', $data);
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/list/list_default.php
===================================================================
--- 3.x/examples/macro/examples/tags/list/list_default.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/list_default.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: list_default.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('default/page.html');
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/list/list_separated.php
===================================================================
--- 3.x/examples/macro/examples/tags/list/list_separated.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/list_separated.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: list_separated.php 5178 2007-03-04 21:49:36Z serega $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('separated/page.html');
+include('data.inc.php');
+$page->set('php_modules', $data);
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/list/templates/decorated/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/list/templates/decorated/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/templates/decorated/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List Properties Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<style type="text/css">
+.odd {
+    background-color: lightyellow;
+}
+.even {
+    background-color: lightgrey;
+}
+
+.box {
+    background-color: silver;
+    padding: 5px;
+    margin-bottom: 10px;
+}
+</style>
+</head>
+<body>
+<h1 align="center">List Properties Example</h1>
+  <P align="center">A simple list formatted into a table.</P>
+  <P align="center">Here we used some of the &#123;&#123;list&#125;&#125; tag properties like <b>counter</b> and <b>parity</b></P>
+
+  {{list using='$#php_modules' parity='$Parity' counter='$row_number'}}
+    <TABLE BORDER="1" ALIGN="CENTER" CELLPADDING="5">
+      {{list:item}}
+        <TR class={$Parity}>
+          <TD>{$row_number}</TD>
+          <TD>{$item.name}</TD>
+          <TD>{$item.description|default:"&nbsp;"}</TD>
+        </TR>
+      {{/list:item}}
+    </TABLE>
+  {{/list}}
+
+  <P align="center">The second example shows how to use <b>&#123;&#123;list:odd&#125;&#125;</b> and  <b>&#123;&#123;list:even&#125;&#125;</b> tags</P>
+
+  {{list using='$#php_modules'}}
+    <TABLE BORDER="1" ALIGN="CENTER" CELLPADDING="5">
+      {{list:item}}
+        {{list:odd}}<? $color="lightgrey"; ?>{{/list:odd}}
+        {{list:even}}<? $color="lightyellow"; ?>{{/list:even}}
+
+        <TR bgcolor="{$color}">
+          <TD>{$item.name}</TD>
+          <TD>{$item.description|default:"&nbsp;"}</TD>
+        </TR>
+      {{/list:item}}
+    </TABLE>
+  {{/list}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/list/templates/default/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/list/templates/default/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/templates/default/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List Default Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">List Default Example</h1>
+  <P align="center">This examples show how to use &#123;&#123;list:default&#125;&#125; tag</P>
+
+  {{list using='$#php_modules'}}
+      {{list:item}}
+        {$item.name}
+      {{/list:item}}
+      {{list:empty}}<b>The list is empty!</b>{{/list:empty}}
+  {{/list}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/list/templates/separated/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/list/templates/separated/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/templates/separated/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List Separator Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">List Separator Example</h1>
+  <P align="center">This example show how to use &#123;&#123;list:glue&#125;&#125; and &#123;&#123;list:fill&#125;&#125;tags</P>
+
+  <h2>Simple separator</h2>
+  {{list using='$#php_modules'}}
+      {{list:item}}
+        {$item.name}
+      {{list:glue}}<br/>{{/list:glue}}
+      {{/list:item}}
+  {{/list}}
+
+  <h2>Separator with defined step</h2>
+  {{list using='$#php_modules'}}
+    <ul>
+      {{list:item}} 
+        <li>{$item.name}</li>
+      {{list:glue every='2'}}</ul><ul>{{/list:glue}}
+      {{/list:item}}
+    </ul>
+  {{/list}}
+
+  <h2>Valid layout with multi column output</h2>
+  {{list using='$#php_modules'}}
+    <table border='1'>
+      <tr>
+      {{list:item}} 
+        <td>{$item.name}</td>
+        {{list:glue every='4' literal='true'}}</tr><tr>{{/list:glue}}
+      {{/list:item}}
+      {{list:fill upto='4' items_left='$count'}}
+        {{repeat times="{$count}"}}<td>&nbsp;</td>{{/repeat}}
+      {{/list:fill}}
+      </tr>
+    </table>
+  {{/list}}
+
+  <h2>Several separators</h2>
+  {{list using='$#php_modules'}}
+    <table border='1'>
+      <tr>
+      <td>
+      {{list:item}} 
+        {$item.name}
+        {{list:glue every='3'}}</td><td>{{/list:glue}}
+        {{list:glue}}<br/>{{/list:glue}}
+      {{/list:item}}
+      </td>
+      </tr>
+    </table>
+  {{/list}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/list/templates/simple/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/list/templates/simple/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/list/templates/simple/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Simple List Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">Simple List Example</h1>
+  <P align="center">A simple list formatted into a table</P>
+
+  {{list using='$#php_modules' as='$module'}}
+    <TABLE BORDER="1" ALIGN="CENTER" CELLPADDING="5">
+      {{list:item}}
+        <TR>
+          <TD>{$module.name}</TD>
+          <TD>{$module.description|default:"&nbsp;"}</TD>
+        </TR>
+      {{/list:item}}
+    </TABLE>
+  {{/list}}
+
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/pager/data.inc.php
===================================================================
--- 3.x/examples/macro/examples/tags/pager/data.inc.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/data.inc.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,416 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: data.inc.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+
+$data = array (
+  0 =>
+  array (
+    'name' => 'Aspell functions',
+    'description' => 'The aspell() functions allows you to check the spelling on a word and offer suggestions.',
+    'url' => 'http://www.php.net/manual/en/ref.aspell.php',
+    'flag' => '--enable-mailparse',
+  ),
+  1 =>
+  array (
+    'name' => 'BCMath Arbitrary Precision Mathematics Functions',
+    'description' => 'For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings.',
+    'url' => 'http://www.php.net/manual/en/ref.bc.php',
+    'flag' => '--enable-bcmath',
+  ),
+  2 =>
+  array (
+    'name' => 'Bzip2 Compression Functions',
+    'description' => 'The bzip2 functions are used to transparently read and write bzip2 (.bz2) compressed files.',
+    'url' => 'http://www.php.net/manual/en/ref.bzip2.php',
+    'flag' => '--with-bz2',
+  ),
+  3 =>
+  array (
+    'name' => 'Calendar functions',
+    'description' => 'The calendar extension presents a series of functions to simplify converting between different calendar formats.',
+    'url' => 'http://www.php.net/manual/en/ref.calendar.php',
+    'flag' => '--enable-calendar',
+  ),
+  4 =>
+  array (
+    'name' => 'CCVS API Functions',
+    'description' => 'These functions interface the CCVS API, allowing you to work directly with CCVS from your PHP scripts.',
+    'url' => 'http://www.php.net/manual/en/ref.dir.php',
+    'flag' => '--with-ccvs',
+  ),
+  5 =>
+  array (
+    'name' => 'COM support functions for Windows',
+    'description' => 'COM encourages versioning, separation of implementation from interface and hiding the implementation details such as executable location and the language it was written in.',
+    'url' => 'http://www.php.net/manual/en/ref.com.php',
+    'flag' => '',
+  ),
+  6 =>
+  array (
+    'name' => 'Class/Object Functions',
+    'description' => 'These functions allow you to obtain information about classes and instance objects.',
+    'url' => 'http://www.php.net/manual/en/ref.classobj.php',
+    'flag' => '',
+  ),
+  7 =>
+  array (
+    'name' => 'ClibPDF functions',
+    'description' => 'ClibPDF lets you create PDF documents with PHP.',
+    'url' => 'http://www.php.net/manual/en/ref.cpdf.php',
+    'flag' => 'with-cpdflib',
+  ),
+  8 =>
+  array (
+    'name' => 'Crack functions',
+    'description' => 'These functions allow you to use the CrackLib library to test the \'strength\' of a password.',
+    'url' => 'http://www.php.net/manual/en/ref.crack.php',
+    'flag' => '--with-crack',
+  ),
+  9 =>
+  array (
+    'name' => 'CURL, Client URL Library Functions',
+    'description' => 'PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols.',
+    'url' => 'http://www.php.net/manual/en/ref.curl.php',
+    'flag' => '--with-curl',
+  ),
+  10 =>
+  array (
+    'name' => 'Cybercash payment functions',
+    'description' => '',
+    'url' => 'http://www.php.net/manual/en/ref.cybercash.php',
+    'flag' => '--with-cybercash',
+  ),
+  11 =>
+  array (
+    'name' => 'Cyrus IMAP administration functions',
+    'description' => 'This function is currently not documented',
+    'url' => 'http://www.php.net/manual/en/ref.cyrus.php',
+    'flag' => '--with-cyrus',
+  ),
+  12 =>
+  array (
+    'name' => 'Character type functions',
+    'description' => 'The functions provided by this extension check whether a character or string falls into a certain character class according to the current locale.',
+    'url' => 'http://www.php.net/manual/en/ref.ctype.php',
+    'flag' => '--enable-ctype',
+  ),
+  13 =>
+  array (
+    'name' => 'Database (dbm-style) abstraction layer functions',
+    'description' => 'These functions build the foundation for accessing Berkeley DB style databases.',
+    'url' => 'http://www.php.net/manual/en/ref.dba.php',
+    'flag' => '--enable-dba=shared',
+  ),
+  14 =>
+  array (
+    'name' => 'Date and Time functions',
+    'description' => 'These functions allow you to get the date and time from the server where your PHP scripts are running.',
+    'url' => 'http://www.php.net/manual/en/ref.datetime.php',
+    'flag' => '',
+  ),
+  15 =>
+  array (
+    'name' => 'dBase functions',
+    'description' => 'These functions allow you to access records stored in dBase-format (dbf) databases.',
+    'url' => 'http://www.php.net/manual/en/ref.dbase.php',
+    'flag' => '--enable-dbase',
+  ),
+  16 =>
+  array (
+    'name' => 'DBM Functions',
+    'description' => 'These functions allow you to store records stored in a dbm-style database.',
+    'url' => 'http://www.php.net/manual/en/ref.dbm.php',
+    'flag' => '--with-db',
+  ),
+  17 =>
+  array (
+    'name' => 'dbx functions',
+    'description' => 'The dbx module is a database abstraction layer (db \'X\', where \'X\' is a supported database)',
+    'url' => 'http://www.php.net/manual/en/ref.dbx.php',
+    'flag' => '--enable-dbx',
+  ),
+  18 =>
+  array (
+    'name' => 'DB++ Functions',
+    'description' => 'db++, made by the German company Concept asa, is a relational database system with high performance and low memory and disk usage in mind.',
+    'url' => 'http://www.php.net/manual/en/ref.dbplus.php',
+    'flag' => '--with-dbplus',
+  ),
+  19 =>
+  array (
+    'name' => 'Direct IO functions',
+    'description' => 'PHP supports the direct io functions as described in the Posix Standard (Section 6) for performing I/O functions at a lower level than the C-Language stream I/O functions.',
+    'url' => 'http://www.php.net/manual/en/ref.dio.php',
+    'flag' => '--enable-dio',
+  ),
+  20 =>
+  array (
+    'name' => 'Directory functions',
+    'description' => '',
+    'url' => 'http://www.php.net/manual/en/ref.dir.php',
+    'flag' => '',
+  ),
+  21 =>
+  array (
+    'name' => 'DOM XML functions',
+    'description' => '',
+    'url' => 'http://www.php.net/manual/en/ref.cyrus.php',
+    'flag' => '--with-dom',
+  ),
+  22 =>
+  array (
+    'name' => '.NET functions',
+    'description' => '',
+    'url' => 'http://www.php.net/manual/en/ref.dotnet.php',
+    'flag' => '',
+  ),
+  23 =>
+  array (
+    'name' => 'Error Handling and Logging Functions',
+    'description' => 'These are functions dealing with error handling and logging.',
+    'url' => 'http://www.php.net/manual/en/ref.errorfunc.php',
+    'flag' => '',
+  ),
+  24 =>
+  array (
+    'name' => 'FrontBase Functions',
+    'description' => 'These functions allow you to access FrontBase database servers.',
+    'url' => 'http://www.php.net/manual/en/ref.fbsql.php',
+    'flag' => '--with-fbsql',
+  ),
+  25 =>
+  array (
+    'name' => 'filePro functions',
+    'description' => 'These functions allow read-only access to data stored in filePro databases.',
+    'url' => 'http://www.php.net/manual/en/ref.filepro.php',
+    'flag' => '--enable-filepro',
+  ),
+  26 =>
+  array (
+    'name' => 'Filesystem functions',
+    'description' => '',
+    'url' => 'http://www.php.net/manual/en/ref.filesystem.php',
+    'flag' => '',
+  ),
+  27 =>
+  array (
+    'name' => 'Forms Data Format functions',
+    'description' => 'Forms Data Format (FDF) is a format for handling forms within PDF documents.',
+    'url' => 'http://www.php.net/manual/en/ref.fdf.php',
+    'flag' => '--with-fdftk',
+  ),
+  28 =>
+  array (
+    'name' => 'FriBiDi functions',
+    'description' => 'FriBiDi is a free implementation of the Unicode Bidirectional Algorithm.',
+    'url' => 'http://www.php.net/manual/en/ref.fribidi.php',
+    'flag' => '--with-fribidi',
+  ),
+  29 =>
+  array (
+    'name' => 'FTP functions',
+    'description' => 'The functions in this extension implement client access to file servers speaking the File Transfer Protocol (FTP) as defined in http://www.faqs.org/rfcs/rfc959.html.',
+    'url' => 'http://www.php.net/manual/en/ref.ftp.php',
+    'flag' => '--enable-ftp',
+  ),
+  30 =>
+  array (
+    'name' => 'Function Handling functions',
+    'description' => 'These functions all handle various operations involved in working with functions.',
+    'url' => 'http://www.php.net/manual/en/ref.funchand.php',
+    'flag' => '',
+  ),
+  31 =>
+  array (
+    'name' => 'Gettext',
+    'description' => 'The gettext functions implement an NLS (Native Language Support) API which can be used to internationalize your PHP applications.',
+    'url' => 'http://www.php.net/manual/en/ref.gettext.php',
+    'flag' => '--with-gettext',
+  ),
+  32 =>
+  array (
+    'name' => 'GMP functions',
+    'description' => 'These functions allow you to work with arbitrary-length integers using the GNU MP library.',
+    'url' => 'http://www.php.net/manual/en/ref.gmp.php',
+    'flag' => '--with-gmp',
+  ),
+  33 =>
+  array (
+    'name' => 'HTTP functions',
+    'description' => 'These functions let you manipulate the output sent back to the remote browser right down to the HTTP protocol level.',
+    'url' => 'http://www.php.net/manual/en/ref.http.php',
+    'flag' => '',
+  ),
+  34 =>
+  array (
+    'name' => 'Hyperwave functions',
+    'description' => 'Hyperwave is an information system similar to a database (HIS, Hyperwave Information Server).',
+    'url' => 'http://www.php.net/manual/en/ref.hyperwave.php',
+    'flag' => '--with-hyperwave',
+  ),
+  35 =>
+  array (
+    'name' => 'Hyperwave API functions',
+    'description' => 'Hyperwave is an information system similar to a database (HIS, Hyperwave Information Server).',
+    'url' => 'http://www.php.net/manual/en/ref.hwapi.php',
+    'flag' => '--with-hwapi',
+  ),
+  36 =>
+  array (
+    'name' => 'iconv functions',
+    'description' => 'This module contains an interface to the iconv library functions. The iconv library functions convert strings between various character sets encodings.',
+    'url' => 'http://www.php.net/manual/en/ref.iconv.php',
+    'flag' => '--with-iconv',
+  ),
+  37 =>
+  array (
+    'name' => 'Image functions',
+    'description' => 'PHP is not limited to creating just HTML output. It can also be used to create and manipulate image files in a variety of different image formats, including gif, png, jpg, wbmp, and xpm.',
+    'url' => 'http://www.php.net/manual/en/ref.image.php',
+    'flag' => '-with-gd',
+  ),
+  38 =>
+  array (
+    'name' => 'IMAP, POP3 and NNTP functions',
+    'description' => 'These functions are not limited to the IMAP protocol, despite their name. The underlying c-client library also supports NNTP, POP3 and local mailbox access methods.',
+    'url' => 'http://www.php.net/docs.php',
+    'flag' => '--with-imap',
+  ),
+  39 =>
+  array (
+    'name' => 'Informix functions',
+    'description' => 'The Informix driver for Informix (IDS) 7.x, SE 7.x, Universal Server (IUS) 9.x and IDS 2000 is implemented in "ifx.ec" and "php3_ifx.h" in the informix extension directory.',
+    'url' => 'http://www.php.net/manual/en/ref.ifx.php',
+    'flag' => '--with_informix',
+  ),
+  40 =>
+  array (
+    'name' => 'InterBase functions',
+    'description' => 'InterBase is a popular database put out by Borland/Inprise.',
+    'url' => 'http://www.php.net/manual/en/ref.ibase.php',
+    'flag' => '--with-interbase',
+  ),
+  41 =>
+  array (
+    'name' => 'Ingres II functions',
+    'description' => 'These functions allow you to access Ingres II database servers.',
+    'url' => 'http://www.php.net/manual/en/ref.ingres.php',
+    'flag' => '--with-ingres',
+  ),
+  42 =>
+  array (
+    'name' => 'IRC Gateway Functions',
+    'description' => 'With IRCG you can rapidly stream XML data to thousands of concurrently connected users.',
+    'url' => 'http://www.php.net/manual/en/ref.ircg.php',
+    'flag' => '--with-ircg-config',
+  ),
+  43 =>
+  array (
+    'name' => 'PHP / Java Integration',
+    'description' => 'There are two possible ways to bridge PHP and Java: you can either integrate PHP into a Java Servlet environment, which is the more stable and efficient solution, or integrate Java support into PHP.',
+    'url' => 'http://www.php.net/manual/en/ref.java.php',
+    'flag' => '--with-java',
+  ),
+  44 =>
+  array (
+    'name' => 'LDAP functions',
+    'description' => 'LDAP is the Lightweight Directory Access Protocol, and is a protocol used to access "Directory Servers". The Directory is a special kind of database that holds information in a tree structure.',
+    'url' => 'http://www.php.net/manual/en/ref.ldap.php',
+    'flag' => '--with-ldap',
+  ),
+  45 =>
+  array (
+    'name' => 'Mail functions',
+    'description' => 'The mail() function allows you to send mail.',
+    'url' => 'http://www.php.net/manual/en/ref.mail.php',
+    'flag' => '',
+  ),
+  46 =>
+  array (
+    'name' => 'mailparse functions',
+    'description' => '',
+    'url' => 'http://www.php.net/manual/en/ref.mailparse.php',
+    'flag' => '--with-aspell',
+  ),
+  47 =>
+  array (
+    'name' => 'Mathematical Functions',
+    'description' => ' These math functions will only handle values within the range of the integer and float types on your computer (this corresponds currently to the C types long resp. double).',
+    'url' => 'http://www.php.net/manual/en/ref.math.php',
+    'flag' => '',
+  ),
+  48 =>
+  array (
+    'name' => 'Multi-Byte String Functions',
+    'description' => 'There are many languages in which all characters can be expressed by single byte. Multi-byte character codes are used to express many characters for many languages. mbstring is developed to handle Japanese characters.',
+    'url' => 'http://www.php.net/manual/en/ref.mbstring.php',
+    'flag' => '--enable-mbstring',
+  ),
+  49 =>
+  array (
+    'name' => 'MCAL functions',
+    'description' => 'MCAL stands for Modular Calendar Access Library.',
+    'url' => '',
+    'flag' => '',
+  ),
+  50 =>
+  array (
+    'name' => 'Mcrypt Encryption Functions',
+    'description' => 'This is an interface to the mcrypt library, which supports a wide variety of block algorithms',
+    'url' => 'http://www.php.net/manual/en/ref.mcrypt.php',
+    'flag' => '--with-mcrypt',
+  ),
+  51 =>
+  array (
+    'name' => 'MCVE Payment Functions',
+    'description' => 'These functions interface the MCVE API (libmcve), allowing you to work directly with MCVE from your PHP scripts.',
+    'url' => 'http://www.php.net/manual/en/ref.mcve.php',
+    'flag' => '--with-mcve',
+  ),
+  52 =>
+  array (
+    'name' => 'Mhash Functions',
+    'description' => 'These functions are intended to work with mhash. Mhash can be used to create checksums, message digests, message authentication codes, and more.',
+    'url' => 'http://www.php.net/manual/en/ref.mhash.php',
+    'flag' => '--with-mhash',
+  ),
+  53 =>
+  array (
+    'name' => 'Mimetype Functions',
+    'description' => 'The functions in this module try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file.',
+    'url' => 'http://www.php.net/manual/en/ref.mime-magic.php',
+    'flag' => '--with-mime-magic',
+  ),
+  54 =>
+  array (
+    'name' => 'Microsoft SQL Server functions',
+    'description' => 'These functions allow you to access MS SQL Server database.',
+    'url' => 'http://www.php.net/manual/en/ref.mssql.php',
+    'flag' => '--with-mssql',
+  ),
+  55 =>
+  array (
+    'name' => 'Ming functions for Flash',
+    'description' => 'First of all: Ming is not an acronym. Ming is an open-source (LGPL) library which allows you to create SWF ("Flash") format movies.',
+    'url' => 'http://www.php.net/manual/en/ref.ming.php',
+    'flag' => '--with-ming',
+  ),
+  56 =>
+  array (
+    'name' => 'Miscellaneous functions',
+    'description' => 'These functions were placed here because none of the other categories seemed to fit.',
+    'url' => 'http://www.php.net/manual/en/ref.misc.php',
+    'flag' => '',
+  ),
+);
+
+?>
\ No newline at end of file

Added: 3.x/examples/macro/examples/tags/pager/desc.ini
===================================================================
--- 3.x/examples/macro/examples/tags/pager/desc.ini	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/desc.ini	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,17 @@
+title=Pager tags examples
+
+[elipses]
+description=Pager with elipses example.
+php=pager_with_elipses.php
+0=templates/elipses/page.html
+
+[sections]
+description=Pager with sections example
+php=pager_with_sections.php
+0=templates/sections/page.html
+
+[paginage]
+description="{{paginate}} tag example. This tag allows to link pager and list right in MACRO template"
+php=paginate_in_template.php
+0=templates/paginate/page.html
+

Added: 3.x/examples/macro/examples/tags/pager/pager_with_elipses.php
===================================================================
--- 3.x/examples/macro/examples/tags/pager/pager_with_elipses.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/pager_with_elipses.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: pager_with_elipses.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/core/src/lmbCollection.class.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+
+$page = new lmbMacroTemplate('elipses/page.html');
+include('data.inc.php');
+$iterator = new lmbCollection($data);
+
+// here is an example how to do pagination without using {{paginate}} tag
+lmb_require('limb/macro/src/tags/pager/lmbMacroPagerHelper.class.php');
+$pager = new lmbMacroPagerHelper('pager');
+$pager->setItemsPerPage($items_per_page = 5);
+$pager->setTotalItems($total_items = $iterator->count());
+$pager->prepare();
+$iterator->paginate($pager->getCurrentPageOffset(), $items_per_page);
+$page->set('items_per_page', $items_per_page);
+$page->set('total_items', $total_items);
+
+$page->set('php_modules', $iterator);
+
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/pager/pager_with_sections.php
===================================================================
--- 3.x/examples/macro/examples/tags/pager/pager_with_sections.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/pager_with_sections.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: pager_with_sections.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+require_once 'limb/core/src/lmbCollection.class.php';
+
+$page = new lmbMacroTemplate('sections/page.html');
+include('data.inc.php');
+$iterator = new lmbCollection($data);
+
+// here is an example how to do pagination without using {{paginate}} tag
+lmb_require('limb/macro/src/tags/pager/lmbMacroPagerHelper.class.php');
+$pager = new lmbMacroPagerHelper('pager');
+$pager->setItemsPerPage($items_per_page = 5);
+$pager->setTotalItems($total_items = $iterator->count());
+$pager->prepare();
+$iterator->paginate($pager->getCurrentPageOffset(), $items_per_page);
+$page->set('items_per_page', $items_per_page);
+$page->set('total_items', $total_items);
+
+$page->set('php_modules', $iterator);
+
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/pager/paginate_in_template.php
===================================================================
--- 3.x/examples/macro/examples/tags/pager/paginate_in_template.php	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/paginate_in_template.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id: pager_with_elipses.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package    macro_examples
+ */
+
+require_once 'limb/macro/common.inc.php';
+require_once 'limb/macro/src/lmbMacroTemplate.class.php';
+require_once 'limb/core/src/lmbCollection.class.php';
+
+$page = new lmbMacroTemplate('paginate/page.html');
+include('data.inc.php');
+$page->set('php_modules', new lmbCollection($data));
+echo $page->render();
+
+?>

Added: 3.x/examples/macro/examples/tags/pager/templates/elipses/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/pager/templates/elipses/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/templates/elipses/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List with pager example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<style type="text/css">
+.odd {
+  background-color: silver;
+}
+.even {
+  background-color: white;
+}
+</style>
+</head>
+<body>
+<h1 align="center">List with pager example</h1>
+<P align="center">A simple dataset in paginated via the pager tags. For extra pages we uses <b>elipses</b>(... are elipses)</P>
+
+{{list using='$#php_modules' parity='$Parity' counter='$row_number'}}
+<DIV ALIGN="RIGHT">
+Page:
+{{pager id="pager" items="$#items_per_page" total_items="$#total_items" pages_in_sides="2" pages_in_middle="3"}}
+    {{pager:first}}<a href='{$href}'>First</a>{{/pager:first}} {{pager:prev}}<a href='{$href}'>Prev</a>{{/pager:prev}}
+    {{pager:list}}
+        {{pager:number}}<a href='{$href}'>{$number}</a>{{/pager:number}}
+        {{pager:current}}<b>{$number}</b>{{/pager:current}}
+        {{pager:elipses}}...{{/pager:elipses}}
+        {{pager:separator}} {{/pager:separator}}
+    {{/pager:list}}
+    {{pager:next}}<a href='{$href}'>Next</a>{{/pager:next}} {{pager:last}}<a href='{$href}'>Last</a>{{/pager:last}}
+{{/pager}}
+</DIV>
+  <TABLE width="100%" BORDER="1" ALIGN="CENTER">
+    {{list:item}}
+      <TR class="{$Parity}">
+        <TD>{$row_number}</TD>
+        <TD>{$item.name}</TD>
+        <TD>{$item.description|default:"&nbsp;"}
+        </TD>
+        <TD>{$item.flag|default:"&nbsp;"}</TD>
+      </TR>
+    {{/list:item}}
+  </TABLE>
+{{/list}}
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/pager/templates/paginate/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/pager/templates/paginate/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/templates/paginate/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List with pager example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<style type="text/css">
+.odd {
+  background-color: silver;
+}
+.even {
+  background-color: white;
+}
+</style>
+</head>
+<body>
+<h1 align="center">List with pager example</h1>
+<P align="center">A simple dataset in paginated via the pager tags. For extra pages we uses <b>elipses</b>(... are elipses)</P>
+
+{{paginate iterator='$#php_modules' pager='pager'/}}
+{{list using='$#php_modules' parity='$Parity' counter='$row_number'}}
+<DIV ALIGN="RIGHT">
+Page:
+{{pager id="pager" items="5" pages_in_sides="2" pages_in_middle="3"}}
+    {{pager:first}}<a href='{$href}'>First</a>{{/pager:first}} {{pager:prev}}<a href='{$href}'>Prev</a>{{/pager:prev}}
+    {{pager:list}}
+        {{pager:number}}<a href='{$href}'>{$number}</a>{{/pager:number}}
+        {{pager:current}}<b>{$number}</b>{{/pager:current}}
+        {{pager:elipses}}...{{/pager:elipses}}
+        {{pager:separator}} {{/pager:separator}}
+    {{/pager:list}}
+    {{pager:next}}<a href='{$href}'>Next</a>{{/pager:next}} {{pager:last}}<a href='{$href}'>Last</a>{{/pager:last}}
+{{/pager}}
+</DIV>
+  <TABLE width="100%" BORDER="1" ALIGN="CENTER">
+    {{list:item}}
+      <TR class="{$Parity}">
+        <TD>{$row_number}</TD>
+        <TD>{$item.name}</TD>
+        <TD>{$item.description|default:"&nbsp;"}
+        </TD>
+        <TD>{$item.flag|default:"&nbsp;"}</TD>
+      </TR>
+    {{/list:item}}
+  </TABLE>
+{{/list}}
+</body>
+</html>

Added: 3.x/examples/macro/examples/tags/pager/templates/sections/page.html
===================================================================
--- 3.x/examples/macro/examples/tags/pager/templates/sections/page.html	                        (rev 0)
+++ 3.x/examples/macro/examples/tags/pager/templates/sections/page.html	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List with pager example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<style type="text/css">
+.odd {
+  background-color: silver;
+}
+.even {
+  background-color: white;
+}
+</style>
+</head>
+<body>
+<h1 align="center">List with pager example</h1>
+<P align="center">A simple dataset in paginated via the pager tags. For extra pages we use now so called <b>sections</b></P>
+{{list using='$#php_modules' parity='$Parity' counter='$row_number'}}
+<DIV ALIGN="RIGHT">
+Page:
+{{pager id="pager" items="$#items_per_page" total_items="$#total_items" pages_per_section="5"}}
+    {{pager:first}}<a href='{$href}'>First</a>{{/pager:first}} {{pager:prev}}<a href='{$href}'>Prev</a>{{/pager:prev}}
+    {{pager:list}}
+        {{pager:number}}<a href='{$href}'>{$number}</a>{{/pager:number}}
+        {{pager:current}}<b>{$number}</b>{{/pager:current}}
+        {{pager:section}}<a href='{$href}'>[{$section_begin_page}-{$section_end_page}]</a>{{/pager:section}}
+        {{pager:separator}} {{/pager:separator}}
+    {{/pager:list}}
+    {{pager:next}}<a href='{$href}'>Next</a>{{/pager:next}} {{pager:last}}<a href='{$href}'>Last</a>{{/pager:last}}
+{{/pager}}
+</DIV>
+  <TABLE width="100%" BORDER="1" ALIGN="CENTER">
+    {{list:item}}
+      <TR class="{$Parity}">
+        <TD>{$row_number}</TD>
+        <TD>{$item.name}</TD>
+        <TD>{$item.description|default:"&nbsp;"}
+        </TD>
+        <TD>{$item.flag|default:"&nbsp;"}</TD>
+      </TR>
+    {{/list:item}}
+  </TABLE>
+{{/list}}
+</body>
+</html>

Added: 3.x/examples/macro/favicon.ico
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/favicon.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/images/bgr/bottom.gif
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/images/bgr/bottom.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/images/bgr/header.gif
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/images/bgr/header.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/images/bgr/hr.gif
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/images/bgr/hr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/images/bit.gif
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/images/bit.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/images/bit_hover.gif
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/images/bit_hover.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/images/logo.limb.gif
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/macro/images/logo.limb.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 3.x/examples/macro/index.php
===================================================================
--- 3.x/examples/macro/index.php	                        (rev 0)
+++ 3.x/examples/macro/index.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,29 @@
+<?php
+require_once './src/examples_utils.inc.php';
+
+/**
+ * Tree structure implemented with an array
+ * for best performances.
+ */
+$tree = array('name'  => 'examples',
+              'path'  => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR,
+              'group' => '');
+
+$group = (empty($_GET['group']) ? '' : $_GET['group']);
+
+if (!empty($group))
+{
+  $groups = explode('/', $_GET['group']);
+  array_pop($groups);
+  $tree['name']  = array_pop($groups);
+  $tree['group'] = $_GET['group'];
+  $tree['path']  = $tree['path'].$_GET['group'];
+}
+
+createTree($tree, 3); // one level deep tree. Change the 2nd parameter ad libitum.
+
+$page = new lmbMacroTemplate('index.html');
+$page->set('crumbs', get_breadcrumbs($group));
+$page->set('tree', treeToHtml($tree));
+echo $page->render();
+?>
\ No newline at end of file

Added: 3.x/examples/macro/lib/XML/HTMLSax3/Decorators.php
===================================================================
--- 3.x/examples/macro/lib/XML/HTMLSax3/Decorators.php	                        (rev 0)
+++ 3.x/examples/macro/lib/XML/HTMLSax3/Decorators.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,363 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2002 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license at php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: Alexander Zhukov <alex at veresk.ru> Original port from Python |
+// | Authors: Harry Fuecks <hfuecks at phppatterns.com> Port to PEAR + more  |
+// | Authors: Many @ Sitepointforums Advanced PHP Forums                  |
+// +----------------------------------------------------------------------+
+//
+// $Id: Decorators.php,v 1.1 2004/06/02 14:09:19 hfuecks Exp $
+//
+/**
+* Decorators for dealing with parser options
+* @package XML_HTMLSax3
+* @version $Id: Decorators.php,v 1.1 2004/06/02 14:09:19 hfuecks Exp $
+* @see XML_HTMLSax3::set_option
+*/
+/**
+* Trims the contents of element data from whitespace at start and end
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_Trim {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original handler method
+    * @var string
+    * @access private
+    */
+    var $orig_method;
+    /**
+    * Constructs XML_HTMLSax3_Trim
+    * @param object handler object being decorated
+    * @param string original handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_Trim(&$orig_obj, $orig_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_method = $orig_method;
+    }
+    /**
+    * Trims the data
+    * @param XML_HTMLSax3
+    * @param string element data
+    * @access protected
+    */
+    function trimData(&$parser, $data) {
+        $data = trim($data);
+        if ($data != '') {
+            $this->orig_obj->{$this->orig_method}($parser, $data);
+        }
+    }
+}
+/**
+* Coverts tag names to upper case
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_CaseFolding {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original open handler method
+    * @var string
+    * @access private
+    */
+    var $orig_open_method;
+    /**
+    * Original close handler method
+    * @var string
+    * @access private
+    */
+    var $orig_close_method;
+    /**
+    * Constructs XML_HTMLSax3_CaseFolding
+    * @param object handler object being decorated
+    * @param string original open handler method
+    * @param string original close handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_CaseFolding(&$orig_obj, $orig_open_method, $orig_close_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_open_method = $orig_open_method;
+        $this->orig_close_method = $orig_close_method;
+    }
+    /**
+    * Folds up open tag callbacks
+    * @param XML_HTMLSax3
+    * @param string tag name
+    * @param array tag attributes
+    * @access protected
+    */
+    function foldOpen(&$parser, $tag, $attrs=array(), $empty = FALSE) {
+        $this->orig_obj->{$this->orig_open_method}($parser, strtoupper($tag), $attrs, $empty);
+    }
+    /**
+    * Folds up close tag callbacks
+    * @param XML_HTMLSax3
+    * @param string tag name
+    * @access protected
+    */
+    function foldClose(&$parser, $tag, $empty = FALSE) {
+        $this->orig_obj->{$this->orig_close_method}($parser, strtoupper($tag), $empty);
+    }
+}
+/**
+* Breaks up data by linefeed characters, resulting in additional
+* calls to the data handler
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_Linefeed {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original handler method
+    * @var string
+    * @access private
+    */
+    var $orig_method;
+    /**
+    * Constructs XML_HTMLSax3_LineFeed
+    * @param object handler object being decorated
+    * @param string original handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_LineFeed(&$orig_obj, $orig_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_method = $orig_method;
+    }
+    /**
+    * Breaks the data up by linefeeds
+    * @param XML_HTMLSax3
+    * @param string element data
+    * @access protected
+    */
+    function breakData(&$parser, $data) {
+        $data = explode("\n",$data);
+        foreach ( $data as $chunk ) {
+            $this->orig_obj->{$this->orig_method}($parser, $chunk);
+        }
+    }
+}
+/**
+* Breaks up data by tab characters, resulting in additional
+* calls to the data handler
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_Tab {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original handler method
+    * @var string
+    * @access private
+    */
+    var $orig_method;
+    /**
+    * Constructs XML_HTMLSax3_Tab
+    * @param object handler object being decorated
+    * @param string original handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_Tab(&$orig_obj, $orig_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_method = $orig_method;
+    }
+    /**
+    * Breaks the data up by linefeeds
+    * @param XML_HTMLSax3
+    * @param string element data
+    * @access protected
+    */
+    function breakData(&$parser, $data) {
+        $data = explode("\t",$data);
+        foreach ( $data as $chunk ) {
+            $this->orig_obj->{$this->orig_method}($this, $chunk);
+        }
+    }
+}
+/**
+* Breaks up data by XML entities and parses them with html_entity_decode(),
+* resulting in additional calls to the data handler<br />
+* Requires PHP 4.3.0+
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_Entities_Parsed {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original handler method
+    * @var string
+    * @access private
+    */
+    var $orig_method;
+    /**
+    * Constructs XML_HTMLSax3_Entities_Parsed
+    * @param object handler object being decorated
+    * @param string original handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_Entities_Parsed(&$orig_obj, $orig_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_method = $orig_method;
+    }
+    /**
+    * Breaks the data up by XML entities
+    * @param XML_HTMLSax3
+    * @param string element data
+    * @access protected
+    */
+    function breakData(&$parser, $data) {
+        $data = preg_split('/(&.+?;)/',$data,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+        foreach ( $data as $chunk ) {
+            $chunk = html_entity_decode($chunk,ENT_NOQUOTES);
+            $this->orig_obj->{$this->orig_method}($this, $chunk);
+        }
+    }
+}
+/**
+* Compatibility with older PHP versions
+*/
+if (version_compare(phpversion(), '4.3', '<') && !function_exists('html_entity_decode') ) {
+    function html_entity_decode($str, $style=ENT_NOQUOTES) {
+        return strtr($str,
+            array_flip(get_html_translation_table(HTML_ENTITIES,$style)));
+    }
+}
+/**
+* Breaks up data by XML entities but leaves them unparsed,
+* resulting in additional calls to the data handler<br />
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_Entities_Unparsed {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original handler method
+    * @var string
+    * @access private
+    */
+    var $orig_method;
+    /**
+    * Constructs XML_HTMLSax3_Entities_Unparsed
+    * @param object handler object being decorated
+    * @param string original handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_Entities_Unparsed(&$orig_obj, $orig_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_method = $orig_method;
+    }
+    /**
+    * Breaks the data up by XML entities
+    * @param XML_HTMLSax3
+    * @param string element data
+    * @access protected
+    */
+    function breakData(&$parser, $data) {
+        $data = preg_split('/(&.+?;)/',$data,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+        foreach ( $data as $chunk ) {
+            $this->orig_obj->{$this->orig_method}($this, $chunk);
+        }
+    }
+}
+
+/**
+* Strips the HTML comment markers or CDATA sections from an escape.
+* If XML_OPTIONS_FULL_ESCAPES is on, this decorator is not used.<br />
+* @package XML_HTMLSax3
+* @access protected
+*/
+class XML_HTMLSax3_Escape_Stripper {
+    /**
+    * Original handler object
+    * @var object
+    * @access private
+    */
+    var $orig_obj;
+    /**
+    * Original handler method
+    * @var string
+    * @access private
+    */
+    var $orig_method;
+    /**
+    * Constructs XML_HTMLSax3_Entities_Unparsed
+    * @param object handler object being decorated
+    * @param string original handler method
+    * @access protected
+    */
+    function XML_HTMLSax3_Escape_Stripper(&$orig_obj, $orig_method) {
+        $this->orig_obj =& $orig_obj;
+        $this->orig_method = $orig_method;
+    }
+    /**
+    * Breaks the data up by XML entities
+    * @param XML_HTMLSax3
+    * @param string element data
+    * @access protected
+    */
+    function strip(&$parser, $data) {
+        // Check for HTML comments first
+        if ( substr($data,0,2) == '--' ) {
+            $patterns = array(
+                '/^\-\-/',          // Opening comment: --
+                '/\-\-$/',          // Closing comment: --
+            );
+            $data = preg_replace($patterns,'',$data);
+
+        // Check for XML CDATA sections (note: don't do both!)
+        } else if ( substr($data,0,1) == '[' ) {
+            $patterns = array(
+                '/^\[.*CDATA.*\[/s', // Opening CDATA
+                '/\].*\]$/s',       // Closing CDATA
+                );
+            $data = preg_replace($patterns,'',$data);
+        }
+
+        $this->orig_obj->{$this->orig_method}($this, $data);
+    }
+}
+?>
\ No newline at end of file

Added: 3.x/examples/macro/lib/XML/HTMLSax3/States.php
===================================================================
--- 3.x/examples/macro/lib/XML/HTMLSax3/States.php	                        (rev 0)
+++ 3.x/examples/macro/lib/XML/HTMLSax3/States.php	2008-03-03 08:39:25 UTC (rev 6813)
@@ -0,0 +1,287 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2002 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license at php.net so we