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.
So, to sum it up into simple terms my stupid brain can understand (both for my reference for the next version of MyAlerts... whenever that is and for the core):
  • Have both a seen and read flag for alerts. Mark them as seen when the dropdown/modal/whatever is opened, but not as read. The count in the header should show the number of alerts not seen. Alerts not read should be distinguished with a colour.
  • Add a button to mark an alert as read, as well as being able to click on an alert to go to the content that triggered it (and marking it as read that way).
  • Show previews of content that triggered the alert where appropriate - this could be costly if it was pulled every page load. Storing the preview then the post/pm/whatever is made would save this, but then the incorrect content may be shown if the post/whatever gets edited.

Sound about right? This is pretty much what I'd like to see as well (as well as marking alerts read when viewing a topic contains alert content, handling PM alerts properly, deleting/removing alerts for content that gets removed and a better way to handle the popup/modal/dropdown/whatever - using a dropdown became a major pain in the lime in terms of support for me due to custom themes and lazy administrators unwilling to put any work in to fix styling themselves...).
Yeah, that's pretty much it, with the addition of being able to mark all alerts as read from the modal.

I figured that was why you went with a modal design and while I wish it was as fast as a traditional dropdown I've learned to embrace and design around its limitations. Although I think there's some issues with my setup right now.

Would it be possible to update the stored preview when a post is edited?
Quote:as well as marking alerts read when viewing a topic contains alert content

I remember I implemented this in my previous website. I might have a backup, so I shall give the code back to you if you want to.
(2016-10-30, 05:24 AM)brad-t Wrote: [ -> ]Yeah, that's pretty much it, with the addition of being able to mark all alerts as read from the modal.

I figured that was why you went with a modal design and while I wish it was as fast as a traditional dropdown I've learned to embrace and design around its limitations. Although I think there's some issues with my setup right now.

Would it be possible to update the stored preview when a post is edited?
It would be possible, yeah. It might be the way to go.
(2016-10-30, 08:26 AM)Shade Wrote: [ -> ]
Quote:as well as marking alerts read when viewing a topic contains alert content

I remember I implemented this in my previous website. I might have a backup, so I shall give the code back to you if you want to.

Sure, I'll always welcome PRs Wink
How can I integrate MyAlerts to this?
<div class="float_right">
	<a href="{$mybb->settings['bburl']}/private.php">
		<div class="panel-messages"><div class="panel-messages-unread">{$mybb->user['unreadpms']}</div><i class="fa fa-envelope-o"></i></div>
	</a>
</div>

My try: 
<div class="float_right">
	<a href="{$mybb->settings['bburl']}/alerts.php">
		<div class="panel-messages"><div class="panel-messages-unread">{$mybb->user['unreadpms']}</div><i class="fa fa-bell"></i></div>
	</a>
</div>

Idk how I can get it to work with the notication counter and that. Confused
Try this:

<div class="float_right alerts {$newAlertsIndicator}">
    <a href="{$mybb->settings['bburl']}/alerts.php" class="myalerts" onclick="MyBB.popupWindow('/alerts.php?action=modal&amp;ret_link={$myalerts_return_link}', { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;">
        <div class="panel-messages"><div class="panel-messages-unread">{$mybb->user['unreadAlerts']}</div><i class="fa fa-bell"></i></div>
    </a>
</div>
(2016-11-18, 05:26 PM)Euan T Wrote: [ -> ]Try this:

<div class="float_right alerts {$newAlertsIndicator}">
    <a href="{$mybb->settings['bburl']}/alerts.php" class="myalerts" onclick="MyBB.popupWindow('/alerts.php?action=modal&amp;ret_link={$myalerts_return_link}', { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;">
        <div class="panel-messages"><div class="panel-messages-unread">{$mybb->user['unreadAlerts']}</div><i class="fa fa-bell"></i></div>
    </a>
</div>

Nothing happens when I click on it. Confused

[Image: lFMGZnk.png]
(2016-11-18, 06:27 PM)mrkiller2010 Wrote: [ -> ]
(2016-11-18, 05:26 PM)Euan T Wrote: [ -> ]Try this:

<div class="float_right alerts {$newAlertsIndicator}">
    <a href="{$mybb->settings['bburl']}/alerts.php" class="myalerts" onclick="MyBB.popupWindow('/alerts.php?action=modal&amp;ret_link={$myalerts_return_link}', { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;">
        <div class="panel-messages"><div class="panel-messages-unread">{$mybb->user['unreadAlerts']}</div><i class="fa fa-bell"></i></div>
    </a>
</div>

Nothing happens when I click on it. Confused

[Image: lFMGZnk.png]

Odd. Can you send me your URL and details for a temporary admin account?
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.
(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.