Hey there I would like for every time someone gets a private message on my forum they would get this notification:
I know this seems impossible and yes i have no idea how to make it i just made the design and the inbox section.
pls help
You can display it with the variable
{$mybb->user['pms_total']}
in the template header_welcomeblock_member_pms
thanks this really helped me its working great! but now i see that i want it to show only unread РMS. is there any way to do that?
You can probably use
Ajax PM Notification which is old but works fine (I've it on MyBB 1.8.26).
You'll have to modify templates to fit the design you want.
thanks for the help guys but i figured it out and just did it with the variable {$mybb->user['pms_unread']}
but now i have a issue. when all pms are read it shows as 0 but i want it to not show at all.
That's why I've replied...
(2021-06-18, 06:09 AM)LuFo Wrote: [ -> ]Maybe with the plugin template conditional (http://mybbhacks.zingaburga.com/showthread.php?tid=464) and something like this
<if $mybb->user['pms_total'] != 0 then>
your html code
{$mybb->user['pms_total']}
your html code
</if>
Change it with your variable
Or add a class:
.unread_0 { display: none;}
And in the element showing your number of unread PM, use (example if it's a span with already the class "redbullet"):
<span class="redbullet unread_{$mybb->user['pms_unread']}">
If the count is 0, the
display:none
will be used, else not
definitely better, good job
(2021-06-18, 02:42 PM)Crazycat Wrote: [ -> ]Or add a class:
.unread_0 { display: none;}
And in the element showing your number of unread PM, use (example if it's a span with already the class "redbullet"):
<span class="redbullet unread_{$mybb->user['pms_unread']}">
If the count is 0, the display:none
will be used, else not
(2021-06-18, 02:42 PM)Crazycat Wrote: [ -> ]Or add a class:
.unread_0 { display: none;}
And in the element showing your number of unread PM, use (example if it's a span with already the class "redbullet"):
<span class="redbullet unread_{$mybb->user['pms_unread']}">
If the count is 0, the display:none
will be used, else not
where should i add all of this?