Extension:IDProvider

The IDProvider extension provides the generation of (unique) IDs through different ID algorithms. They can be accessed through parser functions, API or as a static PHP function.

There no dependencies on other extensions.

MW 1.25+

 * Download the files from Git and place them in extensions/IDProvider/
 * Alternatively, use Composer to install: gesinn-it/id-provider
 * Add this into your wiki's LocalSettings.php:

MW 1.24 and older
Instead of downloading the zip archive you may also clone from Git:

Run Database Updates
As this extension saves the current increments per prefix in a database table, you have to run php maintainence/update.php first!

Usage
If you've got the ApiSandbox extension installed, it will display and document all available options. All parameters are given as key values and work the same way whether you use the parser function, api or a static php call.

Through parser functions
This makes most sense in combination with Page Forms. There it can be used for auto-creating unique page titles.

Please note that you should avoid spaces within the parser functions if you use it as a parameter of a Page Form info tag.

#idprovider-increment

 * api.php?action=idprovider-increment
 * api.php?action=idprovider-increment&prefix=Issue_&padding=8&skipUniqueTest=true

#idprovider-random

 * api.php?action=idprovider-random
 * api.php?action=idprovider-increment&type=fakeid&prefix=Issue_&skipUniqueTest=true

Through a static PHP call
For more examples, take a look at the unit-tests.