Index: trunk/extensions/Poll/Poll.alias.php |
— | — | @@ -0,0 +1,20 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Aliases for special pages |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$aliases = array(); |
| 11 | + |
| 12 | +/** English */ |
| 13 | +$aliases['en'] = array( |
| 14 | + 'Poll' => array( 'Poll' ), |
| 15 | +); |
| 16 | + |
| 17 | +/** German(Deutsch) */ |
| 18 | +$aliases['de'] = array( |
| 19 | + 'Poll' => array( 'Umfrage' ,'Poll' ), |
| 20 | +); |
| 21 | + |
Property changes on: trunk/extensions/Poll/Poll.alias.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 22 | + native |
Index: trunk/extensions/Poll/Poll_body.php |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +<?php |
| 3 | +class MyExtension extends SpecialPage { |
| 4 | + function __construct() { |
| 5 | + parent::__construct( 'Poll' ); |
| 6 | + wfLoadExtensionMessages('Poll'); |
| 7 | + } |
| 8 | + |
| 9 | + function execute( $par ) { |
| 10 | + global $wgRequest, $wgOut; |
| 11 | + |
| 12 | + $this->setHeaders(); |
| 13 | + |
| 14 | + # Get request data from, e.g. |
| 15 | + $action = $wgRequest->getText('action'); |
| 16 | + |
| 17 | + } |
| 18 | +} |
Property changes on: trunk/extensions/Poll/Poll_body.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |
Index: trunk/extensions/Poll/Poll.i18n.php |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for TSPoll extension. |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +$messages['en'] = array( |
| 13 | + 'poll-desc' => 'Add a [[Special:Poll|specialpage]] to MediaWiki for useing polls in MediaWiki', |
| 14 | +); |
| 15 | + |
| 16 | +$messages['de'] = array( |
| 17 | + 'poll-desc' => 'Erstellt eine [[Special:Poll|Spezialsite]], um Umfragen in MedaWiki zu nutzen', |
| 18 | +); |
Property changes on: trunk/extensions/Poll/Poll.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |
Index: trunk/extensions/Poll/Poll.php |
— | — | @@ -0,0 +1,41 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Poll - Create a specialpage for useing polls in MediaWiki |
| 5 | + * |
| 6 | + * To activate this extension, add the following into your LocalSettings.php file: |
| 7 | + * require_once("$IP/extensions/Poll/Poll.php"); |
| 8 | + * |
| 9 | + * @ingroup Extensions |
| 10 | + * @author Jan Luca <jan@toolserver.org> |
| 11 | + * @version 0.0 |
| 12 | + * @link http://www.mediawiki.org/wiki/User:Jan_Luca/Extension:TSPoll Documentation |
| 13 | + * @license http://creativecommons.org/licenses/by-sa/3.0/ Attribution-Share Alike 3.0 Unported or later |
| 14 | + */ |
| 15 | + |
| 16 | +/** |
| 17 | + * Protect against register_globals vulnerabilities. |
| 18 | + * This line must be present before any global variable is referenced. |
| 19 | + */ |
| 20 | + |
| 21 | +// Die the extension, if not MediaWiki is used |
| 22 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 23 | + echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); |
| 24 | + die( - 1 ); |
| 25 | +} |
| 26 | + |
| 27 | +// Extension credits that will show up on Special:Version |
| 28 | +$wgExtensionCredits['specialpage'][] = array( |
| 29 | + 'name' => 'Poll', |
| 30 | + 'version' => '0.0', |
| 31 | + 'path' => __FILE__, |
| 32 | + 'author' => 'Jan Luca', |
| 33 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Poll2', |
| 34 | + 'descriptionmsg' => 'poll-desc' |
| 35 | +); |
| 36 | + |
| 37 | +$dir = dirname(__FILE__) . '/'; |
| 38 | + |
| 39 | +$wgAutoloadClasses['Poll'] = $dir . 'Poll_body.php'; # Tell MediaWiki to load the extension body. |
| 40 | +$wgExtensionMessagesFiles['Poll'] = $dir . 'Poll.i18n.php'; |
| 41 | +$wgExtensionAliasesFiles['Poll'] = $dir . 'Poll.alias.php'; |
| 42 | +$wgSpecialPages['Poll'] = 'Poll'; # Let MediaWiki know about your new special page. |
Property changes on: trunk/extensions/Poll/Poll.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 43 | + native |
Index: trunk/extensions/Poll/README |