Kghbln has uploaded a new change for review. https://gerrit.wikimedia.org/r/255725
Change subject: 2.0.0 release ...................................................................... 2.0.0 release * BREAKING CHANGE: Changed entry point file * Changed LICENSE to COPYING * Added CREDITS * Improved file documentation * Improved CHANGELOG * Cleaned up main extension file * Renamed extension class * Renamed extension files Change-Id: I50ae84ca2ae0dfe826e925c2b7a4199cdbd67169 --- M CHANGELOG R COPYING A CREDITS R PCRGUIInserts.class.php A PCRGUIInserts.php M i18n/de.json M i18n/en.json M i18n/fr.json M i18n/qqq.json D pcr_guii.php 10 files changed, 156 insertions(+), 105 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PCRGUIInserts refs/changes/25/255725/1 diff --git a/CHANGELOG b/CHANGELOG index e39574f..c3798c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,15 +1,36 @@ -Version 1.1 -=========== -2015-10-16 -Dennis Roczek +The CHANGELOG of the PCR GUI Inserts extension to MediaWiki. -+ add CHANGELOG -+ add license lame + license file on Special:Version -+ transformed i18n files to "new" JSON format -+ initial README, needs much love -Version 1.0 -=========== -David Dernoncourt +== Version 2.0 == -+initial release \ No newline at end of file +Released on November 27, 2015 by Karsten Hoffmeyer. + +* BREAKING CHANGE: Changed entry point file +* Changed LICENSE to COPYING +* Added CREDITS +* Improved file documentation +* Improved CHANGELOG +* Cleaned up main extension file +* Renamed extension class +* Renamed extension files + + +== Version 1.1.0 == + +Released on October 16, 2015 by Dennis Roczek. + +* Added CHANGELOG +* Added README +* Added LICENSE (now CC BY-SA 4.0) +* Migrated I18n-files to json +* MediaWiki 1.23 or above +* PHP 5.3 or above + + +== Version 1.0 == + +Released on March 2, 2011 by David Dernoncourt. + +* Initial release +* MediaWiki 1.16 or above +* PHP 5.2 or above diff --git a/LICENSE b/COPYING similarity index 99% rename from LICENSE rename to COPYING index 779223f..e7f785e 100644 --- a/LICENSE +++ b/COPYING @@ -1,4 +1,3 @@ -<pre> Attribution-ShareAlike 4.0 International ======================================================================= @@ -50,7 +49,8 @@ such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations - for the public: + for the public: + wiki.creativecommons.org/Considerations_for_licensees ======================================================================= @@ -424,4 +424,3 @@ licenses. Creative Commons may be contacted at creativecommons.org. -</pre> diff --git a/CREDITS b/CREDITS new file mode 100644 index 0000000..d625f8d --- /dev/null +++ b/CREDITS @@ -0,0 +1,9 @@ +The PCR GUI Inserts extension lets you easily add pieces of HTML code +at several useful places of the GUI. It was released under the Creative +Commons Attribution Share Alike license 4.0. We would like to recognize +the following names for their contribution. + +== Developers == +* David Dernoncourt +* Dennis Roczek +* Karsten Hoffmeyer diff --git a/pcr_guii_body.php b/PCRGUIInserts.class.php similarity index 71% rename from pcr_guii_body.php rename to PCRGUIInserts.class.php index a8beba2..63e243d 100644 --- a/pcr_guii_body.php +++ b/PCRGUIInserts.class.php @@ -1,17 +1,15 @@ <?php -/********************************************************************* -** -** This file is part of the PCR GUI Inserts extension for MediaWiki -** Copyright (C)2010 -** - PatheticCockroach <www.patheticcockroach.com> -** -** 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. -** -*********************************************************************/ +/** + * This is the class file for the PCR GUI Inserts extension + * + * @file + * + * @author David Dernoncourt (Patheticcockroach) + * + * @license https://creativecommons.org/licenses/by-sa/4.0/ CC-BY-SA-4.0 + */ -class PCRguii +class PCRGUIInserts { public function __construct() { @@ -20,7 +18,7 @@ $wgHooks['SkinAfterBottomScripts'][] = array( &$this, 'SkinAfterBottomScripts' ); $wgHooks['SkinBuildSidebar'][] = array( &$this, 'SkinBuildSidebar' ); } - + # addHeadItem places stuff within <head></head> # BeforePageDisplay places stuff just at the end of the page content frame public function BeforePageDisplay(&$out, &$sk) @@ -31,7 +29,7 @@ $i=0; foreach($wgPCRguii_Inserts['addHeadItem']['content'] as $value) { - $out->addHeadItem('PCRguii'.$i,$value); + $out->addHeadItem('PCRGUIInserts'.$i,$value); $i++; } } @@ -39,7 +37,7 @@ $out->addHTML($wgPCRguii_Inserts['BeforePageDisplay']['content']); return $out; } - + # SkinAfterBottomScripts places stuff really at the bottom (after the last yellow line!) public function SkinAfterBottomScripts($skin, &$text) { @@ -48,7 +46,7 @@ $text .= $wgPCRguii_Inserts['SkinAfterBottomScripts']['content']; return true; } - + # SkinBuildSidebar places stuff at the end of the side bar public function SkinBuildSidebar($skin, &$bar) { diff --git a/PCRGUIInserts.php b/PCRGUIInserts.php new file mode 100644 index 0000000..ae91026 --- /dev/null +++ b/PCRGUIInserts.php @@ -0,0 +1,86 @@ +<?php +/** + * The PCR GUI Inserts extension lets you easily add pieces of HTML code + * at several useful places of the GUI + * + * @version 2.0.0 + * + * @link https://www.mediawiki.org/wiki/Extension:PCR_GUI_Inserts Documentation + * @link https://www.mediawiki.org/wiki/Extension_talk:PCR_GUI_Inserts Support + * @link https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FPCRGUIInserts.git Source Code + * + * @file + * @ingroup Extensions + * @package MediaWiki + * + * @author David Dernoncourt (Patheticcockroach) + * + * @license https://creativecommons.org/licenses/by-sa/4.0/ CC-BY-SA-4.0 + */ + +// Ensure that the script cannot be executed outside of MediaWiki +if ( !defined( 'MEDIAWIKI' ) ) { + die( 'This is an extension to MediaWiki and cannot be run standalone.' ); +} + +// Display extension's information on "Special:Version" +$wgExtensionCredits['other'][] = array( + 'path' => '__FILE__', + 'name' => 'PCR GUI Inserts', + 'version' => '2.0.0', + 'author' => array( + 'David Dernoncourt', + '...' + ), + 'descriptionmsg' => 'pcrguiinserts-desc', + 'url' => 'https://www.mediawiki.org/wiki/Extension:PCR_GUI_Inserts', + 'license-name' => 'CC-BY-SA-4.0' +); + +// Define configuration parameter +$wgPCRguii_Inserts = array( + 'addHeadItem' => array( + 'on' => false, + 'content' => array( + 'head1', + 'head2' + ) + ), + 'BeforePageDisplay' => array( + 'on' => false, + 'content' => 'BeforePageDisplay' + ), + 'SkinAfterBottomScripts' => array( + 'on' => false, + 'content' => 'SkinAfterBottomScripts' + ), + 'SkinBuildSidebar' => array( + 'on' => false, + 'content' => array( + array( + 'title1', + 'content1' + ), + array( + 'title2', + 'content2' + ) + ) + ), +); + +// Register extension messages +$wgMessagesDirs['PCRGUIInserts'] = __DIR__ . '/i18n'; + +// Register extension classs +$wgAutoloadClasses['PCRGUIInserts'] = __DIR__ . '/PCRGUIInserts.class.php'; + +// Register hooks +$wgHooks['ParserFirstCallInit'][] = 'wfPCRGUIInserts'; + +// Add extension function +function wfPCRGUIInserts() { + new PCRGUIInserts; + + return true; +} diff --git a/i18n/de.json b/i18n/de.json index e4d7a04..32ca4d6 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -1,8 +1,8 @@ { "@metadata": { "authors": [ - "Dennis Roczek" + "Kghbln" ] }, - "pcrguii-desc": "Ermöglicht das Einfügen von HTML-Quelltext in die grafische Benutzeroberfläche." -} \ No newline at end of file + "pcrguiinserts-desc": "Ermöglicht das Einfügen von HTML-Quelltext in die grafische Benutzeroberfläche." +} diff --git a/i18n/en.json b/i18n/en.json index a0d84b5..9d8bb4c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,8 +1,9 @@ { "@metadata": { "authors": [ - "Dennis Roczek" + "David Dernoncourt", + "Kghbln" ] }, - "pcrguii-desc": "Inserts stuff around the GUI." + "pcrguiiinserts-desc": "Lets you easily add pieces of HTML code at several useful places of the GUI" } diff --git a/i18n/fr.json b/i18n/fr.json index 4755394..c69d9a8 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -1,8 +1,8 @@ { "@metadata": { "authors": [ - "Dennis Roczek" + "David Dernoncourt" ] }, - "pcrguii-desc": "Permet d'insérer du code HTML en divers endroits de l'interface utilisateur." -} \ No newline at end of file + "pcrguiinserts-desc": "Permet d'insérer du code HTML en divers endroits de l'interface utilisateur" +} diff --git a/i18n/qqq.json b/i18n/qqq.json index e6164b7..42f757d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,10 +1,9 @@ { "@metadata": { "authors": [ - "Dennis Roczek" + "Dennis Roczek", + "Kghbln" ] }, - "pcrguii-desc": "[[Special:Version]] description" + "pcrguiiinserts-desc": "{{desc|name=PCR_GUI_Inserts|url=https://www.mediawiki.org/wiki/Extension:PCR_GUI_Inserts}}" } - - diff --git a/pcr_guii.php b/pcr_guii.php deleted file mode 100644 index eea5463..0000000 --- a/pcr_guii.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/********************************************************************* -** -** This file is part of the PCR GUI Inserts extension for MediaWiki -** Copyright (C)2010 -** - PatheticCockroach <www.patheticcockroach.com> -** -** Home Page : http://www.mediawiki.org/wiki/Extension:PCR_GUI_Inserts -** Version: 1.0 -** -** 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. -** -*********************************************************************/ - -if (!defined('MEDIAWIKI')) die('This file is part of MediaWiki. It is not a valid entry point.'); - -$dir = dirname(__FILE__) . '/'; - -/************** -* Options (NB: edit the settings you want to customize in LocalSettings.php) -***************/ -$wgPCRguii_Inserts = array( - 'addHeadItem' => array('on' => false, - 'content' => array( - 'head1', - 'head2')), - 'BeforePageDisplay' => array('on' => false, - 'content' => 'BeforePageDisplay'), - 'SkinAfterBottomScripts' => array('on' => false, - 'content' => 'SkinAfterBottomScripts'), - 'SkinBuildSidebar' => array('on' => false, - 'content' => array( - array('title1','content1'), - array('title2','content2'))), - ); -/************** -* End of options -***************/ - -$wgAutoloadClasses['PCRguii'] = $dir . 'pcr_guii_body.php'; -$wgHooks['ParserFirstCallInit'][] = 'wfPCRguii'; -$wgMessagesDirs['PCRgii'] = __DIR__ . '/i18n'; - -$wgExtensionCredits['other'][] = array( - 'path' => __FILE__, - 'name' => 'PCR GUI Inserts', - 'author' => array('[http://www.patheticcockroach.com David Dernoncourt]', - 'Dennis Roczek' - ), - 'url' => 'http://www.mediawiki.org/wiki/Extension:PCR_GUI_Inserts', - 'descriptionmsg' => 'pcrguii-desc', - 'version' => '1.1', - 'license-name' => 'CC-BY-SA 4.0' -); - -function wfPCRguii() -{ - new PCRguii; - return true; -} -- To view, visit https://gerrit.wikimedia.org/r/255725 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50ae84ca2ae0dfe826e925c2b7a4199cdbd67169 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PCRGUIInserts Gerrit-Branch: master Gerrit-Owner: Kghbln <kars...@hoffmeyer.info> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits