/**
  * Add "x email-tmwed open account requests" notice
  * @param $notice
  * @return bool
  */
 public static function tmwAccountsNotice(OutputPage &$out, Skin &$skin)
 {
     global $wgTMWAccountNotice;
     $context = $out->getContext();
     if (!$wgTMWAccountNotice || !$context->getUser()->isAllowed('tmwaccount')) {
         return true;
     }
     # Only show on some special pages
     $title = $context->getTitle();
     if (!$title->isSpecial('Recentchanges') && !$title->isSpecial('Watchlist')) {
         return true;
     }
     $count = TMWAccount::getOpenEmailTMWedCount('*');
     if ($count > 0) {
         $out->prependHtml('<div id="mw-tmwaccount-msg" class="plainlinks mw-tmwaccount-bar">' . $out->parse(wfMsgExt('tmwaccount-newrequests', 'parsemag', $count), false) . '</div>');
     }
     return true;
 }
 /**
  * Add "x email-confirmed open account requests" notice
  * @param $notice
  * @return bool
  */
 public static function confirmAccountsNotice(OutputPage &$out, Skin &$skin)
 {
     global $wgConfirmAccountNotice;
     $context = $out->getContext();
     if (!$wgConfirmAccountNotice || !$context->getUser()->isAllowed('confirmaccount')) {
         return true;
     }
     # Only show on some special pages
     $title = $context->getTitle();
     if (!$title->isSpecial('Recentchanges') && !$title->isSpecial('Watchlist')) {
         return true;
     }
     $count = ConfirmAccount::getOpenEmailConfirmedCount('*');
     if ($count > 0) {
         $out->prependHtml('<div id="mw-confirmaccount-msg" class="plainlinks mw-confirmaccount-bar">' . $context->msg('confirmaccount-newrequests')->numParams($count)->parse() . '</div>');
         $out->addModules('ext.confirmAccount');
         // CSS
     }
     return true;
 }