Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: Number of private messages on top of board Aug 28th, 2014 at 12:04pm Mark & QuoteQuote This makes the PM count display cleaner when all private messages are unread. Code Index: cgi-bin/yabb2/Languages/English/Main.lng =================================================================== --- cgi-bin/yabb2/Languages/English/Main.lng (revision 1555) +++ cgi-bin/yabb2/Languages/English/Main.lng (working copy) @@ -161,7 +161,9 @@ '152' => 'you have', '153' => 'messages', '154' => 'are new.', +'154b' => 'new messages.', '155' => 'is new.', +'155b' => 'new message.', 'nonew' => 'and no new messages.', '231' => 'Gender', 'female' => 'Female', Index: cgi-bin/yabb2/Sources/Load.pm =================================================================== --- cgi-bin/yabb2/Sources/Load.pm (revision 1555) +++ cgi-bin/yabb2/Sources/Load.pm (working copy) @@ -109,13 +109,21 @@ } if ( ${$username}{'PMmnum'} == 1 ) { - $yyim = + if ( ${$username}{'PMimnewcount'} == 1 ) { + $yyim = qq~$load_txt{'152'} <a href="$scripturl?action=im">${$username}{'PMmnum'} $load_txt{'155b'}</a>~; + } + else { + $yyim = qq~$load_txt{'152'} <a href="$scripturl?action=im">${$username}{'PMmnum'} $load_txt{'471'}</a>, $imnewtext~; + } } elsif ( !${$username}{'PMmnum'} && !${$username}{'PMimnewcount'} ) { $yyim = qq~$load_txt{'152'} <a href="$scripturl?action=im">${$username}{'PMmnum'} $load_txt{'153'}</a>~; } + elsif ( ${$username}{'PMmnum'} == ${$username}{'PMimnewcount'} ) { + $yyim = qq~$load_txt{'152'} <a href="$scripturl?action=im">${$username}{'PMmnum'} $load_txt{'154b'}</a>~; + } else { $yyim = qq~$load_txt{'152'} <a href="$scripturl?action=im">${$username}{'PMmnum'} $load_txt{'153'}</a>, $imnewtext~; GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2234 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: Number of private messages on top of board Reply #1 - Aug 28th, 2014 at 1:31pm Mark & QuoteQuote Okay. Perfection is not possible. Excellence, however, is excellent. WWW IP Logged