The mtAlertPlugin is a plugin designed to show non-obstrusive themable alerts to the users of an application.

The alerts will be shown when certain 'condition' evaluates to true, only to the users that needs to see it or to the users who have a certain credential. This is configured per alert.

The plugin is also able to send alerts via mail. It provides a task that, if the plugin is configured correctly, sends the alerts automatically to the users. It uses the 'dcMailerPlugin' for this which is quite easy to use and can be configured via a nice Web interface.

The mtAlertPlugin lets you create alerts via a simple web interface... and a little programming of course.

If you use symfony 1.3, the removal of the sfCommonFilter avoids the inclusion of stylesheets included in component's partial. If this happens to you, you should include the stylesheet for the theme you desire. By default, you should do this:

If mail service is desired...

Also you should provide some 'extra methods' if you'd like to send mails. This methods are configured in the 'app.yml' section of the plugin. Three static methods are needed:

{{
app.yml
all:
mt_alert_plugin:
mail_retrieve_mails_method: This method should retrieve the mail address of an array of usernames passed as parameter.
mail_retrieve_usernames_by_credential_method: This methos should retrieve the usernames of the user who have a credential passed as parameter.
mail_retrieve_all_mails_method: This should retrieve the mail addresses of all the users of the application.
}}
This plugin uses the dcMailerPlugin to send mails, so its installation is needed.

If you want you can use a rich text editor when creating the alerts. You need to install sfFormExtraPlugin, download the tiny_mce library and set it all up. After that you must enable the rich text feature in the mt_alert_plugin app.yml section

Usage:

Go to the 'mt_alert_message' module to create some alerts.

That's it!

To send mails use the mtAlertPlugin:sendMail task. An application and an enviroment is required: