[limb-svn] r5261 - in 3.x/examples/wact: . config examples/expressions examples/expressions/templates examples/filters/core examples/filters/core/templates/1 examples/filters/core/templates/2 examples/filters/data examples/filters/data/templates examples/tags/core/block examples/tags/core/datasource examples/tags/core/include examples/tags/core/include/templates examples/tags/core/literal examples/tags/core/literal/templates examples/tags/core/optional_and_default examples/tags/core/optional_and_default/templates/1 examples/tags/core/repeat examples/tags/core/set examples/tags/core/set/templates examples/tags/core/wrap examples/tags/form/basic examples/tags/form/basic/templates/1 examples/tags/form/select examples/tags/form/select/templates/1 examples/tags/form/select/templates/2 examples/tags/list examples/tags/list/templates/1 examples/tags/list/templates/2 examples/tags/list/templates/3 examples/tags/list/templates/4 examples/tags/pager lib/limb src
svn at limb-project.com
svn at limb-project.com
Fri Mar 16 12:55:33 MSK 2007
Author: serega
Date: 2007-03-16 12:55:33 +0300 (Fri, 16 Mar 2007)
New Revision: 5261
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5261
Added:
3.x/examples/wact/examples/expressions/desc.ini
3.x/examples/wact/examples/filters/core/desc.ini
3.x/examples/wact/examples/filters/data/desc.ini
3.x/examples/wact/examples/tags/core/datasource/desc.ini
3.x/examples/wact/examples/tags/core/include/desc.ini
3.x/examples/wact/examples/tags/core/literal/desc.ini
3.x/examples/wact/examples/tags/core/optional_and_default/desc.ini
3.x/examples/wact/examples/tags/core/repeat/desc.ini
3.x/examples/wact/examples/tags/core/set/desc.ini
3.x/examples/wact/examples/tags/form/basic/desc.ini
3.x/examples/wact/examples/tags/form/select/desc.ini
3.x/examples/wact/examples/tags/list/desc.ini
3.x/examples/wact/examples/tags/pager/desc.ini
3.x/examples/wact/run.php
Modified:
3.x/examples/wact/config/config.ini
3.x/examples/wact/examples/expressions/expressions.php
3.x/examples/wact/examples/expressions/templates/page.html
3.x/examples/wact/examples/filters/core/templates/1/page.html
3.x/examples/wact/examples/filters/core/templates/2/page.html
3.x/examples/wact/examples/filters/core/text.php
3.x/examples/wact/examples/filters/core/with_variables.php
3.x/examples/wact/examples/filters/data/filters.php
3.x/examples/wact/examples/filters/data/templates/page.html
3.x/examples/wact/examples/tags/core/block/block.php
3.x/examples/wact/examples/tags/core/datasource/datasource.php
3.x/examples/wact/examples/tags/core/include/include.php
3.x/examples/wact/examples/tags/core/include/templates/page.html
3.x/examples/wact/examples/tags/core/literal/literal.php
3.x/examples/wact/examples/tags/core/literal/templates/literal.html
3.x/examples/wact/examples/tags/core/optional_and_default/dbe.php
3.x/examples/wact/examples/tags/core/optional_and_default/simple.php
3.x/examples/wact/examples/tags/core/optional_and_default/templates/1/page.html
3.x/examples/wact/examples/tags/core/repeat/repeat.php
3.x/examples/wact/examples/tags/core/set/set.php
3.x/examples/wact/examples/tags/core/set/templates/page.html
3.x/examples/wact/examples/tags/core/wrap/desc.ini
3.x/examples/wact/examples/tags/core/wrap/more.php
3.x/examples/wact/examples/tags/core/wrap/multiple.php
3.x/examples/wact/examples/tags/core/wrap/multiple_with_include.php
3.x/examples/wact/examples/tags/core/wrap/multiple_with_nested.php
3.x/examples/wact/examples/tags/core/wrap/simple.php
3.x/examples/wact/examples/tags/form/basic/form.php
3.x/examples/wact/examples/tags/form/basic/form_errors.php
3.x/examples/wact/examples/tags/form/basic/templates/1/page.html
3.x/examples/wact/examples/tags/form/select/select.php
3.x/examples/wact/examples/tags/form/select/select_options_source.php
3.x/examples/wact/examples/tags/form/select/templates/1/page.html
3.x/examples/wact/examples/tags/form/select/templates/2/page.html
3.x/examples/wact/examples/tags/list/list.php
3.x/examples/wact/examples/tags/list/list_decorated.php
3.x/examples/wact/examples/tags/list/list_default.php
3.x/examples/wact/examples/tags/list/list_separated.php
3.x/examples/wact/examples/tags/list/templates/1/page.html
3.x/examples/wact/examples/tags/list/templates/2/page.html
3.x/examples/wact/examples/tags/list/templates/3/page.html
3.x/examples/wact/examples/tags/list/templates/4/page.html
3.x/examples/wact/examples/tags/pager/pager_with_elipses.php
3.x/examples/wact/examples/tags/pager/pager_with_sections.php
3.x/examples/wact/examples/tags/pager/paginate_in_template.php
3.x/examples/wact/lib/limb/
3.x/examples/wact/showsource.php
3.x/examples/wact/showtemplate.php
3.x/examples/wact/src/examples_utils.inc.php
Log:
-- moved all WACT examples into new schema
Modified: 3.x/examples/wact/config/config.ini
===================================================================
--- 3.x/examples/wact/config/config.ini 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/config/config.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -5,7 +5,7 @@
force_compile = 1
# absolute path to your wact templates cache dir
-#cache_dir = limb/wact/cache/
+cache_dir = ./cache/
# directory where template compiler looks for source templates
templates_dir = templates/
Added: 3.x/examples/wact/examples/expressions/desc.ini
===================================================================
--- 3.x/examples/wact/examples/expressions/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/expressions/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,7 @@
+title=WACT output expressions examples
+
+[text]
+description=Output expressions with complex DBE's
+php=expressions.php
+0=templates/page.html
+
Modified: 3.x/examples/wact/examples/expressions/expressions.php
===================================================================
--- 3.x/examples/wact/examples/expressions/expressions.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/expressions/expressions.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,7 +10,8 @@
* @package wact
*/
-require '../setup.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$template = new WactTemplate('page.html');
$template->set('data', array('first', 'second', 'third'));
Modified: 3.x/examples/wact/examples/expressions/templates/page.html
===================================================================
--- 3.x/examples/wact/examples/expressions/templates/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/expressions/templates/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -7,18 +7,10 @@
<body>
<h1 align="center">Expressions Example</h1>
-<h2>Result</h2>
-
{$data.0}<br/>
{$data.1}<br/>
{$nested_data.0.title}<br/>
{$nested_data.1.1}<br/>
-<h2>Template source file</h2>
-<core:include file='page.html' source='true'/>
-
-<h2>Php source file</h2>
-<core:include file='../expressions.php' source='true'/>
-
</body>
</html>
Added: 3.x/examples/wact/examples/filters/core/desc.ini
===================================================================
--- 3.x/examples/wact/examples/filters/core/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/filters/core/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,12 @@
+title=WACT core filters examples
+
+[text]
+description=Demonstrates how to use core text processing filters
+php=text.php
+0=templates/1/page.html
+
+[with_variable]
+description=Demonstrates how to use several core filters in dynamic expressions
+php=with_variables.php
+0=templates/2/page.html
+
Modified: 3.x/examples/wact/examples/filters/core/templates/1/page.html
===================================================================
--- 3.x/examples/wact/examples/filters/core/templates/1/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/filters/core/templates/1/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -7,9 +7,7 @@
<body>
<h1 align="center">Text processing filters Example</h1>
-<h2>Result</h2>
-
-<h3>Description:</h3>
+<h2>Description:</h2>
This page demonstrates how to use several text processing filters such as:
<ul>
<li>upper</li>
@@ -50,11 +48,5 @@
<core:literal>{$'some very long text'|wordwrap:10|nl2br} =</core:literal> {$'some very long text'|wordwrap:10|nl2br}<p/>
<core:literal>{$'some very long text'|wordwrap:10|nl2br|raw} (no htmlspecialchars by default) =</core:literal> {$'some very long text'|wordwrap:10|nl2br|raw}
-<h2>Template source file</h2>
-<core:include file='1/page.html' source='true'/>
-
-<h2>PHP source file</h2>
-<core:include file='../text.php' source='true'/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/filters/core/templates/2/page.html
===================================================================
--- 3.x/examples/wact/examples/filters/core/templates/2/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/filters/core/templates/2/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -7,9 +7,7 @@
<body>
<h1 align="center">Core filters Example</h1>
-<h2>Result</h2>
-
-<h3>Description</h3>
+<h2>Description</h2>
This page demonstrates how to use several core filters such as:
<ul>
<li>const</li>
@@ -35,11 +33,5 @@
<core:literal>{$my_hex|hex} = </core:literal> {$my_hex|hex} (real value is {$my_hex})
-<h2>Template source file</h2>
-<core:include file='2/page.html' source='true'/>
-
-<h2>PHP source file</h2>
-<core:include file='../with_variables.php' source='true'/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/filters/core/text.php
===================================================================
--- 3.x/examples/wact/examples/filters/core/text.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/filters/core/text.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,7 +10,8 @@
* @package wact
*/
-require '../../setup.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('1/page.html');
$page->display();
Modified: 3.x/examples/wact/examples/filters/core/with_variables.php
===================================================================
--- 3.x/examples/wact/examples/filters/core/with_variables.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/filters/core/with_variables.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,7 +10,8 @@
* @package wact
*/
-require '../../setup.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
define('MY_TESTING_TEMPLAE_EXAMPLE_CONSTANT', 'Constant value');
Added: 3.x/examples/wact/examples/filters/data/desc.ini
===================================================================
--- 3.x/examples/wact/examples/filters/data/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/filters/data/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,8 @@
+title=WACT data filters examples
+
+[simple]
+description=Demonstrates how to use data filters like math, data, clip
+php=filters.php
+0=templates/1/page.html
+
+
Modified: 3.x/examples/wact/examples/filters/data/filters.php
===================================================================
--- 3.x/examples/wact/examples/filters/data/filters.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/filters/data/filters.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,7 +10,8 @@
* @package wact
*/
-require '../../setup.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('page.html');
$page->display();
Modified: 3.x/examples/wact/examples/filters/data/templates/page.html
===================================================================
--- 3.x/examples/wact/examples/filters/data/templates/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/filters/data/templates/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -7,9 +7,7 @@
<body>
<h1 align="center">Data Filters Example</h1>
-<h2>Result</h2>
-
-<h3>Description</h3>
+<h2>Description</h2>
This page demonstrates how to use several data filters such as:
<ul>
<li>clip</li>
@@ -27,11 +25,5 @@
<core:literal>{$'1 + 2'|math} =</core:literal> {$'1 + 2'|math}<br/>
<core:literal>{$'2 * 2'|math} =</core:literal> {$'2 * 2'|math}<br/>
-<h2>Template source file</h2>
-<core:include file='page.html' source='true'/>
-
-<h2>Php source file</h2>
-<core:include file='../filters.php' source='true'/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/core/block/block.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/block/block.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/block/block.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 2004-2007 BIT
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
- * @version $Id: block.php 5021 2007-02-12 13:04:07Z pachanga $
- * @package wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 2004-2007 BIT
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version $Id: block.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('block.html');
$block = $page->getChild('Block3');
Modified: 3.x/examples/wact/examples/tags/core/datasource/datasource.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/datasource/datasource.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/datasource/datasource.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 2004-2007 BIT
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
- * @version $Id: datasource.php 5021 2007-02-12 13:04:07Z pachanga $
- * @package wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 2004-2007 BIT
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version $Id: datasource.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('page.html');
$page->registerDatasource(array('Animal' => 'Rabbit', 'Food' => 'Carrot',
Added: 3.x/examples/wact/examples/tags/core/datasource/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/datasource/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/core/datasource/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,7 @@
+title=<core:datasource> tag examples
+
+[simple]
+description=<core:datasource> usage example.
+php=datasource.php
+0=templates/page.html
+
Added: 3.x/examples/wact/examples/tags/core/include/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/include/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/core/include/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,10 @@
+title=<core:include> tag examples
+
+[simple]
+description=<core:include> usage example.
+php=include.php
+0=templates/page.html
+1=templates/include_file.html
+2=templates/include_source_file.html
+3=templates/include_literal_file.html
+
Modified: 3.x/examples/wact/examples/tags/core/include/include.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/include/include.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/include/include.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('page.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/include/templates/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/core/include/templates/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/include/templates/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -17,7 +17,4 @@
</p>
</body>
-<h2>The source file</h2>
-<core:include file="page.html" source='true'/>
-
</html>
Added: 3.x/examples/wact/examples/tags/core/literal/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/literal/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/core/literal/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,7 @@
+title=<core:literal> tag examples
+
+[simple]
+description=<core:literal> usage example.
+php=literal.php
+1=templates/literal.html
+
Modified: 3.x/examples/wact/examples/tags/core/literal/literal.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/literal/literal.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/literal/literal.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 2004-2007 BIT
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
- * @version $Id: literal.php 5021 2007-02-12 13:04:07Z pachanga $
- * @package wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 2004-2007 BIT
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version $Id: literal.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('literal.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/literal/templates/literal.html
===================================================================
--- 3.x/examples/wact/examples/tags/core/literal/templates/literal.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/literal/templates/literal.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -15,8 +15,5 @@
</core:LITERAL>
</p>
-<h3>The source of the example template:</h3>
-<core:include file='literal.html' source='1'/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/core/optional_and_default/dbe.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/optional_and_default/dbe.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/optional_and_default/dbe.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 2004-2007 BIT
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
- * @version $Id: dbe.php 5021 2007-02-12 13:04:07Z pachanga $
- * @package wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 2004-2007 BIT
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version $Id: dbe.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('2/page.html');
$root_datasource = array('title' => 'Page title',
Added: 3.x/examples/wact/examples/tags/core/optional_and_default/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/optional_and_default/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/core/optional_and_default/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,13 @@
+title=<core:optional> and <core:default> tags examples
+
+[simple]
+description=<core:default> basic usage example.
+php=simple.php
+1=templates/1/page.html
+
+[dbe]
+description=<core:default> and <core:optional> tag for complex DBE expressions.
+php=dbe.php
+1=templates/2/page.html
+
+
Modified: 3.x/examples/wact/examples/tags/core/optional_and_default/simple.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/optional_and_default/simple.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/optional_and_default/simple.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,19 +1,20 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('1/page.html');
+$page->set('url', $_SERVER['REQUEST_URI']);
$page->set('clicked', @$_GET['clicked']);
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/optional_and_default/templates/1/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/core/optional_and_default/templates/1/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/optional_and_default/templates/1/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -12,7 +12,7 @@
</core:optional>
<core:default for="clicked">
<p>This is the default - link not clicked</p>
+<p><a href="{$url}&clicked=1">Click Me!</a></p>
</core:default>
-<p><a href="?clicked=1">Click Me!</a></p>
</body>
</html>
\ No newline at end of file
Added: 3.x/examples/wact/examples/tags/core/repeat/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/repeat/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/core/repeat/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,7 @@
+title=<core:repeat> tag examples
+
+[simple]
+description=<core:repeat> usage example.
+php=repeat.php
+1=templates/page.html
+
Modified: 3.x/examples/wact/examples/tags/core/repeat/repeat.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/repeat/repeat.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/repeat/repeat.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('page.html');
$page->set('times', 4);
Added: 3.x/examples/wact/examples/tags/core/set/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/set/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/core/set/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,7 @@
+title=<core:set> tag examples
+
+[simple]
+description=<core:set> usage example.
+php=set.php
+1=templates/page.html
+
Modified: 3.x/examples/wact/examples/tags/core/set/set.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/set/set.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/set/set.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 2004-2007 BIT
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
- * @version $Id: set.php 5021 2007-02-12 13:04:07Z pachanga $
- * @package wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 2004-2007 BIT
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version $Id: set.php 5021 2007-02-12 13:04:07Z pachanga $
+ * @package wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('page.html');
$page->set('other_title', 'Some second level title');
Modified: 3.x/examples/wact/examples/tags/core/set/templates/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/core/set/templates/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/set/templates/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -25,9 +25,5 @@
Third level title is a <b>run time</b> variable reference from parent datasource.
</core:datasource>
-<h2>The source file</h2>
-
-<core:include file='page.html' source='true'/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/core/wrap/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/core/wrap/desc.ini 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/wrap/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,18 +1,39 @@
title=<core:wrap> tag examples
[simple]
-description=Basic <core:wrap> usage
+description=Basic <core:wrap> usage. Wrap template into single placeholder
php=simple.php
0=templates/1/page.html
1=templates/1/simple.html
-[second]
-description=<core:block> tag example
-php=block.php
-0=templates/block.html
+[multiple]
+description=Wrap into multiple placeholders
+php=multiple.php
+0=templates/2/multiple.html
+1=templates/2/page.html
-[third]
-description=<core:block> tag example
-php=block.php
-0=templates/block.html
+[nested]
+description=Nested wrapping example
+php=multiple_with_nested.php
+0=templates/3/wrap.html
+1=templates/3/layout.html
+2=templates/3/page.html
+[complex]
+description=Very complex template composition
+php=more.php
+0=templates/4/wrap.html
+1=templates/4/layout.html
+2=templates/4/form.html
+3=templates/4/example.html
+4=templates/4/box.html
+
+[wrap_with_includ]
+description=Example of moving child <core:wrap> tags into separate template
+php=multiple_with_include.php
+0=templates/5/wrap.html
+1=templates/5/zones.html
+2=templates/5/layout.html
+3=templates/5/page.html
+
+
Modified: 3.x/examples/wact/examples/tags/core/wrap/more.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/wrap/more.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/wrap/more.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('4/wrap.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/wrap/multiple.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/wrap/multiple.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/wrap/multiple.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('2/multiple.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/wrap/multiple_with_include.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/wrap/multiple_with_include.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/wrap/multiple_with_include.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('5/wrap.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/wrap/multiple_with_nested.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/wrap/multiple_with_nested.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/wrap/multiple_with_nested.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('3/wrap.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/core/wrap/simple.php
===================================================================
--- 3.x/examples/wact/examples/tags/core/wrap/simple.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/core/wrap/simple.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('1/simple.html');
$page->display();
Added: 3.x/examples/wact/examples/tags/form/basic/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/form/basic/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/form/basic/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,11 @@
+title=Form related tags examples
+
+[simple]
+description=Basic usage of WACT 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
Modified: 3.x/examples/wact/examples/tags/form/basic/form.php
===================================================================
--- 3.x/examples/wact/examples/tags/form/basic/form.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/basic/form.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,25 +1,26 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('1/page.html');
-if(isset($_GET['my_input']))
+if(isset($_POST['my_input']))
{
- $page->set('text', $_GET['my_input']);
- $page->setChildDatasource('my_form', $_GET);
+ $page->set('text', $_POST['my_input']);
+ $page->setChildDatasource('my_form', $_POST);
}
+
$page->display();
?>
Modified: 3.x/examples/wact/examples/tags/form/basic/form_errors.php
===================================================================
--- 3.x/examples/wact/examples/tags/form/basic/form_errors.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/basic/form_errors.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,8 +10,8 @@
* @package wact
*/
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('2/page.html');
Modified: 3.x/examples/wact/examples/tags/form/basic/templates/1/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/form/basic/templates/1/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/basic/templates/1/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -15,15 +15,11 @@
<p/>You typed: <b>{$text}</b>
</core:optional>
-<form name='my_form' runat='server' method='GET'>
+<form name='my_form' runat='server' method='POST'>
Type here: <input type='text' name='my_input'/>
<input type='submit' name='button' value='Send!'/>
</form>
-<h2>The source file</h2>
-
-<core:include file='1/page.html' source="true"/>
-
</body>
</html>
Added: 3.x/examples/wact/examples/tags/form/select/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/form/select/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/form/select/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,11 @@
+title=Wact <select> related tags examples
+
+[simple]
+description=<select> tags usage. Demonstates how to fill options list from php-script and WACT template
+php=select.php
+0=templates/1/page.html
+
+[errors]
+description=<select:options_source> tags example. This tag allows to create options list for select tag right in WACT template
+php=select_options_source.php
+0=templates/2/page.html
Modified: 3.x/examples/wact/examples/tags/form/select/select.php
===================================================================
--- 3.x/examples/wact/examples/tags/form/select/select.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/select/select.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('1/page.html');
$page->setChildDatasource('my_form1', $_GET);
Modified: 3.x/examples/wact/examples/tags/form/select/select_options_source.php
===================================================================
--- 3.x/examples/wact/examples/tags/form/select/select_options_source.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/select/select_options_source.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('2/page.html');
Modified: 3.x/examples/wact/examples/tags/form/select/templates/1/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/form/select/templates/1/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/select/templates/1/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -19,7 +19,7 @@
</core:optional>
Select an option: <select name='my_select1' type='text' runat='server'>
- <option value='no_value' selected >------</option>
+ <option value='no_value' selected='true' >------</option>
<option value='first'>First option</option>
<option value='second'>Second option</option>
</select>
@@ -40,9 +40,6 @@
<input type='submit' name='button' value='Send!'/>
</form>
-<h2>The source file</h2>
-<core:include file='1/page.html' source="true"/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/form/select/templates/2/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/form/select/templates/2/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/form/select/templates/2/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -22,9 +22,5 @@
<input type='submit' name='button' value='Send!'/>
</form>
-<h2>The source file</h2>
-
-<core:include file='2/page.html' source="true"/>
-
</body>
</html>
Added: 3.x/examples/wact/examples/tags/list/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/list/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/list/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,23 @@
+title=List tags examples
+
+[simple]
+description=Basic <list:list> and <list:item> tags usage example.
+php=list.php
+0=templates/1/page.html
+
+[decorated]
+description=<list:item> predefined properties usage example.
+php=list_decorated.php
+0=templates/2/page.html
+
+[separated]
+description=<list:separator> and <list:fill> tags example. These tags allows to output multicolumn lists
+php=list_separated.php
+0=templates/3/page.html
+
+[default]
+description=<list:default> tag example
+php=list_default.php
+0=templates/4/page.html
+
+
Modified: 3.x/examples/wact/examples/tags/list/list.php
===================================================================
--- 3.x/examples/wact/examples/tags/list/list.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/list.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('1/page.html');
include('data.inc.php');
Modified: 3.x/examples/wact/examples/tags/list/list_decorated.php
===================================================================
--- 3.x/examples/wact/examples/tags/list/list_decorated.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/list_decorated.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('2/page.html');
include('data.inc.php');
Modified: 3.x/examples/wact/examples/tags/list/list_default.php
===================================================================
--- 3.x/examples/wact/examples/tags/list/list_default.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/list_default.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('4/page.html');
$page->display();
Modified: 3.x/examples/wact/examples/tags/list/list_separated.php
===================================================================
--- 3.x/examples/wact/examples/tags/list/list_separated.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/list_separated.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,8 +10,8 @@
* @package wact
*/
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$page = new WactTemplate('3/page.html');
include('data.inc.php');
Modified: 3.x/examples/wact/examples/tags/list/templates/1/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/list/templates/1/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/templates/1/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -19,8 +19,5 @@
</TABLE>
</list:LIST>
-<h2>The source file</h2>
-
-<core:include file='1/page.html' source="true"/>
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/list/templates/2/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/list/templates/2/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/templates/2/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -56,9 +56,5 @@
</TABLE>
</list:LIST>
- <h2>The source file</h2>
-
- <core:include file='2/page.html' source="true"/>
-
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/list/templates/3/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/list/templates/3/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/templates/3/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -21,7 +21,7 @@
<ul>
<list:ITEM>
<li>{$name}</li>
- <list:separator every='2' literal></ul><ul></list:separator>
+ <list:separator every='2' literal='true'></ul><ul></list:separator>
</list:ITEM>
</ul>
</list:LIST>
@@ -32,7 +32,7 @@
<tr>
<list:ITEM>
<td>{$name}</td>
- <list:separator every='4' literal></tr><tr></list:separator>
+ <list:separator every='4' literal='true'></tr><tr></list:separator>
</list:ITEM>
<list:FILL upto='4' var='count'>
<core:repeat value="{$count}"><td> </td></core:repeat>
@@ -49,15 +49,12 @@
<list:ITEM>
{$name}
<list:separator><br/></list:separator>
- <list:separator every='3' literal></td><td></list:separator>
+ <list:separator every='3' literal='true'></td><td></list:separator>
</list:ITEM>
</td>
</tr>
</table>
</list:LIST>
-<h2>The source file</h2>
-
-<core:include file='3/page.html' source="true"/>
</body>
</html>
Modified: 3.x/examples/wact/examples/tags/list/templates/4/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/list/templates/4/page.html 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/list/templates/4/page.html 2007-03-16 09:55:33 UTC (rev 5261)
@@ -15,8 +15,5 @@
<list:default><b>The list is empty!</b></list:default>
</list:LIST>
-<h2>The source file</h2>
-
-<core:include file='4/page.html' source="true"/>
</body>
</html>
Added: 3.x/examples/wact/examples/tags/pager/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/pager/desc.ini (rev 0)
+++ 3.x/examples/wact/examples/tags/pager/desc.ini 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,17 @@
+title=Pager tags examples
+
+[elipses]
+description=Pager with elipses example.
+php=pager_with_elipses.php
+0=templates/1/page.html
+
+[sections]
+description=Pager with sections example
+php=pager_with_sections.php
+0=templates/2/page.html
+
+[paginage]
+description=<paginate> tag example. This tag allows to link pager and list right in WACT template
+php=paginate_in_template.php
+0=templates/3/page.html
+
Modified: 3.x/examples/wact/examples/tags/pager/pager_with_elipses.php
===================================================================
--- 3.x/examples/wact/examples/tags/pager/pager_with_elipses.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/pager/pager_with_elipses.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$template = new WactTemplate('1/page.html');
include('data.inc.php');
Modified: 3.x/examples/wact/examples/tags/pager/pager_with_sections.php
===================================================================
--- 3.x/examples/wact/examples/tags/pager/pager_with_sections.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/pager/pager_with_sections.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -1,17 +1,17 @@
-<?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright Copyright © 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 wact
- */
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright Copyright © 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 wact
+ */
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$template = new WactTemplate('2/page.html');
include('data.inc.php');
Modified: 3.x/examples/wact/examples/tags/pager/paginate_in_template.php
===================================================================
--- 3.x/examples/wact/examples/tags/pager/paginate_in_template.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/examples/tags/pager/paginate_in_template.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -10,8 +10,8 @@
* @package wact
*/
-require 'limb/wact/common.inc.php';
-require 'limb/wact/src/WactTemplate.class.php';
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
$template = new WactTemplate('3/page.html');
include('data.inc.php');
Property changes on: 3.x/examples/wact/lib/limb
___________________________________________________________________
Name: svn:externals
- wact -r 5255 https://svn.limb-project.com/limb/3.x/limb/wact
+ wact -r 5260 https://svn.limb-project.com/limb/3.x/limb/wact
Added: 3.x/examples/wact/run.php
===================================================================
--- 3.x/examples/wact/run.php (rev 0)
+++ 3.x/examples/wact/run.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -0,0 +1,26 @@
+<?php
+// Crude.
+require './setup.php';
+
+function contains($str, $sub) {
+ return gettype(strpos($str, $sub)) == "integer";
+}
+
+if(!isset($_GET['file']))
+ die('file param is not set!');
+
+$file = $_GET['file'];
+
+if (contains($file, "..") || contains($file, "//") || (substr($file, 0, 1) == '/'))
+ exit;
+
+$filename = dirname(__FILE__) . '/examples/' . $file;
+
+if(!file_exists($filename))
+ exit;
+
+set_include_path(dirname($filename) . '/' . PATH_SEPARATOR .
+ get_include_path());
+
+include($filename);
+?>
Modified: 3.x/examples/wact/showsource.php
===================================================================
--- 3.x/examples/wact/showsource.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/showsource.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -6,6 +6,9 @@
return gettype(strpos($str, $sub)) == "integer";
}
+if(!isset($_GET['file']))
+ die('file param is not set!');
+
$file = $_GET['file'];
if (contains($file, "..") || contains($file, "//") || (substr($file, 0, 1) == '/'))
@@ -18,12 +21,10 @@
$filecontents = file_get_contents($filename);
-$filecontents = str_replace('wacky', '******', $filecontents);
-
$page = new WactTemplate('phpfile.html');
$page->set('Filename', $file);
-$highlighted_string = highlight_string(file_get_contents($filename));
+$highlighted_string = highlight_string(file_get_contents($filename), true);
$page->set('SourceCode', $highlighted_string);
$page->display();
Modified: 3.x/examples/wact/showtemplate.php
===================================================================
--- 3.x/examples/wact/showtemplate.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/showtemplate.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -11,6 +11,9 @@
return gettype(strpos($str, $sub)) == "integer";
}
+if(!isset($_GET['file']))
+ die('file param is not set!');
+
$file = $_GET['file'];
if (contains($file, "..") || contains($file, "//") || (substr($file, 0, 1) == '/')) {
Modified: 3.x/examples/wact/src/examples_utils.inc.php
===================================================================
--- 3.x/examples/wact/src/examples_utils.inc.php 2007-03-16 08:45:07 UTC (rev 5260)
+++ 3.x/examples/wact/src/examples_utils.inc.php 2007-03-16 09:55:33 UTC (rev 5261)
@@ -177,7 +177,7 @@
}
$newData['examples'][] = array('description' => $row['description'],
- 'exec' => $root . $row['php'],
+ 'exec' => "./run.php?file=$root{$row['php']}",
'php_file' => array('path' => "./showsource.php?file=$root{$row['php']}",
'file' => $row['php']),
'templates' => $srcfiles);
More information about the limb-svn
mailing list