25 Июнь 2012 г. 20:06:19 пользователь Derric Atzrott (datzrott@alizeepathology.com) написал:
Would anyone be interested in a program that generates Skeletons for new extensions? I've noticed that when I make extensions I generally go through the exact same process (with minor variations) each time.
The idea in my head right now is for a program that does the following: * Asks for the Extension name and other Credit information * Asks whether or not the extension is going to need to change the database schema * Asks whether or not the extension is going to make use of ResourceLoader * Asks whether or not the extension is going to include a Special Page * Depending on the answers to the above it may do some of the remaining items on this list * Creates a folder hierarchy with the following folders: ExtensionName |- includes |- js |- images |- styles |- sql * Create skeleton files for ExtensionName.php, ExtensionName.i18n.php, ExtensionName.alias.php, and SpecialExtensionName.php * Create a skeleton file for sql\ExtensionName.sql * Creates table, adds ID column UNIQUE PRIMARY * Includes basic configuration for Schema Updates in ExtensionName.php * Includes basic configuration for Special Page in ExtensionName.php * Includes basic configuration for Resource Loader in ExtensionName.php
MediaWiki extensions can be so different. Some, like many "media handlers", do not even require direct DB access. Some extensions might implement their own remote API's (so there might be api folder added). In 1.20 there can be new "actions", in the future maybe new "page handlers" for non-wikitext. There are almost unexplored extensions, like XML Importer / Exporter extensions, I think there is only one extension of such kind. Dmitriy