Thread: [Pieforms-commit] SF.net SVN: pieforms: [238] pieforms-php5/trunk/doc/html
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2007-12-27 23:40:04
|
Revision: 238 http://pieforms.svn.sourceforge.net/pieforms/?rev=238&view=rev Author: oracleshinoda Date: 2007-12-27 15:40:09 -0800 (Thu, 27 Dec 2007) Log Message: ----------- HTML version of documentation updates. Modified Paths: -------------- pieforms-php5/trunk/doc/html/index.html pieforms-php5/trunk/doc/html/user/concepts.html pieforms-php5/trunk/doc/html/user/configuration.html pieforms-php5/trunk/doc/html/user/elements.html pieforms-php5/trunk/doc/html/user/examples.html pieforms-php5/trunk/doc/html/user/features.html pieforms-php5/trunk/doc/html/user/usage.html Added Paths: ----------- pieforms-php5/trunk/doc/html/user/templates.html Modified: pieforms-php5/trunk/doc/html/index.html =================================================================== --- pieforms-php5/trunk/doc/html/index.html 2007-12-27 23:39:31 UTC (rev 237) +++ pieforms-php5/trunk/doc/html/index.html 2007-12-27 23:40:09 UTC (rev 238) @@ -71,6 +71,8 @@ <li><a class="reference" href="user/elements.html">Elements</a> - General information about elements including a list of elements that come with Pieforms.</li> <li><a class="reference" href="user/renderers.html">Renderers</a></li> +<li><a class="reference" href="user/templates.html">Templates</a> - How templates can help you control the +layout of your forms, when you need extra control</li> <li><a class="reference" href="user/rules.html">Rules</a></li> <li><a class="reference" href="user/i18n.html">i18n</a></li> </ul> @@ -106,6 +108,6 @@ </div> <div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, -© 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> </body> </html> Modified: pieforms-php5/trunk/doc/html/user/concepts.html =================================================================== --- pieforms-php5/trunk/doc/html/user/concepts.html 2007-12-27 23:39:31 UTC (rev 237) +++ pieforms-php5/trunk/doc/html/user/concepts.html 2007-12-27 23:40:09 UTC (rev 238) @@ -28,32 +28,32 @@ <div class="contents topic"> <p class="topic-title first"><a id="contents" name="contents">Contents</a></p> <ul class="simple"> -<li><a class="reference" href="#background" id="id1" name="id1">Background</a></li> -<li><a class="reference" href="#concepts" id="id2" name="id2">Concepts</a><ul> -<li><a class="reference" href="#the-form-definition-hash" id="id3" name="id3">The form definition hash</a></li> -<li><a class="reference" href="#the-pieform-function-call" id="id4" name="id4">The <tt class="docutils literal"><span class="pre">pieform(...)</span></tt> function call</a></li> -<li><a class="reference" href="#the-testform-validate-function" id="id5" name="id5">The <tt class="docutils literal"><span class="pre">testform_validate</span></tt> function</a></li> -<li><a class="reference" href="#the-testform-submit-function" id="id6" name="id6">The <tt class="docutils literal"><span class="pre">testform_submit</span></tt> function</a></li> +<li><a class="reference" href="#background" id="id3" name="id3">Background</a></li> +<li><a class="reference" href="#concepts" id="id4" name="id4">Concepts</a><ul> +<li><a class="reference" href="#the-form-definition-hash" id="id5" name="id5">The form definition hash</a></li> +<li><a class="reference" href="#the-pieform-function-call" id="id6" name="id6">The <tt class="docutils literal"><span class="pre">pieform(...)</span></tt> function call</a></li> +<li><a class="reference" href="#the-testform-validate-function" id="id7" name="id7">The <tt class="docutils literal"><span class="pre">testform_validate</span></tt> function</a></li> +<li><a class="reference" href="#the-testform-submit-function" id="id8" name="id8">The <tt class="docutils literal"><span class="pre">testform_submit</span></tt> function</a></li> </ul> </li> -<li><a class="reference" href="#form-api-terms" id="id7" name="id7">Form API Terms</a><ul> -<li><a class="reference" href="#elements" id="id8" name="id8">Elements</a></li> -<li><a class="reference" href="#rules" id="id9" name="id9">Rules</a></li> -<li><a class="reference" href="#renderers" id="id10" name="id10">Renderers</a></li> +<li><a class="reference" href="#form-api-terms" id="id9" name="id9">Form API Terms</a><ul> +<li><a class="reference" href="#elements" id="id10" name="id10">Elements</a></li> +<li><a class="reference" href="#rules" id="id11" name="id11">Rules</a></li> +<li><a class="reference" href="#renderers" id="id12" name="id12">Renderers</a></li> +<li><a class="reference" href="#templates" id="id13" name="id13">Templates</a></li> </ul> </li> -<li><a class="reference" href="#how-they-fit-together" id="id11" name="id11">How They Fit Together</a></li> -<li><a class="reference" href="#other-features-of-pieforms" id="id12" name="id12">Other Features of Pieforms</a></li> +<li><a class="reference" href="#how-they-fit-together" id="id14" name="id14">How They Fit Together</a></li> +<li><a class="reference" href="#other-features-of-pieforms" id="id15" name="id15">Other Features of Pieforms</a></li> </ul> </div> <p>Pieforms is a development of the <a class="reference" href="http://mahara.org/">Mahara</a> project, that was later split out into its own project on <a class="reference" href="http://pieforms.sourceforge.net/">sourceforge</a>. It provides a unified way to create, validate -and process forms all with a common look and feel, with support for pluggable -elements, renderers and validation rules.</p> +and process forms, with an emphasis on flexibility and extensibility.</p> <p>What does that all mean? That's what this document is for - to describe the overall concepts and ideas behind Pieforms.</p> <div class="section"> -<h1><a class="toc-backref" href="#id1" id="background" name="background">Background</a></h1> +<h1><a class="toc-backref" href="#id3" id="background" name="background">Background</a></h1> <div class="note"> <p class="first admonition-title">Note</p> <p class="last">You can skip this section if you don't care for history lessons :)</p> @@ -84,10 +84,16 @@ that this little subproject had turned into a cool implementation of a form API, that was worth splitting out into its own project. And thus, Pieforms was born. The name was chosen as a tribute to a leaving team member, whose nick on -IRC was 'pie' :)</p> +IRC was 'pie' <a class="footnote-reference" href="#id2" id="id1" name="id1">[1]</a></p> +<table class="docutils footnote" frame="void" id="id2" rules="none"> +<colgroup><col class="label" /><col /></colgroup> +<tbody valign="top"> +<tr><td class="label"><a class="fn-backref" href="#id1" name="id2">[1]</a></td><td>Said co-worker has since returned to Catalyst IT :)</td></tr> +</tbody> +</table> </div> <div class="section"> -<h1><a class="toc-backref" href="#id2" id="concepts" name="concepts">Concepts</a></h1> +<h1><a class="toc-backref" href="#id4" id="concepts" name="concepts">Concepts</a></h1> <p>So, what is it that made Pieforms so easy to use and quick to build forms with? It is because from the outset the library was designed to build forms with as little work by the user as possible, instead of following a strict 'OO' @@ -155,23 +161,24 @@ <a href="http://www.php.net/exit"><span style="color:#a1a100;" title="php/php/keyword">exit</span></a><span style="color:#008000;" title="php/php/symbol">;</span> <span style="color:#008000;" title="php/php/symbol">}</span></pre><p>Here is a description of each part.</p> <div class="section"> -<h2><a class="toc-backref" href="#id3" id="the-form-definition-hash" name="the-form-definition-hash">The form definition hash</a></h2> +<h2><a class="toc-backref" href="#id5" id="the-form-definition-hash" name="the-form-definition-hash">The form definition hash</a></h2> <p>This array contains the definition of the form. In this example the form is hard coded, and that would be what you would do most of the time, but there's nothing to stop it from being generated dynamically. The array specifies some metadata for the whole form, like its name, method and action target, and then -a list of elements that are on the form. Evary form must have a name, this name -is used to call the callback functions.</p> +a list of elements that are on the form. Every form must have a name, used to +distinguish it from other forms so Pieforms can tell when the form itself has +been submitted.</p> <p>More information about the form array is available on a <a class="reference" href="usage.html">separate page</a>.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id4" id="the-pieform-function-call" name="the-pieform-function-call">The <tt class="docutils literal"><span class="pre">pieform(...)</span></tt> function call</a></h2> +<h2><a class="toc-backref" href="#id6" id="the-pieform-function-call" name="the-pieform-function-call">The <tt class="docutils literal"><span class="pre">pieform(...)</span></tt> function call</a></h2> <p>This call builds the form, validates and submits the form if it has been submitted, and returns the HTML for the form. So in the example above the form is simply <tt class="docutils literal"><span class="pre">echo</span></tt>'d to the browser, but it could easily be put into a <a class="reference" href="http://smarty.php.net/">Smarty</a> template variable or manipulated any way required.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id5" id="the-testform-validate-function" name="the-testform-validate-function">The <tt class="docutils literal"><span class="pre">testform_validate</span></tt> function</a></h2> +<h2><a class="toc-backref" href="#id7" id="the-testform-validate-function" name="the-testform-validate-function">The <tt class="docutils literal"><span class="pre">testform_validate</span></tt> function</a></h2> <p>This function is named after the form name, with <tt class="docutils literal"><span class="pre">_validate</span></tt> on the end. It takes the Pieform object and an array of the submitted values, and can perform whatever checks are required that cannot be otherwise handled by the inbuilt @@ -188,7 +195,7 @@ available, and it's easy to write your own.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id6" id="the-testform-submit-function" name="the-testform-submit-function">The <tt class="docutils literal"><span class="pre">testform_submit</span></tt> function</a></h2> +<h2><a class="toc-backref" href="#id8" id="the-testform-submit-function" name="the-testform-submit-function">The <tt class="docutils literal"><span class="pre">testform_submit</span></tt> function</a></h2> <p>This function is named after the form name, with <tt class="docutils literal"><span class="pre">_submit</span></tt> on the end. It takes an array of the submitted values that have already been validated successfully according to the validation rules set on the form. From here you @@ -211,10 +218,10 @@ </div> </div> <div class="section"> -<h1><a class="toc-backref" href="#id7" id="form-api-terms" name="form-api-terms">Form API Terms</a></h1> +<h1><a class="toc-backref" href="#id9" id="form-api-terms" name="form-api-terms">Form API Terms</a></h1> <p>Pieforms has several components, a basic description of each is given here.</p> <div class="section"> -<h2><a class="toc-backref" href="#id8" id="elements" name="elements">Elements</a></h2> +<h2><a class="toc-backref" href="#id10" id="elements" name="elements">Elements</a></h2> <p>Pieform <strong>elements</strong> are similar to the widgets you have in normal HTML forms, and in fact all HTML widgets have element implementations in Pieforms. However, Pieforms does not limit you to using just the standard HTML widgets - you can @@ -231,7 +238,7 @@ how to write your own, is available.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id9" id="rules" name="rules">Rules</a></h2> +<h2><a class="toc-backref" href="#id11" id="rules" name="rules">Rules</a></h2> <p>Rules are used to validate elements. Given the element's value, they check if the value matches a certain condition. There is a few simple rules implemented, such as <em>required</em>, <em>minlength</em> and <em>maxlength</em> etc., but again like elements @@ -243,7 +250,7 @@ available.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id10" id="renderers" name="renderers">Renderers</a></h2> +<h2><a class="toc-backref" href="#id12" id="renderers" name="renderers">Renderers</a></h2> <p>Renderers are used to output the containers that elements are rendered inside. For example, there is a "table" renderer which puts each element inside a table row, and a "div" renderer that puts them inside a <tt class="docutils literal"><span class="pre"><div></span></tt>. Like elements and @@ -257,17 +264,30 @@ <p>If all that was confusing, check out the <a class="reference" href="renderers.html">renderers</a> page for more information.</p> </div> +<div class="section"> +<h2><a class="toc-backref" href="#id13" id="templates" name="templates">Templates</a></h2> +<p>If renderers don't provide the flexibility you require when laying out a form, +you can instead write a template for it. These are simply PHP/HTML template +files, in which you can output the form in any layout you choose.</p> +<p>You might find that one or two renderers satisfy most of your form needs, and +that you write templates for the few forms in your application that you can't +lay out nicely using a renderer.</p> +<p>Combined with the limitless customisability of elements, this grants you the +holy grail - a consistent framework for form building that gives you <strong>complete +control</strong> over how your forms look.</p> +<p>Check out the <a class="reference" href="templates.html">template documentation</a> for more information.</p> </div> +</div> <div class="section"> -<h1><a class="toc-backref" href="#id11" id="how-they-fit-together" name="how-they-fit-together">How They Fit Together</a></h1> +<h1><a class="toc-backref" href="#id14" id="how-they-fit-together" name="how-they-fit-together">How They Fit Together</a></h1> <p>Here are some statements that might help you understand how a form is put together using Pieforms.</p> <p>A <strong>form</strong> is made up of <a class="reference" href="elements.html">elements</a>.</p> <p><strong>Elements</strong> are like standard HTML widgets, except they can be more complicated and comprised of many widgets if necessary.</p> <p>Elements are validated by <a class="reference" href="rules.html">rules</a>.</p> -<p>Each element in a form is rendered inside some boilerplate HTML provided by a -<a class="reference" href="renderers.html">renderer</a>.</p> +<p>When using a renderer, each element in a form is rendered inside some +boilerplate HTML provided by a <a class="reference" href="renderers.html">renderer</a>.</p> <p>When forms are <strong>submitted</strong>, they are <strong>validated</strong> using the <strong>rules</strong> for each <strong>element</strong>. If validation passes, the form <strong>submit callback</strong> is called with the values. If validation fails, the form is redisplayed, with the @@ -275,7 +295,7 @@ <strong>element</strong> next to it.</p> </div> <div class="section"> -<h1><a class="toc-backref" href="#id12" id="other-features-of-pieforms" name="other-features-of-pieforms">Other Features of Pieforms</a></h1> +<h1><a class="toc-backref" href="#id15" id="other-features-of-pieforms" name="other-features-of-pieforms">Other Features of Pieforms</a></h1> <p>As well as customisable elements, renderers and rules, Pieforms has the following features:</p> <ul class="simple"> @@ -284,7 +304,7 @@ available on both pages</li> <li>Support for <strong>cancel buttons</strong> - in effect, submit buttons with no validation applied to them</li> -<li><strong>Auto focus</strong> of fields in a form on page load, including focussing the +<li><strong>Auto focus</strong> of fields in a form on page load, including focusing the first element with an error if the form has failed validation</li> <li><a class="reference" href="usage.html#jsform">JS forms</a> - forms submitted to a hidden iframe with the result returned asynchronously, meaning the form behaves very @@ -297,6 +317,6 @@ </div> <div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, -© 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> </body> </html> Modified: pieforms-php5/trunk/doc/html/user/configuration.html =================================================================== --- pieforms-php5/trunk/doc/html/user/configuration.html 2007-12-27 23:39:31 UTC (rev 237) +++ pieforms-php5/trunk/doc/html/user/configuration.html 2007-12-27 23:40:09 UTC (rev 238) @@ -58,10 +58,11 @@ native JSON extension for PHP, so if you have that extension it is a bonus. PHP 5 >= 5.2 contains the JSON extension built in, so you do not need to worry if you are using a version above that.</li> -<li>The <tt class="docutils literal"><span class="pre">Base</span></tt>, <tt class="docutils literal"><span class="pre">Iter</span></tt>, <tt class="docutils literal"><span class="pre">Style</span></tt>, <tt class="docutils literal"><span class="pre">DOM</span></tt> and <tt class="docutils literal"><span class="pre">Async</span></tt> modules of <a class="reference" href="http://mochikit.com/">MochiKit</a>, greater than version 1.3.1. A packed version of -MochiKit containing just these modules is available for your convenience in the -<tt class="docutils literal"><span class="pre">static/core/MochiKit</span></tt> directory, however you can use your own MochiKit if -you require other modules.</li> +<li>The <tt class="docutils literal"><span class="pre">Base</span></tt>, <tt class="docutils literal"><span class="pre">Iter</span></tt>, <tt class="docutils literal"><span class="pre">Style</span></tt>, <tt class="docutils literal"><span class="pre">DOM</span></tt>, <tt class="docutils literal"><span class="pre">Async</span></tt> and <tt class="docutils literal"><span class="pre">Signal</span></tt> modules +of <a class="reference" href="http://mochikit.com/">MochiKit</a>, greater than version 1.3.1. A packed +version of MochiKit containing just these modules is available for your +convenience in the <tt class="docutils literal"><span class="pre">static/core/MochiKit</span></tt> directory, however you can use +your own MochiKit if you require other modules.</li> </ul> </div> <div class="section"> @@ -138,6 +139,9 @@ <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> ones.</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">configdirs</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">LIBDIR</span> <span style="color:#008000;" title="php/php5/symbol">.</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">form/</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> Look in this directory for your custom form templates</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">templatedir</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">LIBDIR</span> <span style="color:#008000;" title="php/php5/symbol">.</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">form/templates/</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> You can add elements that will be in all forms. Here's the prime</span> <span style="color:#888;font-style:italic;" title="php/php5/single_comment/start">//</span><span style="color:#888;font-style:italic;" title="php/php5/single_comment"> example of why you would want to...</span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">elements</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> @@ -193,6 +197,6 @@ </div> <div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, -© 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> </body> </html> Modified: pieforms-php5/trunk/doc/html/user/elements.html =================================================================== --- pieforms-php5/trunk/doc/html/user/elements.html 2007-12-27 23:39:31 UTC (rev 237) +++ pieforms-php5/trunk/doc/html/user/elements.html 2007-12-27 23:40:09 UTC (rev 238) @@ -146,12 +146,21 @@ <li>textarea</li> <li>text</li> </ul> -<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> » <a href="../">Documentation Home</a> » <a href="">Pieforms Elements</a></div></p> +<div class="system-message"> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">rst/user/elements.rst</tt>, line 110)</p> +<p>Unknown directive type "TODO".</p> +<pre class="literal-block"> +.. TODO:: Link to docs for the elements, generate the list programatically + +</pre> </div> +<p>Most of these elements correspond to basic HTML elements +<div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> » <a href="../">Documentation Home</a> » <a href="">Pieforms Elements</a></div></p> </div> </div> +</div> <div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, -© 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> </body> </html> Modified: pieforms-php5/trunk/doc/html/user/examples.html =================================================================== --- pieforms-php5/trunk/doc/html/user/examples.html 2007-12-27 23:39:31 UTC (rev 237) +++ pieforms-php5/trunk/doc/html/user/examples.html 2007-12-27 23:40:09 UTC (rev 238) @@ -31,6 +31,6 @@ </div> <div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, -© 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> </body> </html> Modified: pieforms-php5/trunk/doc/html/user/features.html =================================================================== --- pieforms-php5/trunk/doc/html/user/features.html 2007-12-27 23:39:31 UTC (rev 237) +++ pieforms-php5/trunk/doc/html/user/features.html 2007-12-27 23:40:09 UTC (rev 238) @@ -30,9 +30,10 @@ <ul class="simple"> <li><a class="reference" href="#simple-to-use-api" id="id1" name="id1">Simple To Use API</a></li> <li><a class="reference" href="#pluggable-and-extensable" id="id2" name="id2">Pluggable and Extensable</a></li> -<li><a class="reference" href="#asynchronous-forms" id="id3" name="id3">Asynchronous Forms</a></li> -<li><a class="reference" href="#full-internationalisation-i18n" id="id4" name="id4">Full Internationalisation (i18n)</a></li> -<li><a class="reference" href="#html-4-01-compliance" id="id5" name="id5">HTML 4.01 Compliance</a></li> +<li><a class="reference" href="#full-layout-control" id="id3" name="id3">Full Layout Control</a></li> +<li><a class="reference" href="#asynchronous-forms" id="id4" name="id4">Asynchronous Forms</a></li> +<li><a class="reference" href="#full-internationalisation-i18n" id="id5" name="id5">Full Internationalisation (i18n)</a></li> +<li><a class="reference" href="#html-4-01-compliance" id="id6" name="id6">HTML 4.01 Compliance</a></li> </ul> </div> <p>This document outlines the major features that Pieforms has, with a brief @@ -75,7 +76,19 @@ be included in the next release for everyone to enjoy.</p> </div> <div class="section"> -<h1><a class="toc-backref" href="#id3" id="asynchronous-forms" name="asynchronous-forms">Asynchronous Forms</a></h1> +<h1><a class="toc-backref" href="#id3" id="full-layout-control" name="full-layout-control">Full Layout Control</a></h1> +<p>Pieforms gives you two options for laying out forms. One - renderers - will +handle most common cases for forms in your application. If a form you are +writing doesn't need any special layout control, a renderer will be perfect. It +will allow you, without any effort, to guarantee that your forms are all layed +out consistently.</p> +<p>However, there comes a time when you need more advanced layout control. +Pieforms provides you the ability to write a template to describe how a form +should be layed out. Templates are simply PHP files with access to the form, so +you can get as fancy as you like with how the form elements are layed out.</p> +</div> +<div class="section"> +<h1><a class="toc-backref" href="#id4" id="asynchronous-forms" name="asynchronous-forms">Asynchronous Forms</a></h1> <p>By simply flipping a switch, you can turn your forms from being standard <tt class="docutils literal"><span class="pre">POST</span></tt> forms into snappy, responsive "Javascript Forms" (or JSForms as Pieforms knows them). Rather than doing a full <tt class="docutils literal"><span class="pre">POST</span></tt> every time the form is @@ -90,16 +103,16 @@ is successfully submitted.</p> </div> <div class="section"> -<h1><a class="toc-backref" href="#id4" id="full-internationalisation-i18n" name="full-internationalisation-i18n">Full Internationalisation (i18n)</a></h1> +<h1><a class="toc-backref" href="#id5" id="full-internationalisation-i18n" name="full-internationalisation-i18n">Full Internationalisation (i18n)</a></h1> <p>Though there is not a lot to translate, Pieforms has i18n support, so the rule messages can be in your native language if you need. Elements also support i18n where required - for example, the calendar element supports different -languages. Although the only supported language at the moment is "en.utf8", it -will take only around 10 minutes to add new languages. Ask on the mailing list -or in the forums!</p> +languages. Currently there are translations for English, German and French, and +creating a new translation will take only around 10 minutes to add new +languages. Ask on the mailing list or in the forums!</p> </div> <div class="section"> -<h1><a class="toc-backref" href="#id5" id="html-4-01-compliance" name="html-4-01-compliance">HTML 4.01 Compliance</a></h1> +<h1><a class="toc-backref" href="#id6" id="html-4-01-compliance" name="html-4-01-compliance">HTML 4.01 Compliance</a></h1> <p>Pieforms generates HTML 4.01 compatible output. It does not support XHTML at the moment, but the author reckons this will only take an hour of work, if you ask nicely :).</p> @@ -112,6 +125,6 @@ </div> <div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, -© 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> </body> </html> Added: pieforms-php5/trunk/doc/html/user/templates.html =================================================================== --- pieforms-php5/trunk/doc/html/user/templates.html (rev 0) +++ pieforms-php5/trunk/doc/html/user/templates.html 2007-12-27 23:40:09 UTC (rev 238) @@ -0,0 +1,310 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns=http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" /> +<title>Pieforms Elements</title> + +<link rel="stylesheet" type="text/css" href="../style.css" /> +</head> +<body> +<div class="document" id="pieforms-elements"> +<h1 class="title">Pieforms Elements</h1> +<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> » <a href="../">Documentation Home</a> » <a href="">Pieforms Templates</a></div></p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Author:</th><td class="field-body">Nigel McNie</td> +</tr> +<tr class="field"><th class="field-name">Contact:</th><td class="field-body"><a class="reference" href="mailto:nigel@catalyst.net.nz">nigel@catalyst.net.nz</a></td> +</tr> +<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">This document has been placed in the public domain</td> +</tr> +</tbody> +</table> +<div class="contents topic"> +<p class="topic-title first"><a id="contents" name="contents">Contents</a></p> +<ul class="simple"> +<li><a class="reference" href="#overview" id="id1" name="id1">Overview</a></li> +<li><a class="reference" href="#using-templates" id="id2" name="id2">Using Templates</a></li> +<li><a class="reference" href="#an-example-template" id="id3" name="id3">An Example Template</a><ul> +<li><a class="reference" href="#step-1-specify-template-configuration-elements" id="id4" name="id4">Step 1 - Specify Template Configuration Elements</a></li> +<li><a class="reference" href="#step-2-create-the-template" id="id5" name="id5">Step 2 - Create the Template</a></li> +<li><a class="reference" href="#step-3-customise-the-template-to-suit-your-needs" id="id6" name="id6">Step 3 - Customise the template to suit your needs</a></li> +</ul> +</li> +<li><a class="reference" href="#conclusion" id="id7" name="id7">Conclusion</a></li> +</ul> +</div> +<p>This document describes how you can lay out forms very precisely using +templates rather than renderers.</p> +<div class="section"> +<h1><a class="toc-backref" href="#id1" id="overview" name="overview">Overview</a></h1> +<p>Imagine you have a form that you need to lay out quite precisely, compared to a +typical form. Renderers assume that all elements will be layed out in a +consistent manner, which makes them quite limiting in this situation. So +instead, you can write a <strong>template</strong> for your form, that describes exactly how +you want the form layed out.</p> +</div> +<div class="section"> +<h1><a class="toc-backref" href="#id2" id="using-templates" name="using-templates">Using Templates</a></h1> +<p>There are two configuration elements you will be interested in if you are going +to use templates:</p> +<ul class="simple"> +<li>The <tt class="docutils literal"><span class="pre">templatedir</span></tt> specifies in what directory (relative to PHP's include +path) templates will be searched for. You probably want to set this in your +<tt class="docutils literal"><span class="pre">pieform_configure()</span></tt> function, so that you do not have to specify it for +every form.</li> +<li>The <tt class="docutils literal"><span class="pre">template</span></tt> configuration element sets what file is to be used as a +template for this form. Unless you have written a generic template that +applies to many forms in your application, you probably want to set this on +the form itself.</li> +</ul> +<p>Here is an example of setting the <tt class="docutils literal"><span class="pre">templatedir</span></tt> and <tt class="docutils literal"><span class="pre">template</span></tt> +configuration elements on a form:</p> +<pre style="background-color:#ffc;border:1px solid #cc9;"><span style="font-weight:bold;color:#000;" title="php/php5/start"><?php</span> + +<span style="color:#33f;" title="php/php5/varstart">$</span><span style="color:#33f;" title="php/php5/var">form</span> <span style="color:#008000;" title="php/php5/symbol">=</span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">name</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">myform</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">templatedir</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">templates/</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">template</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">myform.php</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">elements</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#008000;" title="php/php5/symbol">.</span><span style="color:#008000;" title="php/php5/symbol">.</span><span style="color:#008000;" title="php/php5/symbol">.</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> +<span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">;</span> + +<span style="font-weight:bold;color:#000;" title="php/php5/end">?></span></pre><p>In the above example, the <tt class="docutils literal"><span class="pre">templates/</span></tt> directory relative to PHP's include +path will be searched for the <tt class="docutils literal"><span class="pre">myform.php</span></tt> file.</p> +</div> +<div class="section"> +<h1><a class="toc-backref" href="#id3" id="an-example-template" name="an-example-template">An Example Template</a></h1> +<p>Let us assume that you have been tasked with laying out the blog post form you +created as an example on the <a class="reference" href="usage.html">basic usage</a> page in some +different manner. Feedback from your users suggests that they would like the +"Categories" multiple select to be to the right of the text area, and the +"Publish Date" selector to be to the right of the "Post Title" textbox.</p> +<p>This is not possible with a renderer, but with a template this is quite easy. +We will simply write a template that outputs the elements in the correct +places. Note that the existing form has a fieldset and the new form will not +have one. When you use a template, Pieforms actually <em>ignores</em> fieldsets +(although it keeps the elements inside them). So there is no need to change the +form definition. For your reference, here is the current form definition and a +screenshot of how the form is currently layed out:</p> +<pre style="background-color:#ffc;border:1px solid #cc9;"><span style="font-weight:bold;color:#000;" title="php/php5/start"><?php</span> + +<a href="http://www.php.net/require_once"><span style="color:#a1a100;" title="php/php5/keyword">require_once</span></a><span style="color:#008000;" title="php/php5/symbol">(</span><span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">pieform.php</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">;</span> + +<a href="http://www.php.net/echo"><span style="color:#a1a100;" title="php/php5/keyword">echo</span></a> <span style="color:#600;font-weight:bold;" title="php/php5/functioncall">pieform</span><span style="color:#008000;" title="php/php5/symbol">(</span><a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">name</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">blogpost</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">method</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">post</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">autofocus</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">elements</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">title</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">type</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">text</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">title</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Post Title</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">rules</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">required</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">content</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">type</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">textarea</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">title</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Content</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">rules</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">required</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">resizable</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">optional</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">type</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">fieldset</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">legend</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Advanced Options...</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">collapsible</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">collapsed</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">elements</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">categories</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">type</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">select</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">title</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Categories</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">multiple</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="font-weight:bold;color:#000;" title="php/php5/constant">true</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">size</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#11e;" title="php/php5/num/int">5</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">options</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#11e;" title="php/php5/num/int">1</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Personal</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#11e;" title="php/php5/num/int">2</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Rants</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#11e;" title="php/php5/num/int">3</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Politics</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#11e;" title="php/php5/num/int">4</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Religion</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#11e;" title="php/php5/num/int">5</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Science</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#11e;" title="php/php5/num/int">6</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Arts</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#008000;" title="php/php5/symbol">)</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">publishdate</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <a href="http://www.php.net/array"><span style="color:#a1a100;" title="php/php5/keyword">array</span></a><span style="color:#008000;" title="php/php5/symbol">(</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">type</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">date</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</span> + <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">title</span><span style="color:#f00;" title="php/php5/single_string/end">'</span> <span style="color:#008000;" title="php/php5/symbol">=</span><span style="color:#008000;" title="php/php5/symbol">></span> <span style="color:#f00;" title="php/php5/single_string/start">'</span><span style="color:#f00;" title="php/php5/single_string">Publish Date</span><span style="color:#f00;" title="php/php5/single_string/end">'</span><span style="color:#008000;" title="php/php5/symbol">,</sp... [truncated message content] |