Firefox PHP

Module: Birthdays

Posted by Steve H 
Re: Module: Birthdays
February 12, 2008 02:23PM
Such array would not be accessible from the search function. There are quite some options for working with custom profile fields, but serialized data isn't easily accessible and for sure not by SQL. Therefore if you want data to be searchable, then you can't use array data (as you already found out).

An option would be to use more than one field. Of course I was stupid with YYYYMMDD :-) So instead of one field, you could split it in a YYYY field and a MMDD field. An extreme option would be to create a table for the birthdays storage. For some applications, custom tables might even be needed, because custom fields just don't deliver the goods. But for this typical application, I think that working with custom fields should be sufficient.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Birthdays
February 12, 2008 07:44PM
Here's a Dutch language file.

However, the mod is not working very well for me. If I try to set my birthday it won't remember the date. It allways says december 31 1969, whatever I try. Any suggestions?
Attachments:
open | download - dutch_informal.php (1.5 KB)
Re: Module: Birthdays
February 13, 2008 03:19AM
I looked at the code and I see that the getdate() PHP function is used for working with the date. That is problematic here, since UNIX dates (a.k.a. Epoch) are defined as the number of seconds since Januari 1st 1970. Therefore, you can not use dates before that time when using the standard UNIX date processors.

For my own projects, I nowadays use SQL queries for advanced date processing. Most SQL server systems (and MySQL as well) have well written date functions in their library. Of course doing so would make this module MySQL targeted, unless care would be taken to allow multiple db layers (which is not too hard too do; check the spam hurdles module for example).


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Birthdays
February 13, 2008 03:43PM
I have set birthdays prior to 1969 with this module, and it worked fine. While it certainly sounds like Jan-Willem is having a problem with the UNIX date, it isn't a universal problem. Perhaps something different in his installation?

At any rate, once I rewrite the module to store YYYY and MMDD the UNIX timestamp issue will go away.

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Re: Module: Birthdays
February 13, 2008 05:17PM
Thanks for new language strings. here is turkish language file.
Attachments:
open | download - turkish.php (1.5 KB)
Re: Module: Birthdays
February 13, 2008 06:25PM
So now you know I'm from before 31-12-1969 <g>
Re: Module: Birthdays
April 02, 2008 08:20AM
Somehow the Birthdays today are not shown. The Birthdays in die Future are working fine, but not the actual birthdays today.

Any hints for that problem?
Re: Module: Birthdays
April 06, 2008 09:16AM
Can you please give me a hint, how to change the fontsize for this module? Changes in cc_usersettings wont show any effect in forum.
Re: Module: Birthdays
April 07, 2008 12:42PM
Quote
Sunbringer
Somehow the Birthdays today are not shown. The Birthdays in die Future are working fine, but not the actual birthdays today.

Any hints for that problem?

OK, problem solved: the mod didn't recognise that 2008 is a leap year so this little hack shouldt help out:

change
322    if($ubirthday["yday"] >= $jetzt["yday"])
323        $nextBirthday = mktime(0,0,1,$ubirthday["mon"],$ubirthday["mday"],$jetzt["year"]);
324    else
325        $nextBirthday = mktime(0,0,1,$ubirthday["mon"],$ubirthday["mday"],$jetzt["year"]+1);

to
322    if((date("L", mktime(0,0,1,$jetzt["mon"],$jetzt["mday"],$jetzt["year"])) == 1) || ($ubirthday["yday"] >= $jetzt["yday"])) 
323        $nextBirthday = mktime(0,0,1,$ubirthday["mon"],$ubirthday["mday"],$jetzt["year"]);
324    else
325        $nextBirthday = mktime(0,0,1,$ubirthday["mon"],$ubirthday["mday"],$jetzt["year"]+1);

greetings
Sun
Re: Module: Birthdays
April 26, 2008 08:31PM
Is anyone using this Mod? Is it stable and working well?
Sorry, only registered users may post in this forum.

Click here to login