Hi,

The Birthday module displays the brithdays of drupal users within a configurable timeframe. It works against drupal 4.6. If there is some interest in this I can clean up the code and add features.

You can download it at: birthday.tar.gz

Enjoy!

Comments

weeguy’s picture

Just tried it out. Works pretty well except that the entering of the birthday was split rather awkwardly into 3 different textboxes.

Requests:
Allow users to enter birthday upon registration. (allow admin to set as compulsary or optional field)

Integrations with event.module?
Show birthdays in event calendar.
Show birthdays in Upcoming Events

neofactor’s picture

You alter User table directly which may not be the best thing...
Profile may be the safer place...

Another consideration is what you collect for their birthday.... you may only want to ask them their Month and day... the year is rather "invasive" and a bit to personal if your community has a more mature audience.

Just a few thoughts...

David McIntosh
neofactor.com

Cruell-1’s picture

Can someone modify it for use with Drupal 4.7?

Thank a lot

jax’s picture

I'll try to make a 4.7 version this weekend or the next. I'll also make it store the birthdate in the profile as suggested by neofactor.

Cruell-1’s picture

Nice to read you Jax.
I wait for your job.
Thank you very much

jax’s picture

I updated the 4.6 version as an exercise to 4.7. It's not very polished, but it's just an exercise. If you want a small change I just might do it.

  • It still modifies the user table because it's not possible to use profile. The mysql statement needs the value in a column to be able to efficiently query it.
  • In the process I encountered something strange with hook_submit and hook_user, I've raised the issue here: http://drupal.org/node/42057

Anyway, you can get it by going clicky on birthday-4.7-1.tgz.

underpressure’s picture

I'm interested in this module, but I rather wait for a version with the code cleaned up.

thanks for making it, I always wanted a module like this for my site, I too would like to see this module intigrated with the events module.

keep us posted

--------------------->
underpressure
http://ravalonline.com

tom-d’s picture

Thanks for this module, its perfect! I just have one question, how can i change the date format from year-month-day to day/month/year?

Cheers,

jax’s picture

In the standard drupal installation, the date-format is set together with the time format and there is not perfect way to retrieve only the date information (unless someone knows how?).

What you can do is:
change

			case 'view':
				$b = _birthday_get($user->uid);
 			    $items[] = array('title' => t('Birthday'),
      							'value' => $b,
      							'class' => 'member'
    						);

to

			case 'view':
				$b = _birthday_get($user->uid);
 			    $items[] = array('title' => t('Birthday'),
      							'value' => date('d M Y', strtotime($b)),
      							'class' => 'member'
    						);

The different letters you can use for Year Month and Day can be found at http://www.php.net/manual/en/function.date.php
Just interchange or replace the letters (in 'd M Y')until the result is what you want.

Cruell-1’s picture

Hi
Birthday module is ok, but when i set only Users can see block, al site is block.
Can you check and resolve it?

Thank you very much

jax’s picture

I don't understand your problem from your explanation. Could you please clarify? Could you tell me how you set those permissions?

Also, I must say that this module is rather a proof-of-concept rather than a full-blown module. It doesn't implement any special permissions or nothing. When I make it for 5.0 I'll try to incorporate some of the feature requests that others have asked for (and not alter the users table).

sanlucas’s picture

I've two questions: The first one, i wanna know if in the block(a littre box on right) i can change the date format for "day-month" (now is set for "month-day"). I've already tried to change it on the .module archive but it was kinda impossible. I wanna know this because im Brazilian and thats the date format for here. The second one is how to put the birthdate on registration of user.
Sorry for wrong english.

--- Lucas Boaventura

teddy83’s picture

For the first, sorry my english is not the best, but I hope you can understand me.

Now to my Problem:
I installed the birthday module and I see, that there is a new Birthday form in the Profil. The problem ist, that I also have a Birthdayform in the Profil, so now I have two... It is possible that I change the modul birthday form to my birthdayform?
Thanks