Extension:NoTitle

What can this extension do?
Adds a magic word, __NOTITLE__, that lets you hide the main title heading.

Usage
Just put __NOTITLE__ on any pages where you want to hide the title. This extension will work for any skins that puts the title heading in an  with , including the default MonoBook skin.

Installation
Create a file in your extensions directory called  with the following code:

Changes to LocalSettings.php
Add the following line to your  file in the wiki root:

Known Problems
<?php $NoTitle = new NoTitle; $wgHooks['MagicWordMagicWords'][] = array($NoTitle, 'addMagicWord'); $wgHooks['MagicWordwgVariableIDs'][] = array($NoTitle,
 * On some MW 1.10 servers the above code will not work, please try using the following instead in such cases:

'addMagicWordId'); $wgHooks['LanguageGetMagic'][] = array($NoTitle,

'addMagicWordLanguage'); $wgHooks['ParserAfterStrip'][] = array($NoTitle, 'checkForMagicWord'); class NoTitle { function NoTitle {}  function addMagicWord(&$magicWords) {    $magicWords[] = 'MAG_NOTITLE';    return true;  }  function addMagicWordId(&$magicWords) {    $magicWords[] = MAG_NOTITLE;  }  function addMagicWordLanguage(&$magicWords, $langCode) {    switch($langCode) {    default:      $magicWords['MAG_NOTITLE'] = array(0, '__NOTITLE__');    }    return true;  }  function checkForMagicWord(&$parser, &$text, &$strip_state) {    global $action;    $mw = MagicWord::get('MAG_NOTITLE');    if (!in_array($action, array('edit', 'submit')) && $mw->matchAndRemove($text)) {      $parser->mOptions->mHideTitle = true;      $this->hideTitle;    }    return true;  }  function hideTitle {    global $wgOut;    $wgOut->addScript(' h1.firstHeading { position : absolute; top: 0px; left : -1000px;} '); return true; } }

?>