Extension:WikiFarm

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
WikiFarm

Release status: stable

Implementation Special page
Description Assists in wiki farm management
Author(s) Pavel Malakhov (24pmtalk)
Last version 2.3 (2012.10.24)
MediaWiki 1.16 +
License Public Domain/GNU GPL
Download download
home page
Example single wiki (Russian)
2 wiki farms (English)
Check usage and version matrix

The WikiFarm extension is a tool designed to assist wiki farm administrators in maintaining their wiki, multiple individual wikis or wiki farm(s).

Contents

About [edit]

The current version has 7 modules:

  • WikiFarmStatistics - shows the following information for each wiki:
    • wiki name (What API returns)
    • number of pages
    • number of articles
    • number of views
    • number of edits
    • number of files
    • number of users
    • number of categories
    • number of templates
    • interwiki prefix, if exists in interwiki table

The following is visible in debug info level only:

  • wiki URL and API URL
  • list of wikis for each DB
  • table prefix in DB
  • DB name
  • DB server


  • WikiFarmLinks - gathers usefull administrative links for every wiki.
  • WikiFarmChanges - shows recent changes from all wikis.
  • WikiFarmPages - shows all articles in the project from all wikis.
  • WikiFarmUsers - list all users of administrative wiki with useful links for each of them. So it is good to have an admin wiki as one of wiki farm.
  • WikiFarmLog - provides links to log pages. Bots can write to the log, which is useful to trace their work. The log is a page(s) in the "project" namespace.
  • WikiFarmSearch - search for string in titles and text in all wikis.
  • + You can find special scripts for batch-renaming MySQL tables in tools directory.
  • More features are being developed for future releases of this extension. I am morally ready to use git if anyone is interested in that.


  • WikiFarm requires one wiki to be an "admin wiki". The admin wiki can be a central or a master wiki, but it could also just be a regular wiki. WikiFarm uses the admin wiki to:
    • read the user database
    • read the interwiki table (optional)
    • write log pages (optional)


  • Since version 2.0, WikiFarm is using the MediaWiki API, which required a complete code rewrite.
  • Since v2.2 direct MySQL requests are used just to scan DB for wikis (optional).

See home page for previous versions and release notes.


  • Note: this extension does not set up wiki farms automatically. It helps to manage an existing wiki or wiki farm(s).

Screenshots [edit]

WikiFarmStatistics WikiFarmLinks WikiFarmChanges WikiFarmPages WikiFarmUsers WikiFarmSearch

Prerequisite [edit]

  • cURL module for php5 - standard on most web servers, so in most cases you have this already.


Installation [edit]

  1. Add to LocalSettings.php the following line:
    require_once("{$IP}/extensions/WikiFarm/WikiFarm.php");
    
  2. Set variables in /extensions/WikiFarm/WikiFarm_config.php
  3. Optionally disable WikiFarm tools at the end of /extensions/WikiFarm/WikiFarm.php
  4. Optionally put all wikis you would like to manage to interwiki table


One wiki installation [edit]

  • Set prefix delimiter for MySQL wiki tables. If there is none set it to ''.
$wfarmPrefixDelimiter = '__';


  • Set admin wiki. In this case it is your wiki.
$wikiAdmin = new wfarmWikiInstance(
        'http://wiki.domain.name/main',         // URL to wiki page
        'http://wiki.domain.name/w-main/api.php',   // MediaWiki API end point for admin wiki.
        $wfarmDBConnection[0],                  // db connection, see above
        'main__',                               // prefix for tables (interwiki, users). It may be $wgSharedPrefix
        '',                                     // Bot name. Leave it empty to anonymous queries
        ''                                      // Bot pass
);
  • Comment additional wikis description
/*
$wikis[] = new wfarmWikiInstance(
        'http://wiki.domain.name',      // url to wiki page
        'http://wiki.domain.name',      // MediaWiki API end point. If prefix is [all], leave it the same as URL.
        $wfarmDBConnection[0],          // db connection, see above
        '[all]',                        // table prefix. Set it to "[all]" to get all wikis in the database. DB will be scanned for wikis in it
        '',                             // Bot name. Leave it empty to annonimous queries
        ''                              // Bot pass
);
*/

Several wikis installation [edit]

  • Set prefix delimiter for MySQL wiki tables. If there is none set it to ''.
  • Set admin wiki. It will be looked up for interwiki links and users.
  • Uncomment and set variables $wfarmDBConnection[] and $wikis[], see config file for info.

Usage [edit]

To use this extension, go to the Special:WikiFarm page on your wiki.

Issues [edit]

  • WikiFarmChanges:
    • Hide my edits -- to be implemented soon
    • Show changes since -- this feature isn't useful to me, so it's a low priority

Please send me a note if you have other issues.


Examples [edit]


See also [edit]

Language: English