2010-09-15 03:02:35 +00:00
|
|
|
<?php
|
2010-09-16 17:29:22 +00:00
|
|
|
/**
|
|
|
|
* WikiEditor extension
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
|
|
|
*
|
|
|
|
* @author Trevor Parscal <trevor@wikimedia.org>
|
|
|
|
* @author Roan Kattouw <roan.kattouw@gmail.com>
|
|
|
|
* @author Nimish Gautam <nimish@wikimedia.org>
|
|
|
|
* @author Adam Miller <amiller@wikimedia.org>
|
|
|
|
* @license GPL v2 or later
|
|
|
|
* @version 0.3.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Configuration */
|
|
|
|
|
|
|
|
// Each module may be configured individually to be globally on/off or user preference based
|
2010-09-16 21:11:46 +00:00
|
|
|
$wgWikiEditorFeatures = array(
|
2010-09-16 22:37:03 +00:00
|
|
|
|
|
|
|
/* Textarea / i-frame compatible (probably deployable) */
|
|
|
|
|
2010-09-16 21:11:46 +00:00
|
|
|
'toolbar' => array( 'global' => false, 'user' => true ),
|
2010-09-16 22:37:03 +00:00
|
|
|
// Provides interactive tools
|
|
|
|
'dialogs' => array( 'global' => false, 'user' => true ),
|
|
|
|
// Adds a tab for previewing in-line
|
2010-09-16 17:29:22 +00:00
|
|
|
'preview' => array( 'global' => false, 'user' => true ),
|
2010-09-16 22:37:03 +00:00
|
|
|
// Adds a button for previewing in a dialog
|
2010-10-04 21:08:41 +00:00
|
|
|
'previewDialog' => array( 'global' => false, 'user' => false ),
|
2010-09-16 22:37:03 +00:00
|
|
|
// Adds a button and dialog for step-by-step publishing
|
2010-09-16 17:29:22 +00:00
|
|
|
'publish' => array( 'global' => false, 'user' => true ),
|
2010-09-16 22:37:03 +00:00
|
|
|
|
|
|
|
/* I-frame dependent (do not deploy!) */
|
|
|
|
|
|
|
|
// Failry stable table of contents
|
|
|
|
'toc' => array( 'global' => false, 'user' => true ),
|
|
|
|
// Pretty broken template collapsing/editing
|
2010-10-04 21:08:41 +00:00
|
|
|
'templateEditor' => array( 'global' => false, 'user' => false ),
|
2010-09-16 22:37:03 +00:00
|
|
|
// Bare-bones (probably broken) template collapsing
|
2010-10-04 21:08:41 +00:00
|
|
|
'templates' => array( 'global' => false, 'user' => false ),
|
2010-09-16 22:37:03 +00:00
|
|
|
|
|
|
|
/* Unknown status */
|
|
|
|
|
|
|
|
// Adds the AddMediaWizard gadget to the toolbar
|
|
|
|
'addMediaWizard' => array( 'global' => false, 'user' => false ),
|
2010-09-16 17:29:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/* Setup */
|
|
|
|
|
|
|
|
$wgExtensionCredits['other'][] = array(
|
|
|
|
'path' => __FILE__,
|
|
|
|
'name' => 'WikiEditor',
|
|
|
|
'author' => array( 'Trevor Parscal', 'Roan Kattouw', 'Nimish Gautam', 'Adam Miller' ),
|
|
|
|
'version' => '0.3.0',
|
|
|
|
'url' => 'http://www.mediawiki.org/wiki/Extension:UsabilityInitiative',
|
|
|
|
'descriptionmsg' => 'wikieditor-desc',
|
|
|
|
);
|
|
|
|
$wgAutoloadClasses['WikiEditorHooks'] = dirname( __FILE__ ) . '/WikiEditor.hooks.php';
|
|
|
|
$wgExtensionMessagesFiles['WikiEditor'] = dirname( __FILE__ ) . '/WikiEditor.i18n.php';
|
2010-09-16 21:11:46 +00:00
|
|
|
$wgHooks['EditPage::showEditForm:initial'][] = 'WikiEditorHooks::editPageShowEditFormInitial';
|
2010-09-16 17:29:22 +00:00
|
|
|
$wgHooks['GetPreferences'][] = 'WikiEditorHooks::getPreferences';
|
|
|
|
$wgHooks['MakeGlobalVariablesScript'][] = 'WikiEditorHooks::makeGlobalVariablesScript';
|
|
|
|
$wgHooks['ResourceLoaderRegisterModules'][] = 'WikiEditorHooks::resourceLoaderRegisterModules';
|