User:Zzmonty/import2


MediaWiki extensions manual
Import2
Release status: experimental
Implementation Api
Description Replacement for "import.php" include file.
Author(s) Melissa Newman (zzmontytalk)
Latest version 0.1 (2009-12-08)
MediaWiki 1.15.1
PHP 5.0.0
License Creative Commons Share Alike
Download No link
User:zzmonty/import2/readme.txt
User:zzmonty/import2/changelog.txt

import

Translate the Zzmonty extension if it is available at translatewiki.net

What can this extension do?

edit

Replacement for the "/include/import.php" file. Import2 does the following improvements to the standard import file:

  • General cleanup of import.php file to make it easier to maintenance in the future.
  • Processes all variables in the XML dump file including the siteinfo variables.
  • The sitename and base are used to establish links back to original import page.
  • Template:ImportBot has the example text: Note: This page was originally imported from <sitename>, page <title> on Dec 08, 2009. Title is actually a hyperlink to the exact revision imported.
  • Import username (or ip) are changed to <sitename>ImportBot.
  • Import comment is changed to "Imported from <sitename>, article <basename>/index.php?oldid=<revid>". This enables compliance with MediaWiki licensing to state exact version of page imported. The original comment is not as valuable as information to do a full traceback of a page.
  • Page is tagged with an import category, for example, Category:WikipediaImportBot.

Example

edit

On article page:

Note: This page was originally imported from Wikipedia, page Scooby-Doo on Dec 08, 2009.

On history page:

00:12, December 9, 2003 WikipediaImportBot (block) m (24 bytes) (Imported from Wikipedia, http://en.wikipedia.org/wiki/index.php?oldid=329763663)

Usage

edit

Not applicable. This is a library include file that works behind the scenes during import from Special:import or maintenance/importDump.php. Once the extension is installed, there is nothing else to do.

Installation

edit
  1. Replace the "import.php" file in the $src/includes.
  2. Create the page template:ImportBot on your Wiki.
  3. Create user pages, for example, User:WikipediaImportBot.
  4. Create category pages, for example, Category:WikipediaImportBot.

Configuration parameters

edit

Not applicable.

User rights

edit

This extension is only valid if the user has import rights.

Code

edit

import.php
Template:ImportBot (MediaWiki template)

See also

edit

Not applicable.