[giapeto] FastTemplate compatibility. (amended)
Kyrian (List)
kyrian-list at ore.org
Wed Jan 28 06:34:37 PST 2004
scratch that. ignore the bit about define() and don't patch it in. I've done it wrong.
The flag for compatible templates is fine though.
K.
> Message: 1
> Date: Mon, 13 Oct 2003 00:03:06 -0400
> From: Chuck Hagenbuch <chuck at horde.org>
> Subject: Re: [giapeto] Re: giapeto Digest, Vol 19, Issue 1
> To: giapeto at lists.horde.org
> Message-ID: <1066017786.1b5u1jq4ddz4 at marina.horde.org>
> Content-Type: text/plain; charset="ISO-8859-1"
>
> Quoting Kyrian <kyrian-list at orenet.co.uk>:
>
> > Although, it would be a pretty killer feature to have a
> > "fasttemplate compatibility mode" incorporated (which could default
> > to off, and be set/disabled with a class function), as that
> > potentially could easily bring a hell of a lot more of a userbase to
> > Giapeto ;-)
>
> You should just have to modify getTag() and getTags() in
> Horde_Template, and should be able to make this mode settable via a
> setOption() call easily.
>
I've attached a (trivial) patch that should allow a
"compat_fasttemplate" option to be set, in order to have basic
template compatibility, and it also implements a define() method a-la
FastTemplate.
By "basic" I mean that straight tags are compatible. FastTemplate has
this odd "dynamic block" feature, which is sort of sub-templates, which
it won't cover, but never mind, it's a start :)
It "seems to work"(tm) for my client, so do with it what you will.
Although I suppose for more full compatibility, we'd need to have a set
of mirror functions for all the FastTemplate ones, as per this google
cache thing (the only way you can get the FastTemplate docs!)
http://216.239.59.104/search?q=cache:AuvAhDRrHNQJ:www.thewebmasters.net/php/FastTemplate.phtml+class.FastTemplate+php&hl=en&ie=UTF-8
However there are some namespace and other code clashes which look like
they will render this impossible, although just having a compatibility
mode for the template style, and the "define()" method of FastTemplate
will enable most of its functionality in Giapeto/Horde_Template, or at
least enable easier migration.
K.
--
Kev Green, aka Kyrian. E: kyrian@ore.org WWW: http://kyrian.ore.org/
ISP/Perl/PHP/Linux/Security Contractor, via http://www.orenet.co.uk/
More information about the giapeto
mailing list