Manual:Parameters to index.php/uk

Ця сторінка — частковий список параметрів — основного сценарію програмного забезпечення MediaWiki. Більшість цих аргументів зазвичай даються як GET-параметри в URL, але також можуть передаватися як дані POST. POST насправді вимагається в деяких випадках, як-от дія очищення.

Page revision or version
Параметри index.php зазвичай застосовуються та мають значення, пов'язане зі сторінкою, до якої вони застосовуються. Сторінку (чи її версію) можна зазначити, набравши один або більше наступних параметрів: https:// en.wikipedia.org/w/index.php? title =Ferengi& curid =177126& diff =304901009& oldid =304764764'' Деякі дії (такі, як перегляд і редагування) також працюють на конкретній версії сторінки. Така версія ідентифікується двома наступними параметрами, дозволяючи упущення заголовку й ідентифікатора сторінки.

Дії
The following is a list of values for the   parameter.

Деякі з цих дій можна вмикати / вимикати, використовуючи виділене налаштування конфігурації в. Де доступні, ці локальні налаштування перелічені.

Перекриття налаштування користувача
Наступні параметри перекривають деякі налаштування користувача. Інші параметри, пояснені в інших розділах, — «diffonly», «internaledit» і «externaledit». Параметри нижче впливають на всі дії, крім «render» і «raw».

View and render
Перегляд — дія за замовчуванням. Якщо жодна інша дія не додана до URL, то використовується. Ця дія показує сторінку, версію чи різницю між двома версіями тієї ж або двох різних сторінок. Нижче наведено (частковий) список.


 * diff
 * значення цього параметру визначає версію, повертається різниця між іншою та цією версіями:


 * якщо  не передано, то показується різниця між цією та попередньою версіями тієї ж статті;
 * інакше показується різниця між версією, даною  та цією; значення цього параметру може бути ідентифікатором версії, значеннями   або   для визначення версії відносно даної , і значенням   для визначення останньої версії сторінки;
 * Зверніть увагу, що  і   не потребують бути двома версіями тієї ж статті, дозволяючи порівнювати дві версії двох різних сторінок


 * 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

Наступні параметри застосовуються тільки до категорій.


 * from
 * if the page is a category, only list entries whose sortkey are equal or follows the value of this parameter;
 * Приклад: https://en.wikipedia.org/w/index.php?title=Special:Log&type=upload & from =20070814233520&until=20070814233525
 * Links to a log of all the images uploaded on August 14, 2007 from 23:35:20 until 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;

Наступний параметр застосовується тільки до зображень.


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

Історія

 * limit
 * The number of page edits to list, the maximum is 5000 edits.
 * Приклад: https://en.wikipedia.org/w/index.php?title=Special:Contributions &limit=13 &contribs=user&target=Atlgirl052005 - перелічує 13 редагувань на сторінку.


 * dir
 * відносний порядок сторінок історії редагувань.
 * редагування сторінки відсортовані за спаданням часової мітки.


 * offset
 * використовує часову мітки для визначення того, яку частину історії показувати;
 * Повертає редагування, які відбулися до часової мітки;
 * Приклад: https://en.wikipedia.org/w/index.php?title=Special:Contributions &offset=20090815195334 &contribs=user&target=Atlgirl052005
 * Показує редагування, які відбулися одразу перед часовою міткою 20090815195334 (20090815195334 не показується).
 * Формат параметру — yyyymmddhhmmss. Тому, 20090815195334 створено 15 серпня 2009 року [20090815] о 19:53 (UTC) і 34 секундах [195334].
 * Див. w:Wikipedia:Complete diff and link guide.
 * якщо додано, то працює навпаки, перелічуючи всі редагування після часової мітки
 * Приклад: https://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20090815195334 &dir=prev &contribs=user&target=Atlgirl052005
 * Показує редагування, які відбулися одразу після часової мітки 20090815195334 (20090815195334 не показується).
 * Example to show only the very first edit on a 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  . Можна вимкнути з.


 * go
 * (застаріло — слід уникати, тому що було витіснене)  — перша (найранніша) показана сторінка історії

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


 * 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

Edit and submit
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 affecting the edit form
The following 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;
 * Example: https://en.wikipedia.org/wiki/Talk:Main_Page?action=edit&section=new&preload=Project:Sandbox


 * preloadparams[] (or preloadparams%5B%5D): Replace  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   replaced by first value and   replaced by second value.
 * editintro
 * title of an existing article or template to be rendered above the edit form;


 * preloadtitle
 * in the case of section=new, provides initial content of the "Subject/headline" box; it can be edited before saving;
 * Example: 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  or , overrides user preference "" ;


 * internaledit/externaledit : overrides user preference on external editors;
 * mode
 * this parameter affects the result page if passed with value  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

What to do
The following options tell the software what to do when submitting: saving, showing a preview, or showing the difference with the current version.


 * 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
 * set in a POST request to request a preview of the page or section as if the value of wpTextbox1 were saved;


 * by default, returns an edit form with a preview of the value of 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;

Parameters that are needed to save
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
 * the new page/section content;


 * wpStarttime
 * the timestamp of when the user started editing the page; used to check whether the page has been deleted between this moment and the submission time (in this case, the user is asked to confirm saving);


 * wpRecreate
 * in case the page was deleted after wpStarttime, this field confirms that the page is to be saved;


 * wpEdittime
 * for new pages, it is equal to wpStarttime; otherwise, it is the timestamp of the last revision of the page; used to check edit conflicts;


 * 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.

Optional additional data
The edit summary or the "ignore blank" parameter may be mandatory if "warn on blank summaries" is configured.


 * wpSummary
 * the edit summary;


 * 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. If any of the provided tags are not activated for manual use, the edit will be rejected.


 * 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 ;


 * 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.

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

The following URL parameters provide initial values for some input fields; they can be edited before submitting the form.

Special:MovePage

 * wpReason
 * text field with reason.


 * wpNewTitle
 * text field with new title.


 * wpLeaveRedirect
 * whether to select the "Leave a redirect behind" checkbox.

Special:BlockIP

 * wpDisableEmail
 * whether to select the "" checkbox.


 * wpDisableUTEdit
 * whether to select the "" checkbox.


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


 * wpReason-other
 * text field with custom reason; require


 * wpAutoBlock
 * whether to select the "" checkbox.


 * wpWatch
 * whether to select the "" checkbox.

Special:UserRights

 * user-reason
 * 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)

Userscript parameters and Autoedit extension
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.

Maxlag parameter
The  is used only if the software is running on a replicated database cluster.

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.

Див. також

 * m:Help:URL
 * Лістинг функцій
 * Snippets/Load JS and CSS by URL (додає параметри withJS і withCSS, які обробляються на боці клієнта)
 * Лістинг функцій
 * Snippets/Load JS and CSS by URL (додає параметри withJS і withCSS, які обробляються на боці клієнта)