cliffparnitzky/birthday-lister
最新稳定版本:2.0.3
Composer 安装命令:
composer require cliffparnitzky/birthday-lister
包简介
Provides a module to list member birthdays (past, actual, upcoming).
README 文档
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;
}
}
统计信息
- 总下载量: 37
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2015-02-03