MarkTraceur has uploaded a new change for review.
https://gerrit.wikimedia.org/r/73917
Change subject: Work with the newer versions of BetaFeatures
......................................................................
Work with the newer versions of BetaFeatures
I changed how Extension:BetaFeatures works, so this patch should fix
that as well as add some of the cool new features.
Change-Id: Ia2c1c16100fca425c4d2915fe6c8128c2438b21c
---
M CategorySlideShow.i18n.php
M CategorySlideShow.php
M CategorySlideShowHooks.php
A images/screenshot.png
4 files changed, 10 insertions(+), 7 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategorySlideShow
refs/changes/17/73917/1
diff --git a/CategorySlideShow.i18n.php b/CategorySlideShow.i18n.php
index 1664d2a..2c23cc8 100644
--- a/CategorySlideShow.i18n.php
+++ b/CategorySlideShow.i18n.php
@@ -19,9 +19,11 @@
$messages['en'] = array(
'mwe-css-start-slideshow' => 'Start slideshow',
'mwe-css-enable-preference' => 'Enable category slide shows',
+ 'mwe-css-extension-description' => 'This preference will enable
slide-shows on pages in the Category namespace, which may be a desirable
feature in media-centric wikis and for people who spend a lot of time browsing
categories.',
);
$messages['qqq'] = array(
'mwe-css-start-slideshow' => 'Button for starting the slideshow on a
category page.',
'mwe-css-enable-preference' => 'Label for a preference that enables the
feature.',
+ 'mwe-css-extension-description' => 'Description for the beta features
page.',
);
diff --git a/CategorySlideShow.php b/CategorySlideShow.php
index cc5ba2b..1517e30 100644
--- a/CategorySlideShow.php
+++ b/CategorySlideShow.php
@@ -47,5 +47,5 @@
),
) + $moduleInfo;
-$wgHooks['GetPreferences'][] = 'CategorySlideShowHooks::getPreferences';
+$wgHooks['GetBetaFeaturePreferences'][] =
'CategorySlideShowHooks::getPreferences';
$wgHooks['CategoryPageView'][] = 'CategorySlideShowHooks::onCategoryPageView';
diff --git a/CategorySlideShowHooks.php b/CategorySlideShowHooks.php
index 463119d..87372f8 100644
--- a/CategorySlideShowHooks.php
+++ b/CategorySlideShowHooks.php
@@ -18,9 +18,7 @@
class CategorySlideShowHooks {
- // Remove the "beta-feature-" prefix when the feature is no longer
- // beta, and make sure you change it elsewhere in the project too.
- private static $optionName = 'beta-feature-category-slideshow';
+ private static $optionName = 'category-slideshow';
public static function onCategoryPageView( &$categoryArticle ) {
if ( $wgUser->getOption( self::$optionName ) ) {
@@ -32,12 +30,15 @@
}
public static function getPreferences( $user, &$prefs ) {
+ global $wgExtensionAssetsPath;
+
$prefs[self::$optionName] = array(
- // Hidden for now because it's a beta preference - make
sure
- // you change this to "toggle" when it's no longer beta.
- 'type' => 'hidden',
'label-message' => 'mwe-css-enable-preference',
'section' => 'misc',
+ 'screenshot' => $wgExtensionAssetsPath .
'/CategorySlideShow/images/screenshot.png',
+ 'description' => 'mwe-css-extension-description',
);
+
+ return true;
}
}
diff --git a/images/screenshot.png b/images/screenshot.png
new file mode 100644
index 0000000..514220d
--- /dev/null
+++ b/images/screenshot.png
Binary files differ
--
To view, visit https://gerrit.wikimedia.org/r/73917
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2c1c16100fca425c4d2915fe6c8128c2438b21c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategorySlideShow
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits