Download the PHP package heimrichhannot/contao-newsalert-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-newsalert-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-newsalert-bundle

Contao Newsalert Bundle

Latest Stable Version Total Downloads Travis Coveralls github

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

Requirements

Installation

Install via composer

Afterwards call the Contao install procedure to update the database.

Setup

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 -> Newsalert). The overview about sent messages is found withing the newsalert section (News -> Newsalert -> Sent Newsalerts)

Developers

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

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

Tag Description
##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

Name Arguments Expected return value Description
huh_newsalert_customToken NewsModel $objArticle, array $arrTokens, DC_Table $dc $arrTokens Hook to add custom tokens or manipulate existing ones. Don't forget to register them via your config.php file.

Frontend autocompletion

We recommend Chosen to add a search field to the topic select element. It's already used by Contao in the backend.

Commands

Name Options Description
huh:newsalert:send --limit=0: Max number of news articles Checks for unsend newsalert.

Setup triggger

You have 3 options:

Option Description
poorManCron Poor man cron is the contao own cronjob system. You can choose the intervall in the module settings.
cronJob You can setup your own cronjob. Just trigger the send command (see Commands)
onSubmit Trigger 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


All versions of contao-newsalert-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
contao/core-bundle Version ^4.13
terminal42/notification_center Version ^1.4.1
heimrichhannot/contao-formhybrid Version ^3.2
heimrichhannot/contao-utils-bundle Version ^2.235.1
symfony/dependency-injection Version ^5.4 || ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/contao-newsalert-bundle contains the following files

Loading the files please wait ....