MyBB Community Forums

Full Version: MyAlerts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Another issue, it seems like alerts are not marked as read once the use opens the modal window. Is there a jQuery funtion that must be run for this to happen? If so, where should it be located in? I suck at JS.
i allready uninstall this plugin and all other who compatible with myalerts,Moderation Alerts Pack and mention me becouse they not work with myalerts
(2013-03-02, 08:42 PM)tacticalsk8er Wrote: [ -> ]
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />

<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/ins/js/jquery-1.2.6.min.js"></script> 
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/ins/js/popup.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='http://code.jquery.com/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">
    var unreadAlerts = {$mybb->user['unreadAlerts']};
</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/myalerts.js"></script>
{$stylesheets}
<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>
{$newpmmsg}

I believe it is in there, but I could be wrong.

Yes, it's definitely in there. Could you send me some details of a temporary admin account?

(2013-03-03, 03:08 AM)Omar G. Wrote: [ -> ]There seems to be something weird with the plugin, though $lang->myalerts_setting_post_tagging is set and is correct, the following returns an error message:
$tempKey = 'myalerts_setting_post_tagging';
$lang->$tempKey;

Fatal error: Cannot access empty property in /home/cosmox75/public_html/pokecosmo.com.ar/foros/inc/plugins/myalerts.php on line 959

Edit: The following also returns a weird error:
                    if (!isset($lang->$tempKey) AND !in_array($key, $baseSettings)) {
                        @$lang->load($tempKey);
                    }

/home/cosmox75/public_html/pokecosmo.com.ar/foros/inc/languages/espanol/.lang.php does not exist

$tempKey is not empty, I even verified. I had to modify the language class on the fly to ignore the error.

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?

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:

$('body').on({
	click: function(event)
	{
		event.preventDefault();
		var popup_id = $(this).attr('id') + '_popup';

		$('#' + popup_id).attr('top', $(this).height() + 'px').slideToggle('slow', function() {
			var toMarkRead = new Array;
			$('[id^="alert_row_popup_"]').each(function() {
				toMarkRead.push($(this).attr('id').substr(16));
			});

			$.get('xmlhttp.php?action=markRead', {
				my_post_key: my_post_key,
				toMarkRead: toMarkRead
			}, function(data) {

			});
		});
		return false;
	}
}, '.myalerts_popup_hook');

(2013-03-03, 07:29 AM)bizzarela Wrote: [ -> ]i allready uninstall this plugin and all other who compatible with myalerts,Moderation Alerts Pack and mention me becouse they not work with myalerts

That's fine. Don't understand why you have to specifically post about it? I'm not forcing anybody to use the plugin? It's entirely up to you if you install it or not...
i do this becouse your plugin bugged when bug will be fixed i consider add it again
>.> Would it not be easier to TELL ME what the bugs are and how to reproduce them rather than constantly complaining?
(2013-03-03, 11:05 AM)bizzarela Wrote: [ -> ]i do this becouse your plugin bugged when bug will be fixed i consider add it again

These sorts of posts must be infuriating to read for Euan.
Just a little. I use my free time to develop a plugin which I then release for free out of the kindness of my heart (when I could easily of sold it for at least $10 a go and still probably of made plenty of sales) then people like the above complain endlessly without even trying to help me help them.
^sotru

Anyone who thinks MyAlerts was easy to get to where it is now show take a walk down to GitHub and go through those commits . . . excellent work Euan and thanks for allowing us to use this without paying a dime and continuing to support it-- even when you have to deal with ungrateful peeps.

Cheers Smile
(2013-03-03, 07:03 AM)Omar G. Wrote: [ -> ]Another issue, it seems like alerts are not marked as read once the use opens the modal window. Is there a jQuery funtion that must be run for this to happen? If so, where should it be located in? I suck at JS.
That's an issue for me too. I think Alerts are marked as read once the window opens and slides away up again when we click outside it.

And yes, very excellent plugin by Euantor. People have lives, guys.
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).