Manual:Parameters to index.php/fr

Cette page est une liste partielle des paramètres de, le script principal du logiciel MediaWiki. La plupart de ces arguments sont habituellement passés en paramètres du GET dans l'URL, mais peuvent également être passés comme données du POST. POST est nécessaire actuellement dans certains cas, tels que l'action de purge.

Révisions de page ou version
Les paramètres de index.php s'appliquent habituellement et ont une signification qui dépend de la page concernée. La page (ou l'une de ses versions) peut être spécifiée en entrant un ou plusieurs des paramètres suivants : https:// en.wikipedia.org/w/index.php? title =Ferengi& curid =177126& diff =304901009& oldid =304764764'' Certaines actions (comme l'affichage ou la modification) agissent également sur une version particulière de la page. Une telle version est identifiée par les deux paramètres suivants, autorisant l'omission du titre et de l'ID de page.

Actions
Ce qui suit est une liste de valeurs du paramètre.

Certaines de ces actions peuvent être activées/désactivées en utilisant un paramètre de configuration dédié dans. Ces initialisations locales sont listées à chaque fois qu'elle sont disponibles.

Réécraser les préférences utilisateur
Les paramètres suivants réécrasent certaines des préférences utilisateur. Les autres paramètres expliqués dans les autres sections sont "diffonly", "internaledit", et "externaledit". Les paramètres ci-dessous concernent toutes les actions sauf "render" et "raw".

Affichage et rendu
View is the default action. If no other action is added to the URL,  is used. This action shows a page, a revision, or the difference between two revisions of the same or two different pages. Below is a (partial) list.


 * diff
 * la valeur de ce paramètre identifie une révision; la différence entre une autre révision et celle-ci est retournée :


 * si  n'est pas passé, la différence entre cette révision et la précédente pour le même article est affichée;
 * otherwise, the difference between the revision given by  and this one is shown; the value of this parameter can be a revision id, the values   or   to identify a revision relative to the one given by , and the value   to identify the latest revision of the page;
 * Notez que  et   n'ont pas besoin d'être deux révisions du même article, ce qui permet de comparer deux révisions de deux pages différentes


 * redirect
 * if the value of this parameter is 'no' and the page is a redirect, the page itself is shown and not the target of the redirect; this parameter has effect only on  and   and only if neither   nor   is given, as this is the only case where the target article is shown instead of the redirect;


 * rdfrom
 * when the page is the result of following a redirect from an external wiki, this parameter tells which wiki that was, so that the "Redirected from ..." line can be shown


 * diffonly
 * override the user's preference on whether to render the page when a diff is requested, eg.


 * search
 * if non-blank (and if searches are enabled), override all other parameters and perform a search

Les paramètres suivants ne s'appliquent qu'aux catégories.


 * from
 * if the page is a category, only list entries whose sortkey are equal or follows the value of this parameter;
 * Exemple : https://en.wikipedia.org/w/index.php?title=Special:Log&type=upload & from =20070814233520&until=20070814233525
 * Lien vers un journal de tous les téléversements d'images du 14 août 2007 depuis 23:35:20 jusque 23:36:25


 * until
 * if the page is a category, only list entries whose sortkey precedes the value of this parameter; only used if  is not passed;

Le paramètre suivant ne s'applique qu'aux images.


 * page
 * a page number in a multi-page media; it currently only applies to DjVu and PDF files; first page is numbered 1;

Historique

 * limit
 * Le nombre de modifications de page à afficher, le maximum étant de 5000 modifications.
 * Exemple : https://en.wikipedia.org/w/index.php?title=Special:Contributions &limit=13 &contribs=user&target=Atlgirl052005 - affiche 13 modifications par page.


 * dir
 * the relative order of edit history pages.
 * les modifications de page sont triées dans l'ordre décroissant des horodatages.


 * offset
 * utilise un horodatage pour spécifier quelle partie de l'historique est affichée :
 * Retourne les modifications effectuées avant l'horodatage;
 * Exemple : https://en.wikipedia.org/w/index.php?title=Special:Contributions &offset=20090815195334 &contribs=user&target=Atlgirl052005
 * Affiche les modifications qui ont eu lieu immédiatement avant l'horodatage 20090815195334 (20090815195334 n'est pas montré).
 * Le format du paramètre est aaaammjjhhmmss. Donc 20090815195334 a été créé le 15 août 2009 [20090815] à 19:53 (UTC) et 34 secondes [195334].
 * Voir Wikipedia: guide complet du diff et du link.
 * si  est ajouté, cela fonctionne à l'envers, c'est à dire en listant toutes les modifications après l'horodatage
 * Exemple : https://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20090815195334 &dir=prev &contribs=user&target=Atlgirl052005
 * Affiche les modifications réalisées immédiatement après l'horodatage 20090815195334 (20090815195334 n'est pas montré).
 * Exemple pour n'afficher seulement que la toute première modification d'une page : https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&action=history& dir=prev &limit=1


 * feed
 * a feed for the changes in the history is returned; allowed values are  and  . Peut être désactivé avec.


 * go
 * (déprécié - doit être évité, car a été remplacé)  la première page (la plus ancienne) de l'historique est affichée

Raw
Passing  returns the source code of a page or revision. For security reasons, in some versions of MediaWiki this is only allowed when using the "primary script access point", that is, when using the "ugly" URL form with index.php?title=...


 * templates
 * if passed with value, templates within the page are expanded;


 * ctype
 * the content-type value to be used in the HTTP header when returning the raw content, instead of the default ; this can only be one of the allowed types, which currently are ,  ,  , and


 * maxage
 * the value of max-age in the Cache-Control HTTP header field to be used when returning the raw page (client cache)


 * smaxage
 * the value of s-maxage in the Cache-Control HTTP header field to be used when returning the raw page (cache-server cache)


 * oldid
 * the id of a specific revision to return


 * direction
 * either,  , or  ; instead of the revision specified by oldid, returns the one following it, the one preceding it, or the current (last) one;


 * section
 * Limits output to a particular section or subsections of the document. Sections are specified with non-negative integers : section 0 being the section before any named sections, section one being the first named section or subsection and so on. The numbering scheme treats sections and subsections as identical. A list of the sections and subsections can be obtained via API with api.php?action=parse&text=&#123;&#123;:My_page&#125;&#125;&#95;&#95;TOC&#95;&#95;&prop=sections.


 * example

Modifier et soumettre
The edit and submit actions perform almost the same action. By default, they return an "edit page" form for the page. Different results can be obtained by passing other arguments; some results (such as saving the new version of a page) can only be obtained using POST. This action takes the standard arguments for specifying a page or a page revision.

Options qui modifient le formulaire d'édition
The following three options produce an effect on the edit form (the first one also affects how the page is saved.)


 * section
 * specifies the index of a section within a document to preload and edit; sections are numbered sequentially from 0 on; section 0 is the part of the article before the first section header; value  is used to append a new section to the document;


 * preload
 * specifies a page, of which the wikitext is used as the initial value of the textarea in the edit form if the page or section to be edited does not exist; if it exists the preload command is ignored; also see Manual:Creating pages with preloaded text;
 * Exemple: https://en.wikipedia.org/wiki/Talk:Main_Page?action=edit&section=new&preload=Project:Sandbox


 * preloadparams[] (or preloadparams%5B%5D): Replace $1 style parameters in preload text. For example https://mediawiki.org/wiki/Project:Sandbox?action=edit&section=new&preload=Manual:Creating_pages_with_preloaded_text/param_demo&preloadparams%5b%5d=first%20value&preloadparams%5b%5d=second%20value would cause Manual:Creating pages with_preloaded text/param demo to be preloaded into the edit form, but with $1 replaced by first value and $2 replaced by second value.
 * editintro
 * titre d'un article ou d'un modèle existant dont le rendu sera à faire au-dessus du formulaire de modification;


 * preloadtitle
 * in the case of section=new, provides initial content of the "Subject/headline" box; it can be edited before saving;
 * Exemple: https://en.wikipedia.org/w/index.php?title=User_talk:5dsddddd&action=edit&section=new&preloadtitle=The+%5B%5BWP%3AARS%7CArticle+Rescue+Squadron%5D%5D
 * Example with both preloadtitle and preload: https://en.wikipedia.org/wiki/User_Talk:Ikip?action=edit&section=new&preload=Template:Article_Rescue_Squadron_ invite&preloadtitle=Invitation


 * nosummary
 * Do not show the "headline" box when doing section=new.


 * summary
 * its value is used as the edit summary in place of the default one.


 * preview
 * if set to, overrides user preference "Show preview on first edit" (bug 9936);


 * internaledit/externaledit : réécrase les préférences utilisateur pour les éditeurs externes;
 * mode
 * this parameter affects the result page if passed with value file and using an external editor;


 * undo, undoafter
 * attempts to undo a sequence of edits, from the  revision up to the   revision; technically, this is done by trying to merge the inverse of these edits with the sequence of all subsequent edits; the values of these parameters are ids of old revisions of a page; if merge is not possible, a regular edit form for that revision is returned

Que faire ?
Les options suivantes indiquent au logiciel quoi faire dans les cas suivants : enregistrement, affichage d'un aperçu, ou de différence avec la version actuelle.


 * wpSave
 * this argument is generated when saving the content of an edit form returned by the server, but is not actually used nor required when submitting (see below for required arguments to save);


 * wpPreview
 * initialisé dans une requête POST pour demander un aperçu de la page ou de la section comme si la valeur de wpTextbox1 avait été enregistrée;


 * par défaut, retourne un formulaire de modification avec un aperçu de la valeur de wpTextbox1;
 * if the additional  argument is passed, only the rendering of the value of wpTextbox1 is shown, not the form and the other GUI element; this is similar to the result of saving and then viewing with  ; see  Manual:Live preview for more info;
 * the argument  is identical to wpPreview; therefore, a regular preview is returned if   is not passed;
 * wpDiff
 * set in a POST request to request a table showing the changes between the current version of the page or section and the version as if value of wpTextbox1 were saved;

Paramètres à enregistrer obligatoirement
The following parameters are required when a user saves a page. The edit summary field may also be required if so configured (see below).


 * wpTextbox1
 * le contenu de la nouvelle page/section;


 * wpStarttime
 * l'horodatage associé au début de la modification de la page par l'utilisateur; utilisé pour vérifier si la page a été supprimée entre ce moment et celui où elle est soumise (dans ce cas, il est demandé à l'utilisateur de confirmer l'enregistrement);


 * wpRecreate
 * dans le cas où la page a été supprimée après wpStarttime, ce champ confirme que la page doit être enregistrée;


 * wpEdittime
 * pour les nouvelles pages, il vaut wpStarttime; sinon, il correspond à l'horodatage de la dernière révision de la page; utilisé pour vérifier les conflits d'édition;


 * wpEditToken
 * an edit token; this is used to avoid users from being tricked into saving a page by following a link or pressing a button in an external site. For non-logged-in users, wpEditToken is required since revision 18112; it currently contains only the characters  rather than a random string (see edit token suffix).

For the page to be saved,,  ,   and   are required in a POST request, and neither   nor   are passed. If the page was deleted after, the boolean option   is also required.

Données supplémentaires optionnelles
The edit summary or the "ignore blank" parameter may be mandatory if "warn on blank summaries" is configured.


 * wpSummary
 * le résumé des modifications;


 * wpMinoredit
 * if set in a save request, the edit is marked as minor; for preview and diff, it is the initial value of "this is a minor edit" checkbox in the edit form;


 * wpWatchthis
 * if passed on a save request, the page is added to the user's watchlist; if it is not passed in a save request, the page is removed from the user's watchlist; for preview or diff, this is the initial value of the "watch this page" checkbox of the edit form;


 * wpSection
 * specify the index of a section within a document to submit to; sections are numbered sequentially from 0 on; section 0 is the part of the article before the first section header; value  is used to append a new section to the document;


 * wpChangeTags
 * an optional comma-separated list of tags to be added to the edit. Si certaines des balises fournies ne sont pas activées pour l'utilisation manuelle, la modification sera rejetée.


 * wpAutoSummary
 * contains the MD5-hashing of the edit summary field as initially presented to the user in the edit form; this field is used to check if the user has modified that field before submitting: if the MD5 hashing of the value of  is the same as this field, the edit summary has not been modified;


 * wpIgnoreBlankSummary
 * save page even if user has not modified the edit summary, while they were supposed to;


 * wpTextbox2
 * in case of an edit conflict, it contains the value of wpTextbox1 of the save request that generated the conflict;


 * safemode
 * some browsers are known to have problems with editing text containing Unicode characters; when a request for an edit form come from one such browser, the non-ascii characters in the initial content of the textarea are converted into the form  and the value   is hidden in the form; when submitting, the   field indicate that the the inverse translation is to be performed; a browser is considered non-Unicode-compliant if the User-Agent HTTP header matches a regular expressions in the variable $wgBrowserBlackList;


 * wpScrolltop
 * used to preserve the scrollbar position in the edit textbox when loading a preview.


 * redlink
 * if the user does not have permission to edit the page, redirect to the empty article page (e.g., "Wikipedia does not have an article with this exact name") instead of showing the permission error notice; this parameter is used on red links.


 * wpExtraQueryRedirect
 * hidden input to modify after save URL and is not used by actual edit form. Intended to be used by gadgets and such.

Pages spéciales
Most special pages have additional parameters, specific to the function they perform. As an example, the parameters for Special:Export are outlined in Parameters to Special:Export

The following URL parameters provide initial values for some input fields; they can be edited before submitting the form.
 * wpReason
 * on Special:MovePage and action=delete: text field with reason.


 * wpNewTitle
 * on Special:MovePage: text field with new title.


 * wpLeaveRedirect
 * on Special:MovePage: whether to select the "Leave a redirect behind" checkbox.


 * wpBlockReason
 * on Special:BlockIP: text field with reason.


 * wpBlockReasonList
 * on Special:BlockIP: initially selected item in the drop-down box, value should match a row in the MediaWiki:Ipbreason-dropdown.


 * mwProtect-reason
 * on action=protect: text field with reason.

Extension

 * stable
 * if set to, last stable version is shown.


 * stableid
 * like oldid except with stable image/template inclusion. Setting  will give the best version (pristine > quality > sighted > last).


 * filetimestamp
 * view the file version created at a certain date (applies only to viewing file pages)

Paramètres Userscript et extension Autoedit
Userspace JavaScript scripts and gadgets may interpret arbitrary parameters passed via GET or POST. If the user's or global JavaScript script include Lupin's Autoedit Script, the following parameters are used for automated editing: autoedit, autosummary, autoclick, and autominor. Some more details are given in Autoedit extension.

Paramètre Maxlag
Le paramètre maxlag est utilisé seulement si le logiciel s'exécute sur une grappe répliquée de la base de données.

The maxlag parameter makes it so a request is not served if there is high server traffic. maxlag parameter applies to all actions. maxlag parameter value is a number; the lower this value, the lower the traffic that causes the request not to be served. Zero is not allowed.

Voir aussi

 * m:Help:URL
 * Liste des fonctions
 * Snippets/Load JS and CSS by URL (adds withJS and withCSS parameters which are processed on the client side)
 * Liste des fonctions
 * Snippets/Load JS and CSS by URL (adds withJS and withCSS parameters which are processed on the client side)