Birthday Plugin for Geeklog

The Happiest Plugin Ever Written

by Mike Lynn mike@mlynn.com

This plugin was written using the Universal Plugin and the Plugin Developers API.

Description

The Birthday plugin was written as a method for me to learn the Geeklog API. Thanks to Blaine Lang, Tom Willett and Vincent Furia for this document.

This plugin doesn't do much other than let members view/enter/maintain their own birthdates. It comes equipped with a block that displays the current month's birthdays and next months.

Functionality

  1. Birthday listing: Driven by /birthdays/index.php, this plugin displays birthday records for members. It uses a variable called filter_month to control what member birthdays are displayed. Selecting ALL displays a list of all registered users and any corresponding data from the birthdays table.
  2. Birthday Edit Screen: Users may only edit their own birthday (unless they are in the birthdays.admin group.


Order Now and Get a Free BLOCK!

(just kidding - it's always free)
The plugin comes with a block - phpblock_birthdays() - this block simply displays member birthdays for this and the next month.
The block also displays a link for users to add their birthday.

Language Support This plugin supports multiple languages. However, I've only provided english (any volunteers?).

Date Formats

You can control how the birthdays are displayed. The following formats are available in config.php:
Format Example Actual Date
dm 11/1 January 11th
md 1/11 January 11th
mmmd Jan/11 January 11th
dmmm 11/Jan January 11th

Data

The Birthday Plugin uses a single table (called gl_birthdays oddly enough).
CREATE TABLE gl_birthdays (
  bd_id int(11) NOT NULL auto_increment,
  uid int(10) NOT NULL default '1',
  day int(2) default NULL,
  month int(2) default NULL,
  year int(4) default NULL,
  PRIMARY KEY  (bd_id),
  KEY uid (uid)
) TYPE=MyISAM;
The uid column is a link to the gl_users.uid column. Currently, year is not used.

Screenshots

Birthday Listing:
Birthday Edit:
Birthday Block:

Getting the Plugin

I'm not sure where this will end up - but you can check here.

Installing

Check out the install guide.

Stuff it doesn't do yet