Extension:RPED: Difference between revisions
No edit summary |
KrenairBot (talk | contribs) m This extension appears to be in SVN, not Git. |
||
Line 18: | Line 18: | ||
|mediawiki = 1.16+ |
|mediawiki = 1.16+ |
||
|php = 5 |
|php = 5 |
||
|download = {{WikimediaDownload|RPED}} |
|download = {{WikimediaDownload|RPED}} |
||
|readme = |
|readme = |
||
|changelog = |
|changelog = |
Revision as of 22:30, 13 August 2012
This is the Remote Page Existence Detection (RPED) extension.
![]() Release status: beta |
|
---|---|
Implementation | Hook , API |
Description | Once equipped with a list of titles of pages existent on Wikipedia, this extension turns wikilinks to pages that don't exist on the local wiki different colors to reflect whether a page exists or not on Wikipedia. |
Author(s) | Tisanetalk |
Latest version | 1.0.0 |
MediaWiki | 1.16+ |
PHP | 5 |
License | Creative Commons Attribution/Share-Alike License 3.0, GPL |
Download | |
Example | http://libertapedia.org |
Translate the RPED extension if it is available at translatewiki.net | |
What can this extension do?
Once equipped with a list of titles of pages existent on Wikipedia, this extension turns wikilinks to pages that don't exist on the local wiki different colors to reflect whether a page exists or not on Wikipedia. E.g., if you link to Foo on your local wiki but that page does not exist there, the link will still turn blue, and link to w:en:Foo, if that article exists on Wikipedia.
Usage
Regular double-bracketed internal links will now link to Wikipedia when the article does not exist on the local wiki but exists on Wikipedia. Interwiki links such as wikipedia:Foo will detect whether the page exists on Wikipedia and turn red or blue accordingly.
To use the API, first use Special:UserRights to grant RPED rights to the user who will be inserting/deleting page titles from rped_table
. Then use commands such as this:
http://libertapedia.org/w/api.php?action=rped&insert=Foo http://libertapedia.org/w/api.php?action=rped&delete=Foo
You can also use piped parameters to insert/delete more than one at a time, e.g.:
http://libertapedia.org/w/api.php?action=rped&insert=Foo%7CBar
RPED will automatically detect whether Extension:PureWikiDeletion is active and, if so, treat blanked local pages as nonexistent.
Recommended policy
Situations may arise in which you have an option between having an article that is a one-line stub, or getting rid of that article so that wikilinks to it will link instead to the (much larger) Wikipedia article. Because high-quality, comprehensive articles may evolve from what begins as a one-line stub, you may wish to leave the one-line article in place and use a {{WP}} template like the following (after you upload Wikipedia-logo.png to your wiki):
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;"> [[Image:Wikipedia-logo.png|50px]]</div>
<div style="margin-left: 60px;">There is also an article about [[Wikipedia:{{PAGENAME}}|{{PAGENAME}}]] at [[Wikipedia]].</div>
</div>
Installation
Add this to your LocalSettings.php file:
require_once( "$IP/extensions/RPED/RPED.php" );
Then run update.php
to create the rped_page
table.
Next, populate the rped_page
table. It is recommended that you download all-titles-in-ns0.gz
from the most recent data dump at download:enwiki/ and use the Peachy RPED scripts to populate the table.
Configuration settings
$wgRPEDBrokenLinkStyle
This is the color for broken interwiki links, e.g. This page does not exist. Default:
$wgRPEDBrokenLinkStyle = "color: red";
$wgRPEDExcludeNamespaced
If set to true, this will cause the extension to ignore interwiki links such as wikipedia:Wikipedia:AFD. This is useful because presently, the list of page titles that Wikimedia provides only contains page titles in the main namespace. Default:
$wgRPEDExcludeNamespaced = false;
$wgRemoteStyle
This is the color that links to Wikipedia, such as wikipedia:Comparison of Linux distributions, will appear when those pages are in the rped_table. Default:
$wgRemoteStyle = 'color: blue'; // Remote links are blue
External link
- http://compwhizii.net/peachy/wiki/Manual/RPED — Information on Peachy framework RPED-related plugins/scripts