User:Dcoetzee/2012 improvements to LiteratePrograms

From LiteratePrograms
Jump to: navigation, search

In April 2012, LiteratePrograms underwent a number of improvements, listed below.


[edit] Upgrade from MediaWiki 1.6.6 to 1.18.2

The MediaWiki version of LiteratePrograms was way out of date, in no small part due to the fact that LiteratePrograms relied on a patch, which was difficult to integrate with new updates. It has now been updated to 1.18.2, offering many security fixes, the Vector skin and other interface changes, and many new features, such as InstantCommons for using free images directly from Wikimedia Commons, and Revision Deletion.

[edit] Reimplemented as an extension

LiteratePrograms is now implemented using two basic extensions, the CodeBlock extension for rendering codeblocks and the DownloadCode extension for implementing Special:DownloadCode (see Special:Version). This will make future upgrades much easier, and make it much easier to distribute to others, since the extensions are easy to install and can run on many different versions of MediaWiki.

[edit] Performance

Before, no caching was implemented at all other than a basic file cache, making LiteratePrograms very slow. Now, APC is being used to cache PHP opcodes and MediaWiki objects, the new message cache is enabled, Apache2's mod_cache is enabled, and Special:DownloadCode handles If-Modified-Since queries. Page counters were disabled, allowing pages to be cached for logged-out users and web spiders. Robots.txt was updated to encourage spiders to crawl more slowly, and the misbehaving Baiduspider was banned. Many other performance tweaks to Apache, MySQL, and PHP/APC were made. The end result should be a much faster experience.

[edit] Better antispam

The simple math-based antispam measure used for every edit before was trivial for spammers to break. This has been replaced by the Asirra CAPTCHA during log-in or anonymous adding of links, which has not yet been cracked by automated spammers. Additionally, all editing IPs are now checked against several spam blacklists and scanned for open proxies. Special:AbuseFilter has been installed, allowing sysops to create sophisticated filters tuned to the type of spam appearing. Special:Nuke has been added, allowing all pages contributed by a given username or IP to be rapidly deleted. A spam blacklist of common spam URLs has been added, which can be customized on-wiki at MediaWiki:Spam-blacklist and MediaWiki:Spam-whitelist.

Because of these changes, anonymous editing and page creation have been re-enabled for now in order to encourage more contributions.

[edit] Source code migrated to Github

The LiteratePrograms source, which was unavailable for a time, has now been migrated to a Github repository.

[edit] Database dumps back up and running

Weekly automatic database dumps are now up and running and will be available once more from

[edit] Other new extensions

  • Extension:Gadgets: Allows scripts to be created and made available to all users in their preferences. The navigation popups script has been imported from Wikipedia.
  • Extension:Renameuser, Extension:User Merge and Delete: Allows deleting/renaming of user accounts, for users who may wish to update their usernames.
  • Extension:Cite: Allows Wikipedia-style inline referencing, for citing sources/additional resources.

I'm happy to add any other extensions contributors may find useful on request.