Album date

Tried using printAlbumDate but couldn't get it to work. Anyone tried using this particular template function and gotten it to work?

Comments

  • Right now, saving album dates is not supported, so that function won't return anything other than NULL. Soon hopefully!
  • Geert Member
    Is this function already back in use? I can't seem to get it work.
  • Geert Member
    I see it does work. I changed the date directly in my database. But I guess it is not implemented in the admin?
  • Not sure about this one.... never looked to see if it actually works. Trisweb, can you answer this question?
  • koffee Member
    I got it working somehow... I am very new to PHP and MySQL, but it works for me.. In Admin, when you edit albums, you can put Name,Place and in my version - date, whatever you want.. Using printAlbumDate
  • Geert Member
    Well, I am using ZP 1.0.3, I'll try to implement it myself, it is a nice feature, I would like to use it.
    But I guess they will try to use it with the EXIF metadata in the future or something...?
  • what version are you using. I have the latest 1.0.3 and I do not have an option to add an album date via anywhere.....My date values in the DB are null for album data, where is it pulling the data from?
  • trisweb Administrator
    Yeah, it's really not done yet. It's something I've been meaning to do since the beginning, but never had time to flesh out a good date input interface for it. I'll probably do it for the next release...
  • Geert Member
    Ah, okay. I think it is a useful feature, it would be great to see it implemented it the next release.

    Chilifrei64, if you take a look at the source code of the admin.php, you see the date feature hidden in a comment. Haven't fully tried it yet, but I just entered a date directly in my database to see what it did.
  • I have it working. Only in a very basic state on my test zp database at http://www.thinkdreams.com/devzp

    It's not hard to get it working, but I see what Tristan means about the albumdate entry. It's very basic, and what i found is you have to enter 2006-06-10 to get it to display properly. It seems to work though. I'll keep plugging away at it.
  • Can't seem to get printAlbumDate() to format the date in anything other than the default. Anyone have luck?
    I tried following this format, but it won't translate the format, just prints the characters F jS, Y in place of the date:
    http://www.zenphoto.org/trac/wiki/TemplateFunctionsGuide#printAlbumDatebeforenonemessageformat

    This is how I wrote the function:
    printAlbumDate($before='Date: ', $nonemessage='', $format='F jS, Y');

    Anyone have any insight into this?

    Thanks,
    Mike
  • `printAlbumDate('Date: ', '', 'F jS, Y');` is the correct syntax. But the format fields are described here: http://us2.php.net/manual/en/function.strftime.php
  • acrylian Administrator, Developer
    Just to mention, the current documentation for functions is here: http://www.zenphoto.org/documentation
  • I may be missing something. Can I place this directly in the theme page, to replace the existing printAlbumDate(''); ? I do that and literally it prints "Date: F jS, Y" on the web page.

    Or possibly it is because I am using the March 3 build. Perhaps there is something awry with this build?

    Thanks
  • What you seem to be missing is the part of my post on where the date formats are described. Please read that.
  • OK, got it. thanks for your patience.
    I was so focused on the syntax of the expression, I had no idea it was the date syntax I had to worry about. Programmers and designers are from separate planets. ;)
    This works just fine: printAlbumDate('Posted: ', '', '%b %e, %Y');
    results with: Posted: Mar 14, 2009
Sign In or Register to comment.