Birthdays Module for Drupal
This is my first open-source contribution for the Drupal project. The birthdays module was created out of a personal need to remember all my friend's birthdays, but also because as much as people have been asking for one, no one has made one yet, although some quick hacks have been put up on the Drupal Forum.
Features:
- A block of upcoming users birthdays (currently next 6)
- A page list of all the user's birthdays
- Displays user's star sign, and hooks into Yahoo Horoscopes
- A display of the user's birthday/current age/starsign on the user's profile
- Automatically e-mails administrator with upcoming birthdays in a certain number of days (currently 7)
- Automatically e-mails user on their birthday
- If the postcard module is installed, will automatically create an e-card to send them on their birthday (this requires the postcard module from: http://drupal.org/project/postcard)
Screenshots:
Because I don't have a demo site to run it on, I've provided a few screenshots as I know how everyone wants to 'see' what a module does before they install it.
|
|
Requirements:
This module has been written for Drupal 4.7 and above, and tested againsted MySQL V.5.0.18. If e-card functionality is required, please install the Postcard module from http://drupal.org/project/postcard.
To Do:
I am providing this module 'working', however I have a few things that need to be done before this module can be used easily by most users. The major limitation at the moment is for times sake, I have hard-coded most of the values so you may need to go into the code to modify certain values such as how many upcoming birthdays to display etc. This is because I haven't built a settings page for the module yet. Below is a list of things to do:
- Add a settings page to modify module settings/remove hard-coded values
- Add form for users to enter DOB on registration
- Add automatic install to setup database automatically when module first used
- Port module to Drupal V.5.0
Design Notes:
I've seen a lot of people asking for the DOB to be stored with the profile module, and the birthdays module read from a profiles field. However, there is a problem with this I found, in that the profiles field stores dates in the database as an array, which makes it imposible to filter dates easily. So I've created a new table using a date field to store the DOB, this way the database date functions can be used instead. I've tried to keep as much sorting/filtering in the database as possible for performance reasons on large websites. Currently it's using MySQL's days() function to show upcoming birthdays and find user's with birthdays today - however I've seen it doesn't seem to work so well, sometimes user's get an automatic e-mail the day after their birthday, and don't disapear from the block either. I'm assuming this has something to do with leap years, and I'll look into it in more detail for the next relase.
Known Issues:
- Birthdays sometimes appear in block after the birthday has passed. Possibly to do with use of MySQL days() function.
- Automatic e-mail/postcard does not always get sent to users, sometimes a day late, sometimes not at all
- Admin reminder e-mail only shows one user's upcoming birthday even if there is more than one on the same day
Download:
The Birthdays module is now available from Drupal.org: http://drupal.org/project/birthdays






Delicious
Digg
Facebook
Google
Yahoo
Technorati