Extension:NoTOC/es
From Linux Web Expert
<translate> This extension stores its source code on a wiki page.</translate> <translate> Please be aware that this code may be unreviewed or maliciously altered.</translate> <translate> They may contain security holes, outdated interfaces that are no longer compatible etc.</translate> <translate> Note:</translate> <translate> No [[<tvar name=localisation>Special:MyLanguage/Localisation#Translation resources</tvar>|localisation]] updates are provided for this extension by <tvar name=twn>translatewiki.net </tvar>.</translate> |
<translate> This extension is currently not actively maintained!</translate> <translate> Although it may still work, any bug reports or feature requests will more than likely be ignored.</translate> |
NoTOC Estado de lanzamiento: sin mantenimiento |
|
---|---|
Implementación | Extensión del analizador |
Descripción | Turns off Table of Contents by default on all pages |
Autor(es) | Andrew Fitzgerald (Frantiktalk) |
Última versión | 0.1.1 (2013-12-11) |
MediaWiki | |
Cambios de la base de datos | No |
Licencia | GNU Licencia Pública general 2.0 o posterior |
Descarga | See the code section |
Descargas trimestrales | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Wikis públicos que lo utilizan | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
The NoTOC extension hides the table of contents by default. The magic word __TOC__ can still be used normally.
Instalación
- <translate> <tvar name=1>Copy the code into files</tvar> and place the file(s) in a directory called <tvar name=name>
NoTOC/es
</tvar> in your <tvar name=ext>extensions/
</tvar> folder.</translate> - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
require_once "$IP/extensions/NoTOC/es/NoTOC/es.php";
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Código
- NoTOC.php
<?php
/**
* NoTOC extension - Turns off the Table of Contents (TOC) by default on all pages
* @version 0.1.1 - 2013/12/11
*
* @link https://www.mediawiki.org/wiki/Extension:NoTOC Documentation
* @link https://www.mediawiki.org/wiki/Extension_talk:NoTOC Support
*
* @ingroup Extensions
* @package MediaWiki
* @author Andrew Fitzgerald (Frantik)
* @author Karsten Hoffmeyer (Kghbln)
* @copyright (C) 2010 Andrew Fitzgerald
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
// check the call
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'This file is a MediaWiki extension and thus not a valid entry point.' );
}
// provide information
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'NoTOC',
'author' => array(
'Andrew Fitzgerald', '...'
),
'url' => 'https://www.mediawiki.org/wiki/Extension:NoTOC',
'descriptionmsg' => 'notoc-desc',
'version' => '0.1.1'
);
// show way to files
$wgExtensionMessagesFiles['NoTOC'] = dirname( __FILE__ ) . '/NoTOC.i18n.php';
// register hooks
$wgHooks['ParserClearState'][] = 'efMWNoTOC';
// perform purpose
function efMWNoTOC($parser) {
$parser->mShowToc = false;
return true;
}
- NoTOC.i18n.php
<?php
/**
* Internationalization file for the NoTOC extension.
*
* @licence GNU GPL v2+
* @author Karsten Hoffmeyer (Kghbln)
*/
$messages = array();
/** English
* @author Frantik
* @author Kghbln
*/
$messages['en'] = array(
'notoc-desc' => 'Turns off the Table of Contents (TOC) by default on all pages',
);
/** Message documentation (Message documentation)
* @author Kghbln
*/
$messages['qqq'] = array(
'notoc-desc' => '{{desc|name=NoTOC|url=https://www.mediawiki.org/wiki/Extension:NoTOC}}',
);
/** German (Deutsch)
* @author Kghbln
*/
$messages['de'] = array(
'notoc-desc' => 'Unterdrückt die automatische Generierung des Inhaltsverzeichnisses',
);
Véase también
- Extension:ForceTocOnEveryPage
- Extension:DeToc - This can be used to extract TOC HTML and to remove it or put it in some other section of the page.
Categories:
- Pages with script errors
- Pages with broken file links
- Extensions which host their code in-wiki/es
- Unmaintained extensions/es
- Parser extensions/es
- Extensions without MediaWiki version
- GPL licensed extensions/es
- ParserClearState extensions/es
- All extensions/es
- Extensions not in ExtensionJson
- Extensions not using extension registration
- TOC extensions/es