Clevely,
Are you trying to format it using a ditto chunk or a TV? If its for a TV it looks like the TV is empty and has a default value of 0. i have had no problems using PHx in both a TV or a Ditto. The other curious thing is I wonder if PHx has a bug and is seeing the first "date" string as a formatter. What happens if you change the name of the date variable?
What about if you try to format the ditto chunk like so: [+date:date=`%a %B %d, %Y at %H:%M`+]. Do you still get the same result?
Scott
Yeah im trying to get the date in a ditto chunk.
Tried your code but still got Thu January 01, 1970 at 01:00
mmmm
I believe that the :date modifier in PHx expects that the value to be modified is in unix timestamp form.. You can do your own date modifier by creating a snippet with name
phx:mydate and with this content:
<?php
return strftime($options, strtotime($output));
?>
Then in the chunk, use [+date:mydate=`%a %B %d, %Y at %H:%M`+]
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Thanks doze that worked like a treat.
Thanks loads.
John
Oh god! You’re saving my life and brain! It’s really an awesome plugin! Two thumbs up!
Blaise Bernier
www.medialdesign.com - Solutions for small business, hosting, design and more!
I’ve made some improvements to PHx, allowing it to get custom modifiers from files, as well as snippets. This is much easier when it comes to distributing custom modifiers (as they can simply be downloaded, rather than having to be copied into database) and copying between sites, or incorporating into new sites.
Can anyone see any drawback to this approach, or any reason why it shouldn’t be used? I’ve contact the author, but no reply yet.
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
Quote from: rthrash at Jun 25, 2007, 08:27 AM
Armand is very busy being a dad for the first time. I don’t think anyone would object, and personally think it’s a great idea. 
Understandable then!! I’ll tidy up the files and upload them to the repository.
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK