MyBB Community Forums

Full Version: MyAlerts v2.0.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi i tried the following tutorial

https://community.mybb.com/thread-198247.html

but now the icon used for alert become a magnifying glass instead of the bell

i want to know how to change it back to the bell icon

thanks!

----------------- solved -----------------

added
.panel_links li.alerts a {
	background-position: 0 -180px;
}

i don't know why it changed in the first place
even if i reverted all the changes i made it still a magnifying glass
is it possible for myalert to automatically pop up the modal if there are new alerts when users joins/logging/visit the forum
(2018-07-24, 04:10 PM)8guawong Wrote: [ -> ]is it possible for myalert to automatically pop up the modal if there are new alerts when users joins/logging/visit the forum

There's no functionality to do anything like that at the minute I'm afraid, but you could add some custom JS to do so by looking at {$mybb->user['unreadAlerts']}.
(2018-07-24, 05:13 PM)Euan T Wrote: [ -> ]
(2018-07-24, 04:10 PM)8guawong Wrote: [ -> ]is it possible for myalert to automatically pop up the modal if there are new alerts when users joins/logging/visit the forum

There's no functionality to do anything like that at the minute I'm afraid, but you could add some custom JS to do so by looking at {$mybb->user['unreadAlerts']}.

thx with your suggestion i wrote a simple plugin to redirect if users have new alerts

<?php

if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("pre_output_page", 'do_alert');

function new_alert_info()
{
    return [
		'name'			=> 'Redirect If New Alert',
		'description'	=> 'Redirect If New Alert',
		'website'		=> 'blackmarke7.com',
		'author'		=> '8guawong',
		'authorsite'	=> 'blackmarke7.com',
		'version'		=> '1.0',
		'compatibility' => '*'
    ];
}


function new_alert_activate()
{
}

function new_alert_deactivate()
{
}

function do_alert()
{
	global $mybb;
	if (!$mybb->user['uid'])
		return;

	if($mybb->user['unreadAlerts'] > 0)
	{
		redirect($mybb->settings['bburl'] . '/alerts.php');
	}
}
?>
(2015-05-31, 08:11 PM)Euan T Wrote: [ -> ]General

MyAlerts is a plugin for MyBB. It is a system that provides visual alerts for events in a forum on a user-by-user basis.

MyAlerts requires PluginLibrary to function.

Events

The currently supported events are:
  • When you're quoted in a post
  • When somebody replies to a thread you started
  • When somebody adds you to their buddy list
  • When somebody PMs you
  • When somebody replies to a thread you are subscribed to
More events are currently in development or planned to be added in the near future.

Extensibility

MyAlerts is extensible. This means that any external MyBB plugin can create alerts and add them to a user's feed. Compatible plugins can be found on the wiki, here

GitHub Project

https://github.com/MyBBStuff/MyAlerts

Download and Install

Download the zip from here: https://github.com/MyBBStuff/MyAlerts/ar...master.zip

Upload "alerts.php" to the root of your forum (next to index.php, forum display.php, etc)
Upload everything in "inc" to the "inc" folder, the contents of "images" to "images", etc.

Upload this file to "inc/plugins/MybbStuff/Core/ClassLoader.php": https://raw.githubusercontent.com/MyBBSt...Loader.php

Upload PluginLibrary as described here: https://github.com/frostschutz/MyBB-PluginLibrary

Works perfectly without issue. Sleepy
(2016-11-18, 10:30 PM)Euan T Wrote: [ -> ]
(2016-11-18, 08:48 PM)Darkrad Wrote: [ -> ]Is there notification cap for this plugin? I mean if user simply refuses to delete his notifications, how much notification he can have? Wouldn't it better to have like max 100 notifications.

There is a task ran by the task system to clear out all read notifications that can be ran as often as you choose: https://github.com/MyBBStuff/MyAlerts/bl...alerts.php

You could also modify that to delete notifications older than X days no matter if they're read or not.

This is a great plugin Euan. Can you clarify how to alter the code to delete both read and unread messages automatically? Do I simply change this line:

if ($db->delete_query('alerts', 'unread = 0')) {

To this:

if ($db->delete_query('alerts')) {

Any input would help. Members on my forum receive copious likes and thus alerts.
(2018-08-09, 03:24 AM)mrdeltoid Wrote: [ -> ]
(2016-11-18, 10:30 PM)Euan T Wrote: [ -> ]
(2016-11-18, 08:48 PM)Darkrad Wrote: [ -> ]Is there notification cap for this plugin? I mean if user simply refuses to delete his notifications, how much notification he can have? Wouldn't it better to have like max 100 notifications.

There is a task ran by the task system to clear out all read notifications that can be ran as often as you choose: https://github.com/MyBBStuff/MyAlerts/bl...alerts.php

You could also modify that to delete notifications older than X days no matter if they're read or not.

This is a great plugin Euan. Can you clarify how to alter the code to delete both read and unread messages automatically? Do I simply change this line:

if ($db->delete_query('alerts', 'unread = 0')) {

To this:

if ($db->delete_query('alerts')) {

Any input would help. Members on my forum receive copious likes and thus alerts.

Yep, that should work. It will delete all alerts though, just to warn you Smile
is working 1.8 ?
(2018-08-09, 11:46 PM)symbol54 Wrote: [ -> ]is working 1.8 ?

Yes.
Hello Euan,

Could you help me please?

I'm getting a HTTP ERROR 500 when I activate the plugin. I have installed everything requested.

https://gyazo.com/b08a2364a7d1bea8e24ddb445e44b62e