Re: [PHPTAL] HTTP paths for templates

2008-01-08 Thread Kornel Lesinski
On Tue, 08 Jan 2008 13:22:05 -, Sean Hodges [EMAIL PROTECTED] wrote: I'm trying to parse templates from an HTTP path, are there any plans to include http:// path support to the template parser in PHPTAL? I'm not sure if that's desirable. PHPTAL templates can contain PHP code, so it's

Re: [PHPTAL] back to the dom parser idea

2008-01-14 Thread Kornel Lesinski
On Sun, 13 Jan 2008 20:40:28 -, Werner [EMAIL PROTECTED] wrote: Speaking of SVN... How does access to contribution's to the current PHPTAL svn work? Who's in charge of the repository at the moment? Technically Laurent is still in charge of the SVN repostiory. I have commit rights to

Re: [PHPTAL] back to the dom parser idea

2008-01-28 Thread Kornel Lesinski
There are issues with DOM itself: - it doesn't report line numbers for elements, so error messages (other than parse errors) can't include them. Not very user- friendly :( It does! Just need to disable libxml error reporting, so no warnings etc are generated, then pull the errors by hand.

Re: [PHPTAL] bug?

2008-03-19 Thread Kornel Lesinski
On 18 Mar 2008, at 22:32, Gosi wrote: i think there is a bug in PHPTAL.php at the executeMacro() method. the require_once at line 338 is missing. else { // call local macro require_once $this-getCodePath(); $fun = $this-getFunctionName() . '_' . trim($path); if

Re: [PHPTAL] automated documentation for templates?

2008-05-30 Thread Kornel Lesinski
On Thu, 29 May 2008 20:25:51 +0100, Jason - USL [EMAIL PROTECTED] wrote: For example, if my template designer creates something like tal:repeat=option options, my php developer would see a corresponding line in the documentation saying that the variable 'options' needs to be set, and it needs

Re: [PHPTAL] problem with proteced function

2008-05-30 Thread Kornel Lesinski
On Fri, 30 May 2008 13:20:38 +0100, anru chen [EMAIL PROTECTED] 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 tal:attributes=href config/webhost

Re: [PHPTAL] Re: PHPTAL Digest, Vol 39, Issue 13

2008-05-30 Thread Kornel Lesinski
On Fri, 30 May 2008 15:29:10 +0100, Patrick Burke [EMAIL PROTECTED] wrote: 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. Perhaps writing

Re: [PHPTAL] Re: developer of PHPTAL or not

2008-05-30 Thread Kornel Lesinski
On Fri, 30 May 2008 17:28:18 +0100, Iván -DrSlump- Montes [EMAIL PROTECTED] wrote: I've been trying to push for PHPTAL use in several projects in the last years but I haven't been very successful. I ended up writing my own version from scratch a couple of months ago, leveraging new PHP 5.3

Re: [PHPTAL] Multiple conditions

2008-05-30 Thread Kornel Lesinski
On Fri, 30 May 2008 17:59:58 +0100, Anton Andrievskij [EMAIL PROTECTED] wrote: PHPTAL rewrites code in php: expressions to use TAL variables, so it will work fine. Please can you explain a bit more about this? How it works? There's a simple PHP parser that modifies the code (see

Re: [PHPTAL] Prevent PHPTAL from converting HTML Chars

2008-06-11 Thread Kornel Lesinski
On Wed, 11 Jun 2008 09:44:43 +0100, Mathias Jacob [EMAIL PROTECTED] wrote: I'm new to PHPTAL and i'm very impressed of it. but one thing is a bit annoying ... For outputting HTML rather than text, use the 'structure' keyword: tal:block tal:content=structure header / -- regards, Kornel

Re: [PHPTAL] [bug]throw exception even if Context-__nothrow is true

2008-06-12 Thread Kornel Lesinski
On Thu, 12 Jun 2008 05:07:40 +0100, zou guangxian [EMAIL PROTECTED] wrote: After $tpl-getContext()-noThrow(true) was invoked Thanks for detailed report, but noThrow() isn't supposed to be used that way. getContext() method is only for use by macros and triggers and isn't supposed to be

Re: [PHPTAL] japanese translation in manual

2009-02-26 Thread Kornel Lesinski
I translated the manual into Japanese version. That's great, thank you! The Japanese always wants a Japanese translation :) If possible, link from official page? Of course! I'd even like to host it on PHPTAL's website alongside other translations,

Re: [PHPTAL] Process dynamically inserted content (feature request?)

2009-02-27 Thread Kornel Lesinski
On 27 Feb 2009, at 12:16, Moritz Baumann wrote: is there any way to make PHPTAL process dynamically inserted content? $phptal-setSource('html') lets you execute a template without a file. I want to use a »skeleton template« for my website which could look as follows: html head [...]

Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Kornel Lesinski
On 18 May 2009, at 11:05, Guillaume Lecanu wrote: Here is the final XHTML STRICT custom DTD for PHPTAL. Nothing is ever final :) You can probably trim it down significantly by only overriding values in XHTML DTD, and including XHTML DTD as an entity. Here's an example that adds Safari's

Re: [PHPTAL] Re: Cannot access $tpl-vars in PHP

2009-06-12 Thread Kornel Lesinski
On 11 Jun 2009, at 18:03, michal wrote: I have created automatic translation system. BTW: PHPTAL has support for custom translation solutions, see PHPTAL_TranslationService interface. And from the point of view of class that inherit translated words there is problem with loops inside

Re: [PHPTAL] Empty loops

2009-06-18 Thread Kornel Lesinski
On 17 Jun 2009, at 19:59, wrote: I find the following works well for me to provide a list of webpage titles with hyperlinks ul li tal:repeat=item titles a tal:content=item/title tal:attributes=href item/ hreftitle is missing/a /li

[PHPTAL] PHPTAL 1.2.0 to be released soon

2009-07-08 Thread Kornel Lesinski
I'm going to release 1.2.0 soon. I've created tool that can scan all PHPTAL templates and look for errors: 1. Install latest PHPTAL beta (or check it out from SVN) 2. Run from command line: php phptal_lint.php


2009-07-13 Thread Kornel Lesinski
On 13 Jul 2009, at 01:05, Wallace McGee wrote: 1) The xml parser stops completely if it finds a doubly defined attribute like class= and style=. Previously it would use just the last one defined. That is intended (XML requires it) and will not change. You have to fix syntax of your

Re: [PHPTAL] Fwd: stripping or escaping php code in templates

2009-08-10 Thread Kornel Lesinski
On 9 Aug 2009, at 23:01, Iván -DrSlump- Montes wrote: Have a look at PHP's tokenizer function token_get_all. It will give you a rock solid base for your filter since it uses the same parser used in the PHP engine. Actually it might not be that simple, because XML is parsed by PHPTAL and

Re: [PHPTAL] PHP newline consumption

2009-08-10 Thread Kornel Lesinski
On 7 Aug 2009, at 16:15, Richard Cernava wrote: A feature of PHP's is to consume a newline when it is following it's closing tag ( The reason I bring this up is because this issue affects PHPTAL's output. Take for example: tal:block

Re: [PHPTAL] Using IonCube

2009-08-12 Thread Kornel Lesinski
On 11 Aug 2009, at 18:09, Levi Stanley wrote: How are you automating your encoding process? I currently have IonCube, I wanted to know what are your ways of automating the encoding process, do you use a cron? Or do you just manually encode the template code that phptal generates? I don't

[PHPTAL] PHPTAL 1.2.1 beta (new define-slot)

2009-09-01 Thread Kornel Lesinski
I've changed the way slots work. Now instead of buffering and storing X[HT]ML output, slots store only callback function that generates the markup on demand. It should be beneficial in case where slot is used for main content of the page. There are many side-effects of this, e.g. code of

Re: [PHPTAL] Macros How-To

2009-09-08 Thread Kornel Lesinski
On 7 Sep 2009, at 18:16, Tobias Herp wrote: I had (and still have) some problems when trying to use a layout macro; when I added the metal:define-macro part to the root html element, no output was generated any more (no error message). Do you have metal:use-macro that triggers it? Do you

Re: [PHPTAL] Check if cached

2009-11-11 Thread Kornel Lesinski
On 11 Nov 2009, at 02:22, Andrew wrote: Hello i've got a question and suggestion... I am using CodeIgniter framework with PHPTAL and it works great, but there is little problem with caching. I cant get a nice preformance boost because i can't figure out how to check if template region was

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

2009-11-23 Thread Kornel Lesinski
On 23 Nov 2009, at 16:07, Tjerk Meesters wrote: 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 ;-) This will work: x i18n:translate=keyname/x These will not: x i18n:translate= /x x

Re: [PHPTAL] A Tale returning a string with several expressions

2009-12-02 Thread Kornel Lesinski
On 1 Dec 2009, at 23:46, spaze wrote: Is there anything I'm missing or do I need to refactor my stuff to be able to work just as one expression (e.g. Foo::canHaz()- bar('waldo')-gimmeQuux())? Yes, you should refactor it. Your code should return string to output, allowing PHPTAL to escape

Re: [PHPTAL] LGPL and commercial licence

2009-12-02 Thread Kornel Lesinski
On 2 Dec 2009, at 16:16, wrote: I am not deep in licences. Does LGPL allows me to use PHPTAL in commrecial software which will be selled to customers.( internet shop)? Yes. LGPL doesn't infect other software. Your commercial software can remain closed. Template

Re: [PHPTAL] Support for PHP 5.3 closures

2009-12-23 Thread Kornel Lesinski
On 23 Dec 2009, at 18:27, Iván Montes wrote: I fail to see why checking for closures makes variable access much slower. As far as I remember, interpolated variable paths are compiled to use the $ctx-path() method, and it already does quite a few type checking logic already. Checking for

Re: [PHPTAL] i18n plural forms

2010-01-08 Thread Kornel Lesinski
On 8 Jan 2010, at 17:21, Marcin Głowacki wrote: Thanks for your advice @phptal plural forms. It is working but i stuck on other problem - how to add plural translation in a tal variable? for example: div i18n:translate=structure session/message/ and session/message for $n = 5 looks like:

Re: [PHPTAL] How to disabe ${php: XXXX} forced echo?

2010-01-12 Thread Kornel Lesinski
On 11 Jan 2010, at 21:07, wrote: Is there anyway to prevent PHPTAL from automatically echoing the result of ${php: }? There's no explicit way to do it. You could wrap call in function that returns nothing (e.g. substr(,0,0)). I have

Re: [PHPTAL] How to disabe ${php: XXXX} forced echo?

2010-01-12 Thread Kornel Lesinski
On 12 Jan 2010, at 16:02, wrote: Thanks for the advice. I'd prefer to go with method #1 because that is how I was previously rendering templates with Zend_View. The echo issue still remains, however. If I use ${dojo().onLoadCaptureEnd()} then I get random 1 outputs

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

2010-02-09 Thread Kornel Lesinski
On 9 Feb 2010, at 11:00, Marco Pivetta wrote: Isn't it simpler to build it with an ol and just some CSS? Table layout is not that good for calendars to me :\ table is, semantically, the best choice for a calendar. You have logical columns with days of week and logical rows with weeks. A

Re: [PHPTAL] tal:attributes question - reducing this statement

2010-03-22 Thread Kornel Lesinski
On 20 Mar 2010, at 04:35, romtek wrote: function phptal_tales_erorrclass($fieldname, $nothrow) { return phptal_tales('true:error/'.$fieldname, $nothrow). ? 'error' : NULL; } label class=${errorclass:first_name} labelbox I've noticed true: there. Is true one of PHPTALES? (It's not