cliffparnitzky / birthday-mailer
向当天过生日的所有成员发送生日电子邮件。
1.3.5
2018-10-30 18:52 UTC
Requires
- php: >=5.3
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ~3.2 || ~4.4
- friends-of-contao/contao-associategroups: ~1.3
Conflicts
- contao/core: 3.4.0,3.4.1,3.4.2
Replaces
- contao-legacy/birthdaymailer: *
This package is auto-updated.
Last update: 2024-09-21 21:54:58 UTC
README
Contao 扩展: BirthdayMailer
向当天过生日的所有成员发送生日电子邮件。
安装
使用 composer 安装扩展: cliffparnitzky/birthday-mailer。
如果您希望手动安装,请在此处下载最新版本:https://github.com/cliffparnitzky/BirthdayMailer/releases
跟踪器
https://github.com/cliffparnitzky/BirthdayMailer/issues
兼容性
- Contao 版本 >= 3.2.0 ... < 3.6.0
- Contao 版本 >= 4.4.0
依赖
本扩展依赖于以下扩展
插入标签
{{birthdaychild::*}} ... This tag returns all the values of the current member (replace * with any attribute of the member, e.g. firstname or company, the attribute password is not allowed).
{{birthdaychild::salutation}} ... This tag returns the salutation of the member (depending on gender).
{{birthdaychild::name}} ... This tag returns first and last name of the member.
{{birthdaychild::groupname}} ... This tag returns the name of the member group of the current configuration.
{{birthdaychild::age}} ... This tag returns the age of the member.
{{birthdaymailer::email}} ... This tag returns the e-mail the configured sender.
{{birthdaymailer::name}} ... This tag returns the name of the configured sender.
钩子
birthdayMailerAbortSendMail
"birthdayMailerAbortSendMail" 钩子会在发送生日邮件前触发,以便检查是否应该发送生日邮件。因此可以为每个生日儿童进行自定义检查。它传递 $birthdayChildConfig
(当前生日儿童的配置)和 $blnAbortSendMail
(当前值,如果应该中断发送)。它期望返回布尔值。
// config.php
$GLOBALS['TL_HOOKS']['birthdayMailerAbortSendMail'][] = array('MyClass', 'myAbortSendMail');
// MyClass.php
class MyClass
{
public function myAbortSendMail($birthdayChildConfig, $blnAbortSendMail)
{
if ($blnAbortSendMail !== TRUE && $birthdayChildConfig->id == 1)
{
$blnAbortSendMail = true;
$this->log('SEnding birthday mail to member with id "1" was aborted.', 'MyClass myAbortSendMail()', TL_INFO);
}
return $blnAbortSendMail;
}
}