Mglaser has uploaded a new change for review. https://gerrit.wikimedia.org/r/249764
Change subject: AboutBlueSpice extension: initial commit ...................................................................... AboutBlueSpice extension: initial commit This extension brings a special page which shows up-to-date information about BlueSpice. Links to that page are rendered in several menus. There is a preference setting to opt out of the menu links if needed. Change-Id: Iad8893e53b67b70b2cbf21b5b9ebafff395b45c0 --- A AboutBlueSpice/AboutBlueSpice.class.php A AboutBlueSpice/AboutBlueSpice.setup.php A AboutBlueSpice/i18n/de.json A AboutBlueSpice/i18n/en.json A AboutBlueSpice/i18n/qqq.json A AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.alias.php A AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php A AboutBlueSpice/resources/bluespice.aboutbluespice.js A AboutBlueSpice/template/aboutbluespice.wiki M BlueSpiceExtensions.php.template 10 files changed, 396 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/64/249764/1 diff --git a/AboutBlueSpice/AboutBlueSpice.class.php b/AboutBlueSpice/AboutBlueSpice.class.php new file mode 100644 index 0000000..6853acb --- /dev/null +++ b/AboutBlueSpice/AboutBlueSpice.class.php @@ -0,0 +1,98 @@ +<?php +/** + * BlueSpice for MediaWiki + * Extension: AboutBlueSpice + * Description: Show user addional options of the pro version. + * Authors: Markus Glaser + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * For further information visit http://www.bluespice.com + * + * @author Markus Glaser <[email protected]> + * @version 2.23.2 + * @package BlueSpice_Extensions + * @subpackage AboutBlueSpice + * @copyright Copyright (C) 2015 Hallo Welt! - Medienwerkstatt GmbH, All rights reserved. + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ + +class AboutBlueSpice extends BsExtensionMW { + + public function __construct() { + wfProfileIn( 'BS::'.__METHOD__ ); + + // Base settings + $this->mExtensionFile = __FILE__; + $this->mExtensionType = EXTTYPE::VARIABLE; + $this->mInfo = array( + EXTINFO::NAME => 'AboutBlueSpice', + EXTINFO::DESCRIPTION => 'bs-aboutbluespice-desc', + EXTINFO::AUTHOR => 'Markus Glaser', + EXTINFO::VERSION => 'default', + EXTINFO::STATUS => 'default', + EXTINFO::PACKAGE => 'default', + EXTINFO::URL => 'http://www.hallowelt.com', + EXTINFO::DEPS => array ( 'bluespice' => '2.23.1' ) + ); + $this->mExtensionKey = 'MW::AboutBluespice'; + wfProfileOut( 'BS::'.__METHOD__ ); + } + + protected function initExt() { + wfProfileIn( 'BS::'.__METHOD__ ); + // Hooks + $this->setHook( 'BeforePageDisplay' ); + $this->setHook( 'BSWikiAdminMenuItems' ); + + BsConfig::registerVar( 'MW::AboutBlueSpice::ShowMenuLinks', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-aboutbluespice-show-menu-links', 'toggle' ); + + wfProfileOut( 'BS::'.__METHOD__ ); + } + + /** + * + * @param OutputPage $out + * @param Skin $skin + * @return boolean + */ + public static function onBeforePageDisplay( &$out, &$skin ) { + if ( BsConfig::get( 'MW::AboutBlueSpice::ShowMenuLinks' )) { + $out->addModules( 'ext.bluespice.aboutbluespice' ); + } + return true; + } + + /** + * Returns a list item with a link to the "About BlueSpice" special page + * @param array $aOutSortable Indexed list of menu items. Add item in HTML form. + * @return string Link to the "About BlueSpice" special page + */ + public static function onBSWikiAdminMenuItems( &$aOutSortable ) { + $oSpecialPage = SpecialPage::getTitleFor( 'AboutBlueSpice' ); + $sLink = Html::element( + 'a', array ( + 'id' => 'bs-admin-aboutbluespice', + 'href' => $oSpecialPage->getLocalURL(), + 'title' => wfMessage( 'bs-aboutbluespice-about-bluespice' )->escaped() + ), wfMessage( 'bs-aboutbluespice-about-bluespice' )->escaped() + ); + $aOutSortable[wfMessage( 'bs-aboutbluespice-about-bluespice' )->escaped()] = '<li>' . $sLink . '</li>'; + return true; + } + +} \ No newline at end of file diff --git a/AboutBlueSpice/AboutBlueSpice.setup.php b/AboutBlueSpice/AboutBlueSpice.setup.php new file mode 100644 index 0000000..8476b66 --- /dev/null +++ b/AboutBlueSpice/AboutBlueSpice.setup.php @@ -0,0 +1,27 @@ +<?php + +BsExtensionManager::registerExtension( 'AboutBlueSpice', BsRUNLEVEL::FULL | BsRUNLEVEL::REMOTE ); + +$GLOBALS['wgAutoloadClasses']['AboutBlueSpice'] = __DIR__ . '/AboutBlueSpice.class.php'; +$wgAutoloadClasses['SpecialAboutBlueSpice'] = __DIR__ . '/includes/specials/SpecialAboutBlueSpice.class.php'; + +$wgMessagesDirs['AboutBlueSpice'] = __DIR__ . '/i18n'; + +$wgSpecialPages['AboutBlueSpice'] = 'SpecialAboutBlueSpice'; +$wgExtensionMessagesFiles['ExtendedStatisticsAlias'] = __DIR__ . '/includes/specials/SpecialAboutBlueSpice.alias.php'; + +$aResourceModuleTemplate = array ( + 'localBasePath' => __DIR__ . '/resources', + 'remoteExtPath' => 'BlueSpiceExtensions/AboutBlueSpice/resources' +); + +$wgResourceModules['ext.bluespice.aboutbluespice'] = array ( + 'scripts' => array ( + 'bluespice.aboutbluespice.js' + ), + 'messages' => array ( + 'bs-aboutbluespice-about-bluespice' + ) + ) + $aResourceModuleTemplate; + +unset( $aResoureModuleTemplate ); diff --git a/AboutBlueSpice/i18n/de.json b/AboutBlueSpice/i18n/de.json new file mode 100644 index 0000000..0371c1f --- /dev/null +++ b/AboutBlueSpice/i18n/de.json @@ -0,0 +1,12 @@ +{ + "@metadata": { + "authors": [ + "Markus Glaser <[email protected]>" + ] + }, + "bs-aboutbluespice-desc": "Informationen über BlueSpice.", + "bs-aboutbluespice-about-bluespice": "Über BlueSpice", + "aboutbluespice": "Über BlueSpice", + "prefs-aboutbluespice": "Über BlueSpice", + "bs-aboutbluespice-show-menu-links": "Link \"Über BlueSpice\" im Top- und Hauptmenü anzeigen" +} \ No newline at end of file diff --git a/AboutBlueSpice/i18n/en.json b/AboutBlueSpice/i18n/en.json new file mode 100644 index 0000000..0a83d1f --- /dev/null +++ b/AboutBlueSpice/i18n/en.json @@ -0,0 +1,12 @@ +{ + "@metadata": { + "authors": [ + "Markus Glaser <[email protected]>" + ] + }, + "bs-aboutbluespice-desc": "Information about BlueSpice.", + "bs-aboutbluespice-about-bluespice": "About BlueSpice", + "aboutbluespice": "About BlueSpice", + "prefs-aboutbluespice": "About BlueSpice", + "bs-aboutbluespice-show-menu-links": "Show link \"About BlueSpice\" in top and main menu" +} diff --git a/AboutBlueSpice/i18n/qqq.json b/AboutBlueSpice/i18n/qqq.json new file mode 100644 index 0000000..fa5695d --- /dev/null +++ b/AboutBlueSpice/i18n/qqq.json @@ -0,0 +1,12 @@ +{ + "@metadata": { + "authors": [ + "Markus Glaser <[email protected]>" + ] + }, + "bs-aboutbluespice-desc": "Used in [{{canonicalurl:Special:WikiAdmin|mode=ExtensionInfo}} Special:WikiAdmin?mode=ExtensionInfo], description of hide title extension", + "bs-aboutbluespice-about-bluespice": "Label for menu item in various menus", + "aboutbluespice": "Label for special page in list of special pages", + "prefs-aboutbluespice": "Header for extension's preferences settings", + "bs-aboutbluespice-show-menu-links": "Label for option to show the \"About BlueSpice\" link in top and main menu" +} \ No newline at end of file diff --git a/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.alias.php b/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.alias.php new file mode 100644 index 0000000..738bf01 --- /dev/null +++ b/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.alias.php @@ -0,0 +1,25 @@ +<?php +/** + * Internationalisation file for About BlueSpice special page. + * + * Part of BlueSpice for MediaWiki + * + * @author Markus Glaser <[email protected]> + + * @package BlueSpice_Extensions + * @subpackage AboutBlueSpice + * @copyright Copyright (C) 2015 Hallo Welt! - Medienwerkstatt GmbH, All rights reserved. + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ +$specialPageAliases = array(); + +/** English */ +$specialPageAliases['en'] = array( + 'AboutBlueSpice' => array( 'About BlueSpice' ), +); + +/** German (Deutsch) */ +$specialPageAliases['de'] = array( + 'AboutBlueSpice' => array( 'Über BlueSpice' ), +); \ No newline at end of file diff --git a/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php b/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php new file mode 100644 index 0000000..93c6c4d --- /dev/null +++ b/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php @@ -0,0 +1,62 @@ +<?php + +/** + * Renders the About BlueSpice special page. + * + * Part of BlueSpice for MediaWiki + * + * @author Markus Glaser <[email protected]> + + * @package BlueSpice_Extensions + * @subpackage AboutBlueSpice + * @copyright Copyright (C) 2015 Hallo Welt! - Medienwerkstatt GmbH, All rights reserved. + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ + +class SpecialAboutBlueSpice extends BsSpecialPage { + + /** + * Constructor of SpecialAboutBlueSpice class + */ + public function __construct() { + wfProfileIn( 'BS::'.__METHOD__ ); + parent::__construct( 'AboutBlueSpice' ); + wfProfileOut( 'BS::'.__METHOD__ ); + } + + /** + * Renders special page output. + * @param string $sParameter Not used. + * @return bool Allow other hooked methods to be executed. Always true. + */ + public function execute( $sParameter ) { + parent::execute( $sParameter ); + + $sLang = RequestContext::getMain()->getLanguage()->getCode(); + switch ( substr( $sLang, 0, 2 ) ) { + case "de" : + $sUrl = "http://de.bluespice.com"; + break; + default : + $sUrl = "http://www.bluespice.com"; + }; + + $sOutHTML = '<iframe src="' . $sUrl . '" id="aboutbluespiceremote" style="width:100%;border:0px;min-height:400px;"></iframe>'; + + $oOutputPage = $this->getOutput(); + $this->getOutput()->setPagetitle( wfMessage( 'bs-aboutbluespice-about-bluespice' )->plain() ); + + //$sWikitext = file_get_contents( __DIR__ . '/../../template/aboutbluespice.wiki' ); + //$oOutputPage->addWikiText( $sWikitext ); + + $oOutputPage->addHTML( $sOutHTML ); + + return true; + } + + protected function getGroupName() { + return 'bluespice'; + } + +} \ No newline at end of file diff --git a/AboutBlueSpice/resources/bluespice.aboutbluespice.js b/AboutBlueSpice/resources/bluespice.aboutbluespice.js new file mode 100644 index 0000000..f5e7151 --- /dev/null +++ b/AboutBlueSpice/resources/bluespice.aboutbluespice.js @@ -0,0 +1,62 @@ +/** + * About BlueSpice extension + * + * @author Markus Glaser <[email protected]> + * @version 1.0.0 beta + + * @package Bluespice_Extensions + * @subpackage AboutBlueSpice + * @copyright Copyright (C) 2015 Hallo Welt! - Medienwerkstatt GmbH, All rights reserved. + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ + +/** +* Open status bar if review is clicked. +*/ + +$(function () { + // Add About BlueSpice link to top menu + var oAboutBlueSpiceTopLink = mw.html.element( + 'a', + { + href: mw.util.getUrl('Special:AboutBlueSpice'), + class: 'menu-item-single level-1' + }, + mw.message('bs-aboutbluespice-about-bluespice').plain() + ); + var oAboutBlueSpiceTopMenuItem = mw.html.element( + 'li', + {}, + new mw.html.Raw(oAboutBlueSpiceTopLink) + ); + $('#bs-apps').find('ul').append(oAboutBlueSpiceTopMenuItem); + + // Add About BlueSpice link to main navigation + var oAboutBlueSpiceMainLink = mw.html.element( + 'a', + { + href: mw.util.getUrl('Special:AboutBlueSpice'), + class: 'menu-item-single level-1' + }, + new mw.html.Raw( + mw.html.element( + 'span', + {class: 'icon24'} + ) + + mw.html.element( + 'span', + {class: 'bs-nav.item-text'}, + mw.message('bs-aboutbluespice-about-bluespice').plain() + ) + ) + ); + var oAboutBlueSpiceMainMenuItem = mw.html.element( + 'li', + { + class: 'clearfix' + }, + new mw.html.Raw(oAboutBlueSpiceMainLink) + ); + $('#p-navigation').find('ul').append(oAboutBlueSpiceMainMenuItem); +}); \ No newline at end of file diff --git a/AboutBlueSpice/template/aboutbluespice.wiki b/AboutBlueSpice/template/aboutbluespice.wiki new file mode 100644 index 0000000..d62e467 --- /dev/null +++ b/AboutBlueSpice/template/aboutbluespice.wiki @@ -0,0 +1,85 @@ +__NOTOC__ +__HIDETITLE__ + + + +{| style="width: 100%;" border="0" +|- style="background-color: #f7f7f7;" +| style="padding: 20px;" colspan="3"| +<span style="font-size: 150%; color: #888888;">'''Congratulations - You have successfully installed BlueSpice!'''</span><br /><br />Hier finden Sie einige erste Hinweise, wie Sie in BlueSpice arbeiten können. Für weitere Hilfe schauen Sie in unserem [http://help.bluespice.com Helpdesk] vorbei oder buchen Sie beim Entwickler Hallo Welt! GmbH + +* [http://bluespice.com/services/support Support] +* [http://bluespice.com/services/migration Migration] +* [http://bluespice.com/services/skinning Skinning] +* [http://bluespice.com/services/consulting Set up detailed rights management structures] +* [http://bluespice.com/services/trainings Trainings] + +We wish you lots of fun and success with your BlueSpice wiki! + + +Ihre [http://hallowelt.com Hallo Welt! - Medienwerkstatt GmbH] + +| style="width: 230px;" rowspan="4"| +{| style="height: 59px; width: 180px;" border="0" cellspacing="0" cellpadding="0" align="center" +|- +| style="text-align: left;"|[[Image:Facebook.png|link=http://www.facebook.com/BlueSpice.for.MediaWiki]] +| style="text-align: center;"|[[Image:Twitter.png|link=http://www.twitter.com/BlueSpiceTweets|32x32px]] +| style="text-align: right;"|[[Image:Youtube.png|link=http://www.youtube.com/user/BlueSpiceVideo]] +| style="text-align: right;"|[[Image:GooglePlus_128_Red.png|link=http://plus.google.com/102189038724381341308/posts|32x32px]] +|} +<span style="font-size: 150%; color: #3e5389;">Go pro!</span> + +Subscribe to the extended version <span style="color: #3e5389;">BlueSpice pro</span> now: + +* Comprehensive range of functions (e.g. create and export books, workflows/reviews and approvals, reminder...) +* Patches and updates of provided functions +* Continious expanding of the functions +* Professional product support by the manufacturer + + +[[Bild:Btn-go-pro.png|center|link=http://bluespice.com/products/BlueSpice_pro|100%px|BlueSpice pro]] + + + +<span style="font-size: 150%; color: #3e5389;">BlueSpice Shop</span> + +In the BlueSpice Shop you will find some gimmicks for your wiki: + +* [http://shop.bluespice.com/design-templates.html Templates] for main pages and portals +* [http://shop.bluespice.com/design-templates.html Boxensets] for highlighting content (e.g. infobox) +* [http://shop.bluespice.com/free-downloads/iconset-navigation.html Free iconsets] +* [http://shop.bluespice.com/packages.html Additional packages and extensions] for self installation + + +[[Bild:Btn-Shop.png|center|link=http://shop.bluespice.com|100%px|BlueSpice Shop]] + + +|- style="background-color: #3e5389;" +| style="padding: 20px;" colspan="3"|<span style="font-size: 150%; color: #ffffff;">First steps</span> +|- style="background-color: #f7f7f7;" +| style="padding: 12px;"|[[Image:Helpdesk-editieren.png]] +| style="padding: 12px;" colspan="2" valign="top"| +<span style="font-size: 120%; color: #888888;">Writing articles</span> + +* [http://help.bluespice.com/index.php/Create_new_article Create a new article] +* [http://help.bluespice.com/index.php/InsertImage Insert images] +* [http://help.bluespice.com/index.php/InsertLink Insert links] +* [http://help.blue-pice.com/index.php/Insert_table Insert tables] + +Further information you will find in the [http://help.bluespice.com/index.php/Wiki user manual]. <br />(Please use the book navigation tab in the left hand navigation). + +|- style="background-color: #f7f7f7;" +| style="padding: 12px;"|[[Image:Helpdesk-admin.png]] +| style="padding: 12px;" colspan="2"| +<span style="font-size: 120%; color: #888888;">Administration</span> + +* [http://help.bluespice.com/index.php/FlexiSkin Insert logo and change basic design elements] +* [http://help.bluespice.com/index.php/TopBarMenuCustomizer Customize the TopBar] +* [http://help.bluespice.com/index.php/Preferences Settings] +* [http://help.bluespice.com/index.php/UserManager User management] +* [http://help.bluespice.com/index.php/PermissionManager Rights management] + +In the [http://help.bluespice.com/index.php/Installation_manual BlueSpice Administration Manual] you will find more descriptions on how to administrate the wiki. <br />(Please use the book navigation tab in the left hand navigation). + + +|} \ No newline at end of file diff --git a/BlueSpiceExtensions.php.template b/BlueSpiceExtensions.php.template index 9db77ba..ac11c4b 100644 --- a/BlueSpiceExtensions.php.template +++ b/BlueSpiceExtensions.php.template @@ -12,6 +12,7 @@ //Other Extendsions require_once( __DIR__."/StateBar/StateBar.setup.php" ); require_once( __DIR__."/RSSFeeder/RSSFeeder.setup.php" ); +require_once( __DIR__."/AboutBlueSpice/AboutBlueSpice.setup.php" ); require_once( __DIR__."/ArticleInfo/ArticleInfo.setup.php" ); require_once( __DIR__."/Authors/Authors.setup.php" ); require_once( __DIR__."/Blog/Blog.setup.php" ); -- To view, visit https://gerrit.wikimedia.org/r/249764 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad8893e53b67b70b2cbf21b5b9ebafff395b45c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Mglaser <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
