ZenphotoCMS Forum
Album date - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Album date (/thread-177.html)



Album date - ayutheos - 2005-12-18

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




Album date - Luckyspin - 2005-12-22

Right now, saving album dates is not supported, so that function won't return anything other than NULL. Soon hopefully!




Album date - Geert - 2006-06-17

Is this function already back in use? I can't seem to get it work.




Album date - Geert - 2006-06-17

I see it does work. I changed the date directly in my database. But I guess it is not implemented in the admin?




Album date - DarrellD - 2006-06-18

Not sure about this one.... never looked to see if it actually works. Trisweb, can you answer this question?




Album date - koffee - 2006-06-18

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




Album date - Geert - 2006-06-18

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...?




Album date - Chilifrei64 - 2006-06-19

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?




Album date - trisweb - 2006-06-19

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...




Album date - Geert - 2006-06-19

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.




Album date - thinkdreams - 2006-06-20

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.




Album date - mikeque - 2009-03-14

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




Album date - sbillard - 2009-03-14

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




Album date - acrylian - 2009-03-14

Just to mention, the current documentation for functions is here: http://www.zenphoto.org/documentation




Album date - mikeque - 2009-03-15

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




Album date - sbillard - 2009-03-15

What you seem to be missing is the part of my post on where the date formats are described. Please read that.




Album date - mikeque - 2009-03-15

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