Extension:Link Attributes/es
Appearance
Link Attributes Estado de lanzamiento: estable |
|
---|---|
Implementación | Función del analizador |
Descripción | Adds support for the rel , rev and class attributes on links |
Autor(es) | Toby Inkster, Dennis Roczek, Sam Wilson |
Última versión | 1.1 |
MediaWiki | >= 1.35.0 |
Cambios de la base de datos | No |
Licencia | GNU Licencia Pública general 2.0 o posterior |
Descarga | |
Descargas trimestrales | 2 (Ranked 134th) |
Traduce la extensión Link Attributes si está disponible en translatewiki.net | |
This extension adds support for the rel
, rev
and class
attributes on external links:
rel
– The relationship of the linked URL as space-separated link types.rev
– Specified a reverse link; the opposite of therel
attribute. Deprecated for being very confusing.class
– A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements.
Forma de uso
The syntax is a little unorthodox. To set the rel attribute, place one or more tokens in double-parentheses at the end of the link title. e.g.:
[http://tobyinkster.co.uk/ My website((me home))]
The above would be converted to the following link:
<a href="http://tobyinkster.co.uk/" rel="me home" class="external">My website</a>
To set the class attribute, the same syntax is used, but tokens which represent classes are prefixed with a dot:
[http://tobyinkster.co.uk/ My website((me .class1 home .class2))]
Becomes:
<a href="http://tobyinkster.co.uk/" rel="me home" class="external class1 class2">My website</a>
Similarly, prefixing with a tilde (~) sets the rev
attribute.
Tokens may be prefixed by a minus sign (-) to indicate that you don't want to add the token, but remove it. For example:
[http://tobyinkster.co.uk/ My website((me -.external home))]
Becomes:
<a href="http://tobyinkster.co.uk/" rel="me home">My website</a>
The "nofollow" rel token is considered untouchable though.
Instalación
- Descarga y extrae los archivos en un directorio denominado «
Link_Attributes
» dentro de la carpetaextensions/
.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Link_Attributes - Añade el siguiente código en la parte final de tu archivo LocalSettings.php :
wfLoadExtension( 'Link_Attributes' );
- Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.
Véase también
- Extension:LinkAttributes – a different syntax for adding the attributes.
- T35886