This what i use (no seperate template):
Place this in your phpinclude template..
PHP Code:
$headpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers");
$headpmsmessage= "You have $headpms[messages] new message(s)";
Place
$headpmsmessage in your header (or anywhere else) to show the text "You have X new messages" (X being the new message count).
It does add a query to every page.
Just to hijack this thread for a related question..
I use images that change if there are new PMs (using a variant of the above code) - I want to have $headpmsmessage as the alt text for the images but I cant seem to get it to parse the variable. I know it can be done (a variable as alt text) as the header image uses $bbtitle for it's alt text.
Any ideas? Thanks.