Jump to content

Extension:Theme/es

From mediawiki.org
This page is a translated version of the page Extension:Theme and the translation is 9% complete.
Manual de extensiones de MediaWiki
Theme
Estado de la versión: estable
Implementación Apariencia
Descripción Allows using themes of skins
Autor(es) Ryan Schmidt
Jack Phoenix
Samantha Nguyen
Última versión 2.5.1
MediaWiki 1.43+
Licencia Public domain
(the main PHP file is PD-licensed, while some of the actual theme files may not be)
Descargar
Ejemplo ShoutWiki
$wgDefaultTheme, $wgSkipThemes
Traduce la extensión Theme si está disponible en translatewiki.net
Incidentes Tareas abiertas · Reportar un error

The Theme extension allows loading of themes (preset CSS to change the appearance of a skin). Users can determine their preferred theme by configuring this in their preferences. The $wgDefaultTheme variable can be used to control what theme is being used site-wide, and the usetheme=X parameter is accepted on a request to change the theme on a per-pageload basis.

This extension was written by Skizzerz for ShoutWiki.

Installation

  • Descarga y mueve la carpeta Theme extraída a tu directorio extensions/.
    Los desarrolladores y contribuidores de código deberían instalar la extensión desde Git en su lugar, usando:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Theme
    
  • Añade el siguiente código en la parte final de tu archivo LocalSettings.php :
    wfLoadExtension( 'Theme' );
    
  • Yes Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.

Parameters

  • $wgDefaultTheme - controls which theme is displayed by default when users visit your wiki.
  • $wgSkipThemes - (available from extension version 2.5, July 2024) allows sysadmins to disable certain themes. If you wanted to disable the StellarBook MonoBook and dark Vector themes, for example, you'd set it like so:
$wgSkipThemes = [
	'monobook' => [
		'stellarbook' => true
	],
	'vector' => [
		'dark' => true
	]
];

Available themes

Certain skins, like Bouquet , Dusk or Gamepress include themes as a part of the skin; themes can then be activated once the Theme extension is installed on your wiki.

Other skins, primarily those maintained by Wikimedia Foundation developers for use on Wikimedia Foundation websites like Wikipedia etc., do not include themes; instead their themes are located as a part of the Theme extension. Currently these kind of skins include MonoBook and Vector .

Es parte de la extensión del tema

por MonoBook
  • dark
  • pink
  • stellarbook
For Vector (2010) :
  • dark
  • dark-grey
  • deepsea (eliminado en 1.39 06bbbfd)

Included with the skins themselves

Bouquet
  • forgetmenot
  • pinkdogwood
  • tigerlily
Dusk
  • green
Gamepress
  • red (default)
  • blue
  • green
  • orange

Adding themes

To add a new theme for a core skin (such as Modern or Vector), create a directory called skinname (i.e. vector) under $IP /extensions/Theme, place the CSS file(s) there and register the new theme in Theme/extension.json file, under ResourceModules object.

To add a new theme for a custom skin, register a module for each theme in the skin's main setup file (skin.json). The naming convention is themeloader.skins.skinname-in-lowercase.themename-in-lowercase; for example, the module name of the AutumnLeaf theme for the BlueCloud skin would be themeloader.skins.bluecloud.autumnleaf.

You also need to define the key below to list the available theme names. Here's how Gamepress does that (see Gamepress' skin.json file's master version for details):

  • attributes.Theme.Modules in manifest version 2
  • ThemeModules in manifest version 1
manifest version 2 manifest version 1
{
	"attributes": {
		"Theme": {
			"Modules": [
				"gamepress": [
					"blue",
					"green",
					"orange"
				]
			]
		}
	}
}
{
	"ThemeModules": {
		"gamepress": [
			"blue",
			"green",
			"orange"
		]
	}
}