We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14796
    • 59 Posts
    Hey Doze,

    I believe this is a question combining phX and Maxigallery. Still hope you could help smiley
    I wanted to change the output of [+maxigallery.picture.date+] which returns: 2007-04-09 14:56:29.

    I just wanted it to return 04/09/2007.
    I’ve tried the following command with phX:
    [+maxigallery.picture.date:date=`%m/%d/%Y`+]
    But that gives me: 12/31/1969...

    I also tried:
    [+maxigallery.picture.date=`%m/%d/%Y`+]
    but that returns nothing.

    Any suggestions?
      • 7923
      • 4,213 Posts
      The PHx :date modifier expects that the input is a unix timestamp. MaxiGallery returns the time in mysql datetime form so it won’t work, but this should:

      Create a snippet "phx:maxidate" with this content:
      <?php
      return strftime($options, strtotime($output));
      ?>


      In your MaxiGallery template, use:
      [+maxigallery.picture.date:maxidate=`%m/%d/%Y`+]
      


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."