Template:Undo
This template is intended to be useful for creating links to "undo" diffs. Note: not all revisions can be undone. Use this template with care.
Every version of a page has a revision ID, which you can find from the history of the page by looking at the link for the timestamp, which is of the form:
http[s]://en.wikipedia.org/w/index.php?title=SomePageName&oldid=442212827
The number after oldid= is the revision ID.
Given a page name and two revision IDs, you can construct links undo diffs.
Usage
{{Undo|page|oldid|diff|label}}
page– The title of the page.oldid · undoafter– The base ID onto which the diff is generated.diff · undo– The ID or keyword that is used against the base ID.label– Text to display as link. No label will give an "undo" link.
Examples
{{Undo|Wikipedia:Pagediff|204934693|204901573}}- undo
- The page= parameter (parameter number 1) should be a name of a page, for instance Wikipedia:Pagediff.
- The oldid= parameter (parameter number 2) should be the smaller revision number.
- The diff= parameter (parameter number 3) should be the larger revision number.
- undo
{{Undo|Wikipedia:Pagediff|204934693|204901573|revert an edit}}- revert an edit
- The page= parameter (parameter number 1) should be a name of a page, for instance Wikipedia:Pagediff.
- The oldid= parameter (parameter number 2) should be the smaller revision number.
- The diff= parameter (parameter number 3) should be the larger revision number.
- The label= parameter (parameter number 4) should be an alternate display for the link than just "undo"
- revert an edit
See also
- {{Oldid}} – simplifies the case for linking to a known old version
- {{Diff}}
- {{Diff2}}
- {{Querylink}} – generic template to construct query strings
- diff utility – syntax highlight on wiki pages with mw:Extension:SyntaxHighlight GeSHi
TemplateData
A template that is intended to be useful for creating links to undo specific diffs.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page | page | The title of the page. | Page name | required |
| Oldid | oldid undoafter | The base ID onto which the diff is generated. Some number like "442212827" (without the quotes). | Number | required |
| Diff | diff undo | The ID or keyword that is used against the base ID. | Number | required |
| Label | label | Text to display as link. No label will give a numbered link.
| Line | optional |
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.