Quote:
Originally Posted by MarkFL
Well, in your PHP code, you could do something like:
PHP Code:
$notifications = '';
//Only display for non-zero values.
if ($vbulletin->userinfo['pmunread'])
{
$notifications .= 'Unread PMs: ' . $vbulletin->userinfo['pmunread'] . PHP_EOL;
}
//Check for other notifications in the same way.
Then you could wrap the $notifications string in the appropriate HTML before appending it to a template hook or you might have a custom template designed that you would simply register this string so it can by output there.
|
Thanks for the reply
BUT i noticed that perhaps I haven't explained what i'm trying to achieve properly.
I understand that
PHP Code:
$vbulletin->userinfo['pmunread']
fetches the
number of "pmunread" notifications however lets say that there is 1 "pmunread" notification ,what would be the best way to go about retrieving information about this 1 "pmunread" notification eg:-
pmtextid,
messageread,
fromusername,
pmid and the associated (serialized) format for that notification type eg:-('user
X has just messaged you Re:
pmtext');
and then display that in a foreach loop which accounts for a dynamic list of notifications, just like the facebook notifications dropdown.
I hope this makes more sense.
Thanks again for the reply