Extension:CoAuthor

What can this extension do?
The CoAuthor extension provides a tool for finding the co-authors for a given wiki user. More precisely, this extension calculates the degree of co-authorship for a given user with all other users who have contributed to one (or more) wiki page(s) that this user has also contributed to.

The degree of co-authorship between a given user a and a co-author b is calculated for each page p which they have co-authored using following pieces of information:


 * number of non-minor revisions by user a in page p
 * number of minor revisions by user a in page p
 * number of non-minor revisions by user b in page p
 * number of non-minor revisions by user b in page p
 * total number of all non-minor revisions in page p
 * total number of all minor revisions in page p
 * editing period of user a for page p
 * editing period of user b for page p

Here the editing period is the interval from the first edited revision to the last edited revision of the page. Details of the calculation method can be found in our published paper (see See also section).

Usage
The CoAuthor extension is a MediaWiki Special Page. There are three ways to invoke this special page and search for a user's co-authors:


 * 1) Directly navigate to the page 'Special:CoAuthor'. Then enter a user name to initiate the search for this user's co-authors. See the screenshot below.
 * 2) Enter the 'Special Pages' page and click on the CoAuthor special page. Then enter a user name to initiate the search for this user's co-authors. See the screenshot below.
 * 3) Enter the history page of any article which the given user has contributed to. Each entry in the history list shows one revision, including the contributing user name. In parentheses following the user name is a link 'co-authors'. Clicking this link directly initiates a search for this user's co-authors.

The following shows the co-author page with the search box to enter a user name:



The following is an example of the co-author link in the history page:



The generated output sorts the co-authors by their degree of co-authorship, presented both as an absolute value and also as a percentage. The following shows an example of a co-authorship output:



The current version of the CoAuthor extension calculates the coauthorship degree on the fly. As this needs to fetch all revision meta-data of all pages which the selected user has ever contributed to, and then analyze this data, the calculation could require quite some time. On small wikis results are produced within a reasonable time (< 2 seconds), however for larger wikis response time can measure minutes (as in the example pictured above where it took over 6 minutes). It would be desirable to pre-calculate and store co-authorship values in the database, but this is a todo item and not currently implemented.

Download instructions
Download the CoAuthor extension archive file.

Requirements
The CoAuthor extension has the following requirements (besides the MediaWiki and PHP versions specified in the extension box):


 * MySQL or PostgreSQL database servers are required; SQLite is not supported.
 * MediaWiki database administrator access (or other database role that has privileges for creating SQL functions).

Step by Step Instruction
Step 1: Download the archive file from the link above.

Step 2: Extract the downloaded archive to the extensions directory of your MediaWiki installation. For example (replace with the actual path to your MediaWiki installation):

Step 3: Update MediaWiki database. Currently supported databases are MySQL and PostgreSQL. Choose the appropriate command, as well as the path to your MediaWiki installation.

Notes:
 * Update MySQL database
 * 1) Replace 'host' with database server name.
 * 2) Replace 'pass' with MySQL administrator password.
 * 3) Replace 'admin' with MySQL administrator username.
 * 4) Replace 'wikidb' with the MediaWiki database name.
 * 5) Replace 'wikiuser' with the MediaWiki database username.

Notes:
 * Update PostgreSQL database
 * 1) Replace 'host' with database server name.
 * 2) Replace 'admin' with MySQL administrator username.
 * 3) Replace 'wikidb' with the MediaWiki database name.
 * 4) Replace 'wikiuser' with the MediaWiki database username.

Step 4: Add a new index (rev_user, rev_page) into the revision table of the MediaWiki database. If such an index already exists this step can be ignored. Depending on the size of the revision table, this step could be time consuming. Choose the appropriate command for your installation.


 * MySQL database
 * PostgreSQL database

Step 5: Add the following line to the bottom of LocalSettings.php (before trailing ?>, if it is present):

Step 6: Visit the page 'Special:CoAuthor' in your MediaWiki installation. If everything went fine you should see the CoAuthor special page.