The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hi
in vbulletin 3 and 4 it was possible to check user's unread private messages in any template (footer, header ...) with this if condition: Code:
<if condition="$bbuserinfo[pmunread]">user has new pms</if> i found this but it checks all types of notifications , unread visitor messages, requests and ... including new private messages : Code:
{vb:data unreadCount, content_privatemessage, getUnreadInboxCount}
{vb:data canUsePmSystem, content_privatemessage, canUsePmSystem}
<vb:if condition="!empty($unreadCount)">
</vb:if>
regards |
|
#2
|
||||
|
||||
|
so for your reference here is the solution:
Code:
{vb:data canUsePmSystem, content_privatemessage, canUsePmSystem}
{vb:data folders, content_privatemessage, fetchSummary}
{vb:set folderlist, {vb:raw folders.folders}}
<vb:if condition="$canUsePmSystem">
{vb:set folder, {vb:raw folderlist.messages} }
{vb:set routeInfo.folderid, {vb:raw folder.folderid}}
<vb:if condition="!empty($folder['qty'])">
IF YOU HAVE NEW PRIVATE MESSAGES THIS SHOWS UP
</vb:if>
seems you have to define variables first and then assign them values and then use them in if conditions too many lines of codes for a simple check! |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|