diff options
Diffstat (limited to 'extensions')
34 files changed, 325 insertions, 0 deletions
diff --git a/extensions/CategoryTree b/extensions/CategoryTree new file mode 120000 index 0000000..cffbeb2 --- /dev/null +++ b/extensions/CategoryTree @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/CategoryTree
\ No newline at end of file diff --git a/extensions/Cite b/extensions/Cite new file mode 120000 index 0000000..8acc4e8 --- /dev/null +++ b/extensions/Cite @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Cite
\ No newline at end of file diff --git a/extensions/CiteThisPage b/extensions/CiteThisPage new file mode 120000 index 0000000..7191cc3 --- /dev/null +++ b/extensions/CiteThisPage @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/CiteThisPage
\ No newline at end of file diff --git a/extensions/ConfirmAccount b/extensions/ConfirmAccount new file mode 120000 index 0000000..f588715 --- /dev/null +++ b/extensions/ConfirmAccount @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/ConfirmAccount
\ No newline at end of file diff --git a/extensions/ConfirmEdit b/extensions/ConfirmEdit new file mode 120000 index 0000000..cd8c33c --- /dev/null +++ b/extensions/ConfirmEdit @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/ConfirmEdit
\ No newline at end of file diff --git a/extensions/Gadgets b/extensions/Gadgets new file mode 120000 index 0000000..220d529 --- /dev/null +++ b/extensions/Gadgets @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Gadgets
\ No newline at end of file diff --git a/extensions/GoogleSiteSearch b/extensions/GoogleSiteSearch new file mode 120000 index 0000000..1f100d6 --- /dev/null +++ b/extensions/GoogleSiteSearch @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/GoogleSiteSearch
\ No newline at end of file diff --git a/extensions/ImageMap b/extensions/ImageMap new file mode 120000 index 0000000..d887a60 --- /dev/null +++ b/extensions/ImageMap @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/ImageMap
\ No newline at end of file diff --git a/extensions/InputBox b/extensions/InputBox new file mode 120000 index 0000000..e5a6624 --- /dev/null +++ b/extensions/InputBox @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/InputBox
\ No newline at end of file diff --git a/extensions/Interwiki b/extensions/Interwiki new file mode 120000 index 0000000..d5022d8 --- /dev/null +++ b/extensions/Interwiki @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Interwiki
\ No newline at end of file diff --git a/extensions/LanguageSelector b/extensions/LanguageSelector new file mode 120000 index 0000000..de93ac6 --- /dev/null +++ b/extensions/LanguageSelector @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/LanguageSelector
\ No newline at end of file diff --git a/extensions/LocalisationUpdate b/extensions/LocalisationUpdate new file mode 120000 index 0000000..552dbb0 --- /dev/null +++ b/extensions/LocalisationUpdate @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/LocalisationUpdate
\ No newline at end of file diff --git a/extensions/MetaDescriptionTag/MetaDescriptionTag b/extensions/MetaDescriptionTag/MetaDescriptionTag new file mode 120000 index 0000000..4a5c495 --- /dev/null +++ b/extensions/MetaDescriptionTag/MetaDescriptionTag @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/MetaDescriptionTag
\ No newline at end of file diff --git a/extensions/MetaDescriptionTag/MetaDescriptionTag.i18n.php b/extensions/MetaDescriptionTag/MetaDescriptionTag.i18n.php new file mode 100644 index 0000000..a8e140b --- /dev/null +++ b/extensions/MetaDescriptionTag/MetaDescriptionTag.i18n.php @@ -0,0 +1,40 @@ +<?php +/** + * * Internationalisation file for extension MetaDescriptionTag. + * */ + +$messages = array(); + +/** English (English) + * * @author David M. Sledge + * * @author Purodha + * */ +$messages['en'] = array( + 'metadescriptiontag-desc' => 'Tag to inject meta description into page header', + 'metadescriptiontag-missing-content' => 'Error: <metadesc> tag must contain a "content" attribute.', +); + +/** Message documentation (Message documentation) + * * @author DrorSnir + * */ +$messages['qqq'] = array( + 'metadescriptiontag-desc' => '{{desc}}', + 'metadescriptiontag-missing-content' => 'Error message for wrong usage of tag - missing content attribute', +); + +/** German (Deutsch) + * * @author Kghbln + * */ +$messages['de'] = array( + 'metadescriptiontag-desc' => 'Ergänzt das Tag <code><metadesc></code>, um dem Seitenheader eine Beschreibung (description) hinzufügen zu können', + 'metadescriptiontag-missing-content' => 'Fehler: Zum Tag <metadesc> muss das Attribut "content" angegeben werden.', +); + +/** Hebrew (עברית) + * * @author DrorSnir + * */ +$messages['he'] = array( + 'metadescriptiontag-desc' => 'תגית המאפשרת לקבוע את תיאור העמוד עבור מנועי חיפוש (Meta description)', + 'metadescriptiontag-missing-content' => 'שגיאה: תגית <metadesc> חייבת לכלול תכונת <metadesc>.', +); +?> diff --git a/extensions/MetaDescriptionTag/MetaDescriptionTag.php b/extensions/MetaDescriptionTag/MetaDescriptionTag.php new file mode 100644 index 0000000..37ce617 --- /dev/null +++ b/extensions/MetaDescriptionTag/MetaDescriptionTag.php @@ -0,0 +1,126 @@ +<?php +/* + * MetaDescriptionTag.php - A MediaWiki tag extension for adding <meta> description to a page. + * @author Joshua C. Lerner + * @version 0.3 + * @copyright Copyright (C) 2007-8 Joshua C. Lerner, Jim R. Wilson, Dror Snir + * @license The MIT License - http://www.opensource.org/licenses/mit-license.php + * ----------------------------------------------------------------------- + * Description: + * This is a MediaWiki extension which adds support for injecting a <meta> description tag + * into the page header. + * Requirements: + * MediaWiki 1.6.x, 1.8.x, 1.9.x, 1.13.x or higher + * PHP 4.x, 5.x or higher + * Installation: + * 1. Drop this script (MetaDescriptionTag.php) in $IP/extensions + * Note: $IP is your MediaWiki install dir. + * 2. Enable the extension by adding this line to your LocalSettings.php: + * require_once('extensions/MetaDescriptionTag.php'); + * Usage: + * Once installed, you may utilize MetaDescriptionTag by adding the <metadesc> tag to articles: + * <metadesc> Home page for the MetaDescriptionTag MediaWiki extension </metadesc> + * Version Notes: + * version 0.1: + * Initial release. + * version 0.2: + * Change syntax to <metadesc>some content</metadesc> to support template variable substitution. + * version 0.3: + * Fix i18n to work with v1.16+, sanitize output using htmlspecialchars() + * + * ----------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- + */ + +if( !defined( 'MEDIAWIKI' ) ) { + echo "This file is part of MediaWiki, it is not a valid entry point.\n"; + exit( 1 ); +} + +# Credits +$wgExtensionCredits['parserhook'][] = array( + 'name' => 'MetaDescriptionTag', + 'author' => 'Joshua C. Lerner', + 'url' => 'https://www.mediawiki.org/wiki/Extension:MetaDescriptionTag', + 'descriptionmsg' => 'metadescriptiontag-desc', + 'version'=> '0.3' +); + +$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR; +$wgExtensionMessagesFiles['MetaDescriptionTag'] = $dir . 'MetaDescriptionTag.i18n.php'; +$wgHooks['ParserFirstCallInit'][] = 'setupMetaDescriptionTagParserHooks'; +$wgHooks['OutputPageBeforeHTML'][] = 'insertMetaDescription'; // Attach post-parser hook to extract metadata and alter headers + +/** + * Sets up the MetaDescriptionTag Parser hook and system messages + */ +function setupMetaDescriptionTagParserHooks( &$parser ) { + $parser->setHook( 'metadesc', 'renderMetaDescriptionTag' ); + return true; +} + +/** + * Renders the <metadesc> tag. + * @param String $text Incoming text - should always be null or empty (passed by value). + * @param Array $params Attributes specified for tag - must contain 'content' (passed by value). + * @param Parser $parser Reference to currently running parser (passed by reference). + * @return String Always empty. + */ +function renderMetaDescriptionTag( $text, $params, Parser $parser, PPFrame $frame) { + + // Short-circuit with error message if content is not specified. + if ( !isset($text) ) { + return + '<div class="errorbox">'. + wfMsgForContent('metadescriptiontag-missing-content'). + '</div>'; + } + + return '<!-- META_DESCRIPTION '.base64_encode( htmlspecialchars( $text ) ).' -->'; +} + +/** + * Adds the <meta> description to document head. + * Usage: $wgHooks['OutputPageBeforeHTML'][] = 'insertMetaDescription'; + * @param OutputPage $out Handle to an OutputPage object - presumably $wgOut (passed by reference). + * @param String $text Output text. + * @return Boolean Always true to allow other extensions to continue processing. + */ +function insertMetaDescription( $out, $text ) { + + // Extract meta description + if (preg_match_all( + '/<!-- META_DESCRIPTION ([0-9a-zA-Z\\+\\/]+=*) -->/m', + $text, + $matches)===false + ) return true; + $data = $matches[1]; + + // Merge description data into OutputPage as meta tag + foreach ($data AS $item) { + $content = @base64_decode($item); + if ($content) + $out->addMeta( 'description', $content ); + } + return true; +} +?> diff --git a/extensions/MetaKeywordsTag/MetaKeywordsTag b/extensions/MetaKeywordsTag/MetaKeywordsTag new file mode 120000 index 0000000..dd02e45 --- /dev/null +++ b/extensions/MetaKeywordsTag/MetaKeywordsTag @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/MetaKeywordsTag
\ No newline at end of file diff --git a/extensions/MetaKeywordsTag/MetaKeywordsTag.php b/extensions/MetaKeywordsTag/MetaKeywordsTag.php new file mode 100644 index 0000000..ae53617 --- /dev/null +++ b/extensions/MetaKeywordsTag/MetaKeywordsTag.php @@ -0,0 +1,128 @@ +<?php +/* + * MetaKeywordsTag.php - A MediaWiki tag extension for adding <meta> keyword to a page. + * @author Jim R. Wilson, Joshua C. Lerner, Choshi, brted + * @version 0.3 + * @copyright Copyright (C) 2007-12 Joshua C. Lerner, Jim R. Wilson + * @license The MIT License - http://www.opensource.org/licenses/mit-license.php + * ----------------------------------------------------------------------- + * Description: + * This is a MediaWiki extension which adds support for injecting <meta> keyword tag + * into the page header. + * Requirements: + * MediaWiki 1.18.0 or higher + * PHP 4.x, 5.x or higher + * Installation: + * 1. Drop this script (MetaKeywordsTag.php) in $IP/extensions + * Note: $IP is your MediaWiki install dir. + * 2. Enable the extension by adding this line to your LocalSettings.php: + * require_once('extensions/MetaKeywordsTag.php'); + * Usage: + * Once installed, you may utilize MetaKeywordsTag by adding the <metakey> tag to articles: + * <metakey>put, a, list, of, keywords, here</metakey> + * Version Notes: + * version 0.1 (2007): + * Initial release. + * version 0.2 (Dec 2010): + * Changed renderMetaKeywordsTag to not expect $parser as reference. + * version 0.3 (Jan 2012): + * Change syntax to <metakey>some content</metakey> to support template variable substitution. + * Incorporate Joshua Lerner and Choshi's changes they made to MetaDescriptionTag.php, + * which was based on the original MetaKeywordsTag.php + * ----------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- + */ +# Confrim MW environment +if( !defined( 'MEDIAWIKI' ) ) { + exit( 1 ); +} + +# Credits +$wgExtensionCredits['parserhook'][] = array( + 'name' => 'MetaKeywordsTag', + 'author' => 'brted - brted<_at_>yahoo.com', + 'url' => 'http://www.mediawiki.org/wiki/Extension:MetaKeywordsTag', + 'description' => 'Tag to inject meta keywords into page header.', + 'version'=> '0.3' +); +# Add Extension Function +$wgExtensionFunctions[] = 'setupMetaKeywordsTagParserHooks'; + +/** + * Sets up the MetaKeywordsTag Parser hook and system messages + */ +function setupMetaKeywordsTagParserHooks() { + global $wgParser, $wgMessageCache; + $wgParser->setHook( 'metakey', 'renderMetaKeywordsTag' ); +} + +/** + * Renders the <metakey> tag. + * @param String $text Incoming text - should always be null or empty (passed by value). + * @param Array $params Attributes specified for tag - must contain 'content' (passed by value). + * @param Parser $parser Reference to currently running parser (passed by reference). + * @return String Always empty. + */ +function renderMetaKeywordsTag( $input, array $args, Parser $parser, PPFrame $frame ) { + + + # Short-circuit with error message if content is not specified. + if ( !isset($input) ) { + return + ('<div class="errorbox">'. + ' Error: metakey must contain a content attribute.'. + '</div>'); + } + # Retrun encoded content + return '<!-- META_KEYWORDS '.base64_encode($input).' -->'; +} + + +// Attach post-parser hook to extract metadata and alter headers +$wgHooks['OutputPageBeforeHTML'][] = 'insertMetaKeywords'; + +/** + * Adds the <meta> keywords to document head. + * Usage: $wgHooks['OutputPageBeforeHTML'][] = 'insertMetaKeywords'; + * @param OutputPage $out Handle to an OutputPage object - presumably $wgOut (passed by reference). + * @param String $text Output text. + * @return Boolean Always true to allow other extensions to continue processing. + */ +function insertMetaKeywords( $out, $text ) { + + # Extract meta keyword + if (preg_match_all( + '/<!-- META_KEYWORDS ([0-9a-zA-Z\\+\\/]+=*) -->/m', + $text, + $matches)===false + ) return true; + $data = $matches[1]; + + # Merge keyword data into OutputPage as meta tag + foreach ($data AS $item) { + $content = @base64_decode($item); + if ($content) + $out->addMeta( 'keywords', $content ); + } + return true; +} +?> diff --git a/extensions/NewUserNotif b/extensions/NewUserNotif new file mode 120000 index 0000000..32d0c70 --- /dev/null +++ b/extensions/NewUserNotif @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/NewUserNotif
\ No newline at end of file diff --git a/extensions/NewestPages b/extensions/NewestPages new file mode 120000 index 0000000..d83672e --- /dev/null +++ b/extensions/NewestPages @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/NewestPages
\ No newline at end of file diff --git a/extensions/News b/extensions/News new file mode 120000 index 0000000..5d8ca97 --- /dev/null +++ b/extensions/News @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/News
\ No newline at end of file diff --git a/extensions/Nuke b/extensions/Nuke new file mode 120000 index 0000000..0c6ab0d --- /dev/null +++ b/extensions/Nuke @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Nuke
\ No newline at end of file diff --git a/extensions/ParserFunctions b/extensions/ParserFunctions new file mode 120000 index 0000000..bf4311d --- /dev/null +++ b/extensions/ParserFunctions @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/ParserFunctions
\ No newline at end of file diff --git a/extensions/PdfHandler b/extensions/PdfHandler new file mode 120000 index 0000000..2f41b39 --- /dev/null +++ b/extensions/PdfHandler @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/PdfHandler
\ No newline at end of file diff --git a/extensions/Poem b/extensions/Poem new file mode 120000 index 0000000..cdd9b09 --- /dev/null +++ b/extensions/Poem @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Poem
\ No newline at end of file diff --git a/extensions/Polyglot b/extensions/Polyglot new file mode 120000 index 0000000..ca7936b --- /dev/null +++ b/extensions/Polyglot @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Polyglot
\ No newline at end of file diff --git a/extensions/Renameuser b/extensions/Renameuser new file mode 120000 index 0000000..e42a5ed --- /dev/null +++ b/extensions/Renameuser @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Renameuser
\ No newline at end of file diff --git a/extensions/SpamBlacklist b/extensions/SpamBlacklist new file mode 120000 index 0000000..8ebe13e --- /dev/null +++ b/extensions/SpamBlacklist @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/SpamBlacklist
\ No newline at end of file diff --git a/extensions/Spoilers/Spoilers b/extensions/Spoilers/Spoilers new file mode 120000 index 0000000..ab8bd0c --- /dev/null +++ b/extensions/Spoilers/Spoilers @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Spoilers
\ No newline at end of file diff --git a/extensions/SyntaxHighlight_GeSHi b/extensions/SyntaxHighlight_GeSHi new file mode 120000 index 0000000..704c0ac --- /dev/null +++ b/extensions/SyntaxHighlight_GeSHi @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/SyntaxHighlight_GeSHi
\ No newline at end of file diff --git a/extensions/TitleBlacklist b/extensions/TitleBlacklist new file mode 120000 index 0000000..4bb433e --- /dev/null +++ b/extensions/TitleBlacklist @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/TitleBlacklist
\ No newline at end of file diff --git a/extensions/Vector b/extensions/Vector new file mode 120000 index 0000000..978120a --- /dev/null +++ b/extensions/Vector @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/Vector
\ No newline at end of file diff --git a/extensions/WikiArticleFeeds b/extensions/WikiArticleFeeds new file mode 120000 index 0000000..8918b0a --- /dev/null +++ b/extensions/WikiArticleFeeds @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/WikiArticleFeeds
\ No newline at end of file diff --git a/extensions/WikiEditor b/extensions/WikiEditor new file mode 120000 index 0000000..9763715 --- /dev/null +++ b/extensions/WikiEditor @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/WikiEditor
\ No newline at end of file diff --git a/extensions/googleAnalytics b/extensions/googleAnalytics new file mode 120000 index 0000000..ff56ca6 --- /dev/null +++ b/extensions/googleAnalytics @@ -0,0 +1 @@ +/usr/share/mediawiki-extensions/googleAnalytics
\ No newline at end of file |