Index: trunk/extensions/Storyboard/StoryReview_body.php |
— | — | @@ -1,26 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * File holding the SpecialStoryReview class that allows reviewers to moderate the submitted stories. |
5 | | - * |
6 | | - * @file StoryReview_body.php |
7 | | - * @ingroup Storyboard |
8 | | - * |
9 | | - * @author Jeroen De Dauw |
10 | | - */ |
11 | | - |
12 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
13 | | - die( 'Not an entry point.' ); |
14 | | -} |
15 | | - |
16 | | -class SpecialStoryReview extends IncludableSpecialPage { |
17 | | - |
18 | | - function __construct() { |
19 | | - parent::__construct( 'StoryReview' ); |
20 | | - |
21 | | - wfLoadExtensionMessages( 'Storyboard' ); |
22 | | - } |
23 | | - |
24 | | - function execute( $language ) { |
25 | | - global $wgOut; |
26 | | - } |
27 | | -} |
Index: trunk/extensions/Storyboard/specials/StoryReview_body.php |
— | — | @@ -0,0 +1,26 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | + * File holding the SpecialStoryReview class that allows reviewers to moderate the submitted stories.
|
| 5 | + *
|
| 6 | + * @file StoryReview_body.php
|
| 7 | + * @ingroup Storyboard
|
| 8 | + *
|
| 9 | + * @author Jeroen De Dauw
|
| 10 | + */
|
| 11 | +
|
| 12 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 13 | + die( 'Not an entry point.' );
|
| 14 | +}
|
| 15 | +
|
| 16 | +class SpecialStoryReview extends IncludableSpecialPage {
|
| 17 | +
|
| 18 | + function __construct() {
|
| 19 | + parent::__construct( 'StoryReview' );
|
| 20 | +
|
| 21 | + wfLoadExtensionMessages( 'Storyboard' );
|
| 22 | + }
|
| 23 | +
|
| 24 | + function execute( $language ) {
|
| 25 | + global $wgOut;
|
| 26 | + }
|
| 27 | +}
|
Index: trunk/extensions/Storyboard/INSTALL |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +Once you have downloaded the code, place the 'Storyboard' directory within your MediaWiki 'extensions' directory.
|
| 3 | +Then add the following code to your LocalSettings.php file:
|
| 4 | +
|
| 5 | +# Maps
|
| 6 | +require_once( "$IP/extensions/Storyboard/Storyboard.php" ); |
\ No newline at end of file |
Index: trunk/extensions/Storyboard/RELEASE-NOTES |
Index: trunk/extensions/Storyboard/Storyboard.php |
— | — | @@ -37,10 +37,24 @@ |
38 | 38 | $wgExtensionAliasesFiles['Storyboard'] = $egStoryboardDir . 'Storyboard.alias.php'; |
39 | 39 | |
40 | 40 | // Load and register the StoryReview special page and register it's group. |
41 | | -$wgAutoloadClasses['SpecialStoryReview'] = $egStoryboardDir . 'StoryReview_body.php'; |
| 41 | +$wgAutoloadClasses['SpecialStoryReview'] = $egStoryboardDir . 'specials/StoryReview_body.php'; |
42 | 42 | $wgSpecialPages['StoryReview'] = 'SpecialStoryReview'; |
43 | 43 | $wgSpecialPageGroups['StoryReview'] = 'contribution'; |
44 | 44 | |
| 45 | +// Load the tag extension classes. |
| 46 | +$wgAutoloadClasses['TagStoryboard'] = $egStoryboardDir . 'tags/Storyboard_body.php'; |
| 47 | +$wgAutoloadClasses['TagStorysubmission'] = $egStoryboardDir . 'tags/Storysubmission_body.php'; |
| 48 | + |
| 49 | +// Register the tag extensions. |
| 50 | +// Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980. |
| 51 | +if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
| 52 | + $wgHooks['ParserFirstCallInit'][] = 'efStoryboardStoryboardSetup'; |
| 53 | + $wgHooks['ParserFirstCallInit'][] = 'efStoryboardStorysubmissionSetup'; |
| 54 | +} else { // Otherwise do things the old fashioned way. |
| 55 | + $wgExtensionFunctions[] = 'efStoryboardStoryboardSetup'; |
| 56 | + $wgExtensionFunctions[] = 'efStoryboardStorysubmissionSetup'; |
| 57 | +} |
| 58 | + |
45 | 59 | /** |
46 | 60 | * Initialization function for the Storyboard extension. |
47 | 61 | */ |
— | — | @@ -59,3 +73,15 @@ |
60 | 74 | 'descriptionmsg' => 'storyboard-desc', |
61 | 75 | ); |
62 | 76 | } |
| 77 | + |
| 78 | +function efStoryboardStoryboardSetup() { |
| 79 | + global $wgParser; |
| 80 | + $wgParser->setHook( 'storyboard', array('TagStoryboard', 'render') ); |
| 81 | + return true; |
| 82 | +} |
| 83 | + |
| 84 | +function efStoryboardStorysubmissionSetup() { |
| 85 | + global $wgParser; |
| 86 | + $wgParser->setHook( 'storysubmission', array('TagStorysubmission', 'render') ); |
| 87 | + return true; |
| 88 | +} |
Index: trunk/extensions/Storyboard/tags/Storysubmission_body.php |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * File holding the rendering function for the Storysubmission tag.
|
| 6 | + *
|
| 7 | + * @file Storysubmission_body.php
|
| 8 | + * @ingroup Storyboard
|
| 9 | + *
|
| 10 | + * @author Jeroen De Dauw
|
| 11 | + */
|
| 12 | +
|
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 14 | + die( 'Not an entry point.' );
|
| 15 | +}
|
| 16 | +
|
| 17 | +class TagStorysubmission {
|
| 18 | +
|
| 19 | + public static function render( $input, $args, $parser, $frame ) {
|
| 20 | + return '';
|
| 21 | + }
|
| 22 | +
|
| 23 | +} |
\ No newline at end of file |
Index: trunk/extensions/Storyboard/tags/Storyboard_body.php |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +<?php
|
| 3 | +
|
| 4 | +/**
|
| 5 | + * File holding the rendering function for the Storyboard tag.
|
| 6 | + *
|
| 7 | + * @file Storyboard_body.php
|
| 8 | + * @ingroup Storyboard
|
| 9 | + *
|
| 10 | + * @author Jeroen De Dauw
|
| 11 | + */
|
| 12 | +
|
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 14 | + die( 'Not an entry point.' );
|
| 15 | +}
|
| 16 | +
|
| 17 | +class TagStoryboard {
|
| 18 | +
|
| 19 | + public static function render( $input, $args, $parser, $frame ) {
|
| 20 | + return '';
|
| 21 | + }
|
| 22 | +
|
| 23 | +}
|
| 24 | +
|
| 25 | +
|
| 26 | +
|