Documentation

Requirements

  • PHP 5 >= 5.3.0
  • jQuery 1.6+
  • Users must have cookies enabled

Installation

You can install this addon either through the dashboard interface or by extracting the zip file into your /packages folder then visiting the /dashboard/extend/install/ page. Once you have installed Site Notifications, you'll notice that a new section has been added to the dashboard called "Site Notifications" with two links.

  1. View All Site Notifications - This page will list all of the notifications currently in the system. From this page you can view some of the details of each notification as well as delete notifications. You are also provided with links to edit each notification as well as add a new notification from this page.
  2. Add New Site Notification - Add a new notification to your site.

Notification Options

  • Enabled - Allows you to turn the notification on and off. If this box is unchecked the notification will not be displayed, regardless of the other settings.

  • Notification Text - The text that will be displayed in your notification

  • Position - This allows you to select where on the screen the notification will be displayed

  • Type - The type is basically the color. The types are as follows:

    • Alert - White/Gray
    • Information - Blue
    • Error - Red
    • Warning - Yellow
    • Success - Green
  • Delay - The amount of time to show the notification before it disappears automatically. Setting this to 0 will cause the notification to be visible until dismissed by the user.

  • Modal - Checking this box will display the notification in a modal. This means the notification is visible but the rest of the screen is grayed out. It forces the user to acknowledge the notification before interacting with anything else on the site.

  • Close With - Click will dismiss the notification when the user clicks it. Hover will dismiss the notification when the user's mouse touches it.

  • Expires - The date and time to stop showing this notification. If a notification is not enabled this is ignored. If it is enabled, then it will be displayed up until this date/time.

  • Expires Timezone - You will want to set this to your own timezone. If you have APP_TIMEZONE defined in your config/site.php file that will be used. If not, then it will check for your timezone in your user preferences. If that is also not set then it will default to America/Chicago.

  • Show To - The groups that should see the notification. If you check multiple boxes here it will show to users in ANY of those those groups, not all of them.

  • Renotify Users - This option will only be available if you are editing an existing notification. In some cases, you may be editing a notification that users have already seen and acknowledged. In this case, if you want these users to see the new, updated notification you will want to click this box. This will ensure that every user on your site sees the new notification.

Clear Expired Notifications Job

When you install the Site Notifications package a new automated job is added called "Clear Expired Site Notifications". You can get to this job by going to your system and settings page, then under the "Optimization" heading clicking the "Automated Jobs" option. Here you will see all the jobs in your system. To run one you can just click the black arrow next to the ID.

Running the "Clear Expired Site Notifications" job will delete any notification whose expiration date/time is earlier than the current date/time. Once the job is complete, you will be notified of how many notifications were deleted.