MyBB Community Forums

Full Version: MyAlerts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2013-03-03, 01:56 PM)Euan T. Wrote: [ -> ]Hm. It should mark them read as soon as you open the menu, but you'll have to refresh to see that they've actually been marked read (which is something I plan to change).
No, I've noticed this many times. When I open and read alerts and then go to some other page when the menu haven't been closed back, they aren't marked as read.

I'm not talking about real time, I did that HTML modification for real time if you remember.
Yeah I have noticed that. To mark alerts as read you have to click the Alert link and then click away.
(2013-03-03, 02:08 PM)crazy4cs Wrote: [ -> ]
(2013-03-03, 01:56 PM)Euan T. Wrote: [ -> ]Hm. It should mark them read as soon as you open the menu, but you'll have to refresh to see that they've actually been marked read (which is something I plan to change).
No, I've noticed this many times. When I open and read alerts and then go to some other page when the menu haven't been closed back, they aren't marked as read.

I'm not talking about real time, I did that HTML modification for real time if you remember.

(2013-03-03, 02:18 PM)Wildcard Wrote: [ -> ]Yeah I have noticed that. To mark alerts as read you have to click the Alert link and then click away.

That's... odd. Has it always been like this or just since the update? I'm not a JavaScript expert, but I THINK my code should mark them read as soon as you open the menu...
It has always been like that.

For instance if I am quoted I get an alert and then if I click the link 'post' in the alert, when showthread loads I still have an alert.

I have to open the drop-down and click away to get rid of it.
Strange. Just tested it on my forum and it marks them read as soon as I open the popup. Perhaps you'll have to wait a second or so for the AJAX request to complete? Try opening the Chrome console and go to the Network tab. See if a new request is made to xmlhttp.php when you open the popup.

Also note the AJAX call is made only when the dropdown finished animating fully.
EDITED

Quote:That's odd. Are you using the myalerts_load_lang hook to load the required language file and is the language code the same as the code used in the DB?

The problem is actually rather obvious (once you notice it, clearly) and found it while I was writting a long explnation of my situation to you Smile

$tempkey != $tempKey

Capital letters make the difference, that is way I stick to lower case letter in my code Toungue

Quote: Re: marking them read, all alerts in the dropdown should be marked as read when you open the dropdown. The following code (in the jQuery version) should handle it:

Is there any id that should remain intact for the JS to work? I did not edited the JS file itself but it is no working, at all. It just works if I go to the alerts page (which looks runs a different trigger to mark all alerts as read).
(2013-03-03, 10:12 PM)Omar G. Wrote: [ -> ]EDITED

Quote:That's odd. Are you using the myalerts_load_lang hook to load the required language file and is the language code the same as the code used in the DB?

The problem is actually rather obvious (once you notice it, clearly) and found it while I was writting a long explnation of my situation to you Smile

$tempkey != $tempKey

Capital letters make the difference, that is way I stick to lower case letter in my code Toungue

Quote: Re: marking them read, all alerts in the dropdown should be marked as read when you open the dropdown. The following code (in the jQuery version) should handle it:

Is there any id that should remain intact for the JS to work? I did not edited the JS file itself but it is no working, at all. It just works if I go to the alerts page (which looks runs a different trigger to mark all alerts as read).

1) Ah. Crud. That's what happens when you work tipsy...

2) Yes, you should keep the IDs intact in the alert_row_popup template. Here's the original code:

<li class="alert_row {$alert['rowType']}Row{$alert['unreadAlert']}" id="alert_row_popup_{$alert['id']}">
	<a class="avatar" href="{$alert['userLink']}"><img src="{$alert['avatar']}" alt="{$alert['username']}'s avatar" width="24" height="24" /></a>
	<div class="alertContent">
		{$alert['message']}
	</div>
</li>

It relies on the ID being exactly that so it can grab the alert ID to send back to xmlhttp.php.
(2013-03-03, 10:12 PM)Omar G. Wrote: [ -> ]EDITED

Quote:That's odd. Are you using the myalerts_load_lang hook to load the required language file and is the language code the same as the code used in the DB?

The problem is actually rather obvious (once you notice it, clearly) and found it while I was writting a long explnation of my situation to you Smile

$tempkey != $tempKey

Capital letters make the difference, that is way I stick to lower case letter in my code Toungue

Quote: Re: marking them read, all alerts in the dropdown should be marked as read when you open the dropdown. The following code (in the jQuery version) should handle it:

Is there any id that should remain intact for the JS to work? I did not edited the JS file itself but it is no working, at all. It just works if I go to the alerts page (which looks runs a different trigger to mark all alerts as read).

Fixed in #51 Smile
I am update plugin. Delete old version and install new version. But plugin doesn't work. I am select options on "/usercp.php?action=alert_settings" and click save but when page is refresh nothing change. I am waiting for your suggestions.
Did you deactivate and re-activate the plugin?