The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
Have you tried to use the difference:
PHP Code:
|
Благодарность от: | ||
Dr.CustUmz |
#3
|
||||
|
||||
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"> <span>$notifications_total</span> </if> Code:
<if condition="$bbuserinfo[pmunread]"> <span>($bbuserinfo[pmunread])</span> </if> that'll do it =) |
#4
|
||||
|
||||
I think I would use the difference rather than unsetting a variable...that may cause issues...
|
#5
|
||||
|
||||
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"> <li><a href="$notification[link]"><span>$notification[total]</span> $notification[phrase]</a></li> </if> Code:
<if condition="$notifications_total"> <span>$notifications_total</span> </if> Code:
$bbuserinfo[pmunread] btw Code:
<if condition="$notifications_total - $bbuserinfo['pmunread']"> <span>$notifications_total</span> </if> |
#6
|
||||
|
||||
I was assuming both variables mentioned were available and that you wanted to take action only if there were non-pm related notifications.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|