[PHPTAL] Object causing a parse error

2011-08-01 Thread Levi Stanley
Last login ${php: $time.timeFromNow($item.getCreated())} *Message:* Parse error: syntax error, unexpected T_STRING in /usr/share/php/PHPTAL.php(845) : /www/sites/[domain-was-here]/application/../tal/cache/tpl_4e3629a0_users__4qOO_B2LvUN4WCVHcqjFgQ.php on line 40 Best regards, Levi Stanley ___

Fwd: Re: [PHPTAL] Object causing a parse error

2011-08-01 Thread Levi Stanley
Since this is last login, it should be $item.getLastLogin(), the method returns 2 (years|months|days|minutes|seconds) ago. Depending on how far from the current time the last login was. I could do it another way, however, would like to find out why this doesn't work. On 08/01/11 12:53, Levi St

Re: [PHPTAL] Object causing a parse error

2011-08-01 Thread Darrell Hamilton
Fairly sure you just need to drop the `$' See: http://phptal.org/manual/en/#tales-php Darrell Hamilton, Software Developer, 4over, Inc darre...@4over.com 818-246-1170 ext. 285 On Mon, Aug 1, 2011 at 9:53 AM, Levi Stanley wrote: > Last login ${php: $time.timeFromNow($item.getCreated())} > > Me

RE: [PHPTAL] Object causing a parse error

2011-08-01 Thread Robert_E_Lee
Try using valid PHP (->, not . for instance member access). -Original Message- From: phptal-boun...@lists.motion-twin.com [mailto:phptal-boun...@lists.motion-twin.com] On Behalf Of Darrell Hamilton Sent: Monday, August 01, 2011 12:20 PM To: Template Attribute Language for PHP Subject: Re:

Re: [PHPTAL] Object causing a parse error

2011-08-01 Thread Darrell Hamilton
Robert, Per the PHPTAL documentation, when using the `php:' modifier, -> is replaced with a `.' Also, it would appear that there is a missing "not" in the documentation for the `php:' modifier: (again, from: http://phptal.org/manual/en/#tales-php ) This expression evaluates what follows as a re

Re: [PHPTAL] Object causing a parse error

2011-08-01 Thread Marco Pivetta
Just to synthesize :) Last login ${php: $time.timeFromNow($item.getCreated())} becomes Last login ${php: time.timeFromNow(item.getCreated())} Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 1 August 2011 19:35, Darrell Hamilton wrote: > Robert, > > Per the PHPTAL do