MyBB Community Forums

Full Version: MyAlerts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Tomm M might not have updated for 1.04.
Ahg Sad with that update bug I have a lot of problems now Sad
The mentionme alerts aren't working neither D:

Edit: I realized that the new version makes different the integration. So, forget about that, But now when I try to enter to Alert Settings in Control panel I got this:
/home/andyr14/foroact.com/inc/languages/english/.lang.php does not exist
or
/home/andyr14/foroact.com/inc/languages/espanol/.lang.php does not exist
if I'm in Spanish Sad

Edit 2:
I created that file (Blank) and now is working but it's supposed to work without that file.
(2013-03-29, 05:59 PM)alv4 Wrote: [ -> ]Is just me, or the new version is not working with the Post Reputation plugin of Mynetwork?

Find, around line 370:

if(isset($Alerts))
	{
		$_user = get_user($post['author']);

		if($_user['myalerts_settings'])
		{
			$_user['myalerts_settings'] = json_decode($_user['myalerts_settings'], true);
			if(isset($_user['myalerts_settings']['rep']) || $_user['myalerts_settings']['rep'] == 'on')
			{
				$Alerts->addAlert($post['author'], 'rep', $post['pid'], $mybb->user['uid'], array());
			}
		}
	}

Replace with:

if(isset($Alerts))
	{
		$queryString = "SELECT s.*, v.*, u.uid, u.usergroup FROM %salert_settings s LEFT JOIN %salert_setting_values v ON (v.setting_id = s.id) LEFT JOIN %susers u ON (v.user_id = u.uid) WHERE u.uid = ". (int) $post['author'] ." AND s.code = 'rep' LIMIT 1";
        $wantsAlert = $db->fetch_array($db->write_query(sprintf($queryString, TABLE_PREFIX, TABLE_PREFIX, TABLE_PREFIX)));

		if((int) $wantsAlert['value'] == 1)
		{
			$Alerts->addAlert($post['author'], 'rep', $post['pid'], $mybb->user['uid'], array());
		}
	}

And it'll work again.

Also, be sure you're using the GitHub version of MyAlerts which contains the patch to the lang related issue.
(2013-03-29, 08:41 PM)Shade Wrote: [ -> ]
(2013-03-29, 05:59 PM)alv4 Wrote: [ -> ]Is just me, or the new version is not working with the Post Reputation plugin of Mynetwork?

Find, around line 370:

if(isset($Alerts))
	{
		$_user = get_user($post['author']);

		if($_user['myalerts_settings'])
		{
			$_user['myalerts_settings'] = json_decode($_user['myalerts_settings'], true);
			if(isset($_user['myalerts_settings']['rep']) || $_user['myalerts_settings']['rep'] == 'on')
			{
				$Alerts->addAlert($post['author'], 'rep', $post['pid'], $mybb->user['uid'], array());
			}
		}
	}

Replace with:

if(isset($Alerts))
	{
		$queryString = "SELECT s.*, v.*, u.uid, u.usergroup FROM %salert_settings s LEFT JOIN %salert_setting_values v ON (v.setting_id = s.id) LEFT JOIN %susers u ON (v.user_id = u.uid) WHERE u.uid = ". (int) $post['author'] ." AND s.code = 'rep' LIMIT 1";
        $wantsAlert = $db->fetch_array($db->write_query(sprintf($queryString, TABLE_PREFIX, TABLE_PREFIX, TABLE_PREFIX)));

		if((int) $wantsAlert['value'] == 1)
		{
			$Alerts->addAlert($post['author'], 'rep', $post['pid'], $mybb->user['uid'], array());
		}
	}

And it'll work again.

Also, be sure you're using the GitHub version of MyAlerts which contains the patch to the lang related issue.

Thanks it worked.
The file for modify is:
inc/network/core/handles/xml_postrep.php
Yeah sorry I forgot to say what file to edit but it was pretty easy to find Smile
Euan,

I'm having trouble with the alert box hiding behind my theme...

[Image: myalertbox.png]

How might I fix this?
I mean to use xmlhttp_start hook because it load only the basics and is quicker that using global_start/end. But yeah, there are better options.
(2013-03-30, 12:21 AM)Prosper Wrote: [ -> ]Euan,

I'm having trouble with the alert box hiding behind my theme...

[Image: myalertbox.png]

How might I fix this?

http://community.mybb.com/thread-127444-...#pid925565

Should help Smile

(2013-03-30, 03:31 AM)Omar G. Wrote: [ -> ]I mean to use xmlhttp_start hook because it load only the basics and is quicker that using global_start/end. But yeah, there are better options.

Yeah, could do that. I'll be looking at the script and making it core once I get back from holiday.
So I was just upgrading to the newest version of MyAlerts, and it gave me this error:


MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'a.forced' in 'where clause'
Query:
SELECT a.*, u.uid, u.username, u.avatar, u.usergroup, u.displaygroup FROM mybb_alerts a INNER JOIN mybb_users u ON (a.from_id = u.uid) WHERE a.uid = 1 AND (alert_type IN ('') OR a.forced = 1) ORDER BY a.id DESC LIMIT 0, 5;
Please contact the MyBB Group for support.
(2013-03-31, 04:23 PM)Zueq Wrote: [ -> ]So I was just upgrading to the newest version of MyAlerts, and it gave me this error:


MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'a.forced' in 'where clause'
Query:
SELECT a.*, u.uid, u.username, u.avatar, u.usergroup, u.displaygroup FROM mybb_alerts a INNER JOIN mybb_users u ON (a.from_id = u.uid) WHERE a.uid = 1 AND (alert_type IN ('') OR a.forced = 1) ORDER BY a.id DESC LIMIT 0, 5;
Please contact the MyBB Group for support.

http://community.mybb.com/thread-127444-...#pid985450

This is also corrected in the latest version on GitHub (which is the recommended version to use - the mods site is out of date): https://github.com/euantor/MyAlerts/archive/master.zip