Community Central
Community Central
Forums: Index Community Central Forum Sitenoticeis replaced by Sitenotice-translation
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Archive
Note: This topic has been unedited for 4988 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


Related wiki: w:c:jet



I am trying to use Mediawiki:sitenotice on a wiki and I am having issues. When the sitenotice is set, it is displayed for an instance and then replaced by a link to MediaWiki:Sitenotice-translation. Perhaps there is a property set somewhere that says that it should look for a translation or something. Anyway, I have tested logged in and logged out and with FF and Chrome. Atm, I have just put Welcome in the sitenotice so that ppl can see what is happening. I will replace it eventually. Any feedback is appreciated. --boy.pockets (talkmy boom) 02:33, August 17, 2010 (UTC)

Edit http://jet.wikia.com/wiki/MediaWiki:Common.js and remove the entire block:
// Sitenotice translation for all skins, not dependent on jQuery
addOnloadHook (function () {
  var siteNotice = document.getElementById ('siteNotice');
  if (!siteNotice) return;
  var firstPara = siteNotice.getElementsByTagName ('p');
  if (!firstPara || firstPara.length == 0) return;
  firstPara = firstPara[0];
  var toReplace = firstPara.parentNode;
  if (!toReplace) return; // Paranoia.
  var s = document.createElement ('script');
  s.src = wgServer + wgScriptPath
        + '/api.php?action=parse&pst&text={{MediaWiki:Sitenotice-translation}}&uselang=' + wgUserLanguage
        + '&format=json&callback=window.translateSitenotice&maxage=3600&smaxage=3600';
  s.type = 'text/javascript';
  var head = document.getElementsByTagName('head')[0];

  function doTranslation (json) {
    if (json && json.parse && json.parse.text) {
      while (toReplace.firstChild) toReplace.removeChild (toReplace.firstChild);
      toReplace.innerHTML = json.parse.text['*'];
    }
    head.removeChild (s);
  }

  window.translateSitenotice = function (json) { doTranslation (json); };
  head.appendChild (s);
});
--Ciencia Al Poder (talk) -WikiDex 16:16, August 17, 2010 (UTC)
That did the trick! - thank you ***very*** much! --boy.pockets (talkmy boom) 00:52, August 23, 2010 (UTC)