Page 1 of 1

birthdays plugin

Posted: Sat Nov 11, 2006 11:11 pm
by doug2168
i have installed and configured this plugin. put all the info into the user profiles section and they now show up on the sidebar. all seem fine except for a few people who have b-days in jan. and feb. they seem to be coming up both at the same time according to the countdown of days. one is on jan 18 and the other is on feb 22 and the countdown is saying 104 days. it's also saying 105 days for someone with a b-day on feb 24.

does this need to be configured or manipulated for my type of calendar or does it just have a hard time dealing with the month of feb?

thanks!
doug

Re: birthdays plugin

Posted: Sun Nov 12, 2006 1:29 pm
by garvinhicking
Hi!

I believe this is a bug of the birthdays plugin. Could you try this:

- Edit the serendipity_event_userprofiles/serendipity_plugin_userprofiles_birthday.php file and replace this line:

Code: Select all

return (date('z', $res) + 1);
with this:

Code: Select all

return ceil($res / 86400);
Doe sthat return the right number of days then?

Regards,
Garvin

Re: birthdays plugin

Posted: Sun Nov 12, 2006 4:00 pm
by doug2168
garvinhicking wrote:Hi!

I believe this is a bug of the birthdays plugin. Could you try this:

- Edit the serendipity_event_userprofiles/serendipity_plugin_userprofiles_birthday.php file and replace this line:

Code: Select all

return (date('z', $res) + 1);
with this:

Code: Select all

return ceil($res / 86400);
Doe sthat return the right number of days then?

Regards,
Garvin
no it did not return the correct numbers. it sent them into the thousands of days. :D that's good for a joke later on.

Posted: Thu Nov 16, 2006 7:42 pm
by doug2168
Problem solved! My wife and I put our heads together on this today and figured it out. We have people in our list that were born prior to 1940 and noticed that the people born after this year were listed correctly. Anyone before this year, for some reason, had approx 30 or so days added to the time their actual b-day was to be.

don't know why...but it's all fine now with the years for the older folks set to 1940 and a note in the user profile stating the actual year of birth.

cool deal!

Posted: Fri Nov 17, 2006 1:32 pm
by garvinhicking
Hi!

D'oh! Okay.

The plugin uses UNIX timestamps, so no person from earlier than 1970 will be accounted properly, I'm afraid. :-(

Best regards,
Garvin

Posted: Fri Nov 17, 2006 1:57 pm
by doug2168
garvinhicking wrote:Hi!

D'oh! Okay.

The plugin uses UNIX timestamps, so no person from earlier than 1970 will be accounted properly, I'm afraid. :-(

Best regards,
Garvin
hmmm, the people i changed to 1940 seem to be correct for now. why is that? ...and is there no changing the timestamp method in the code or will the whole thing have to be re-written?