Index: trunk/extensions/Preloader/Preloader.txt |
— | — | @@ -1,18 +0,0 @@ |
2 | | -(Better documentation is coming soon)
|
3 | | -
|
4 | | -To use the Preloader extension with MediaWiki < 1.7alpha, apply this patch to
|
5 | | -includes/EditForm.php and install the extension as normal.
|
6 | | -
|
7 | | -Index: EditPage.php
|
8 | | -===================================================================
|
9 | | -+++ EditPage.php (working copy)
|
10 | | -@@ -304,6 +304,8 @@
|
11 | | - # checking, etc.
|
12 | | - if ( 'initial' == $this->formtype || $this->firsttime ) {
|
13 | | - $this->initialiseForm();
|
14 | | -+ if( !$this->mTitle->getArticleId() )
|
15 | | -+ wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) );
|
16 | | - }
|
17 | | -
|
18 | | - $this->showEditForm();
|
Index: trunk/extensions/Preloader/Preloader.php |
— | — | @@ -10,14 +10,12 @@ |
11 | 11 | * @package MediaWiki |
12 | 12 | * @subpackage Extensions |
13 | 13 | * @author Rob Church <robchur@gmail.com> |
14 | | - * @copyright © 2006 Rob Church |
15 | | - * @licence GNU General Public Licence 2.0 |
16 | 14 | */ |
17 | 15 | |
18 | 16 | if( defined( 'MEDIAWIKI' ) ) { |
19 | 17 | |
20 | 18 | $wgExtensionFunctions[] = 'efPreloader'; |
21 | | - $wgExtensionCredits['other'][] = array( 'name' => 'Preloader', 'author' => 'Rob Church' ); |
| 19 | + $wgExtensionCredits['other'][] = array( 'name' => 'Preloader', 'author' => 'Rob Church', 'url' => 'http://www.mediawiki.org/wiki/Extension:Preloader' ); |
22 | 20 | |
23 | 21 | /** |
24 | 22 | * Sources of preloaded content for each namespace |
— | — | @@ -103,7 +101,7 @@ |
104 | 102 | |
105 | 103 | } else { |
106 | 104 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
107 | | - die( 1 ); |
| 105 | + exit( 1 ); |
108 | 106 | } |
109 | 107 | |
110 | 108 | ?> |
\ No newline at end of file |
Index: trunk/extensions/Preloader/Preloader |
— | — | @@ -0,0 +1,66 @@ |
| 2 | +PRELOADER EXTENSION |
| 3 | + |
| 4 | + Version 1.0 |
| 5 | + © 2006 Rob Church |
| 6 | + |
| 7 | +== Overview == |
| 8 | + |
| 9 | +1. Introduction |
| 10 | +2. Requirements |
| 11 | +3. Installation |
| 12 | +4. Configuration |
| 13 | +5. Feedback |
| 14 | +6. Change Log |
| 15 | + |
| 16 | +== 1. Introduction == |
| 17 | + |
| 18 | +The Preloader extension allows the creation of boilerplate text which will |
| 19 | +be inserted into the edit form when creating new pages. Different boilerplate |
| 20 | +text can be specified for different namespaces. |
| 21 | + |
| 22 | +In addition, a new parser tag, <nopreload> is introduced, which is used to |
| 23 | +denote sections which should not be preloaded, ever; useful for instructions |
| 24 | +and advice on the boilerplate pages. This tag has no effect during a regular |
| 25 | +parse operation. |
| 26 | + |
| 27 | +== 2. Requirements == |
| 28 | + |
| 29 | +The Preloader extension requires MediaWiki 1.7.0 or later. |
| 30 | + |
| 31 | +== 3. Installation == |
| 32 | + |
| 33 | +To install the Preloader extension, download all files from Subversion, and |
| 34 | +place them into your extensions directory. |
| 35 | + |
| 36 | +Then edit your LocalSettings.php file and add the following line: |
| 37 | + |
| 38 | + require_once( 'extensions/Preloader.php' ); |
| 39 | + |
| 40 | +Installation can be verified through the Special:Version page on your wiki. |
| 41 | + |
| 42 | +== 4. Configuration == |
| 43 | + |
| 44 | +Configuration of the boilerplate sources is done via the $wgPreloaderSource |
| 45 | +configuration variable, which takes the following format: |
| 46 | + |
| 47 | + $wgPreloaderSource[ NAMESPACE ] = PAGE TITLE; |
| 48 | + |
| 49 | +For instance |
| 50 | + |
| 51 | + $wgPreloaderSource[ NS_MAIN ] = 'Template:Boilerplate'; |
| 52 | + $wgPreloaderSource[ NS_HELP ] = 'Template:Boilerplate help'; |
| 53 | + |
| 54 | +dictates that the boilerplate text for pages in the main namespace should be |
| 55 | +loaded from Template:Boilerplate, while pages in the Help namespace will be |
| 56 | +preloaded from Template:Boilerplate_help. Other namespaces have no boilerplate |
| 57 | +configured. |
| 58 | + |
| 59 | +== 5. Feedback == |
| 60 | + |
| 61 | +Please submit comments, suggestions and bug reports to <robchur@gmail.com>. |
| 62 | + |
| 63 | +== 6. Change Log == |
| 64 | + |
| 65 | +17/12/2006 |
| 66 | +Version 1.0 |
| 67 | + * Initial release |
\ No newline at end of file |
Property changes on: trunk/extensions/Preloader/Preloader |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 68 | + native |