User:Zzmonty/import2

What can this extension do?
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, page on Dec 08, 2009.. Title is actually a hyperlink to the exact revision imported.
 * Import username (or ip) are changed to ImportBot. The last user that did a revision is not as valuable as knowing that the page was imported and from where.
 * Import comment is changed to "Imported from, article / &oldid= ". 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
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?title=Scooby-Doo&oldid=329763663)

Usage
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.

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
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
Not applicable.

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

Code
/import.php/ /Template:ImportBot/