From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- extensions/Vector/Vector.php | 131 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 extensions/Vector/Vector.php (limited to 'extensions/Vector/Vector.php') diff --git a/extensions/Vector/Vector.php b/extensions/Vector/Vector.php new file mode 100644 index 00000000..1d7eefdf --- /dev/null +++ b/extensions/Vector/Vector.php @@ -0,0 +1,131 @@ + + * @author Roan Kattouw + * @author Nimish Gautam + * @author Adam Miller + * @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 +$wgVectorFeatures = array( + 'collapsiblenav' => array( 'global' => true, 'user' => true ), + 'collapsibletabs' => array( 'global' => true, 'user' => false ), + 'editwarning' => array( 'global' => false, 'user' => true ), + 'simplesearch' => array( 'global' => false, 'user' => true ), + // The follwing are experimental and likely unstable - use at your own risk + 'expandablesearch' => array( 'global' => false, 'user' => false ), + 'footercleanup' => array( 'global' => false, 'user' => false ), + 'sectioneditlinks' => array( 'global' => false, 'user' => false ), +); + +// The Vector skin has a basic version of simple search, which is a prerequisite for the enhanced one +$wgDefaultUserOptions['vector-simplesearch'] = 1; + +// Enable bucket testing for new version of collapsible nav +$wgCollapsibleNavBucketTest = false; +// Force the new version +$wgCollapsibleNavForceNewVersion = false; + +// Enable bucket testing for new version of section edit links +$wgVectorSectionEditLinksBucketTest = false; +// Percentage of users who's use of section edit links will be tracked - half of which will see the +// new section edit links - default 5% +$wgVectorSectionEditLinksLotteryOdds = 5; +// Version number of the current experiment - Buckets from previous experiments will be overwritten +// with new values when this is incremented, so as to allow accurate re-distribution. When changing +// the lottery odds, this needs to change too, or you will have inaccurate data. +$wgVectorSectionEditLinksExperiment = 0; + +/* Setup */ + +$wgExtensionCredits['other'][] = array( + 'path' => __FILE__, + 'name' => 'Vector', + 'author' => array( 'Trevor Parscal', 'Roan Kattouw', 'Nimish Gautam', 'Adam Miller' ), + 'version' => '0.3.0', + 'url' => 'http://www.mediawiki.org/wiki/Extension:Vector', + 'descriptionmsg' => 'vector-desc', +); +$wgAutoloadClasses['VectorHooks'] = dirname( __FILE__ ) . '/Vector.hooks.php'; +$wgExtensionMessagesFiles['Vector'] = dirname( __FILE__ ) . '/Vector.i18n.php'; +$wgHooks['BeforePageDisplay'][] = 'VectorHooks::beforePageDisplay'; +$wgHooks['GetPreferences'][] = 'VectorHooks::getPreferences'; +$wgHooks['ResourceLoaderGetConfigVars'][] = 'VectorHooks::resourceLoaderGetConfigVars'; +$wgHooks['MakeGlobalVariablesScript'][] = 'VectorHooks::makeGlobalVariablesScript'; + +$vectorResourceTemplate = array( + 'localBasePath' => dirname( __FILE__ ) . '/modules', + 'remoteExtPath' => 'Vector/modules', + 'group' => 'ext.vector', +); +$wgResourceModules += array( + 'ext.vector.collapsibleNav' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.collapsibleNav.js', + 'styles' => 'ext.vector.collapsibleNav.css', + 'messages' => array( + 'vector-collapsiblenav-more', + ), + 'dependencies' => array( + 'jquery.client', + 'jquery.cookie', + 'jquery.tabIndex', + ), + ), + 'ext.vector.collapsibleTabs' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.collapsibleTabs.js', + 'dependencies' => array( + 'jquery.collapsibleTabs', + 'jquery.delayedBind', + ), + ), + 'ext.vector.editWarning' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.editWarning.js', + 'messages' => array( + 'vector-editwarning-warning', + ), + ), + 'ext.vector.expandableSearch' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.expandableSearch.js', + 'styles' => 'ext.vector.expandableSearch.css', + 'dependencies' => array( + 'jquery.client', + 'jquery.expandableField', + 'jquery.delayedBind', + ), + ), + 'ext.vector.footerCleanup' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.footerCleanup.js', + 'styles' => 'ext.vector.footerCleanup.css', + ), + 'ext.vector.sectionEditLinks' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.sectionEditLinks.js', + 'styles' => 'ext.vector.sectionEditLinks.css', + 'dependencies' => array( + 'jquery.cookie', + 'jquery.clickTracking', + ), + ), + 'ext.vector.simpleSearch' => $vectorResourceTemplate + array( + 'scripts' => 'ext.vector.simpleSearch.js', + 'messages' => array( + 'vector-simplesearch-search', + 'vector-simplesearch-containing', + ), + 'dependencies' => array( + 'jquery.client', + 'jquery.suggestions', + 'jquery.autoEllipsis', + 'jquery.placeholder', + ), + ), +); + -- cgit v1.2.2