Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Parameters to index.php/ha

From mediawiki.org
This page is atranslated version of the pageManual:Parameters to index.php and the translation is 2% complete.
Languages:

This page is apartial list of the parameters toindex.php, the main script of the MediaWiki software, as provided by MediaWiki itself.Most of these arguments are usually given as GET parameters in the URL, but can also be passed as POST data.POST is actually required in some cases, such as the purge action. Some extensions provide additional parameters.

The information on this page is not complete.[1]

Page revision or version

Parameters to index.php usually apply and have a meaning related to the page they apply to.The page (or a version of it) can be specified by typing one or more of the following parameters:https://en.wikipedia.org/w/index.php?title=Ferengi&curid=177126&diff=304901009&oldid=304764764

NameDescription
titleThe title of the page.It can be a wiki page or aspecial page, depending on the other parameters.To disable a special page in your wiki configuration, you can use theSpecialPage_initList hook.
curidThe ID of the wiki page; overrides the value of title.

Some actions (such as view and edit) also work on a particular revision of a page. Such a revision is identified by the following two parameters, allowing the omission of the title and the ID of the page.

NameDescription
oldidThe ID of a revision
directionInstead of the revision given byoldid, use:
  • direction=prev:the one preceding it
  • direction=next:the one following it

Actions

The following is a list of values for theaction parameter.

Some of these actions can be enabled/disabled by using a dedicatedconfiguration setting inLocalSettings.php. Where available, these local settings are listed.[2]

NameFunctionExample
viewView is the default action; view is the one action that is used when no action is explicitly givenwww.mediawiki.org/w/index.php?title=Project:Sandbox&action=view
watchAdds the page to the user's watchlistwww.mediawiki.org/w/index.php?title=Project:Sandbox&action=watch
unwatchRemoves the page from the user's watchlistwww.mediawiki.org/w/index.php?title=Project:Sandbox&action=unwatch
deleteDeletes a page

By default, delete returns a form for the user to confirm deletion and specify a reason.[3]

www.mediawiki.org/w/index.php?title=Project:Sandbox&action=delete
revertReverts to a previous version of animage. The following two other parameters are required:
  • oldimage, the ID of the version to revert to;
  • wpEditToken, a valid edit token
rollbackRollbacks the last edits made by the last editor of the page; in other words, it restores the last version of the article whose editor is not the last one. The edit is marked as minor and a default edit summary is used.[4]

The following two other parameters are required:

  • from is the username whose edits are to be reverted
  • token is a rollback token; used to prevent users from being tricked into performing an unwanted rollback by following a link or clicking a button in an external website.
www.mediawiki.org/w/index.php?title=Project:Sandbox&action=rollback&from=John&token=d7aaa6c\
protectShows or changes the protection levels of a page:
  • By default, this script returns a form showing the current protection levels of the page, allowing the user to change the protection levels of the page.[5]
www.mediawiki.org/w/index.php?title=Project:Sandbox&action=protect
unprotectSame page as protect (unprotect and protect are the same page, and do the same thing).www.mediawiki.org/w/index.php?title=Project:Sandbox&action=unprotect
markpatrolledMarks an edit as patrolled; seeHelp:Patrolled edit.

rcid is the ID of an edit in therecentchanges table

renderOutputs the HTML rendering of the entire page content; similar to theview action, but only the unstyled article text is output, not any part of the user interface (additional toolboxes, search box, stylesheets, etc.).
For more stable programmatic access or to retrieve the HTML of only a piece of page content, you should use theparse API withpage orpageid parameters.
www.mediawiki.org/w/index.php?title=Project:Sandbox&action=render
purgeClears the page's cache, forcing the page to be redisplayed from its source.
  • This action is performed only if requested via a POST request; otherwise, a form to confirm purging is shown (pressing the OK button posts the purge request, which is then executed).

www.mediawiki.org/w/index.php?title=Project:Sandbox&action=purge

editYana nuna editan shafin.

Editan da aka nuna ya dogara da zaɓin mai amfani.SeeEditor.

www.mediawiki.org/w/index.php?title=Project:Sandbox&action=edit
submitLokacin da aka duba kai tsaye (HTTP GET), yana nuna editan, kamar "gyara".
  • If the default editor is set toVisualEditor,action=submit will force showing thesource code editor.VisualEditor can be selected withveaction=edit URL parameter.The2017 wikitext editor can be selected withveaction=editsource.
  • The#/editor/… overlay ofExtension:MobileFrontend onSkin:Minerva does not appear withaction=submit.Instead, the default submission form is shown, which allows marking edits as "minor".
  • The additional parameterhidewelcomedialog may be used to suppress the display of the editor selector welcome popup.

When viewing by submitting a form (HTTP POST), performs various actions related to changing the page (see#What to do below for more details):

  • Change a page,
  • Preview a new version of the page, or
  • nuna bambanci tare da sabon sigar.
www.mediawiki.org/w/index.php?title=Project:Sandbox&action=submit
editredlinkSame asedit.[6]www.mediawiki.org/w/index.php?title=Project:Sandbox&action=editredlink
historyShows the history of the page. (See history, below)www.mediawiki.org/w/index.php?title=Project:Sandbox&action=history
historysubmitWhen viewing the difference between revisions, after clicking "compare selected revisions" on the history page. This requires a "diff" and/or "oldid" parameter, otherwise it just shows the page itself.www.mediawiki.org/w/index.php?title=Project:Sandbox&action=historysubmit&diff=456290&oldid=456270
rawShows the raw content of the page. (See Raw, below) A pop up window will open up, asking whether you would like to save the page in index.php.[7]www.mediawiki.org/w/index.php?title=Project:Sandbox&action=raw
creditsShows a list of people who contributed to the page in question using the real name specified in the user's preferences. Currently disabled on Wikimedia wikis, but is enabled by default on vanilla MediaWiki.translatewiki.net/w/i.php?title=Translating:MediaWiki&action=credits
infoShows information about the page, such as the number of users having it in their watchlist, the number of edits, the number of authors. See theReimplement info action RfC for context.www.mediawiki.org/w/index.php?title=Project:Sandbox&action=info
revisiondeleteSet visibility restrictions on revision text, edit summary, and editor's username/IP address (requires deleterevision user right)

User preference overriding

The following parameters override some of the user'spreferences.Other parameters explained in other sections are "diffonly", "internaledit", and "externaledit". The below parameters affect all actions but "render" and "raw".

NameFunctionExample
useskinSpecify askinwww.mediawiki.org/w/index.php?useskin=modern
uselangSpecify a language for the UI elements (such as the "my talk" link, etc.), i.e. theuser interface language; this is especially useful for creating an account, because at that stage no preference settings apply.

The special language code "qqx" can be used to display the IDs of allsystem messages used on a page.

www.mediawiki.org/w/index.php?title=Special:Userlogin&type=signup&uselang=de
variantSpecify a language variant for the UI elements (this is used for example in the Chinese Wikipedia, as the Chinese language has variants);
printable(deprecated in 1.35)When set toyes, the page is shown in a form that is suitable for printing.
debugWhen set totrue (e.g.1 ortrue), theResourceLoader serves non-minified JavaScript and CSS.SeeResourceLoader/Features#Debug mode.www.mediawiki.org/w/index.php?title=Project:Sandbox&debug=true
safemodeWhen enabled (e.g. set to1 ortrue), user-provided CSS and JS will not be loaded.This disables personal scripts and styles (e.g. "User:" common.js and css), and site-wide scripts and styles (e.g. "MediaWiki:Common.js" and "MediaWiki:Common.css"), and all gadgets.[8]It is possible to mark site-wide styles ("MediaWiki:Common.css") as safe via$wgAllowSiteCSSOnRestrictedPages, which permits them in safemode.www.mediawiki.org/w/index.php?title=MediaWiki&safemode=1
useskinversionSpecify a skin version[9]www.mediawiki.org/w/index.php?title=MediaWiki&useskinversion=2
vectornightmodeWhen set to 1, the page is shown in dark mode on skins like Vector 2022 that support dark mode.www.mediawiki.org/w/index.php?title=MediaWiki&useskin=vector-2022&vectornightmode=1


View and render

View is the default action. If no other action is added to the URL,action=view 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
the value of this parameter identifies a revision; the difference between another revision and this one is returned:
  • ifoldid is not passed, the difference between this revision and the previous one on the same article is shown;
  • otherwise, the difference between the revision given byoldid/direction and this one is shown; the value of this parameter can be a revision ID, the valuesprev ornext to identify a revision relative to the one given byoldid/direction, and the valuecur to identify the latest revision of the page;
Note thatoldid anddiff need not be two revisions of the same article, allowing two revisions of two different pages to be compared
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 onaction=view andaction=render and only if neitheroldid nordiff 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.diffonly=yes
search
if non-blank (and if searches are enabled), override all other parameters and perform a search

The following parameters apply only to categories.

from
if the page is a category, only list entries whose sortkey are equal or follows the value of this parameter;
Example:https://en.wikipedia.org/w/index.php?title=Special:Log&type=upload&from=20070814233520&until=20070814233625
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 iffrom is not passed;

The following parameter apply only to images.

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

History

limit
The number of page edits to list, the maximum is 5000 edits.
Example:https://en.wikipedia.org/w/index.php?title=Special:Contributions&limit=13&contribs=user&target=Atlgirl052005 -lists 13 edits per page.
dir
the relative order of edit history pages.
page edits are sorted in decreasing timestamp.
offset
uses a timestamp to specify which part of the history is displayed;
Returns the edits which occurredbefore the timestamp;
Example:https://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20090815195334&contribs=user&target=Atlgirl052005
Shows the edits which occurred immediatelybefore the timestamp 20090815195334 (20090815195334 is not shown).
Parameter format is yyyymmddhhmmss.So 20090815195334 was created on August 15, 2009 [20090815] at 19:53 (UTC) and 34 seconds [195334].
SeeWikipedia:Complete diff and link guide.
ifdir=prev is added, it works the other way around, listing all editsafter the timestamp[10]
Example:https://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20090815195334&dir=prev&contribs=user&target=Atlgirl052005
Shows the edits which occurred immediatelyafter the timestamp 20090815195334 (20090815195334 is not shown).
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 areatom andrss.Can be disabled with$wgFeed.
go
(deprecated - should be avoided, because it has been superseded)go=first the first (earliest) page of history is shown

Raw

Passingaction=raw returns the source code of a page or revision. For caching and security reasons, this should generally only be used via thescript path, that is,index.php?title=....While "short urls" like/wiki/ are only meant for action=view, they unofficially tend to work for other actions as well.This is expressly discouraged for action=raw as it leads to less effective caching and bypasses automatic purging after edits.

templates
if passed with valueexpand, 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 defaulttext/x-wiki; this can only be one of the allowed types, which currently aretext/x-wiki,text/javascript,text/css, andapplication/x-zope-edit
oldid
the ID of a specific revision to return
direction
eithernext,prev, orcur; 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 viaAPI withapi.php?action=parse&text={{:My_page}}__TOC__&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.(Note: 'section' also affects how the page is saved. Additionally, 'preload' and 'preloadparams' only work on wikitext contentmodel)

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; valuenew 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 seeManual: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$1 style parameters in preload text.
For examplehttps://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 causeManual:Creating pages with_preloaded text/param demo to be preloaded into the edit form, but with$1 replaced byfirst value and$2 replaced bysecond value.(introduced in 1.23)
The only way to set a default value for$1 style parameters is with<includeonly>{{SUBST:#ifeq:$1|&#36;1|default value|$1}}</includeonly>
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 toyes orno, overrides user preference "Nuna samfurori lokacin da za a fara gyara" (T11936);
internaledit/externaledit(removed in1.22)
overrides user preference onexternal editors;
mode(removed in1.22)
this parameter affects the result page if passed with valuefile and using an external editor;
undo, undoafter
attempts to undo a sequence of edits, from theundoafter revision up to theundo 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 additionallive 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 withaction=render; seeManual:Live preview for more info;
  • the argumentwpLivePreview is identical to wpPreview; therefore, a regular preview is returned iflive 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
anedit 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 sincephab:rSVN18112; it currently contains only the characters+\ rather than a random string (seeedit token suffix).

For the page to be saved,wpStarttime,wpEdittime,wpTextbox1 andwpEditToken are required in a POST request, and neitherwpPreview norwpDiff are passed.If the page was deleted afterwpStarttime, the boolean optionwpRecreate 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.
wpWatchlistExpiry
page is added to watchlist with the given expiry time.
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. valuenew is used to append a new section to the document.
wpChangeTags
an optional comma-separated list oftags 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 ofwpEditSummary 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.
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.If the target page exists, ignore theedit parameter and display the (now-)existing page instead.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 forSpecial:Export are outlined inManual:Parameters to Special:Export

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

Special:MovePage

wpNewTitle
text field with new title.
wpReasonList
reason to pre-select in the dropdown.
wpReason
text field with reason.
wpLeaveRedirect
whether to select the "Leave a redirect behind" checkbox.

Special:BlockIP

wpDisableEmail
whether to select the "Sending email" checkbox.
wpDisableUTEdit
whether to select the "Editing own talk page" checkbox.
wpReason
initially selected item in the drop-down box, value should match a row in theMediaWiki:Ipbreason-dropdown.
wpReason-other
text field with custom reason; requirewpReason=other
wpAutoBlock
whether to select the "Nan take an toshe adireshin IP na ƙarshe da wannan mai amfani yayi amfani da shi, da kowane adireshin IP na gaba da suke ƙoƙarin gyarawa daga, na tsawon $1" checkbox.
wpWatch
whether to select the "Watch the target's user page and talk page" checkbox.

Special:UserRights

user-reason
text field with reason.

Maxlag parameter

MediaWiki versions:
1.10 – 1.27

Themaxlag parameter 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.

Notes

  1. Clients submitting forms should submit all form parameters present in the HTML; relying on any kind of static list may lead to future breakage.To register new actions with an installation of MediaWiki, see$wgActions.
  2. Any action, exceptview, can be disabled using the$wgActions variable, which is now available for all actions.

    If searches are enabled and thesearch parameter is supplied (and non-blank) then all actions are ignored and the search is performed.

  3. Deletion is performed upon a POST request, if a validedit token is passed as the value ofwpEditToken; this is what happens when the user confirms deletion.The delete reason is passed as the value of argumentwpReason; this string is recorded in the deletion log (thelog_comment_id field of thelogging table).Deletion is also performed when deleting a single version of an image; this requires the version ID to be passed in the parameteroldimage and a valid edit token inwpEditToken; in this case, the request can also be passed via GET.
    • if the optionalsummary argument is passed, its value is used as the edit summary in place of the default one
    • if the optionalbot argument is passed, the edit will be marked as a bot one (the edit is markedrc_bot=1 in therecentchanges table)
    • thebot argument can also be used on any page a [rollback] link will appear on, to cascade&bot=1 to all rollback links generated
    • if the optionalhidediff argument is passed, the success message is shown instead of a diff of the change (this can be forced via user preferences)
  4. These levels are changed to the values ofmwProtect-level-edit andmwProtect-level-move if the request is a POST one and a valid edit token is passed aswpEditToken; parametermwProtect-reason gives the reason for protection or unprotection which will be recorded in the page log; ifmwProtect-cascade is also passed, cascading protection is applied (all transcluded pages are set to the same protection levels)
    • more generally, the actions that can be limited are those listed in the$wgRestrictionTypes array; this array is initialized toarray('edit','move') and can be changed inLocalSettings.php; the protection action then accept a parametermwProtect-level-$action for each action in that array
  5. Beforerev:r31291, Editredlink did the same thing that is now achieved byaction=edit&redlink=1 (see below for an explanation of the redlink parameter)
  6. For security reasons, in some versions of MediaWiki Raw is only allowed when using the "primary script access point", that is, when using the "ugly" URL form withindex.php?title=...
  7. Project:Tech News/2017#Tech News: 2017-16
  8. Reading/Web/Desktop Improvements#May 2020: First deployment - officewiki and testwiki
  9. For performance reasons, the value of this field is not actually an offset (the index of the first entry to show)

See also

Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Parameters_to_index.php/ha&oldid=8013618"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp