Re: Quickform group rules

Alain Williams <[email protected]> Wed, 18 Nov 2009 00:38:33 +0000
Newsgroups gmane.comp.php.pear.general,gmane.comp.php.smarty.devel
Organization Parliament Hill Computers Ltd
Message-ID <[email protected]>
On Fri, Nov 13, 2009 at 04:09:33PM +0000, Alain Williams wrote:

> I am writing an renderer for Smarty - I have taken the array renderer and am modifying/butchering/... it.
> I am aiming to product an array (which is what Smarty wants) that is compatible with current
> Smarty templates -- ie you are going to need to change the PHP, but hopefully will
> not have to change the templates.

Please find attached some new files that implement the above: a smarty renderer for QuickForm2

* Renderer.php
  Modified to know about the smarty renderer.
  Accept a new option 'old_compat' - this causes the smarty renderer to do somethings
  that might not be wanted if you were starting from new. The point is that it allows
  existing smarty templates to be used without change.

* Smarty.php
  This implements a renderer. It works - at least in the way that I use QuickForm.
  There are some things not implemented, I prob did not understand how to do it
  with QuickForm.
  There are some comments saying what the returned array contains.

This was developed under PHP 5.3 on Linux.

To see how this plugs together see a tutorial set that I have at:

	http://www.phcomp.co.uk/TechTutorial/QfSmarty/index.php

(This runs the QuickForm and NOT the QuickForm2 version, but the output
is the same).

All feedback gratefully accepted.

This is cross posted to both the PEAR-GENERAL and the SMARTY-DEV
mail lists since it is relevant to both.

Have fun!

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
Past chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>

-- 
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php