Release status: stable
|Description||This extensions allows you to use normal redirects to redirect to external websites. This extension is part of the PerPageResources project.|
|Author(s)||Mathias Ertl (Mati talk)|
|MediaWiki||1.13.0 or later (tested up to 1.18.1)|
The CreatePage extension is a highly specialized extension designed specifically for vowi.fsinf.at. As with all MediaWikis, it is rather hard to create a new page and we even have a lengthy Help-page to describe the process. To make matters (a lot) worse, vowi.fsinf.at has a special naming-convention for all articles on which several of its features (i.e. SimilarNamedArticles) rely.
These two facts combined make it very hard for new users to create a new page. This extension is designed to fix just that. You just have to enter the right name (which, in our case, you know, if you want to write a new article) and some additional info and press "Create" to be redirected to a new page in edit-mode.
Note once again that this extension is highly specialized for its purpose and there is probably no other wiki were it is useful without modifications. The code is rather short, however, so feel free to take this extension as a template for new extensions.
git clone https://github.com/mathiasertl/CreatePage.git CreatePage
Older versions are marked as tags, you can view available tags with git tag -l and move back to the current HEAD with git checkout <tag-name>. Versions for older versions of MediaWiki, if available, are managed as branches, use git branch and git checkout <branch> to move to a specific branch. To move back to the newest version, use git checkout master.
Note that GitHub allows you to download older different commits as tarball if you do not want to install git.
Installation & configuration
Simply download the files into your extension-folder and include it in LocalSettings.php:
require_once("$IP/extensions/CreatePage/CreatePage.php"); # universities and course-types: $wgCreatePageNamespaces = array( 'Uni Wien' => 0, 'TU Wien' => 1, ); $wgCreatePageTypes = array( 'EX' => 0, 'LU' => 1, 'PR' => 0, );
Both arrays represent an option-list. The one element where the value is 1, will be the default selection. Take care that no more than one element is a default selection or else you will have invalid HTML.
- Remove TUWIS and use TISS instead.
- Compatibility update for PHP 5.3
- Minimum software requirement is now MediaWiki-1.13.0, because of the MWNamespace class.
- Special:CreatePage is now in group "VoWi-Extensions" on Special:Specialpages
- Fixed so that the special page works with all language/userlanguage combinations
- Universities and types are now configurable with wgCreatePageNamespaces & $wgCreatePageTypes
- Changed the example text to something shorter
- Updated to work with MediaWiki 1.11.1 and later by fixing LanguageGetSpecialPageAliases (This was a typo in 1.11.0, see Bug 11462)
- Updated link to this page (This wiki now uses Very short URLs)
- A bug in version 0.9 broke the direct view of Special:Create Page. This is now fixed, with the special page now having its own parser object.
- The extension now exclusively uses the addHTML function instead of the addWikiText function. This is required to get arround Bug 9762.
- I now set the handler for the form correctly, so the page can now be included in another page
- Updated the example for 'optional info' to no longer include a slash (since slashes in pagenames are somewhat problematic)
first version documented here
GPL v3 or any later version.