[PHPTAL] Re: developer of PHPTAL or not

Patrick Burke hewdaily at gmail.com
Fri May 30 17:33:35 CEST 2008


Anton, yes I am a developer of PHPTAL but I'm not on the PHTPAL
developer list.  My modifications have been specific to the company I
was implementing it for but I've made more general modifications along
the way, like some memcached/compiled templates trickery I used at the
last place I did a gig for, and I'm ready to make a formal
contribution so the PHPTAL Developers can tell me what's up/what they
think.  But even if my own contributions get shot down I'd like to see
development of PHPTAL geared towards the people I have to pitch to:
CTOs, IT Managers, Directors/Producers of Internet Programming, etc.
Just for a while anyways, just until there's undeniable awareness of
PHPTAL in that segment of IT personnel.  I think it's only a matter of
adding and promoting a few more "enterprise" features to the project
(I really, reeeeally hate that "enterprise" term but...you probably
know what I mean when I say it so that's why I'm using it).

I've probably got another couple of months before I get up to speed on
the latest version of PHPTAL and then implement the memcached thingy I
did.  Hopefully I'm an "official" PHPTAL developer at that point.

But do you get what I'm saying about the direction of development in
the short term?  It's just that I know too many CTO types that have
actually heard of Smarty but are baffled by this new-fangled PHPTAL
stuff, and they aren't even keen on hearing about it until I start
sneaking in comments like, "See, that problem just simply doesn't ever
happen when you use PHPTAL", or "We wouldn't worry about that
bottleneck if we had something like PHPTAL's system".

Know what I mean?

Hew

On Fri, May 30, 2008 at 10:48 AM,  <phptal-request at lists.motion-twin.com> wrote:
> Send PHPTAL mailing list submissions to
>        phptal at lists.motion-twin.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.motion-twin.com/mailman/listinfo/phptal
> or, via email, send a message with subject or body 'help' to
>        phptal-request at lists.motion-twin.com
>
> You can reach the person managing the list at
>        phptal-owner at lists.motion-twin.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PHPTAL digest..."
>
>
> Today's Topics:
>
>   1. Re: Lower than as char in javascript (Christian Welzel)
>   2. Re: Lower than as char in javascript (Kornel Lesinski)
>   3. problem with proteced function (anru chen)
>   4. Re: problem with proteced function (Kornel Lesinski)
>   5. Re: PHPTAL Digest, Vol 39, Issue 13 (Patrick Burke)
>   6. Re: Re: PHPTAL Digest, Vol 39, Issue 13 (Anton Andrievskij)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 30 May 2008 12:12:04 +0200
> From: Christian Welzel <gawain at camlann.de>
> Subject: Re: [PHPTAL] Lower than as char in javascript
> To: Guillaume Lecanu <Guillaume at lya.fr>
> Cc: Template Attribute Language for PHP <phptal at lists.motion-twin.com>
> Message-ID: <483FD2F4.7030808 at camlann.de>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Guillaume Lecanu schrieb:
>
>> Is your JavaScript is between a CDATA block ?
>
> This does not work, because we want to use some phptal stuff in the
> js code section to generate parts of the code.
> As soon as i add CDATA, i get errors like this one: "Unable to find path plane"
>
> An example of our js code section:
>
> <span tal:omit-tag="" tal:repeat="plane plane_values">
> p_speed[${repeat/plane/index}] = ${plane/speed};
> p_capacity[${repeat/plane/index}] = ${plane/capacity};
> </span>
>
> This doesnt seem to work anymore when CDATA is added.
>
>> And it's also a good idea to put JS code in an external file like that :
>> <script type="text/javascript" src="code.js"></script>
>
> This is not possible, as we have to generate the js code per page request.
>
> --
> MfG, Christian Welzel
>
>   GPG-Key:     http://www.camlann.de/key.asc
>   Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 30 May 2008 12:33:11 +0100
> From: "Kornel Lesinski" <kornel at aardvarkmedia.co.uk>
> Subject: Re: [PHPTAL] Lower than as char in javascript
> To: "Template Attribute Language for PHP"
>        <phptal at lists.motion-twin.com>
> Message-ID: <op.ubys1lbl8xvji6 at g25.local>
> Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
>
> On Fri, 30 May 2008 11:12:04 +0100, Christian Welzel <gawain at camlann.de>
> wrote:
>
>>> Is your JavaScript is between a CDATA block ?
>>
>> This does not work, because we want to use some phptal stuff in the
>> js code section to generate parts of the code.
>> As soon as i add CDATA, i get errors like this one: "Unable to find path
>> plane"
>>
>> An example of our js code section:
>>
>> <span tal:omit-tag="" tal:repeat="plane plane_values">
>> p_speed[${repeat/plane/index}] = ${plane/speed};
>> p_capacity[${repeat/plane/index}] = ${plane/capacity};
>> </span>
>
> You could reorganize data a bit and simplify generation of the array:
>
> p_speed = ${php:json_encode(plane_speeds)}
> p_capacity = ${php:json_encode(plane_capacities)}
>
> (despite what the name suggests, json_encode isn't limited to JS objects
> and handles generation of whole arrays, strings and ints very well).
>
> If you need HTML-compatible JS block with loop in it, you'll have to use
> multiple CDATA blocks this way:
>
> <tal:block tal:repeat="plane plane_values">
> /*<![CDATA[*/ code /*]]>*/
> </tal:block>
>
> --
> regards, Kornel
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 31 May 2008 00:20:38 +1200
> From: "anru chen" <ctx2002 at gmail.com>
> Subject: [PHPTAL] problem with proteced function
> To: phptal at lists.motion-twin.com
> Message-ID:
>        <9bb664980805300520h7e00194k5520f86a39b985a4 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi :
>
> I have searched achieves , but did not find any topics related to this problem.
>
> I am use zend framework, PHPTal as my template engine.
>
> function phptal_path($base, $path, $nothrow=false) in class PHPTAL_Context uses
> "method_exists" to check if a method exists in a object or not.
>
> for example:
>
>  // look for isset (priority over __get)
>            if (method_exists($base, '__isset')){
>                if ($base->__isset($current)){
>                    $base = $base->$current;
>                    continue;
>                }
>            }
>            // ask __get and discard if it returns null
>            else if (method_exists($base, '__get')){
>                $tmp = $base->$current;
>                if (NULL !== $tmp){
>                    $base = $tmp;
>                    continue;
>                }
>            }
> above code is copied from PHPTAL_Context.
> if that __isset is a protected function , then
> PHP throws a fatal error since method_exists does not check method's visibility.
>
> zend framework has a Zend_Config class, in that class, __isset is a
> protected function.
> so if i am pass a Zend_Config object to PHPTal, and try to do some thing like
> <a href="www.foo.com" tal:attributes="href config/webhost" >here</a>
>
> PHP throws this error:
> Fatal error: Call to protected method Zend_Config::__isset() from
> context '' in e:\php\PEAR\PHPTAL\Context.php on line 269.
>
> regards.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 30 May 2008 13:38:27 +0100
> From: "Kornel Lesinski" <kornel at aardvarkmedia.co.uk>
> Subject: Re: [PHPTAL] problem with proteced function
> To: "Template Attribute Language for PHP"
>        <phptal at lists.motion-twin.com>
> Message-ID: <op.ubyv2dtx8xvji6 at g25.local>
> Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
>
> On Fri, 30 May 2008 13:20:38 +0100, anru chen <ctx2002 at gmail.com> wrote:
>
>
>> zend framework has a Zend_Config class, in that class, __isset is a
>> protected function.
>> so if i am pass a Zend_Config object to PHPTal, and try to do some thing
>> like <a href="www.foo.com" tal:attributes="href config/webhost" >here</a>
>>
>> PHP throws this error:
>> Fatal error: Call to protected method Zend_Config::__isset() from
>> context '' in e:\php\PEAR\PHPTAL\Context.php on line 269.
>
> I've replaced method_exists with is_callable and this should solve the
> problem. Please try the SVN version:
>
> svn co https://svn.motion-twin.com/phptal/trunk/classes phptal
>
> --
> regards, Kornel
>
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 30 May 2008 10:29:10 -0400
> From: "Patrick Burke" <hewdaily at gmail.com>
> Subject: [PHPTAL] Re: PHPTAL Digest, Vol 39, Issue 13
> To: phptal at lists.motion-twin.com
> Message-ID:
>        <63d416700805300729s65ae94a2gde57ec80611df88b at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I love PHPTAL, and the self documentation thread going on is a very
> interesting idea.  The requirement that brought up self-documentation
> seems like a development environment issue though,  The development
> environment issue seems odd to me because I would think that the core
> variables needed would be made available by Development.  If Design
> needs some variables that Devel needs to know about then a simple
> intermediate layer would let Design do their own
> $template_obj->set('thevar', thevalue);  But if the code is nicely
> segmented then some designated member of Design should be able to add
> to the PHP code that is loading the template directly (ideally, anyone
> on Design if the code is locked down and versioned).
>
> I'm not poo-poo'ing the self-documentation idea, I'm just sick of
> Smarty and I know PHPTAL can become the de facto PHP standard if
> development of PHPTAL, in the short term, were geared more towards
> marketing bullet points that can be proudly displayed on a big, pretty
> banner on a web page.  So I'd like to see some awesome effort (yes,
> I'm talking to myself as well) towards things like memcached
> integration, Eclipse/editor plugins, get reeeeally slick with the
> trigger and format systems, and even a geeky effort to do an extended
> promotional push (yes, I'm mentioning a "project" that doesn't
> necessarily involve coding) because, admit it, PHPTAL was "there" at
> 1.18 so it's ready to get a little promotion and that means people
> coordinating a push.
>
> I'm seeing PHPTAL at a tipping point.  I wasn't able to get PHPTAL
> into many environments in the last couple years because big, fat, ugly
> Smarty was sitting in the templates directories already.  PHPTAL has
> awesome core features, is better than "fast enough", and has a great
> lookin' future so it's not hard to pitch it when I can get a chance to
> list off the coolness of it.  I, and others, will get more of a chance
> to pitch it if there were just a few more......I hate to say this
> but......enterprise features that make it more known about to higher
> level Development leads.  It's true though.
>
> Hew
>
> On Fri, May 30, 2008 at 6:00 AM,  <phptal-request at lists.motion-twin.com> wrote:
>> Send PHPTAL mailing list submissions to
>>        phptal at lists.motion-twin.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>        http://lists.motion-twin.com/mailman/listinfo/phptal
>> or, via email, send a message with subject or body 'help' to
>>        phptal-request at lists.motion-twin.com
>>
>> You can reach the person managing the list at
>>        phptal-owner at lists.motion-twin.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of PHPTAL digest..."
>>
>>
>> Today's Topics:
>>
>>   1. Re: automated documentation for templates? (Kornel Lesinski)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 30 May 2008 10:32:04 +0100
>> From: "Kornel Lesinski" <kornel at aardvarkmedia.co.uk>
>> Subject: Re: [PHPTAL] automated documentation for templates?
>> To: "Template Attribute Language for PHP"
>>        <phptal at lists.motion-twin.com>
>> Message-ID: <op.ubynfqek8xvji6 at g25.local>
>> Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
>>
>> On Fri, 30 May 2008 10:19:18 +0100, Iván -DrSlump- Montes
>> <drslump at pollinimini.net> wrote:
>>
>>> With something like this the comment won't show up
>>>
>>> <tal:comment tal:replace="null"><!--
>>>   Comment: Here is a comment which won't show up in the generated HTML
>>> --></tal:comment>
>>
>> any element can have tal:comment attribute.
>>
>> <li tal:comment="won't be in HTML" />
>>
>> and it's possible to register your own attribute or namespace in PHPTAL,
>> so you could have
>>
>> <li my:documentation="..." />
>>
>> --
>> regards, Kornel
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> PHPTAL mailing list
>> PHPTAL at lists.motion-twin.com
>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>
>>
>> End of PHPTAL Digest, Vol 39, Issue 13
>> **************************************
>>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 30 May 2008 17:48:17 +0300
> From: "Anton Andrievskij" <x.meglio at gmail.com>
> Subject: Re: [PHPTAL] Re: PHPTAL Digest, Vol 39, Issue 13
> To: "Template Attribute Language for PHP"
>        <phptal at lists.motion-twin.com>
> Message-ID:
>        <1154274a0805300748o46b9ce6ei9415aef57c5b1967 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Patrick, are you developer of PHPTAL or not?
>
> Anton
>
> On Fri, May 30, 2008 at 5:29 PM, Patrick Burke <hewdaily at gmail.com> wrote:
>
>> I love PHPTAL, and the self documentation thread going on is a very
>> interesting idea.  The requirement that brought up self-documentation
>> seems like a development environment issue though,  The development
>> environment issue seems odd to me because I would think that the core
>> variables needed would be made available by Development.  If Design
>> needs some variables that Devel needs to know about then a simple
>> intermediate layer would let Design do their own
>> $template_obj->set('thevar', thevalue);  But if the code is nicely
>> segmented then some designated member of Design should be able to add
>> to the PHP code that is loading the template directly (ideally, anyone
>> on Design if the code is locked down and versioned).
>>
>> I'm not poo-poo'ing the self-documentation idea, I'm just sick of
>> Smarty and I know PHPTAL can become the de facto PHP standard if
>> development of PHPTAL, in the short term, were geared more towards
>> marketing bullet points that can be proudly displayed on a big, pretty
>> banner on a web page.  So I'd like to see some awesome effort (yes,
>> I'm talking to myself as well) towards things like memcached
>> integration, Eclipse/editor plugins, get reeeeally slick with the
>> trigger and format systems, and even a geeky effort to do an extended
>> promotional push (yes, I'm mentioning a "project" that doesn't
>> necessarily involve coding) because, admit it, PHPTAL was "there" at
>> 1.18 so it's ready to get a little promotion and that means people
>> coordinating a push.
>>
>> I'm seeing PHPTAL at a tipping point.  I wasn't able to get PHPTAL
>> into many environments in the last couple years because big, fat, ugly
>> Smarty was sitting in the templates directories already.  PHPTAL has
>> awesome core features, is better than "fast enough", and has a great
>> lookin' future so it's not hard to pitch it when I can get a chance to
>> list off the coolness of it.  I, and others, will get more of a chance
>> to pitch it if there were just a few more......I hate to say this
>> but......enterprise features that make it more known about to higher
>> level Development leads.  It's true though.
>>
>> Hew
>>
>> On Fri, May 30, 2008 at 6:00 AM,  <phptal-request at lists.motion-twin.com>
>> wrote:
>> > Send PHPTAL mailing list submissions to
>> >        phptal at lists.motion-twin.com
>> >
>> > To subscribe or unsubscribe via the World Wide Web, visit
>> >        http://lists.motion-twin.com/mailman/listinfo/phptal
>> > or, via email, send a message with subject or body 'help' to
>> >        phptal-request at lists.motion-twin.com
>> >
>> > You can reach the person managing the list at
>> >        phptal-owner at lists.motion-twin.com
>> >
>> > When replying, please edit your Subject line so it is more specific
>> > than "Re: Contents of PHPTAL digest..."
>> >
>> >
>> > Today's Topics:
>> >
>> >   1. Re: automated documentation for templates? (Kornel Lesinski)
>> >
>> >
>> > ----------------------------------------------------------------------
>> >
>> > Message: 1
>> > Date: Fri, 30 May 2008 10:32:04 +0100
>> > From: "Kornel Lesinski" <kornel at aardvarkmedia.co.uk>
>> > Subject: Re: [PHPTAL] automated documentation for templates?
>> > To: "Template Attribute Language for PHP"
>> >        <phptal at lists.motion-twin.com>
>> > Message-ID: <op.ubynfqek8xvji6 at g25.local>
>> > Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
>> >
>> > On Fri, 30 May 2008 10:19:18 +0100, Iván -DrSlump- Montes
>> > <drslump at pollinimini.net> wrote:
>> >
>> >> With something like this the comment won't show up
>> >>
>> >> <tal:comment tal:replace="null"><!--
>> >>   Comment: Here is a comment which won't show up in the generated HTML
>> >> --></tal:comment>
>> >
>> > any element can have tal:comment attribute.
>> >
>> > <li tal:comment="won't be in HTML" />
>> >
>> > and it's possible to register your own attribute or namespace in PHPTAL,
>> > so you could have
>> >
>> > <li my:documentation="..." />
>> >
>> > --
>> > regards, Kornel
>> >
>> >
>> >
>> > ------------------------------
>> >
>> > _______________________________________________
>> > PHPTAL mailing list
>> > PHPTAL at lists.motion-twin.com
>> > http://lists.motion-twin.com/mailman/listinfo/phptal
>> >
>> >
>> > End of PHPTAL Digest, Vol 39, Issue 13
>> > **************************************
>> >
>>
>> _______________________________________________
>> PHPTAL mailing list
>> PHPTAL at lists.motion-twin.com
>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20080530/70e06351/attachment.htm
>
> ------------------------------
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
> End of PHPTAL Digest, Vol 39, Issue 14
> **************************************
>



More information about the PHPTAL mailing list