[PHPTAL] Localization confusion

2012-10-14 Thread Tjerk Meesters
Hi, While putting my localization strings in place I discovered an interesting quirk that perhaps someone could explain. This is my construct: title tal:content=title|default i18n:translate=foo bar/title The idea is that a page can override the default page title by setting the title variable.

Re: [PHPTAL] Escaping ${} and $

2011-09-02 Thread Tjerk Meesters
Hi, Small typo, should be 'escape' instead of 'exscape' ;) On Sep 3, 2011 3:06 AM, Kornel Lesiński kor...@geekhood.net wrote: On Fri, 02 Sep 2011 09:59:51 +0100, Tarjei Huse tar...@scanmine.com wrote: Hi, I'm trying to include a JQuery template containing ${} into a PHPTal template. Is there

Re: [PHPTAL] [PATCH] Shouldn't skip over __get() just because __isset() was defined…

2011-06-26 Thread Tjerk Meesters
On Mon, Jun 27, 2011 at 6:36 AM, Terin Stock terinjo...@gmail.com wrote: I've been working with PHPTAL for quite some time, and have always been annoyed that from within the template an object's __get method was being ignored. I think I've tracked down the bug (in version 1.2.2, though it

Re: [PHPTAL] Extending namespace

2011-06-10 Thread Tjerk Meesters
Why not just have tal:content=nl2br: var Just define phptal_tales_nl2br() and voila :) On Jun 10, 2011 12:03 PM, Hisateru Tanaka tanakahisat...@gmail.com wrote: Hi, I'm trying to extend namespace of PHPTAL to use in my framework. 3 new attributes would introduced. pal:content-nl2br

Re: [PHPTAL] tal:equal ?!

2011-04-13 Thread Tjerk Meesters
For the and operation I've written a modifier that turns all its arguments into an array of booleans and then uses array_mult() to determine the outcome for tal:condition. array_sum could be used for the or-operation ;) On Apr 14, 2011 2:27 AM, Kornel Lesiński kor...@geekhood.net wrote: On Wed,

Re: [PHPTAL] There is no namespace declared error in v. 1.2.1

2011-01-13 Thread Tjerk Meesters
Hi, Just bumped into something similar. I'm using a so-called skeleton.html (a big macro starting with html and defining multiple slots for scripts, styles, content, popups, etc.). Let's say that I define xmlns:myns=http://example.org/myns; in the html of my skeleton.html and then one of my

Re: [PHPTAL] There is no namespace declared error in v. 1.2.1

2011-01-13 Thread Tjerk Meesters
On Jan 14, 2011 1:17 AM, Kornel Lesiński kor...@geekhood.net wrote: On Thu, 13 Jan 2011 10:22:52 -, Tjerk Meesters tjerk.meest...@gmail.com wrote: Here's the problem; it throw an error, saying that the myns namespace is not defined ... is that expected? Yes (if I understood correctly

Re: [PHPTAL] Re: Feature request: Allow array as parameter of PHPTAL's set() method

2010-11-22 Thread Tjerk Meesters
Alternatively you could allow overloading set() to accept an array as its only argument. On Nov 22, 2010 8:40 PM, Anton Andriyevskyy x.meg...@gmail.com wrote: Separate method is good idea, but the name *setAll *may be confusing, you may think that it will replace the ones that you have set

Re: AW: [PHPTAL] Minor feature request

2010-11-04 Thread Tjerk Meesters
Interestingly, that's what I ran into yesterday. Found out that while one version of phptal hides any content inside the empty condition, another (probably older) version would instead show it, causing a rather embarrassing few minutes ;) On Nov 4, 2010 4:49 PM, Per Bernhardt p...@webfactory.de

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Tjerk Meesters
Hi, Zend uses spl_autoload_register() as well I believe, so that should be safe. The main problem I can see is that if there's an existing __autoload() function, spl_autoload_register() will replace it (as stated in the manual). I don't think putting the autoloader in a separate file will make a

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Tjerk Meesters
2010/6/2 Kornel Lesiński kor...@aardvarkmedia.co.uk: On 02-06-2010 at 11:10:43 Robert Goldsmith rgoldsm...@names.co.uk wrote: Why would someone choose to replace PHPTAL's autoload with something else? (I'm not implying it's perfect or such, just wondering what problem would such option

Re: [PHPTAL] require_once vs autoloading

2010-06-01 Thread Tjerk Meesters
I could be wrong here, but I think it's not so much any problem with require_once as it is to reduce memory consumption while using the library. This happens when developers only use 30% of the library and yet the whole shebang is loaded on every request ;-) On Wed, Jun 2, 2010 at 5:20 AM,

Re: [PHPTAL] PHPTAL template for a calendar view?

2010-02-09 Thread Tjerk Meesters
Why not just use a client side calendar, such as those provided with jquery ui? On 09-Feb-2010, at 19:12, Marco Pivetta ocram...@gmail.com wrote: Didn't think about week days and weeks, sorry ^_^'' (Yeah, stupid mistake...) 2010/2/9 Kornel Lesinski kor...@aardvarkmedia.co.uk On 9 Feb

Re: [PHPTAL] i18n:translate and dynamic tal:content

2009-11-23 Thread Tjerk Meesters
Hi, What do you mean by all-whitespace translation keys? I hope that doesn't mean i18n:translate= will stop working, because we rely heavily on this feature ;-) On 11/23/09, Kornel Lesiński kor...@aardvarkmedia.co.uk wrote: On 22.11.2009, at 20:16, lo...@nic.fi wrote: I'v got a problem

Re: [PHPTAL] Advanced TALES

2009-11-18 Thread Tjerk Meesters
While I was looking at the pager example, I couldn't help but think this could be fixed by having a few helper classes for this; helper classes that would make your phptal code cleaner and abstract out certain typical tasks of a pager. The same could be said for the dropdown scenario. All in all,

Re: [PHPTAL] Advanced TALES

2009-11-17 Thread Tjerk Meesters
To maintain proper bc I would suggest another namespace, like ntales (new tales) The problem of modifier scope is difficult, unless you can introduce syntax like this: (php:foo()) + foo/bar Braces around the modifier code would define the scope, but this is still error prone if you decide to

Re: [PHPTAL] Escaping of dollar sign ($)

2009-10-27 Thread Tjerk Meesters
I vote for not changing the current behaviour; I agree that if it's documented, it can be a little weird ;-) Personally I would choose to have a money formatter TALES construct, because I hate having to go through my templates again when I start adding another currency for instance. Best,

Re: [PHPTAL] Conditions inside php:

2009-10-22 Thread Tjerk Meesters
Within php: context you should use option[0] instead to get the first element of the option array On 10/22/09, Kornel Lesiński kor...@aardvarkmedia.co.uk wrote: On 22-10-2009 at 14:09:42 Michael hosema...@poczta.onet.pl wrote: One more thing: My select statement: select name=id_country

Re: [PHPTAL] How do I access array keys?

2009-06-18 Thread Tjerk Meesters
Hmm we've seen this mistake being made a lot ;-) would it help if this was documented under, like, things to consider when using php: modifier? :) On 6/18/09, Kornel Lesiński kor...@aardvarkmedia.co.uk wrote: On 18-06-2009 at 15:42:14 Igor Sverkos igor.sverkos+php...@googlemail.com wrote: If

Re: [PHPTAL] Re: selected=

2009-06-15 Thread Tjerk Meesters
Hi, As Kornel mentioned, this is fixed in the repos and it can be made to work for older versions by using exists: isSelected instead of isSelected | nothing Hope that helps :) On 6/16/09, Igor Sverkos igor.sverkos+php...@googlemail.com wrote: Hi, Tjerk Meesters wrote: Hmm I don't think

Re: [PHPTAL] tal:repeat and php:

2009-05-24 Thread Tjerk Meesters
That's because you're using the php: construct; try tal:condition=php: box['nr'] 5 Though, usually - wherever I can - i insert the condition inside the list of elements I'm iterating over, so that I don't have to use php: Best, Tjerk On Sun, May 24, 2009 at 6:13 PM, Dominique Sandoz

Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Tjerk Meesters
On Mon, May 18, 2009 at 3:12 PM, Guillaume Lecanu guilla...@lya.fr wrote: Le dimanche 17 mai 2009 à 20:32 +0800, Tjerk Meesters a écrit : It would be much easier if you could just add tal: and metal: inside the %coreattrs definition ;-) Hi everybody, With the help of Tjerk Chris, I have

Re: [PHPTAL] Validation of XHTML

2009-05-15 Thread Tjerk Meesters
It would be much easier if you could just add tal: and metal: inside the %coreattrs definition ;-) On Sun, Apr 12, 2009 at 11:16 PM, php...@jakeman.plus.com wrote: To follow up my own posting, I've found it's possible to get the W3C validator to accept tal: and metal: attributes by using a

Re: [PHPTAL] PHPTAL 1.2.0 alpha

2009-04-29 Thread Tjerk Meesters
Guess the __DIR__ constant came a bit too late then ;-) On 4/29/09, Kornel Lesiński kor...@aardvarkmedia.co.uk wrote: On 29-04-2009 at 00:53:41 romtek rom...@gmail.com wrote: OK, I've given up on require() and changed it all to require_once(). Is there ever a reason to use require() to

Re: [PHPTAL] Template storage in database?

2009-04-22 Thread Tjerk Meesters
Use setSource() of the phptal class to load from a string that you fetch from your db On 4/23/09, Jason La jaso...@gmail.com wrote: Hi, Is possible to store templates in a database instead of the file system, and how would I go about doing that? Thanks, Jason === Jason La

Re: [PHPTAL] Dynamic defined slots

2009-02-06 Thread Tjerk Meesters
Wouldn't it make more sense to turn your define-slot's into use-macro instead? ;-) On 2/6/09, kaaposc kaap...@gmail.com wrote: Hello! Is there any way to define slots on the fly? Like this: tal:block repeat=item list metal:define-slot=sl_${item/name} / Currently looks like PHPTAL takes

[PHPTAL] phptal and reflection

2008-03-10 Thread Tjerk Meesters
Hi, After my recent recompilation of PHP, the logs were showing errors regarding the reflection classes; however, the documentation never states its dependency. Tip: make sure that the ./configure line doesn't include --disable-reflection during PHP installation. Best, Jack