Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: mabley on November 30, 2017, 10:13:04 PM

Title: Show total PM count
Post by: mabley 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.

Title: Re: Show total PM count
Post by: Pipke 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
Title: Re: Show total PM count
Post by: mabley on February 28, 2018, 06:19:58 PM
Thank you! Life-saver.