MyBB Community Forums

Full Version: Moving {$pm_notice} into welcomeblock, using lang from portal...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to move {$pm_notice} from the header template into the actual welcomeblock template. Is that possible? Just moving pm_notice doesn't seem to work.

Also I want to access and display the raw number of unread PM's. There's some lang in the portal that might work for this but I can't get it to work globally. If we can't do that is there some way to create a new lang string with the number of new PM's only? I already have a custom lang file going.

Thanks! Smile
I'm not sure why you want to move {$pm_notice} to the welcomeblock template, but in order to display the raw number of private messages you can use this:

{$mybb->user['pms_unread']}

And if you want to display the total number of private messages:

{$mybb->user['pms_total']}
Ah, thank you! I'm doing something a little crazy with the pm_notice. Making it like a badge. I have it in regular header now and using relative positioning, but this isn't a great solution.

Is it possible? Already have a plugin associated with the theme if that's necessary..

I tried evaluating $pm_notice before $welcomeblock in global.php, but the text inside the pm_notice bar was not showing. I'm not sure what else you need to do. :/