How to Add Alexa Certificate to Mediawiki Header?

228 Views Asked by At

I would like to add Alexa Certificate to Mediawiki, put i can't find the header file to include the code (<script></script>) in there.

  1. Which file should i put for all Pages to be certified and recognize by Alexa?
  2. Is there a way to put the code in there without damaging any Page?
4

There are 4 best solutions below

1
AudioBubble On

For everyone that is trying to solve this problem, you simply locate your Skin file and you embedded the code in the .php file of your skin.

My Location was:

/skins/Vector.php

You can paste the code within one of the tags.

Hope it help anyone trying to use Alexa. :)

0
Artem P On

Add in LocalSettings.php:

$wgHooks["ParserFirstCallInit"][] = "fnAlexaCertificate";
function fnAlexaCertificate() {

  global $wgOut;

  $wgOut->addHeadItem("AlexaCertificate", '<meta name="" content="">');

  return true;
}
0
Greg Rundlett On

The easiest way to add any sitewide JavaScript to your wiki is to login as an Administrator of your wiki. Then add the necessary Javascript to MediaWiki:Common.js and MediaWiki:Mobile.js See the manual at https://www.mediawiki.org/wiki/Manual:Interface/JavaScript

0
Olivia Fair On

Add in LocalSettings.php:

$wgHooks["ParserFirstCallInit"][] = function () use ($wgOut) {
    $wgOut->addHeadItem("AlexaCertificate", '<meta name="" content="">');
    return true;
}