2017-08-26 20:57:14 +02:00
2017-08-25 19:31:30 +02:00
2016-06-07 00:42:24 +02:00
2017-08-26 20:35:25 +02:00
2017-08-26 20:57:14 +02:00
2015-09-30 01:52:17 +02:00
2017-08-26 20:35:25 +02:00
2017-08-26 20:35:25 +02:00
2017-08-25 19:31:30 +02:00
2017-03-21 22:17:58 +01:00

LinkTitles

MediaWiki extension that automatically adds links to words that match titles of existing pages.

For more information, see http://www.mediawiki.org/wiki/Extension:LinkTitles

Minimum requirements: MediaWiki 1.25, PHP 5.3

Source code documentation can be found at the Github project pages.

This extension is semantically versioned.

Contributing

If you wish to contribute, please issue pull requests against the develop branch, as I follow Vincent Driessen's advice on A successful Git branching model (knowing that there are alternative workflows).

The master branch contains stable releases only, so it is safe to pull the master branch if you want to install the extension for your own wiki.

Contributors

  • Daniel Kraus (@bovender), main developer
  • Ulrich Strauss (@c0nnex), namespaces
  • Brent Laabs (@labster), code review and bug fixes

Testing

Starting from version 4.2.0, LinkTitles finally comes with phpunit tests.

Here's how I set up the testing environment. This may not be the canonical way to do it. Basic information on testing MediaWiki can be found here.

The following assumes that you have an instance of MediaWiki running locally on your development machine. This assumes that you are running Linux (I personally use Ubuntu).

  1. Pull the MediaWiki repository:

     cd ~/Code
     git clone --depth 1 https://phabricator.wikimedia.org/source/mediawiki.git
    
  2. Install composer locally and fetch the dependencies (including development dependencies):

Follow the instructions on the composer download page, but instead of running php composer-setup.php, run:

    php composer-setup.php --install-dir=bin --filename=composer
    bin/composer install
  1. Install phpunit (it was already installed on my Ubuntu system when I began testing LinkTitles, so I leave it up to you to figure out how to do it).

  2. Copy your LocalSettings.php over from your local MediaWiki installation and remove (or comment out) any lines that reference extensions or skins that you are not going to install to your test environment. For the purposes of testing the LinkTitles extension, leave the following line in place:

     wfLoadExtensions( array( 'LinkTitles' ));
    

And ensure the settings file contains the following:

    $wgShowDBErrorBacktrace = true;
  1. Create a symbolic link to your copy of the LinkTitles repository:

     cd ~/Code/mediawiki/extensions
     ln -s ~/Code/LinkTitles
    
  2. Make sure your local MediaWiki instance is up to date. Otherwise phpunit may fail and tell you about database problems.

This is because the local database is used as a template for the unit tests. For example, I initially had MW 1.26 installed on my laptop, but the cloned repository was MW 1.29.1. It's probably also possible to clone the repository with a specific version tag which matches your local installation.

  1. Run the tests:

     cd ~/Code/mediawiki/tests/phpunit
     php phpunit.php --group bovender
    

This will run all tests from the 'bovender' group, i.e. tests for my extensions. If you linked just the LinkTitles extension in step 5, only this extension will be tested.

Description
MediaWiki extension that automatically adds links to words that match titles of existing pages.
Readme 3.9 MiB
Languages
PHP 98%
Dockerfile 0.8%
Shell 0.8%
Makefile 0.4%