jfh-alert-system [Jcink.com Wiki]

JFH >> General Use >> Alert System

Alerts are notifications within the system/forums. They are useful to notify members of events surrounding their activities within the forum itself, and are more convenient than flooding the Personal Message inbox with such activity.

When the system is enabled on your board, it will provide alerts for the following events:

  • A friend add
  • Personal Messages
  • Adding to buddy lists
  • Quoting their name in a post
  • Response to a topic thread subscription
  • A new profile comment
  • A new @username tag

Usage

To enable the system, visit AdminCP » System Settings » General Configuration and set “Enable the Alert System?” to Yes. The standard submenu will now display Alerts(0) where “My Assistant” used to be. Clicking it will take you to your recent alerts.

Settings

The Alert System is a very “plug and play” feature - there is little to configure after you have enabled it. The change instantly takes effect, and the settings are already optimized with what we believe are the best defaults. But of course, everything is customizable. Per-account settings are configurable via “My Controls” > “Alert Settings”. Members have an array of choices as to how they would like to be alerted.

Some of the options that users can tick a checkbox to receive an alert for are shown below:

  • New Personal Message Received to Inbox (Default: Yes)
  • New Friend Request Received (Default: Yes)
  • New Comment on Profile (Default: Yes)
  • New Topic Posted in Subscribed Forum (Default: Yes)
  • New Replies Posted in Subscribed Topic (Default: Yes)
  • Quoted Your Username in a Topic or Post (Default: Yes)
  • @User Tagged You in a Topic or Post (Default: Yes)

Additionally, they can choose to receive an email or not with their alert for each type of event.

Via group settings, an Admin can configure whether or not users in that group are permitted to tag users. Default is on, but this option is there in case you don't want certain people or users with the ability to tag others.

@Username Tagging

To tag a username in a post, which sends an alert, simply type their full name with the @ symbol as a prefix. If their username contains spaces, it must be encased in brackets @[username with spaces].

Note that if a username itself contains brackets, it unfortunately cannot be tagged at this time. There is no work-around.

Additionally, some names with special characters on the end or beginning will need to be encased in brackets so the system can identify between the end of a sentence and a username. Ex: @name! must be @[name!]

You can also tag a name in the topic description, but you can only do this during initial topic creation, not edit.

Mass Alerts

You can send a mass alert to all, or some of your members. To do this, visit AdminCP » Users and Groups » Mass Alert Members. From here, you can choose to send a short text-based alert message to all members of a particular group, all members online, or just all members period. BBCode is enabled in the text alert message, but using a lot of it is not recommended because of character limitations.

The alert will appear to all from whoever is currently logged in to the Admin CP and submits the mass alert send action.

Design & Development

CSS

  • #recent-alerts: the ID for the dropdown box. It may be difficult to position relative to a custom link.
  • .alert-text: will select the table cell containing the the alert message. (UserCP)
  • .alert-read: a tr class for read alreads (UserCP)
  • .alert-unread: a tr class for read alerts (UserCP)
  • a.user-tagged: Whenever a user is tagged, this class is part of the link.
  • .recent-alerts-msg: a div class for the recent alerts dropdown menu that surrounds each alert.
Group Tag Customization
  • a.user-tagged.mgroup-#: This is a dynamically applied class containing the group ID number of the user tagged. Use this to style colors of the tags based on member group. Note: This class is not retroactive; meaning if someone is promoted, their past tags will not reflect the change. Replace # with the number of the group. mgroup-4 is the root admin group, mgroup-3 is the members group.

Example code for Root Administrator:

a.user-tagged.mgroup-4 {
color: #992121;
font-weight: bold;
}

Custom Alerts Indicator

If you have a sidebar, or anywhere else otherwise you would like to insert the link and alert count, you can use thi

<a href="index.php?act=UserCP&CODE=alerts" class="sbsp">Alerts (<!-- |new_alerts| -->)</a>

JSON

If you are building a custom menu or want to integrate the alert dropdown, a JSON encoded output as an object is available at index.php?recent_alerts=1&js=1

The keys include:

  • status: Unread/Read
  • text: The alert text message in its entirety
  • date: The date and time of the alert
  • primary_url: The URL that the alert leads to
  • alert_id: The alert ID number

Important Notes

  • Users will not receive more than one quote alert for a topic until their latest alert has been read. This is to prevent endless quote-stacking.
  • All alerts are marked as read similarly to the inbox when a member visits their Alert's main page
  • Alerts are kept for up to 90 days - they are otherwise pruned. This is to keep the system running fast and efficiently.
  • Guests cannot tag users, and 'Guest' cannot be tagged themselves.
  • @tagging won't let you tag a person who doesn't have permission to view the forum/topic you're trying to tag them in. You will see the tag linked, but they will not get the message.
  • “My Assistant” will be gone from the userlinks menu when the Alert System is enabled.
  • Some names with accented letters such as Ś cannot be tagged, but Í works. To tag names like O'SomeName, brackets must always be used.

External Links

 
jfh-alert-system.txt · Last modified: 2017/12/03 20:45 by jcink