r97396 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97395‎ | r97396 | r97397 >
Date:22:28, 17 September 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Initial framework for Extension:Wikimania so we can port the old thing over to this
Modified paths:
  • /trunk/extensions/Wikimania (added) (history)
  • /trunk/extensions/Wikimania/README (added) (history)
  • /trunk/extensions/Wikimania/Wikimania.alias.php (added) (history)
  • /trunk/extensions/Wikimania/Wikimania.i18n.php (added) (history)
  • /trunk/extensions/Wikimania/Wikimania.php (added) (history)
  • /trunk/extensions/Wikimania/backend (added) (history)
  • /trunk/extensions/Wikimania/backend/WikimaniaHooks.php (added) (history)
  • /trunk/extensions/Wikimania/specials (added) (history)
  • /trunk/extensions/Wikimania/specials/SpecialAdministerWikimania.php (added) (history)
  • /trunk/extensions/Wikimania/specials/SpecialCheckWikimaniaStatus.php (added) (history)
  • /trunk/extensions/Wikimania/specials/SpecialRegisterForWikimania.php (added) (history)
  • /trunk/extensions/Wikimania/sql (added) (history)

Diff [purge]

Index: trunk/extensions/Wikimania/Wikimania.php
@@ -0,0 +1,66 @@
 2+<?php
 3+/*
 4+ * Extension for managing the Wikimania conferences
 5+ */
 6+
 7+if( !defined( 'MEDIAWIKI' ) ) {
 8+ die( "Don't do that." );
 9+}
 10+
 11+
 12+// Extension credits
 13+$wgExtensionCredits['specialpages'][] = array(
 14+ 'path' => __FILE__,
 15+ 'name' => 'Wikimania',
 16+ 'author' => array( 'Chad Horohoe' ),
 17+ 'descriptionmsg' => 'wikimania-desc',
 18+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Wikimania',
 19+);
 20+
 21+$d = dirname( __FILE__ );
 22+
 23+/**
 24+ * Classes
 25+ */
 26+$wgAutoloadClasses['WikimaniaHooks'] = "$d/backend/WikimaniaHooks.php";
 27+$wgAutoloadClasses['SpecialAdministerWikimania'] = "$d/specials/SpecialAdministerWikimania.php";
 28+$wgAutoloadClasses['SpecialCheckWikimaniaStatus'] = "$d/specials/SpecialCheckWikimaniaStatus.php";
 29+$wgAutoloadClasses['SpecialRegisterForWikimania'] = "$d/specials/SpecialRegisterForWikimania.php";
 30+
 31+/**
 32+ * i18n
 33+ */
 34+$wgExtensionMessageFiles['wikimania'] = "$d/Wikimania.i18n.php";
 35+$wgExtensionAliasesFiles['wikimania'] = "$d/Wikimania.alias.php";
 36+
 37+/**
 38+ * Special pages
 39+ */
 40+$wgSpecialPages['AdministerWikimania'] = 'SpecialAdministerWikimania';
 41+$wgSpecialPages['CheckWikimaniaStatus'] = 'SpecialCheckWikimaniaStatus';
 42+$wgSpecialPages['RegisterForWikimania'] = 'SpecialRegisterForWikimania';
 43+$wgSpecialPageGroups['wikimania'] = array(
 44+ 'AdministerWikimania', 'CheckWikimaniaStatus', 'RegisterForWikimania'
 45+);
 46+
 47+/**
 48+ * Hooks
 49+ */
 50+$wgHooks['LoadExtensionSchemaUpdates'][] = 'WikimaniaHooks::loadExtensionSchemaUpdates';
 51+
 52+/**
 53+ * Rights
 54+ */
 55+$wgAdditionalRights[] = 'wikimania-register';
 56+$wgAdditionalRights[] = 'wikimania-checkstatus';
 57+$wgAdditionalRights[] = 'wikimania-admin';
 58+$wgGroupPermissions['user']['wikimania-register'] = true;
 59+$wgGroupPermissions['user']['wikimania-checkstatus'] = true;
 60+$wgGroupPermissions['sysop']['wikimania-admin'] = true;
 61+
 62+/**
 63+ * Configuration array for Wikimania
 64+ */
 65+$wgWikimaniaConf = array(
 66+
 67+);
Property changes on: trunk/extensions/Wikimania/Wikimania.php
___________________________________________________________________
Added: svn:eol-style
168 + native
Index: trunk/extensions/Wikimania/specials/SpecialAdministerWikimania.php
@@ -0,0 +1,14 @@
 2+<?php
 3+/*
 4+ * Administration UI for Wikimania
 5+ */
 6+class SpecialAdministerWikimania extends SpecialPage {
 7+ public function __construct() {
 8+ parent::__construct( 'AdministerWikimania', 'wikimania-admin' );
 9+ }
 10+
 11+ public function execute( $par = '' ) {
 12+ $this->setHeaders();
 13+ $this->getOutput->addHTML( '<p>Todo</p>' );
 14+ }
 15+}
Property changes on: trunk/extensions/Wikimania/specials/SpecialAdministerWikimania.php
___________________________________________________________________
Added: svn:eol-style
116 + native
Index: trunk/extensions/Wikimania/specials/SpecialCheckWikimaniaStatus.php
@@ -0,0 +1,14 @@
 2+<?php
 3+/*
 4+ * Check your registration status
 5+ */
 6+class SpecialCheckWikimaniaStatus extends SpecialPage {
 7+ public function __construct() {
 8+ parent::__construct( 'CheckWikimaniaStatus', 'wikimania-checkstatus' );
 9+ }
 10+
 11+ public function execute( $par = '' ) {
 12+ $this->setHeaders();
 13+ $this->getOutput->addHTML( '<p>Todo</p>' );
 14+ }
 15+}
Property changes on: trunk/extensions/Wikimania/specials/SpecialCheckWikimaniaStatus.php
___________________________________________________________________
Added: svn:eol-style
116 + native
Index: trunk/extensions/Wikimania/specials/SpecialRegisterForWikimania.php
@@ -0,0 +1,14 @@
 2+<?php
 3+/*
 4+ * Register for Wikimania
 5+ */
 6+class SpecialRegisterForWikimania extends SpecialPage {
 7+ public function __construct() {
 8+ parent::__construct( 'RegisterForWikimania', 'wikimania-register' );
 9+ }
 10+
 11+ public function execute( $par = '' ) {
 12+ $this->setHeaders();
 13+ $this->getOutput->addHTML( '<p>Todo</p>' );
 14+ }
 15+}
Property changes on: trunk/extensions/Wikimania/specials/SpecialRegisterForWikimania.php
___________________________________________________________________
Added: svn:eol-style
116 + native
Index: trunk/extensions/Wikimania/Wikimania.alias.php
@@ -0,0 +1,16 @@
 2+<?php
 3+/**
 4+ * Aliases for extension Wikimania
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+$specialPageAliases = array();
 11+
 12+/** English (English) */
 13+$specialPageAliases['en'] = array(
 14+ 'AdministerWikimania' => array( 'AdministerWikimania' ),
 15+ 'CheckWikimaniaStatus' => array( 'CheckWikimaniaStatus' ),
 16+ 'RegisterForWikimania' => array( 'RegisterForWikimania' ),
 17+);
Property changes on: trunk/extensions/Wikimania/Wikimania.alias.php
___________________________________________________________________
Added: svn:eol-style
118 + native
Index: trunk/extensions/Wikimania/backend/WikimaniaHooks.php
@@ -0,0 +1,15 @@
 2+<?php
 3+/*
 4+ * Hook registration
 5+ */
 6+
 7+class WikimaniaHooks {
 8+ public static function onLoadExtensionSchemaUpdates( $updater = null ) {
 9+ if( !$updater ) {
 10+ $updater->output( "Wikimania Extension requires MW 1.17+" );
 11+ } else {
 12+
 13+ }
 14+ return true;
 15+ }
 16+}
Property changes on: trunk/extensions/Wikimania/backend/WikimaniaHooks.php
___________________________________________________________________
Added: svn:eol-style
117 + native
Index: trunk/extensions/Wikimania/README
@@ -0,0 +1,5 @@
 2+This extension is designed for managing the annual Wikimania conference.
 3+
 4+Install like a normal extension, run update.php to create tables.
 5+
 6+Configure $wgWikimaniaConf (see docs in Wikimania.php)
Index: trunk/extensions/Wikimania/Wikimania.i18n.php
@@ -0,0 +1,27 @@
 2+<?php
 3+/*
 4+ * i18n for Wikimania extension
 5+ */
 6+
 7+$messages = array();
 8+
 9+/**
 10+ * English
 11+ */
 12+$messages['en'] = array(
 13+ 'wikimania' => 'Wikimania',
 14+ 'wikimania-desc' => 'Extension designed to manage the annual Wikimania conference',
 15+ 'administerwikimania' => 'Administer Wikimania registrations',
 16+ 'checkwikimaniastatus' => 'Check Wikimania registration status',
 17+ 'registerforwikimania' => 'Register for Wikimania',
 18+ 'right-wikimania-admin' => 'Manage Wikimania registrations',
 19+ 'right-wikimania-register' => 'Register for Wikimania',
 20+ 'right-wikimania-checkstatus' => 'Check status of a Wikimania registration',
 21+);
 22+
 23+/**
 24+ * Message docs (qqq)
 25+ */
 26+$messages['qqq'] = array(
 27+ 'wikimania-desc' => '{{desc}}',
 28+);
Property changes on: trunk/extensions/Wikimania/Wikimania.i18n.php
___________________________________________________________________
Added: svn:eol-style
129 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r97436Some work-in-progress for Wikimania ext (so people can get an idea of how I e...demon19:47, 18 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   10:22, 18 September 2011
+/**
+ * Rights
+ */
+$wgAdditionalRights[] = 'wikimania-register';
...

Doxygen is not wise enough to parse that correctly. Maybe just use normal comment blocks?

More message docs would be nice!

Status & tagging log