1
CS_Swan
php troubles
  • 2009/9/24 23:29

  • CS_Swan

  • Just popping in

  • Posts: 28

  • Since: 2008/11/28


photo.photo_date produces an 11 digit number ... how do I change it to a standard date. ? I have tried using <{date(photo.photo_date}> in the template and tried a number of combinations in the php files nothing is working please help.

2
ghia
Re: php troubles
  • 2009/9/25 0:02

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Try:
<{$photo.photo_date|date_format:"%A, %B %e, %Y"}>

In PHP you could also assign a formatted string to it, with eg date_format($datetime, 'jS, F Y') .

3
CS_Swan
Re: php troubles
  • 2009/9/25 2:08

  • CS_Swan

  • Just popping in

  • Posts: 28

  • Since: 2008/11/28


Thank you Ghia, I have two more questions in regards to this problem .. first where do I find a list of the available codes ??
second , I would also like to place the username associated with this picture .. <{photo.uid}> and <{photo.uname}> dont' work.


4
ghia
Re: php troubles
  • 2009/9/25 7:43

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


See Smarty manual at the Smarty site.
For finding the correct available names look in the PHP code or the list in debug Smarty.
For having more data available in the template, it has to be added to the photo array by the PHP code.

5
CS_Swan
Re: php troubles
  • 2009/9/25 12:55

  • CS_Swan

  • Just popping in

  • Posts: 28

  • Since: 2008/11/28


Thank you again Ghia ,

Login

Who's Online

346 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 346


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits