PHPackages                             heimrichhannot/contao-newsalert-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. heimrichhannot/contao-newsalert-bundle

ActiveContao-bundle

heimrichhannot/contao-newsalert-bundle
======================================

A contao bundle to subscribe to news topics

4.5.2(2y ago)13941[1 issues](https://github.com/heimrichhannot/contao-newsalert-bundle/issues)LGPL-3.0-or-laterPHPPHP ^8.0

Since Aug 4Pushed 2y ago6 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-newsalert-bundle)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-newsalert-bundle)[ Docs](https://github.com/heimrichhannot/contao-newsalert-bundle)[ RSS](/packages/heimrichhannot-contao-newsalert-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (38)Used By (0)

Contao Newsalert Bundle
=======================

[](#contao-newsalert-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/24b853dc9ee6a400e3db2b5fbbf94985a7cba0272140202b4afacee85a3534b5/68747470733a2f2f706f7365722e707567782e6f72672f6865696d7269636868616e6e6f742f636f6e74616f2d6e657773616c6572742d62756e646c652f762f737461626c65)](https://packagist.org/packages/heimrichhannot/contao-newsalert-bundle)[![Total Downloads](https://camo.githubusercontent.com/2c151751048495fe9afd512ffec995a7f2283e04379b1a79698decb645a014bd/68747470733a2f2f706f7365722e707567782e6f72672f6865696d7269636868616e6e6f742f636f6e74616f2d6e657773616c6572742d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/heimrichhannot/contao-newsalert-bundle)[![Travis](https://camo.githubusercontent.com/ccecb6064d36bd8209b6f317b0bc02f83ac3f9bb7682da050f98d848d6df0886/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6865696d7269636868616e6e6f742f636f6e74616f2d6e657773616c6572742d62756e646c652e737667)](https://travis-ci.org/heimrichhannot/contao-newsalert-bundle)[![Coveralls github](https://camo.githubusercontent.com/474b488da4e9fb2c95558afe9bb934d8d230f75883b27ab45a1617b17919264a/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6769746875622f6865696d7269636868616e6e6f742f636f6e74616f2d6e657773616c6572742d62756e646c652e737667)](https://coveralls.io/github/heimrichhannot/contao-newsalert-bundle)

A contao bundle, to let website visitor subscribe to a news topic.

The bundle comes with an interface to add custom news topic, for example categories, tags, authors.

Features
--------

[](#features)

- subscribe form module
- add custom topic sources
- send notifications to user subscribed to topics with notification center
- trigger send event via cronjob, poormancron or callback
- security features
    - captcha in form field
    - opt-in process after subscribe
    - token secured opt-out links
- dublicate entry check
    - when dublicate entry is not confirmed, resend activation link instead of showing error message
- archive informations about sent messages
- bundled topic source for news archives

Requirements
------------

[](#requirements)

- Contao 4.13
- PHP 8
- [Contao Notification Center](https://github.com/terminal42/contao-notification_center) ^1.4
- [Formhybrid](https://github.com/heimrichhannot/contao-formhybrid)

Installation
------------

[](#installation)

Install via composer

```
composer require heimrichhannot/contao-newsalert-bundle

```

Afterwards call the Contao install procedure to update the database.

Setup
-----

[](#setup)

- add topic sources
- set up notification center notifications
    - `hh_newsalert` for newsalert messages
    - `formhybrid-opt-in` for opt-in mails
- add frontend registration module and configure it
- activate newsalert in news archive you want newsalert for
- optional: setup cronjob

Usage
-----

[](#usage)

The bundle adds a checkbox to news archive to activate (or deactivate) newsalert for archives. It also add a checkbox to the news articles form to set (or unset) an article sent (by setting unsent newsalert will be triggered again for said article).

The management of the receivers is placed within the news section (News -&gt; Newsalert). The overview about sent messages is found withing the newsalert section (News -&gt; Newsalert -&gt; Sent Newsalerts)

Developers
----------

[](#developers)

### Add topic source

[](#add-topic-source)

To add a topic source, your topics class needs to implement the `NewsTopicInterface`. With service autoconfiguration the class gets registered automatically. Otherwise, has to be registered as service with the `hh.newsalert.topic_source` tag.

### Notification center tokens

[](#notification-center-tokens)

ContaoNewsalertBundle uses Notification Center for e-mail sending. Following tokens are added to `news_posted` type (in addition to the default ones):

TagDescription\##huh\_newsalert\_topic\_recipient##Emailaddress of the subscriber\##huh\_newsalert\_news\_headline##Title of the news for which newsalert is triggered\##huh\_newsalert\_news\_subheadline##SUbheadline of the news for which newsalert is triggered\##huh\_newsalert\_news\_teaser##Teaser text of the news article\##huh\_newsalert\_news\_content##Article content\##huh\_newsalert\_news\_url##Relative url to the article\##huh\_newsalert\_recipient\_topics##The intersection of news topics and subscribed topics of the receiver\##huh\_newsalert\_recipient\_topic\_count##The the number of topics from ##hh\_newsalert\_recipient\_topics##\##huh\_newsalert\_opt\_out\_html##A list of all recipients topics and the corresponding unsubscribe links in html format (Topic: Link)\##huh\_newsalert\_opt\_out\_text##Same list as above, but textonly\##huh\_newsalert\_year##The current year\##huh\_newsalert\_root\_url##Root url### Hooks

[](#hooks)

NameArgumentsExpected return valueDescriptionhuh\_newsalert\_customTokenNewsModel $objArticle, array $arrTokens, DC\_Table $dc$arrTokensHook to add custom tokens or manipulate existing ones. Don't forget to register them via your config.php file.### Frontend autocompletion

[](#frontend-autocompletion)

We recommend [Chosen](https://harvesthq.github.io/chosen/) to add a search field to the topic select element. It's already used by Contao in the backend.

### Commands

[](#commands)

NameOptionsDescriptionhuh:newsalert:send--limit=0: Max number of news articlesChecks for unsend newsalert.### Setup triggger

[](#setup-triggger)

You have 3 options:

OptionDescriptionpoorManCronPoor man cron is the contao own cronjob system. You can choose the intervall in the module settings.cronJobYou can setup your own cronjob. Just trigger the send command (see Commands)onSubmitTrigger newsalert for a news, which is saved. This is **not** recommend, because the onsubmit event is triggered before saving! So the article may not be finished when event is triggered!Todo
----

[](#todo)

- use caching for speed improvements?
- serverside topic validation
- cleanup function
    - find duplicated
    - find non-available topics
- Module selection for newsalert onsubmit

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~139 days

Total

37

Last Release

747d ago

Major Versions

0.4.0 → 1.0.02017-08-15

1.1.0 → 2.0.02017-08-22

2.0.6 → 3.0.02017-09-13

3.0.6 → 4.0.02018-02-06

PHP version history (4 changes)0.1.0PHP ~7.0

4.0.0PHP ~7.1

4.4.1PHP ~7.1 || ^8.0

4.5.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (95 commits)")[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (1 commits)")[![vvohh](https://avatars.githubusercontent.com/u/75325799?v=4)](https://github.com/vvohh "vvohh (1 commits)")

### Embed Badge

![Health badge](/badges/heimrichhannot-contao-newsalert-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/heimrichhannot-contao-newsalert-bundle/health.svg)](https://phpackages.com/packages/heimrichhannot-contao-newsalert-bundle)
```

###  Alternatives

[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3172.5k4](/packages/terminal42-contao-node)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
