Extension:PureWikiDeletion

This is the Pure Wiki Deletion (PWD) extension.

What can this extension do?
Pure wiki deletion will work as follows:

A former version of this article was blanked by [USER NAME/IP] on [DATE]. The reason given for blanking was: [EDIT SUMMARY]. You may view the article's history, edit the last version, or type new article into the white space below.
 * A link to a blank page will show up as a red link. (or orange, or whatever color you want)
 * When a user follows a link to a blank page, the page will behave the same way that deleted pages do now, except there will be an additional message, reading:
 * Blank pages will not show up in searches using Special:Search, random pages using Special:Randompage, or the list of all pages using Special:Allpages. [Note: This functionality has not yet been implemented.]
 * The URL prefix to a blank page should be listed in robots.txt, and the page will emit "noarchive" and "noindex" and "nofollow" tags, to prevent caching in search engines. [Note: This functionality has not yet been implemented.]

Usage
There are two parser functions, #ifblank and #ifnotblank. Their syntax is as follows: returns true. returns false.

Installation
Insert your database credentials into PWDConfig.php. You will need to use a different account than the one used my Mediawiki itself; for instance, if you use wikiuser in LocalSettings.php, you might want to create a new one called wikiuser2. Make sure to give it all the permissions (to CREATE, DELETE, INSERT, etc.) If your server doesn't allow PHP code to create databases, then you may need to create one manually, using the database name in your PWDConfig.php file. The SQL command would be, e.g.:

CREATE DATABASE PWD_db

The database credentialing variables in PWDConfig.php are:

Add this line to LocalSettings.php:

require_once( "$IP/extensions/PWD/PWD.php" );

Then go to Special:PWD and the tables will be created automatically. Everything should be good to go at this point.

Configuration parameters
You can change the style of broken, blank and known links. By default, broken links are a cherry red that is a bit brighter than the shade of red we are accustomed to seeing in broken links. These parameters should be placed in LocalSettings.php:

$wgPWDBrokenLinkStyle="color: #FF0800"; $wgPWDBlankLinkStyle="color: #FF4500"; $wgPWDKnownLinkStyle="color: blue"; $wgPWDURLStructForEdits='/index.php?title='; // This goes in the middle of URLs $wgPWDURLStructForUserPage='/index.php?title='; // This goes in the middle of URLs $wgPWDURLStructForContribs='/index.php?title=Special:Contributions/'; // This goes in the middle of URLs

Development notes
Filtering blanked pages out of Special:RandomPage will have to wait until v1.16.0, when the SpecialRandomGetRandomTitle hook is released. Compatibility with the Extension:RPED will be established in the near future by changing RPED's hook from LinkEnd to LinkBegin.