/** * Show notification (in Oasis) * * @author macbre */ function SiteWideMessagesAddNotifications(&$skim, &$tpl) { global $wgOut, $wgUser, $wgExtensionsPath; wfProfileIn(__METHOD__); if (F::app()->checkSkin('oasis')) { // Add site wide notifications that haven't been dismissed if ($wgUser->isLoggedIn()) { $msgs = SiteWideMessages::getAllUserMessages($wgUser, false, false); } else { $msgs = SiteWideMessages::getAllAnonMessages($wgUser, false, false); } if (!empty($msgs)) { wfProfileIn(__METHOD__ . '::parse'); foreach ($msgs as &$data) { $data['text'] = $wgOut->parse($data['text']); } wfProfileOut(__METHOD__ . '::parse'); wfRunHooks('SiteWideMessagesNotification', array($msgs)); $wgOut->addScript("<script type=\"text/javascript\" src=\"{$wgExtensionsPath}/wikia/SiteWideMessages/js/SiteWideMessages.tracking.js\"></script>"); } } wfProfileOut(__METHOD__); return true; }