Advertisement:

Author Topic: Show total PM count  (Read 256 times)

Offline mabley

  • Jr. Member
  • **
  • Posts: 117
Show total PM count
« on: November 30, 2017, 10:13:04 PM »
I'm working on a new theme and I'd like to show the total PM count, but read and unread combined.

Example
[envelope icon] 34 (3)

Where 34 is the total number of PMs the user has, and 3 is how many unread.


Offline Pipke

  • Jr. Member
  • **
  • Posts: 377
    • NRNS-GAMES
Re: Show total PM count
« Reply #1 on: December 01, 2017, 01:48:21 PM »
in your example if you mean from the user who is logged in and if global var $context is set

string -> $context['messages'] does then 34
string - > $context['unread_messages'] does 3