Manual:$wgLogo

From mediawiki.org
This page is a translated version of the page Manual:$wgLogo and the translation is 62% complete.
¡Atención! Atención: MediaWiki installations after MediaWiki 1.35.0 should be using $wgLogos as $wgLogo is no longer supported.[1]
Server URLs and file paths: $wgLogo
El URL del logo del sitio.
Introducido en la versión:pre 1.1.0
Eliminado en la versión:aún se usa
Valores permitidos:(ruta relativa o URL absoluto)
Valor predeterminado:"{$wgScriptPath }/resources/assets/change-your-logo.svg" (1.38+)

"{$wgScriptPath }/resources/assets/wiki.png" (1.24-1.37)
"{$wgStylePath }/common/images/wiki.png" (pre 1.1.0 – 1.23)

(Nota: The default value of this variable depends on other variables, such as the values set in Setup.php , after LocalSettings.php is executed)

Detalles

El logo del sitio MediaWiki.org. El tuyo debería tener el mismo tamaño, es decir, 135 píxels.

Sirve para indicar el URL del logo del sitio, es decir, la imagen que aparece en la esquina superior izquierda en la mayoría de instalaciones de MediaWiki. Puede ser un URL absoluto con indicación de protocolo o bien una ruta relativa a DOCUMENT_ROOT. Si se indica una ruta relativa, deberá comenzar con una barra (un archivo en DOCUMENT_ROOT es /archivo.png, no archivo.png).

Se espera que el logotipo sea de 135 x 135 píxels, pero estos valores pueden aumentarse modificando el código CSS del sitio; los logotipos de un tamaño inferior pueden usarse directamente sin necesidad de hacer cambio alguno. Note that if you use a bigger image, MediaWiki will not resize this image! Instead, the image will be cut off so that only part of it (the upper left-hand corner to be precise) will be visible. If this corner is completely white, it might look like the image does not display although in fact it does.

¡Atención! Atención: No te limites simplemente a sustituir el logotipo predeterminado que trae instalado MediaWiki (/resources/assets/change-your-logo.svg); este archivo se sobreescribirá automáticamente cuando actualices el software, y tus cambios se perderán.

Ejemplos

Sube a tu servidor la imagen con tu logotipo. Supongamos que termina ubicada en /images/4/47/mylogo.png. Entonces puedes usarlo como logotipo de tu sitio añadiendo esta línea a LocalSettings.php:

$wgLogo = $wgScriptPath . '/images/4/47/mylogo.png';

Make sure that you add this line below the definition of $wgScriptPath! Otherwise, $wgScriptPath will still be undefined and the logo will not display.

Vary logo per language

With CSS, it is possible to use a different logo for each interface language:

.mw-wiki-logo:lang(ar) {
	background-image: url( /logos/ar.png ) !important;
}

.mw-wiki-logo:lang(de) {
	background-image: url( /logos/de.png ) !important;
}

Véase también