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.
One of my users reported me that, when user mentions someone in his thread and instead of posting, saves as a draft. Mentioned user still gets notification about it.

And if you get mentioned 5 times, you get 5 notifications.
I uploaded new files from github with language fix, when I click on notifications modal opens with issues, like its trying to show actual part of alerts.php page and after that js doesnt work in other places. Any idea what would be causing this issue?

Edit: I found out its related to template changes, I think I fixed it.
(2017-06-15, 10:51 PM)Darkrad Wrote: [ -> ]I uploaded new files from github with language fix, when I click on notifications modal opens with issues, like its trying to show actual part of alerts.php page and after that js doesnt work in other places. Any idea what would be causing this issue?

Edit: I found out its related to template changes, I think I fixed it.

The same thing is happening to me, working perfectly but when I try to open the popup things get weird. Would you mind sharing how you fixed it? Or does anyone else have ideas?
(2017-07-13, 01:32 AM)unfairest Wrote: [ -> ]
(2017-06-15, 10:51 PM)Darkrad Wrote: [ -> ]I uploaded new files from github with language fix, when I click on notifications modal opens with issues, like its trying to show actual part of alerts.php page and after that js doesnt work in other places. Any idea what would be causing this issue?

Edit: I found out its related to template changes, I think I fixed it.

The same thing is happening to me, working perfectly but when I try to open the popup things get weird. Would you mind sharing how you fixed it? Or does anyone else have ideas?

Make sure you have the latest version of alerts.php from here: https://github.com/MyBBStuff/MyAlerts/bl...alerts.php

Then make sure that the "myalerts_headericon" template looks like this: https://github.com/MyBBStuff/MyAlerts/bl...ricon.html
Fixed, thanks!
Amazing feature, great job!

Only a question; how can I move the alert button to the navbar?


[attachment=39095]
Yep, you'll need to modify your "header_welcomeblock_member" template, in ACP> Themes & Styles > Templates (on the left sidebar) > *YOUR THEME* > Header Templates. If you can't work out what to move, you can post the template here and I'll have a look.
(2017-07-15, 01:10 PM)Euan T Wrote: [ -> ]Yep, you'll need to modify your "header_welcomeblock_member" template, in ACP> Themes & Styles > Templates (on the left sidebar) > *YOUR THEME* > Header Templates. If you can't work out what to move, you can post the template here and I'll have a look.

Thanks for answer!!

I was trying to change it, but it looks weird, this is the code:

<div class="usermenu">
 
{$myalerts_headericon}
 
 <a class="inbox tt" href="{$mybb->settings['bburl']}/private.php" id="pm_notification" title="Private Messages"><i style="font-size: 16px;" class="fa fa-envelope-o fa-fw"></i> {$mybb->user['pms_unread']}</a>
   Welcome, <span class="userunique"><a href="{$mybb->settings['bburl']}/member.php?action=profile">{$mybb->user['username']}</a>
<div class="dropdown">
    <a data-target="#" href="#" data-toggle="dropdown" class="dropdown-toggle"><i class="tt fa fa-chevron-down" title="Click"></i>
</a>
      <ul class="dropdown-menu">
<script>
$(document).ready(function() {
//create a default avatar for those without one.
if($('.panelavatar img', this).attr('src') == ''){
$('.panelavatar img').attr('src', 'images/default_avatar.png');
}
});
</script>
 <div class="panelavatar">
 <img src="{$mybb->user['avatar']}" height="40px" width="40px" align="top" />
 </div>
        <li><a href="{$mybb->settings['bburl']}/usercp.php"><i style="font-size: 14px;" class="fa fa-cog fa-fw"></i> User CP</a></li>
  {$admincplink}
  {$myalerts_headericon} {$modcplink}
        <li><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', null, true); return false;"><i style="font-size: 14px;" class="fa fa-users fa-fw"></i> View friend list</a></li>
        <li><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><i class="fa fa-camera fa-fw"></i> Change avatar</a></li>
        <li><a href="{$mybb->settings['bburl']}/usercp.php?action=editsig"><i class="fa fa-picture-o fa-fw"></i> Change signature</a></li>
        <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}"><i class="fa fa-power-off fa-fw"></i> Log out</a></li>
      </ul>   
</div>
 </span>
</div>

<div class="usermenu-responsive">
 <span class="userunique-responsive">
  <a class="inbox" href="{$mybb->settings['bburl']}/private.php" id="pm_notification" title="Private Messages"><i style="font-size: 16px;" class="fa fa-envelope-o fa-fw"></i> {$mybb->user['pms_unread']}</a>
        
 <img class="panelavatar" style="vertical-align: middle;" src="{$mybb->user['avatar']}" alt="" height="37" width="37" />Welcome,<a href="{$mybb->settings['bburl']}/member.php?action=profile"> {$mybb->user['username']}</a></span> 
    <div class="navbar-header">
     <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse" style="margin-top: 4px;border: 0px;">
        <i class="fa fa-chevron-down"></i>
      </button>
    </div>
    <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
      <ul class="nav navbar-nav">
        <li><a href="{$mybb->settings['bburl']}/usercp.php"><i style="font-size: 14px;" class="fa fa-cog fa-fw"></i> UCP</a></li>
  {$admincplink}
  {$myalerts_headericon}{$modcplink}
  <li><a href="{$mybb->settings['bburl']}/search.php?action=unreads"><i style="font-size: 14px;" class="fa fa-eye-slash fa-fw"></i> View Unread Posts</a></li>
         <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}"><i class="fa fa-power-off fa-fw"></i> Logout</a></li>
      </ul>
    </nav>
</div>


This is the result:

[Image: f1c54aed0c51b7e5268a57246240ef6f.jpg]

Can you help me?

Regards
Hi,

Yeah, you'll need to change the "myalerts_headericon" template too (in the "MyAlerts templates" group). You'' need to change the "<li" and "</li>" to "<span" and "</span>" and that should hopefully fix it Smile
(2017-07-16, 03:16 PM)Euan T Wrote: [ -> ]Hi,

Yeah, you'll need to change the "myalerts_headericon" template too (in the "MyAlerts templates" group). You'' need to change the "<li" and "</li>" to "<span" and "</span>" and that should hopefully fix it Smile

Works perfectly!, thanks!!  Smile