Visit Mozilla.org

MDC:Modèles personnalisés

Un article de MDC.

Comment aider : contenu
Listes
Pages à traduire
Traductions à relire
Traductions en cours
Guides
Pour commencer
Guide du rédacteur
Guide de nommage des pages
Pages de désambiguation
Commencer une nouvelle localisation de MDC
Copyrights et licences
Références
Référence des balises wiki
Classes CSS personnalisées
Modèles personnalisés
Extensions MediaWiki
Redirections externes
Cette page est en cours de traduction, son contenu peut donc être incomplet ou contenir des parties en anglais. N'hésitez pas à participer à sa traduction à partir de MDC:Custom Templates

Cette page liste certains des les modèles MediaWiki créés pour être utilisés sur MDC. La liste complète peut être obtenue sur Special:Allpages en filtrant seulement les pages de l'espace de noms Modèle. Toute la liste n'est pas décrite ici.

Consultez également la référence des balises wiki et la liste des classes particulières.

Sommaire

[modifier] Modèles liés à la traduction

[modifier] Modèle:Traduction en cours

Ce modèle permet de suivre l'avancement des pages à traduire. Il permet de lister automatiquement celles-ci dans une catégorie spéciale Traduction en cours. Pour l'utiliser, ajoutez la ligne suivante en haut de la page que vous avez commencé à traduire (juste en dessous de <breadcrumbs></breadcrumbs> le cas échéant).

{{Traduction en cours|Titre de la page anglaise}}

Une fois la page entièrement traduire, remplacez ce modèle par Traduction à relire (voir ci-dessous).

[modifier] Modèle:Traduction à relire

Ce modèle permet de suivre les pages traduites qui ont besoin d'être relues. Pour obtenir un cadre indiquant cet état de relecture, il vous suffit d'ajouter la ligne suivante tout en haut de la page concernée :

{{Traduction à relire}}

Ce modèle ajoute également les pages concernées à une catégorie Traduction à relire. Dès que la relecture est terminée, cette ligne peut être supprimée.

[modifier] Création d'hyperliens

[modifier] Modèle:anch

Modèle:anch insère un lien vers une ancre. {{anch|haut}} produit <a href="#haut">haut</a> (haut). Notez qu'avec ce modèle, vous ne pouvez pas choisir la description du lien qui aurait un nom différent de l'ancre, parce que l'idée était de créer un modèle permettant de lier facilement d'autres sections du document.

[modifier] Modèle:bug

Modèle:bug permet de créer un lien vers un bug de bugzilla.mozilla.org en utilisant simplement cette syntaxe : {{bug|123456}}. Cela vous donne : bug 123456.

[modifier] Modèle:enter-bug

Modèle:enter-bug lets you link to a Enter bug page on bugzilla.mozilla.org with specific product and component. For example, {{enter-bug|Core|Testing}} shows up as Modèle:enter-bug.

[modifier] Modèle:LXRSearch

Modèle:LXRSearch can be used (somewhat painlessly) to create an LXR search URL. The syntax is as follows: {{LXRSearch|type|param|search-string|link-text}}. The parameters are used in the following ways:

  • type must be one of search (a string search through source), find (a file name search), or ident (a search through token names in Mozilla source).
  • param must be one of string (for string/file name searches) or i (for token searches). If templates had some conditional power we could get away with one parameter instead of two, but they don't. An extension could probably work around this, as always.
  • search-string is whatever you'd type in the search box on LXR if you were doing the search there, except that spaces should be converted to +.
  • link-text is the text for the link that will be created.

[modifier] Modèle:source

Modèle:source allows you to link to a Mozilla source code file without having to type a long LXR URL using this syntax: {{source|browser/Makefile.in}}. This gives you: browser/Makefile.in. The text of the link is the path provided; to use something else as text see Modèle:named-source.

  • Ideally we could have a third parameter here for link text, but this isn't possible with MediaWiki right now (bug). It has been suggested that coding an extension for this should be easy:
It seems that noone has mentioned what's the simplest solution to this template problem: Extensions
<if input="{{{1}}}" matches="asdf">text to output</if>
making an extension like that would be trivial
you could just have it skip producing output if the input was ^\{{3}.*?\}{3}$"

[modifier] Modèle:named-source

Modèle:named-source is essentially the same as Modèle:source except that you specify the text of the hyperlink using an additional parameter beyond the path parameter using this syntax: {{named-source|browser/Makefile.in|Firefox's base Makefile.in}}. This gives you: Firefox's base Makefile.in.

[modifier] Liens vers des pages de référence

(Ces modèles ne sont pas beaucoup utilisés pour l'instant)

Utilisation : {{cssxref|color}}: color.

Ce modèle permet d'éviter de taper un lien complet comme : [[CSS:color|color]].


[modifier] Modèles divers

[modifier] Modèle:block-title

Modèle:block-title can be used to create bolded text which visually serves as a title for a block in a page, does not appear in the auto-generated table of contents, and can act as a link target just as headings do. The syntax is: {{block-title|title}}, where title is whatever you want displayed. title also serves as the target for links to the section you are titling. Modèle:block-title is meant for use in titling Modèle:sidenotes, tables, images, and code blocks, particularly in places where you'll be referring to the particular item more than once or in places not close to the item itself.

[modifier] Modèle:Clr

Modèle:Clr inserts a <br style="clear:both;" /> to make sure the text following it is below any floating images or other figures. Usage: {{Clr}}.

  • Please note that using this template may mess up the layout of the whole page, for example because the navigational panel in default skin is floated at the left side, so everything after {{Clr}} will also be below the navigational panel.

[modifier] Modèle:deprecated_header

Modèle:deprecated_header inserts a deprecated mark bar spread out across the page to discourage the use of, e.g., a function, method or property which is officially deprecated. The deprecated bar typically would be placed directly underneath the main page title (or breadcrumb navigation if available) of, e.g., a specific function, method or property specification page. Usage: {{deprecated_header}}. Result:

Déprécié

[modifier] Modèle:deprecated_inline

Modèle:deprecated_inline inserts an in-line deprecated mark to discourage the use of, e.g., a function, method or property which is officially deprecated. Usage: {{deprecated_inline}}. Example:

  • Item 1
  • Item 2 Déprécié
  • Item 3

[modifier] Modèle:disambig

Modèle:disambig ...docs still need to be done.

[modifier] Modèle:non-standard_header

Modèle:non-standard_header inserts a non-standard mark bar spread out across the page to discourage the use of a particular type of functionality, e.g., a function, method, property, or attribute which has not been standardized. The non-standard bar would typically be placed directly underneath the main page title (or breadcrumb navigation if available) of a specific function, method, property, or attribute documentation page. Usage: {{non-standard_header}}. Résultat :

Non standard

[modifier] Modèle:non-standard_inline

Modèle:non-standard_inline inserts an in-line non-standard mark to discourage the use of, e.g., a function, method, property, or attribute which has not been standardized. Usage: {{non-standard_inline}}. Exemple :

  • Item 1
  • Item 2 Non standard
  • Item 3

[modifier] Modèle:ref and Modèle:note

Modèle:ref et Modèle:note peuvent être utilisés pour placer des notes de bas de page dans des articles. Le numéro de la note de bas de page est créé par {{ref|quelquechose}}, où quelquechose doit être un mot descriptif adapté du contenu de la note. Ensuite, à la fin du document, insérez le code suivant pour créer une liste ordinale pour les informations sur les notes :

# {{note|quelquechose}} Bla bla, texte pour la première note de pied de page
# {{note|autrechose}} Le texte pour une autre note de pied de page
# ...


[modifier] Modèle:obsolete_header

Modèle:obsolete_header inserts an obsolete mark bar spread out across the page to prevent the use of e.g. a function, method or property which is officially obsolete. The obsolete bar would typically be placed directly underneath the main page title (or breadcrumb navigation if available) of e.g. a specific function, method or property specification page. Usage: {{obsolete_header}}. Result:

Obsolète

[modifier] Modèle:obsolete_inline

Modèle:obsolete_inline inserts an in-line obsolete mark to prevent the use of e.g. a function, method or property which is officially obsolete. Usage: {{obsolete_inline}}. Example:

  • Item 1
  • Item 2 Obsolète
  • Item 3


[modifier] Modèle:Précédent, Modèle:Suivant et Modèle:PrécédentSuivant

Modèle:Précédent, Modèle:Suivant et Modèle:PrécédentSuivant provide navigation controls for articles which are part of sequences. For the single-way templates, the only parameter needed is the wiki location of the previous or next article in the sequence. For PreviousNext, the two parameters needed are the wiki locations of the appropriate articles. The first parameter is for the previous article and the second is for the next article.


[modifier] À supprimer ?

[modifier] Modèle:sidenote

Due to limitations of templates in Mediawiki which prevent templates from being nested (e.g., {{sidenote|left|See also {{bug|123456}}.}}, where the end of the inner template is incorrectly parsed as the end of the outer template), this template should no longer be used. Instead, use the following:

<div class="side-note-left">...</div> <!-- for a left-floated sidebar -->
<div class="side-note-right">...</div> <!-- for a right-floated sidebar -->

[modifier] Voir aussi