We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22015
    • 3 Posts
    I’m ’trying’ to create my first modx package usable by others as in coded using the modx guidelines and ready to be packaged. I do have a few questions mainly since it’s my first try.

    I did some investigation but are there any packages already out there that produce a list of birthday’s based on user profiles for a certain period or just today? I don’t want to do work that has already been done you see smiley

    Am I going for a difficult time thinking this out if I want to use the dob field in the user profile? This field states the date of birth and not their annual birthday. The only way I can work this out is to generate a month-day array first for all users from that dob timestamp, which is crap on heavy used sites or sites with large amounts of users. I have an alpha working based on using the comment field in the profile filled with a month-day int like 0527 (May 27th) or 1205 (Dec 5th) so I can do a nice DB query on that comment field for certain day(s).

    Thanks in advance for any help and maybe we can make a nice new package for modx for everybody to use!
      • 22015
      • 3 Posts
      Ok I have moved forward and now have a working snippet (no templates or placeholders yet just using $output) that creates a list devided by days listing all birthday poopers and their new age based on the dob field in the user Profile. (I have kept support for other options besides using the dob field as mentioned in the first post, mainly as I am unsure how heavy using the dob field is for large user databases).

      This is done for a whole year, a day or a range of days also with an offset so you can show past birthday too. As said in the first post this is not my first snippet or php project although I consider my self a novice, but this will be my first project creating a working package for the modx community.

      Major things I want to do are:
      clean up the code so it is presentable and meets many of the coding and modx standards
      making it all work with placeholders based on a template file
      adding an option to display the birthday not as a list, but as a calendar
      adding the option to generate rss feed so you can send a list of current (day/week) birthdays
      and some more tweaks and things that I or others can think of along the way

      Now if anybody would like to comment feel free cool