![]() |
exclude private messages from notifications total
im trying to exclude PMs from the total count of notifications and the list.
<if condition="$notification['total'] > 0"> i know it would be built off this, i just have no idea how to set it up example <if condition="$notification['total'] > 0"> (AND IS NOT A $bbuserinfo[pmunread] NOTIFICATION) show all other notifications <else /> NO NEW NOTIFICATIONS </if> *note !$bbuserinfo[pmunread] was tried, but failed i found $notifications['pmunread'] but still cant figure out how to not show them in the notifications |
Have you tried to use the difference:
PHP Code:
|
i have not
but i found a plugin that might do the job i just need help converting one line Code:
vB_Template::preRegister('header', array('newmessages' => $vbulletin->userinfo['pmunread'])); this (along with the rest of the code) unsets pmunread from notifications and creates it individually. --------------- Added [DATE]1459912757[/DATE] at [TIME]1459912757[/TIME] --------------- i did manage to get the correct if statement PHP Code:
--------------- Added [DATE]1459913470[/DATE] at [TIME]1459913470[/TIME] --------------- I GOT IT =P lmao was so easy -_- plugin: in notifications_list Code:
unset($notifications[pmunread]); templates: Code:
<if condition="$notifications_total"> Code:
<if condition="$bbuserinfo[pmunread]"> that'll do it =) |
I think I would use the difference rather than unsetting a variable...that may cause issues...:)
|
im only unseting it in the notifications_list, what potential issues could there be? i tried the difference but couldnt get that to work.
the end goal is: (not implemented in these codes) NOTIFICATIONS LIST (no pm) Code:
<if condition="$notification['total'] > 0"> Code:
<if condition="$notifications_total"> Code:
$bbuserinfo[pmunread] btw Code:
<if condition="$notifications_total - $bbuserinfo['pmunread']"> |
I was assuming both variables mentioned were available and that you wanted to take action only if there were non-pm related notifications.
|
All times are GMT. The time now is 03:50 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|