Re: [PHPTAL] Variable interpolation inside structure'd expression

2013-05-30 Thread Robert Goldsmith
Hello :) I'm not sure I understand your problem but for the href you should prob. do something like: some text Robert - Robert Goldsmith rgoldsm...@names.co.uk On 30 May 2013, at 05:21, romtek wrote: > Hi, > > I need help with something... I have the following

Re: [PHPTAL] How to add customized namespace-attribute out of the Phptal repository

2012-09-25 Thread Robert Goldsmith
things simple and require the class manually as long as you do so before the point you call 'PHPTAL_Dom_Defs::getInstance()->registerNamespace(new MyNewNS());' Robert - Robert Goldsmith rgoldsm...@names.co.uk > I've added my own namespace using: > PHPT

Re: [PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
ar. We want to modify the live environment so that the only php allowed to execute is within a signed Phar in order to add a strong new layer to our site security. Robert - Robert Goldsmith rgoldsm...@names.co.uk On 15 Aug 2012, at 17:11, Kornel Lesi??ski wrote: > I don't understand

Re: [PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
suggest as a future enhancement that an additional method be added to the Source interface that compliments 'getRealPath()' specifically for use in generating the hash so the Source classes can be subclassed instead of the PHPTAL class? Robert - Robert Goldsmith rgoldsm...@names.co.u

Re: [PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
protected: getPreFiltersCacheId() getPreFilterInstances() setCodeFile() getFunctionNamePrefix() Is there a specific reason for this or is it just historical? Obviously it is much harder to subclass a class with private methods. Robert ----- Robert Goldsmith rgoldsm...@n

[PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
n move the templates (put them in a phar and drop them on a different server) this isn't going to work. Has anyone attempted to change the way the template name hashes are calculated before and can they give me some pointers as to the way to go about doing it? Robert - Robert Go

Re: [PHPTAL] PHP content in templates

2012-05-21 Thread Robert Goldsmith
pre-filter that allows me to see what code hasn't been > changed. > > On Fri, May 18, 2012 at 9:16 AM, Robert Goldsmith > wrote: > well, yes, "don't do it" is one approach but we will have a large number of > people with the ability to edit these templates

Re: [PHPTAL] PHP content in templates

2012-05-18 Thread Robert Goldsmith
ause what's the point in the php: functionality if you can just embed php? Robert ---- Robert Goldsmith rgoldsm...@names.co.uk On 18 May 2012, at 14:10, ajcri...@gmail.com wrote: > Don't do it? > > You can create a pre-filter that strips those from the source > --

[PHPTAL] PHP content in templates

2012-05-18 Thread Robert Goldsmith
Hello :) We've noticed you can just drop in a tal template and it will drop it in the compiled template file and execute it. This is not something we want to happen so any suggestions on the best way to prevent it? Robert Robert Goldsmith rgoldsm...@names.

Re: [PHPTAL] Variables in i18n:attributes

2012-05-16 Thread Robert Goldsmith
"Drop photo to upload (max ${maxFilesize} MB)" I am assuming here that the i18n:name key/value pairs are available for attribute translation in the same way they would be for content translation but I haven't seen why that wouldn't be the case. Robert Robert Goldsmith r

[PHPTAL] Custom namespaces

2012-04-16 Thread Robert Goldsmith
he namespaces are registered in the constructor which is called the first time PHPTAL_Dom_Defs is used. I guess I'd need to find a sensible point guaranteed to be before the first use of this class and call it myself to register the new namespace. Robert

Re: [PHPTAL] ZTal 1.3.0

2012-03-28 Thread Robert Goldsmith
;t identify any benefits that would initially make upgrading worthwhile. I suspect we will pick it up for a couple of smaller projects first and evaluate it. Robert Robert Goldsmith rgoldsm...@names.co.uk On 27 Mar 2012, at 19:58, Marco Pivetta wrote: > Hey Robert! > Cool stuff, b

[PHPTAL] ZTal 1.3.0

2012-03-27 Thread Robert Goldsmith
pport for loading templates from within a Phar Regarding the last item, we've used a Resolver class which anyone can make use of within a standard PHPTAL setup and there is nothing particularly ZTal about it :) Robert ---- Robert Goldsmith rgoldsm...@n

Re: [PHPTAL] Not documented - strings with '...' ?

2012-03-23 Thread Robert Goldsmith
I believe while there is no mention in the documentation some of the examples imply that wrapping a string in single quotes makes it behave the same as string: Robert Robert Goldsmith rgoldsm...@names.co.uk On 23 Mar 2012, at 12:30, Anton Andriyevskyy wrote: > Hello. > &

Re: [PHPTAL] PHPTAL Zend Framework 2

2011-11-09 Thread Robert Goldsmith
load the rendering engine but we found this to be quite a performance hit and so quickly opted for the plugin route. Maybe things have changed again and there are new options or old options that are no longer such a performance hit that we could take advantage of :) Robert Robert Goldsmith

Re: [PHPTAL] Translation sometimes works sometimes don't

2011-11-02 Thread Robert Goldsmith
Do you have any sort of page output caching? Robert Robert Goldsmith rgoldsm...@names.co.uk On 2 Nov 2011, at 12:30, Ježísheck wrote: > Hi fellow PHPTALers! > > I'm experiencing strange thing with translations. > I have a simple template index.pt: > > >

Re: [PHPTAL] Minimized version of modifiers

2011-07-15 Thread Robert Goldsmith
Does anyone know if Sean is out of the office? ;) On 15 Jul 2011, at 09:28, s...@canterris.com wrote: > Thank you for contacting Canterris. I???m currently out of the office until > July 25. Please feel free to contact Will Freemen (w...@canterris.com) or > Canterris Technical Support (supp..

Re: [PHPTAL] Minimized version of modifiers

2011-07-15 Thread Robert Goldsmith
rested if someone used to do > so and how it was done. > > Regards, > > Anton Andriyevskyy > Business Automation & Web Development > > > > On Fri, Jul 15, 2011 at 10:59 AM, Robert Goldsmith > wrote: > I agree with this entirely and would like to add my voice to

Re: [PHPTAL] Minimized version of modifiers

2011-07-15 Thread Robert Goldsmith
ter (and probably much clearer to read) way to flow elements over multiple lines. I generally go for each attribute on its own line, indented 1 level from the node name. Robert Goldsmith On 14 Jul 2011, at 23:05, Darrell Hamilton wrote: > I would argue that compile time type inferencing in Scala

Re: [PHPTAL] i18n:domain Attribute

2011-06-29 Thread Robert Goldsmith
I don't know how 'normal' PHP handles domains but my understanding from gettext is that you can specifically mark a context/domain for a translation key so you can reuse the same key in multiple locations without collisions. When we came to implement this very useful feature in Ztal we were rath

Re: SV: [PHPTAL] Table with two array problem

2011-06-28 Thread Robert Goldsmith
r can have more than one name, but is > there an easy way to format that array correct or get this work on this > array? > > Thanks for the answer so far ;) > > Teis > > -Opprinnelig melding- > Fra: phptal-boun...@lists.motion-twin.com > [mailto:phptal-boun

Re: [PHPTAL] Table with two array problem

2011-06-28 Thread Robert Goldsmith
I think I understand what you are saying. The easiest way to do this would be if 'idoffer' is the key for the second array (so you have an array of key/value pairs with the idoffer as the key and name as the value). Then you can effectively ask 'give me the value for this key I am giving you or,

[PHPTAL] Unit Tests

2011-06-01 Thread Robert Goldsmith
Hi all, Interesting question - anyone tried unit testing Tales? Any ideas how to do so? Robert ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

Re: [PHPTAL] PHPTAL and ZTal

2011-04-14 Thread Robert Goldsmith
> I am pretty new PHPTAL, and Zend Framework, but was happy to run accross > ZTal. How do you get ZTal to use hyphenated view names (e.g. > product-description.xhtml) instead of the CamelCasing it currently does? Ztal doesn't use hyphenated view names. Honestly, I really don't understand why Z

Re: [PHPTAL] tal:equal ?!

2011-04-13 Thread Robert Goldsmith
Hello :) It wouldn't work quite as you suggest because of how you use tales but we have an 'equal' tale as part of Ztal that does pretty much the same thing. You use it as follows: print some good content here The | symbol can be considered an 'or' where if the first statement fails or return

Re: [PHPTAL] Template Expressions and Functions

2011-03-25 Thread Robert Goldsmith
e whitespace is messy and I'd love to see a way to do this within the language. In the absence of language support, we are considering adding a concat tale to Ztal that will take a list of comma separated values and concatenate them in a kind of &

[PHPTAL] space chars and string:

2011-03-24 Thread Robert Goldsmith
Hi all, I'm trying to create a string ending in a space but the space seems to be trimmed: source: tal:define="space string: ;" compiled: $ctx->space = '' ; Any suggestions on how to get around this? I assume it is due to 'trimming' or similar. Thanks Robert

[PHPTAL] macros with optional translation

2011-02-15 Thread Robert Goldsmith
Hi again everyone :) Currently, the Ztal form macro for rendering Zend_Form objects is fully translation-enabled but this is a bit of a problem if someone wants to use it without translation support. I can think of 2 possible solutions to the problem and wondered what people think and whether t

[PHPTAL] spaces before and after translation keys

2011-02-14 Thread Robert Goldsmith
Hi all, We've had an issue submitted for ZTal regarding trimming white space off the start and end of translation keys for i18n:translate. Looking at the code for the standard getText translator in PHPTAL the trimming of a translation key, along with some other operations, is in a separate func

Re: [PHPTAL] Ztal 1.0.0

2011-01-05 Thread Robert Goldsmith
That sets the encoding for email content generated by the template - most email clients expect latin1 for email content. Obviously it is also a parameter to the function so you can pass any supported encoding but unless you know your target audience, latin1 behaves most consistently :) For norm

Re: [PHPTAL] Ztal 1.0.0

2011-01-05 Thread Robert Goldsmith
It should be UTF-8 but without the BOM headers. If the files are not UTF-8 I'll look into converting them but we develop UTF-8, unix line endings by default :) Robert On 5 Jan 2011, at 10:23, aaatoja wrote: > BTW. Could You set UTF-8 as default encoding in your project? Looking throug > the co

Re: [PHPTAL] Ztal 1.0.0

2011-01-05 Thread Robert Goldsmith
apc.stat=1)... > Marco Pivetta > @Ocramius > http://marco-pivetta.com > > > > 2010/12/22 Robert Goldsmith > > Hello :) > > Sorry for not replying to everyone's comments but I'm on holiday for > christmas :) > > Regarding Marco's

Re: [PHPTAL] Ztal 1.0.0

2010-12-21 Thread Robert Goldsmith
usands of requests a day using the technology (in Italian and English) across our company intranet. Our next step is upgrading some of our customer facing services where, as we roll out the upgrades, we expect hundreds of thousands and then millions of daily page hits. Robert Goldsmith On S

[PHPTAL] Ztal 1.0.0

2010-12-17 Thread Robert Goldsmith
what we are doing interesting and, of course, comments welcome :) Robert Goldsmith ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

Re: [PHPTAL] runtime generated slot names

2010-11-08 Thread Robert Goldsmith
Hello :) Ok, well, I'm working on the Ztal project which is an integration of PHPTal and Zend framework. Part of this work involves replacing the extremely non-mvc Zend_Form implementation with something rather nicer. For our version of Zend_Form we have a set of macros that process the element

[PHPTAL] runtime generated slot names

2010-11-08 Thread Robert Goldsmith
Hi all, I'd like to create a macro with fillable slots but I'd like the names of these slots to be based on variable information passed to the macro. It appears at the moment that the content of a 'define-slot=""' is not processed like other content and is simply treated as a string. I'd prefer

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Robert Goldsmith
r heavy single-form specific > coding. The benefit I see of doing it this way is that it makes it easier to > create highly complex one-off forms within the system using specific > templates, but to have a generalised forms to hand for most of the rest... > without having t

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Robert Goldsmith
Hi all, Well, we here at Namesco are working hard to get a release package together for the Zend/PHPTal integration 'glue' we've developed for our own internal codebase (which we've called ZTal) and this has full integration with Zend_Form. As such it includes a large number of macros for rende

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
>> require_once "PHPTAL.php"; >> spl_autoload_unregister(array('PHPTAL','autoload')); >> // if needed: spl_autoload_register('__autoload'); >> >> Would that be OK? > > Wouldn't that cause issues when PHPTAL needs to load more classes > during the course of the script's execution? I think the ide

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
;__autoload' so you could call it something more specific to phptal. Robert On 2 Jun 2010, at 11:29, Kornel Lesiński wrote: > On 02-06-2010 at 11:10:43 Robert Goldsmith wrote: > >>> Why would someone choose to replace PHPTAL's autoload with something else? >>>

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
> 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 solve). If people already have autoloader code and wish to use only one autoloader in their application or if they find the auto

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
hptal autoloader. Robert On 2 Jun 2010, at 10:25, Kornel Lesiński wrote: > On 02-06-2010 at 09:56:23 Robert Goldsmith wrote: > >> I think autoloading is a good idea but please keep in mind that the app the >> phptal is being used within may already have autoloading configur

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
I think autoloading is a good idea but please keep in mind that the app the phptal is being used within may already have autoloading configured. a prime example would be Zend. Robert On 2 Jun 2010, at 09:52, Kornel Lesiński wrote: > On 02-06-2010 at 05:10:07 Tjerk Meesters wrote: > >> I coul

Re: [PHPTAL] metal slots and repeats in metal macros

2010-05-05 Thread Robert Goldsmith
Ah, ok. I was hoping a slot would work for me but yes, using another macro will work exactly as I need it to :) Thanks, robert On 5 May 2010, at 14:50, Kornel Lesiński wrote: > On 05-05-2010 at 14:26:08 Robert Goldsmith wrote: > >> Just a quick one. Could someone tell me how to

[PHPTAL] metal slots and repeats in metal macros

2010-05-05 Thread Robert Goldsmith
Hi all, Just a quick one. Could someone tell me how to reference a variable defined within a metal macro from within a slot? In particular, I'd like to define a macro that generates a calendar grid of days and then use a slot to provide varying content to be rendered within the 'day' cells. I

Re: [PHPTAL] Re: Changing PHPTAL i18n compilation

2010-04-12 Thread Robert Goldsmith
1000 sites that are hosted on a cluster (and all of which might use gettext) every time a new apache worker was started - esp. as mod_php actually gets init'd even when apache only serves a static file. Robert On 12 Apr 2010, at 14:27, Florent wrote: > Robert Goldsmith writes: > &g

Re: [PHPTAL] Re: Changing PHPTAL i18n compilation

2010-04-12 Thread Robert Goldsmith
> Gettext translation being already loaded in memory, I suppose there's not much > difference calling gettext method rather than fetching variables from memcache > or other shared memory system. I'm not sure why you would assume the gettext translation would already be in memory - the mo file wil

Re: [PHPTAL] Changing PHPTAL i18n compilation

2010-04-09 Thread Robert Goldsmith
As part of my integration into Zend Framework, I wrote a replacement translator service for phptal. you basically just write a class that implements PHPTAL_TranslationService and then when you create the phptal instance you call its 'setTranslator' method and pass in an instance of your class.

Re: [PHPTAL] custom nodes

2010-04-09 Thread Robert Goldsmith
Hello :) I don't know if someone has replied to you directly but this is what Tal Expression Modifiers are for: http://phptal.org/manual/en/split/custom-modifiers.html Understanding and writing them can be a little tricky as the documentation is not extensive but the key points to remember are:

Re: [PHPTAL] A big hello and a question about cache sources

2010-03-02 Thread Robert Goldsmith
Hi :) >> However, I'm now investigating the ability to use memcache for the compiled >> templates and while I can see it would be easy to create a memcache resolver >> for loading templates it seems that the prepare() function is still >> hard-coded for file-based access. > > It is hardcoded,

[PHPTAL] A big hello and a question about cache sources

2010-03-02 Thread Robert Goldsmith
Hi all :) A big hello from Namesco :) We've been busy integrating PHPTal into our Zend framework workflow for a few months now and I'm very happy with what we've been able to do so far - I hope we will also soon have some cool sources to release back into the world :) However, I'm now investig