Looking For Something?

[wps-alerts-activity]

Purpose

Displays a drop-down list of alerts for the user.

Displays all the alerts that have been sent to the user, whether or not they have chosen to receive alerts via email.

By default this is shown as a drop down list. Remember, all WP Symposium Pro shortcodes can be used in a Text/HTML widget, which is ideal in this case.

To show the alerts as a drop-down list, in either a WordPress page or a Text/HTML widget, you would use the default shortcode:

[wps-alerts-activity]

To show the alerts as a list, you would use the style option:

[wps-alerts-activity style="list"]

To show as a flag, with a highlight number of unread alerts (if applicable), you would use the style option set as flag.

Note, that with the style of flag, you can tweek the look and feel of the “bubble” (the number of unread alerts with the flag_unread_top, flag_unread_left and flag_unread_radius.

You must set the flag_url, which will be where the user goes when they click on the icon. This will probably be a WordPress page with the first example above on it.

[wps-alerts-activity style="flag" flag_url="/alerts"]

You can also use your own icon by setting the flag_src option, eg:

[wps-alerts-activity style="flag"flag_src="/path/to/icon.png"]

Adding Alerts to your Theme

You can run the same function from your theme (as you can with any shortcode) which allows you, should you want, to integrate the alerts into your theme. Depending on your theme this might be as a drop-down list and/or an icon alert for unread activity alerts.

For example, this is from the www.wpsymposiumpro.com website:

<?php
    echo wps_alerts_activity(array('style'=>'flag','flag_url'=>'/alerts'));
    echo wps_alerts_activity('');
?>

Note that the function name uses underscores and not hypens. So the shortcode is [wps-alerts-activity] and the PHP function is wps_alerts_activity.

You pass shortcode options as an array via PHP, the above, laid out to see, is as follows:

echo wps_alerts_activity(array(
    'style'=>'flag', 
    'flag_url'=>'/alerts'
));

If not passing any parameters, you should still pass an empty string:

echo wps_alerts_activity('');

As an aside, as related, note that you can also show an icon alert for pending friendship requests as follows:

echo wps_alerts_friends(array('flag_url'=>'/friends'));

and if you are using the Private Messaging Extension, you can display an icon alert for unread messages too:

echo wps_alerts_mail(array('flag_url'=>'/mail'));

Availability

Provided in the Core Plugin.

Customising

You can use the global shortcode settings via WPS Pro->Shortcodes in the admin dashboard, or add them to the shortcode as options.

Example

[wps-alerts-activity style="list"]

Options

The following (which shows default values and an example of using the shortcode option) can be set via the admin dashboard (WPS Pro->Shortcodes) or added as options to the shortcode in your WordPress page, post or widget.

Style of List (style=”dropdown”)
Icon size (flag_size=”24″)
Icon unread number size (flag_unread_size=”10″)
Icon unread number top margin (flag_unread_top=”6″)
Icon unread number left margin (flag_unread_left=”8″)
Icon unread number radius (flag_unread_radius=”8″)
Icon URL (flag_url=””)
Icon image alernative URL (flag_src=””)
Recent alerts text (recent_alerts_text=”Recent alerts…”)
No alerts text (no_activity_text=”No activity alerts”)
Text for new alerts, seperated by commas (select_activity_text=”You have 1 new alert,You have %d new alerts,You have no new alerts”)
Mark all as read text (make_all_read_text=”Mark all as read”)
Delete all text (delete_all_text=”Delete all”)
Date format (date_format)
Delete on click (delete_on_click=”0″)

Administration

You can review all the alerts that are due to be sent out via WPS Pro>Alerts. Against each alerts will be the status of the alerts, whether it is “pending” (waiting to be sent), when it was sent, or if not sent successfully, the reason why.

You can clear out your alerts using the links above them.

Alerts are sent out at a schedule and quantity that you set. This schedule is set via WPS Pro->Setup->Alerts

Screenshot_9

 

Sidebar