MyBB Community Forums

Full Version: Tweak Private Message Variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all!

I am using the {$mybb->user['pms_unread']} variable on my forum and I want to edit it.

What I want to do is make it say how many you have if you have any unread in parenthesis. Example: (1)

BUT, when a user does not have one unread, I want it to completely disappear.

Thanks in advance.
Do you want something like this?

If the user has unread private messages:
[Image: 546h4p.png]

If the user does not have any unread private messages:
[Image: 245j11k.png]

Or do you want it like this if the user has no unread private messages?
[Image: 30hom53.png]
Upload the attached file to ./inc/plugins, and activate.
[attachment=21849]
I installed it. Now what?
It looks like you've made some edits your header template.

Can you post your header_welcomeblock_member template?
I actually have it in my header template and I am using {$lang->welcome_pms_usage}. Can you please make it say "(x New)
Don't put it in your header template, because this displays to the guests as well.

[Image: mbk3v7.png]

As for what you want it to say, do you just want "(x New)", or "(x New, x Total)"?
Never mind, I got it. Thank you so much dude!

I will make those changes now. Thanks