cliffparnitzky / birthday-lister
Provides a module to list member birthdays (past, actual, upcoming).
Installs: 37
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 2
Type:contao-module
Requires
- php: >=5.3
- contao-community-alliance/composer-plugin: ~2.0
- contao/core: >=3.2.0,<3.6
- friends-of-contao/contao-associategroups: ~1.3
Conflicts
- contao/core: 3.4.0,3.4.1,3.4.2
Replaces
- contao-legacy/birthdaylister: *
README
Contao Extension: BirthdayLister
Provides a module to list member birthdays (past, actual, upcoming).
Installation
Install the extension via composer: cliffparnitzky/birthday-lister.
If you prefer to install it manually, download the latest release here: https://github.com/cliffparnitzky/BirthdayLister/releases
Tracker
https://github.com/cliffparnitzky/BirthdayLister/issues
Compatibility
- min. Contao version: >= 3.2.0
- max. Contao version: < 3.6.0
Dependency
This extension is dependent on the following extensions:
Screenshots
CSS classes
birthday_is_today
: marks a list item which birthday is todaymember_is_inactive
: marks a list item which member is inactivebirthday
: marks the span inside a list item containing the date of birthname
: marks the span inside a list item containing the name (firstname and lastname)age
: marks the span inside a list item containing the agefirst
,last
: marks the first and last list itemeven
,odd
: marks each list item as even or odd
Hooks
birthdayListerModifyBirthdayChildren
The "birthdayListerModifyBirthdayChildren" hook is triggered for modifying the list of birthday children. So custom sorting is possible or removing of birthday children.
It passes $arrBirthdayChildren
(the array of birthday children), $modulConfig
(the modul configuration to get user definings).
It expects an array of birthday children as return value.
// config.php
$GLOBALS['TL_HOOKS']['birthdayListerModifyBirthdayChildren'][] = array('MyClass', 'myModification');
// MyClass.php
class MyClass
{
public function myModification($arrBirthdayChildren, $modulConfig)
{
if ($modulConfig->birthdayListPeriod == 'mySpecialPeriod')
{
// do custom modification here
}
return $arrBirthdayChildren;
}
}
birthdayListerCheckBirthdayInPeriod
The "birthdayListerCheckBirthdayInPeriod" hook is triggered when checking if a birthday is in the defined period. So custom periods could be added or custom checking is possible.
It passes $birthdayInPeriod
(current decision if the birthday is in period), $modulConfig
(the modul configuration to get user definings), $birthday
(the date of birth normalized to the actual year),
$birthdayChild
(the database object of a member). It expects a boolean (is birthday in period) as return value.
// config.php
$GLOBALS['TL_HOOKS']['birthdayListerCheckBirthdayInPeriod'][] = array('MyClass', 'myPeriodCheck');
// MyClass.php
class MyClass
{
public function myPeriodCheck($birthdayInPeriod, $modulConfig, $birthday, $birthdayChild)
{
if ($modulConfig->birthdayListPeriod == 'mySpecialPeriod')
{
// do custom checking here
}
return $birthdayInPeriod;
}
}