Celebrations (before: List user celebrations like birthday and others) v0.1

Release Notes

NOTE: I have no tested it in diferent situations, it's for test purpose, and it is the first version.

This plugin is to see the users celebrations like birthdays, anniversaries,....

You should use Kevin's form and flexprofile plugin because I haven't tested it with the core personalization profile fields, but maybe it works.

This plugin adds some field types to the profile form that is generated by the flexprofile plugin of Kevin.

At the moment I have defined the field type:

- "date" with three pulldowns for the day, month and year to avoid the use of calendar input for old dates

- "feast date" a particular date with two pulldowns with day and month (in some countries like spain you celebrate the date of your name's saint)

Then you can create profile fields like "birthday", "feastday" and "dieday".

If you use these names then the widget and the plugin can show these dates. In a future I want to add a marriage field.

In your "tools" menu appears a "view celebrations" option where you select the month, then you obtain a list with all the celebrations for this month

You can put the widget in your profile page with the celebrations of the day.


I haven't defined css specific styles for this plugin, you can see it with your theme and improve it. I apreciates if you send me css examples.

I'm not a code generator, I'm a user with certain php knowledge. This plugin works for me but maybe it's not the best code.

Any suggestions, bugs, improvements and comments are welcome.


  • It works great, the only bug that i found is that when you select the date it saves as a lower digit for the day.

    For example:

    my birhday is 10 May....when i save, in the profile it shows as 9 May.

    After solving this small bug the plugin would be just fine.

    Another improvement would be that instead of just showing the name of the person it could actually link back to that user.

    Gracias fernando por el 'plugin' me gusto mucho.

  • Dhrup, what goes along with a birthday. ;)

  • Well..

    I never got aorund to finishing the code I had started for Kaitlyn's Birthday PlugIn.
    She must be about 2 weeks old now ;-)

    But it seems Fernando has jumped ahead LOL ;;O

    So I guess I might take his code and see what I can do to extend it for Kaitlyn.





  • @santacrux maybe the problem with the date is the GMT. the plugin take the day month and year and add hour =00 minutes = 00 and seconds = 00

    How have you solved this problem?

    @ Dhrup What ideas dou you want to extend? I'm thinking about add mariage date, but I want to do a relationship between the two users and add the date of the wedding. Now I don't know how to do it because a relationship hasn't a date associate.

  • @Fernando

    Kaitlyn is 2 weeks old ;-)

    I started some code to simply add birthdate for user profile. then when user logs in, if current date is within 7 days of your birthday, we remind him "your birthday is near, have your friends remembered ? no ? get your friends to register here on your site - so they can be reminded ;-) ".

    If your friends *are user on site - PlugIn will send them Reminders.

    I did see many other PlugIns since then which handle birthdate on profile, so I stopped my code to see what these PlugIns can fill for my little Reminder PlugIn.

    Your mariage date as a celebration for 2 users can be achieved, I'll just need too look up the Elgg funcs and data relationships which can do this.

    Be great if you can extend your your PlugIn to do the Birthday/ etc reminders too all your friends. If you want help with the design or the Elgg code approach, just send me message.


  • @Dhrup Thanks for your help, I'm working on a genealogy plugin, when I finish it in a few weeks I will be able to recover this plugin and improve it.

    The reminder option is very interesting but I'm developing a family site with a lot of members, and every day there is diferent celebrations. Imagine diferent reminders every day.

    But I agree with you that reminders is a good improve for the plugin.

    Don't worry I will use your design and code expertise soon. Thanks for the offering.


  • hey Fernando  thanks for this wonderful plugin .Well for extending the plugin for diaplaying upcoming birthdays i came across PHP code which claims to do so.I think you wanna like to have a look.





    <h1>Upcoming Birthday's</h1>
    <table border="0" class=maintext2 cellpadding="0" cellspacing="0" style="border-collapse:

    collapse" bordercolor="#111111" width="100%">
      <td width="100%" valign="top">
      <marquee direction=up height=60 onmouseout=this.start() onmouseover=this.stop()
    scrollAmount=3 scrolldelay=60 width=140>


    $nowdd= gmdate("d" , time() + 19800);
    $nowmm= gmdate("m" , time() + 19800);

    $qrybdy="SELECT * FROM tbbdy where
    bdymm='$nowmm' AND bdydd>='$nowdd' AND bdydd<='$nowdd2' order by bdydd ";

    $nbdy = mysql_num_rows($rslbdy);

    for ($i=0; $i<$nbdy ; $i++)
    $arrbdy = mysql_fetch_row($rslbdy);

    if ($nowdd==$arrbdy[2])
    echo "
     <b>$arrbdy[6] $arrbdy[7]</b><br>
      <b>Today</b> $arrbdy[2] $arrbdy[3]<br>

      <HR width='40%'>
    echo "
     <b>$arrbdy[6] $arrbdy7]</b><br>
      $arrbdy[2] $arrbdy[3]<br>

      <HR width='40%'>

    $qrymon="SELECT * FROM tbmon where monid='$nowmm' ";
    $nmon = mysql_num_rows($rslmon);
    $arrmon = mysql_fetch_row($rslmon);

    $qrymon2="SELECT * FROM tbmon where monid='$nowmm2' ";
    $nmon2 = mysql_num_rows($rslmon2);
    $arrmon2 = mysql_fetch_row($rslmon2);

    $qrybdy2="SELECT * FROM tbbdy where
    bdymm='$nowmm3' AND bdydd<='5' order by bdydd ";
    $nbdy2 = mysql_num_rows($rslbdy2);

    for ($i=0; $i<$nbdy2 ; $i++)
    $arrbdy2 = mysql_fetch_row($rslbdy2);

    echo "
     <b>$arrbdy2[6] $arrbdy2[7]</b><br>
      $arrbdy2[2] $arrbdy2[3]<br>
      <HR width='40%'>







    $server = 'Server Name or localhost';
    $dbuser = 'Database Username';
    $dbpass = 'Database Password';
    $dbname = 'Database Name';

    $connect = mysql_connect($server,$dbuser,$dbpass);


    -- Table structure for table `tbbdy`

    CREATE TABLE `tbbdy` (
      `bdyid` bigint(30) NOT NULL default '0',
      `bdycod` int(30) NOT NULL default '0',
      `bdydd` int(30) NOT NULL default '0',
      `bdymm` int(30) NOT NULL default '0',
      `bdyyyyy` int(30) NOT NULL default '0',
      `bdy6` varchar(30) NOT NULL default '',
      `bdyfrsnam` varchar(30) NOT NULL default '',
      `bdylstnam` varchar(30) NOT NULL default '',
      `bdy9` varchar(30) NOT NULL default '',
      `bdy10` varchar(30) NOT NULL default ''

    -- Dumping data for table `tbbdy`

    INSERT INTO `tbbdy` VALUES (0, 0, 30, 5, 1985, '', 'A', 'B', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 24, 5, 1986, '', 'C', 'D', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 31, 5, 1990, '', 'E', 'F', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 3, 6, 1984, '', 'G', 'H', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 23, 5, 1989, '', 'I', 'J', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 8, 6, 1990, '', 'K', 'L', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 10, 7, 0, '', 'M', 'N', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 20, 7, 0, '', 'O', 'P', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 30, 7, 0, '', 'Q', 'R', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 5, 8, 0, '', 'S', 'T', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 15, 8, 0, '', 'U', 'V', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 25, 8, 0, '', 'W', 'X', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 31, 8, 0, '', 'Y', 'Z', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 5, 7, 0, '', 'AB', 'CD', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 0, 15, 10, '', 'EF', 'GH', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 5, 10, 0, '', 'IJ', 'KL', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 4, 7, 0, '', 'MN', 'OP', '', '');
    INSERT INTO `tbbdy` VALUES (0, 0, 12, 7, 0, '', 'QR', 'ST', '', '');

    -- Table structure for table `tbmon`

    CREATE TABLE `tbmon` (
      `monid` int(11) NOT NULL default '0',
      `monnam` text NOT NULL,
      `monals` text NOT NULL,
      `mon4` varchar(30) NOT NULL default ''

    -- Dumping data for table `tbmon`

    INSERT INTO `tbmon` VALUES (5, 'May', 'May', '');
    INSERT INTO `tbmon` VALUES (6, 'June', 'Jun', '');
    INSERT INTO `tbmon` VALUES (4, 'April', 'Apr', '');
    INSERT INTO `tbmon` VALUES (7, 'July', 'Jul', '');
    INSERT INTO `tbmon` VALUES (1, 'January', 'Jan', '');
    INSERT INTO `tbmon` VALUES (2, 'February', 'Feb', '');
    INSERT INTO `tbmon` VALUES (3, 'March', 'Mar', '');
    INSERT INTO `tbmon` VALUES (8, 'August', 'Aug', '');
    INSERT INTO `tbmon` VALUES (9, 'September', 'Sep', '');
    INSERT INTO `tbmon` VALUES (10, 'October', 'Oct', '');
    INSERT INTO `tbmon` VALUES (11, 'November', 'Nov', '');
    INSERT INTO `tbmon` VALUES (12, 'December', 'Dec', '');

     You may get some help for extending your plugin.

  • @coolsam001

    I will have a look to it. I will try it and with some time I could add it to the plugin.


  • Ferando one more thing in views/default/input/feast.php

    line number 82 and 99 have </select> but the statements are already closed in 85 and 69.which of the this is correct.

  • @coolsam001

    You are right, the correct is the </select> the other close tags are an error

    this is the correct code:

    <select <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> name="FirstSelectDay2" id="dayid2" class="<?php echo $class ?>" onchange="ChangeOptionDays2('<?php echo $vars['internalname']; ?>id')" >


    <select <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> name="FirstSelectMonth2" id="monthid2" class="<?php echo $class ?>" onchange="ChangeOptionDays2('<?php echo $vars['internalname']; ?>id')" >

  • Hi all!

    When I enable the celebrations mod my Elgg 1.5 show me a blank screen in entire site. My Elgg come back when I delete the celebrations plugin in mod directory.

    Any idea to solve may problem?


    Alan Cota.

  • Hi Alan,

    Maybe there is an incompatibility between plugins or themes? Have you used the standard theme?

    You need to be working form and flexprofile plugin to use this celebrations plugin.

    This plugin hasn't special instructions for the installation.

    Can you explain the installation of elgg (plugins,...) that you are running to try to understand your problem?


  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 7859
  • Recommendations: 5

Other Projects

View Fernando's plugins