Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Number of private messages on top of board (Read 2634 times)
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
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
Select All
 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~;
  

  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Number of private messages on top of board
Reply #1 - Aug 28th, 2014 at 1:31pm
Mark & QuoteQuote  
Okay.  Smiley
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Number of private messages on top of board

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry