定制 cliffparnitzky/birthday-lister 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cliffparnitzky/birthday-lister

最新稳定版本:2.0.3

Composer 安装命令:

composer require cliffparnitzky/birthday-lister

包简介

Provides a module to list member birthdays (past, actual, upcoming).

README 文档

README

Latest Version on Packagist Installations via composer per month Installations via composer total

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

Screenshot: System settings

CSS classes

  • birthday_is_today : marks a list item which birthday is today
  • member_is_inactive : marks a list item which member is inactive
  • birthday : marks the span inside a list item containing the date of birth
  • name : marks the span inside a list item containing the name (firstname and lastname)
  • age : marks the span inside a list item containing the age
  • first, last : marks the first and last list item
  • even, 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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2015-02-03