MyBB Community Forums
MyAlerts - a notification/alert system for MyBB - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: MyAlerts - a notification/alert system for MyBB (/thread-119331.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41


RE: MyAlerts - a notification/alert system for MyBB - KRMFY - 2013-01-13

<span style="float:center;"><a href="{$mybb->settings['bburl']}/usercp.php">UCP</a> | 
<a href="{$mybb->settings['bburl']}/modcp.php">MCP</a> | 
<a href="{$mybb->settings['bburl']}/admin/">ACP</a> | 
<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage} | 
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">Log Out</a>
<br></span>

Thanks in advance. Smile


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2013-01-13

Replace the above with this:

<span style="float:center;"><a href="{$mybb->settings['bburl']}/usercp.php">UCP</a> | 
<a href="{$mybb->settings['bburl']}/modcp.php">MCP</a> | 
<a href="{$mybb->settings['bburl']}/admin/">ACP</a> | 
<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage} | <myalerts_headericon> | 
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">Log Out</a>
<br></span>



RE: MyAlerts - a notification/alert system for MyBB - KRMFY - 2013-01-14

(2013-01-13, 05:03 PM)Euan T. Wrote: Replace the above with this:

<span style="float:center;"><a href="{$mybb->settings['bburl']}/usercp.php">UCP</a> | 
<a href="{$mybb->settings['bburl']}/modcp.php">MCP</a> | 
<a href="{$mybb->settings['bburl']}/admin/">ACP</a> | 
<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage} | <myalerts_headericon> | 
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">Log Out</a>
<br></span>

Thanks a lot. +1 Rep Smile


RE: MyAlerts - a notification/alert system for MyBB - iHydra - 2013-01-14

Question: How much resources would this use, would it slow the forum significantly?

Let's say a Small - Medium forum board.


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2013-01-14

Very little. It's running on several fairly large boards (including WWEForums) with no issues reported to my self.


RE: MyAlerts - a notification/alert system for MyBB - FBI - 2013-01-15

This plugin is nice and promising. So, instead of my medium size forum, I'll use and installing on big forum in the next 1-2 week (5 times larger than WWEForums) . Smile


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2013-01-15

Great to hear Smile


RE: MyAlerts - a notification/alert system for MyBB - Geekmanu - 2013-01-20

How to fix this? Confused

[Image: sg0gpc.png]


RE: MyAlerts - a notification/alert system for MyBB - Euan T - 2013-01-20

Looks like either a problem with the language files or your styling - I'm tempted to say the latter. Without a link to your site and details of a demo account, I can hardly help any further.


RE: MyAlerts - a notification/alert system for MyBB - Bitz - 2013-02-06

(2012-12-18, 03:19 AM)echofloripa Wrote: Hi euantor, the link to the PMs are showing the wrong ids, what would that be?



(2012-12-17, 05:35 AM)maniacmusic Wrote: Can someone make a like-plugin that supports MyAlerts? Big Grin

I did it for the thankyou plugin.

Basically:

1) Change the file mybb/thankyoulike.php
After:

Quote:if($tlid)
{
add:
Quote:
    //Add alert for the thanks
     thankyoulike__addThankyouAlert($thread, $post);

And at the end add the function:

Quote:function thankyoulike__addThankyouAlert($thread, $post)
{
global $mybb, $cache, $Alerts;
if ($mybb->settings['myalerts_enabled'] AND $Alerts instanceof Alerts)
{
// UID to give alert to, alert type - should be unique - usually the name of your plugin, TID - use only if alert is related to specific thread, Alert from UID - in this case I want users to know who awarded them, Alert content - any specific content you wish to send in the alert
$Alerts->addAlert($post['uid'], 'post_thankyou', $post['tid'], $mybb->user['uid'], array(
'tid'       =>  $post['tid'],
't_subject' =>  $thread['subject'],
'pid'       =>  $post['pid']
));
}
}


2) Then change mybb/inc/plugins/myalerts.php
after $alert['rowType'] = 'postAlert'; }
add:
Quote:elseif ($alert['alert_type'] == 'post_thankyou' /* AND $mybb->settings['myalerts_alert_post_thankyou'] */)
{
$alert['threadLink'] = $mybb->settings['bburl'].'/'.get_thread_link($alert['content']['tid'], 0, '').'?pid='.$alert['content']['pid'].'#pid'.$alert['content']['pid'];
$alert['message'] = $lang->sprintf($lang->myalerts_post_thankyou, $alert['user'], $alert['threadLink'], htmlspecialchars_uni($parser->parse_badwords($alert['content']['t_subject'])), $alert['dateline']);
$alert['rowType'] = 'postAlert';
}
Add "'post_thankyou'," to the end of the two instances of the "$possible_settings = array(", like this:

Quote: $possible_settings = array(
'rep',
'pm',
'buddylist',
'quoted',
'post_threadauthor',
//mod_start
'post_thankyou', //mod_end
);

3) Enable the alert for all users
Quote:UPDATE mybb.mybb_users SET myalerts_settings = '{"rep":1,"pm":1,"buddylist":1,"quoted":1,"post_threadauthor":1,"post_thankyou":1}';

I think that's all to have you thankyou plugin working with myalerts Smile
Of course you could use the "add_hook" method as instructed here.

I tired doing this, but instead of actually showing a notification, it shows nothing at all. Help. o3o