is there any instruction for adding notifications to other plugins?
https://x0.at/BuJ.png
this is the issue im facing.
How do I include just the amount of alerts someone has what's the variable? I've tried things like ($alerts) ($alertslink) and they don't work.
Try: {$mybb->user['unreadAlerts']}
.
(2021-01-12, 01:08 PM)Laird Wrote: [ -> ]Try: {$mybb->user['unreadAlerts']}
.
Legend! that fixed it.
Now my last issue is for some reason, the js doesn't seem to be working.
this is my code for the alerts in my top-menu bar.
<li class="alerts ">
<a href="/alerts.php" onclick="if (!window.__cfRLUnblockHandlers) return false; MyBB.popupWindow('/alerts.php?action=modal', { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;"><link class="rippleJS"><i class="fa fa-bell"></i> <span id="new-message" style="background: #333 !important;">{$mybb->user['unreadAlerts']}</span></a>
</li>
This is how it looks:
But when I click the alert icon, nothing happens, no errors in the console either. When I hover over the alert, bottom left it changes the the url "https://domain.com/alerts.php" so that works fine just can't understand why the JS isn't working but work's for all the other elements, any ideas?
What's that business with window.__cfRLUnblockHandlers
? Might that be the cause? Is it necessary? If not, simply remove if (!window.__cfRLUnblockHandlers) return false;
and see what happens (but you should probably understand what you're removing and why it was there in the first place).
(2021-01-12, 01:53 PM)Laird Wrote: [ -> ]What's that business with window.__cfRLUnblockHandlers
? Might that be the cause? Is it necessary? If not, simply remove if (!window.__cfRLUnblockHandlers) return false;
and see what happens (but you should probably understand what you're removing and why it was there in the first place).
This is the entire line:
onclick="if (!window.__cfRLUnblockHandlers) return false; MyBB.popupWindow('/alerts.php?action=modal'
I'm assuming that it's some time of check so if someone is on a browser that fails to load the JS it re-directs the main alerts.php?action=modal page, ill remove and see what happens.
(2021-01-12, 01:53 PM)Laird Wrote: [ -> ]What's that business with window.__cfRLUnblockHandlers
? Might that be the cause? Is it necessary? If not, simply remove if (!window.__cfRLUnblockHandlers) return false;
and see what happens (but you should probably understand what you're removing and why it was there in the first place).
Removing it worked. I'm trying to mimic a "drop down" type of display that another mybb forum has I'm assuming that's why that snippet of code was in there.
i`m trying to install and when i came to plugin in the ACP its not shows me any plugin that i have. its show only white screen:
https://prnt.sc/wntbm8