Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. public function DiscussionsController_AfterDiscussionTitle_Handler($Sender){
  2. if (!Gdn::Session()->IsValid())
  3. return;
  4.  
  5. $Discussion = $Sender->EventArguments['Discussion'];
  6.  
  7. if ($Discussion->CountUnreadComments === TRUE) {
  8. $Title = htmlspecialchars(T("You haven't read this yet."));
  9. echo ' <strong class="HasNew MobileHasNew JustNew NewCommentCount" title="'.$Title.'">'.T('new discussion', 'new').'</strong> ';
  10. } elseif ($Discussion->CountUnreadComments > 0) {
  11. $Title = htmlspecialchars(Plural($Discussion->CountUnreadComments, "%s new comment since you last read this.", "%s new comments since you last read this."));
  12. echo ' <strong class="HasNew MobileHasNew NewCommentCount" title="'.$Title.'">'.Plural($Discussion->CountUnreadComments, '%s new', '%s new plural', BigPlural($Discussion->CountUnreadComments, '%s new', '%s new plural')).'</strong> ';
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement