Skip to content

Efficient widget to output all today's birthdays of community members.

License

Notifications You must be signed in to change notification settings

ic3fresh/nodebb-widget-ns-birthdays

 
 

Repository files navigation

NodeBB Widget: Birthdays

Efficient widget to output all today's birthdays of community members.

Version Dependencies bitHound Score Code Climate Travis

Customization

You could change styles for these classes:

  • .birthdays .birthday-item, responsible for line in the list
  • .birthdays .birthday-name, responsible for the user's name
  • .birthdays .birthday-age, responsible for the user's age (Also age could be disabled in widget settings)

If you want change icon style, refer to .fa class.

Screenshots

Widget Preview

How does it work?

  1. At start, job will be triggered to check all users that have birthday today. It's an async process. By design it will take some time.
  2. Every day at midnight (Server Time), job to find today's birthdays is fired
  3. Widget returns birthdays that are stored in memory, It's fast and efficient.

Optimisations:

  • to store today's birthdays in memory
  • to check for birthdays only once per day

Future ideas for improvement

  • ACP: Provide setting to setup timezone
  • ACP: Provide setting to setup time to check for birthdays
  • ACP: Ability to setup presentation
  • ACP: Limit number of birthdays
  • ACP: Default message when there are no birthdays
  • ACP: list birthdays as comma separated list
  • Calculate middle age
  • Update in real time

About

Efficient widget to output all today's birthdays of community members.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.7%
  • Smarty 3.8%
  • CSS 3.5%