Member
Member
ayutheos   2005-12-18, 05:25
#1

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

Member
Member
Luckyspin   2005-12-22, 08:02
#2

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

Member
Member
Geert   2006-06-17, 13:11
#3

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

Member
Member
Geert   2006-06-17, 13:17
#4

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

Member
Member
DarrellD   2006-06-18, 04:54
#5

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

Member
Member
koffee   2006-06-18, 16:46
#6

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

Member
Member
Geert   2006-06-18, 22:02
#7

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

Member
Member
Chilifrei64   2006-06-19, 04:20
#8

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?

Developer
Developer
trisweb   2006-06-19, 06:15
#9

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

Member
Member
Geert   2006-06-19, 13:10
#10

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.

Member
Member
thinkdreams   2006-06-20, 02:51
#11

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.

Member
Member
mikeque   2009-03-14, 20:12
#12

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

Member
Member
sbillard   2009-03-14, 21:00
#13

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

Administrator
Administrator
acrylian   2009-03-14, 21:13
#14

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

Member
Member
mikeque   2009-03-15, 00:54
#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

Member
Member
sbillard   2009-03-15, 01:11
#16

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

Member
Member
mikeque   2009-03-15, 01:53
#17

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

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.