Extension:ExternalArticles

Usage
Saves time when importing pages from an external website.

Fetches the content of an external site's wiki page, by default en.wikipedia.org, and preloads that text into the edit box of an edited page on the local website. The extension will only preload when the page was already blank, and when there is not already a local page being preloaded.

version 0.1.2

 * rephrased errors, added todo's and other minor changes.

version 0.1.1

 * Modified the $wgExtensionCredits
 * Bug: hmm... defined the 'author' element twice when I meant 'url' the second time.
 * Bug: The url specified was incorrect.
 * Added a contact email address specific to this extension.

version 0.1

 * preloads text into an edit box on article edit.
 * Configure external wiki to draw text from (defaults to Wikipedia)
 * Configure perl-compatible regular expression to include or exclude certain pages (defaults to Templates only)

Installation

 * 1) Create a new folder in your MediaWiki extensions folder named "ExternalArticles"
 * 2) Create a new file in the just created folder "extensions/ExternalArticles/ExternalArticles.php"
 * 3) Copy the source below into the file "ExternalArticles.php"
 * 4) Add the following to your "LocalSettings.php"

Configuration
This step is optional. If you do not include the below code, this extension will use the defaults. If you define $eagRules, you must define all the elements of it (likely to change later so you can only override the settings you want).

This extension currently has only one configuration variable "$eagRules". If you wish to change the default behavior, put the following code in your LocalSettings.php above the  statement for this extension.

Known Issues

 * The default rule does not support languages other than English, as the namespace of a template is assumed to be "Template". When implementing in other languages the template namespace string is localized, so the rule must be updated to fit the current language.

Feedback
I'm looking for feedback on this extension. Security, performance, etc...

Please post feedback to the Extension_talk:ExternalArticles page or email me [mailto:externalarticles@nateperry.org here].

Security

 * This extension just fetches external wiki-text and inserts it to preload the edit box. No checking is done to validate or verify wiki-text.

Future development
The long term goal of this extension is to allow a wiki to use templates or other articles from external MediaWiki wiki's without having to import the articles and all the transcluded articles it depends on manually. When an article is demanded (viewed, created, linked to, transcluded) it is automatically downloaded from the external wiki and cached.

There is no release schedule for this extension. When I have time and motivation to work on this extension, I will do so and make new releases that implement features when it makes sense to do so.