Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Diff
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Linking to a diff== {{For|Linking to an old version of a page|Help:Permlink}} If you need to create a link to a specific diff (for use on a talk page or noticeboard, for example), it is best to use the <nowiki>[[</nowiki>Special:Diff/<var><code>oldid</code></var><nowiki>]]</nowiki> method or {{Tl|Diff}}, which make links work across protocols (<code>http://</code> vs. <code>https://</code>) and on our mobile site. Alternatively, locate the diff from the [[Help:Page history|page history]], go to the diff page, and copy the [[URL]] from your browser's address bar. You can paste this URL (the whole of it, including <nowiki>https://</nowiki>) into the text of the page where you want the link to appear, putting single square brackets [...] around it. === External links === The URL for a diff is based on the <code>oldid</code> value of the old revision. If a revision has oldid value 12345678, its URL is: *<code><nowiki>https://en.wikipedia.org/w/index.php?title=PAGETITLE&oldid=12345678</nowiki></code> You can strip the <code>title=PAGETITLE&</code> part from the URL and make it look like this: *<code><nowiki>https://en.wikipedia.org/w/index.php?oldid=12345678</nowiki></code> Then URLs for its diffs may take the forms: *Diff with the current version:<br/><code><nowiki>https://en.wikipedia.org/w/index.php?diff=cur&oldid=123456789</nowiki></code> *Diff with the previous version:<br/><code><nowiki>https://en.wikipedia.org/w/index.php?diff=prev&oldid=123456789</nowiki></code> *Diff with version 10000001:<br/><code><nowiki>https://en.wikipedia.org/w/index.php?diff=100000001&oldid=123456789</nowiki></code> *To show only a diff and not the page content, add <code>&diffonly=1</code> to any of the above:<br/><code><nowiki>https://en.wikipedia.org/w/index.php?diff=cur&oldid=123456789&diffonly=1</nowiki></code> A shorter alternative to link to the diff with the previous version is: *<code><nowiki>https://en.wikipedia.org/wiki/?diff=12345678</nowiki></code> === Internal links === Although external links are easy to copy and paste, they can be long and unwieldy. Diffs can be wikilinked using <nowiki>[[</nowiki>Special:Diff/<var><code>diff</code></var><nowiki>]]</nowiki> (e.g. [[Special:Diff/123456789]]) or <nowiki>[[</nowiki>Special:Diff/<var><code>oldid</code></var>/<var><code>diff</code></var><nowiki>]]</nowiki> (e.g. [[Special:Diff/100000001/123456789]]) where you should replace <var><code>oldid</code></var> and <var><code>diff</code></var> with appropriate values seen in the URL. This syntax is easy and can even be used in [[WP:EDSUM|edit summaries]]. === <nowiki>{{Diff}}</nowiki> or <nowiki>{{Diff2}}</nowiki> === Using {{tl|diff}} or {{T|diff2}} is another approach of linking to a diff within Wikipedia, though it cannot be used in edit summaries. The general syntax is: :{{tlx|Diff|<var>page</var>|<var>diff</var>|<var>oldid</var>|<var>label</var>}} *{{para|<var>page</var>}} β The title of the page. *{{para|<var>diff</var>}} β The ID or keyword that is used against the base ID. Possible keywords are: **<kbd>cur</kbd> β compare with the current (latest) version of a page. **<kbd>prev</kbd> β compare with the previous version of a page. **<kbd>next</kbd> β compare with the next version of a page. **<var>id</var> β This should be {{em|larger}} than <code>oldid</code>. *{{para|<var>oldid</var>}} β The base ID onto which the diff is generated. *{{para|<var>label</var>}} β Text to display as link. No label will give a numbered link. *{{para|diffonly|yes}} β Shows only a diff and not the page content. Parameter name required. ==== <nowiki>{{URL to diff}}</nowiki> ==== {{Tl|URL to diff}} takes a full diff URL and converts it to a {{Tl|Diff}} template. The template should be substituted, thus: :<code><nowiki>{{Subst:URL to diff|url=https://en.wikipedia.org/w/index.php?diff=100000001&oldid=123456789|label=relevant text}}</nowiki></code>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)