diff --git a/OpenCloseSidebar.php b/OpenCloseSidebar.php new file mode 100644 index 0000000000000000000000000000000000000000..565f18af0cc3f41b31953f6a41e13b0a38ee675a --- /dev/null +++ b/OpenCloseSidebar.php @@ -0,0 +1,14 @@ +<?php +# +# Add the Open/Close status to the sidebar for the 'openclosestatus' item +# +$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'stratumOpenCloseSidebarHook'; +function stratumOpenCloseSidebarHook($skin, $tpl) { + if(isset($tpl->data['sidebar']['openclosestatus'])) + $tpl->data['sidebar']['openclosestatus'] = '<ul><li><a title="'. + 'Öffnungsstatus" href="/wiki/Open/Close-Monitor">'. + '<img style="border:none; height:2em;" src="https://stratum0.org/status/'. + 'status.png" /></a></li></ul>'; + return true; +} +?> diff --git a/SponsorsSidebar.php b/SponsorsSidebar.php new file mode 100644 index 0000000000000000000000000000000000000000..31ce71e1028b26c7bc45d3261c1d641975d2def8 --- /dev/null +++ b/SponsorsSidebar.php @@ -0,0 +1,40 @@ +<?php +# +# Add a sponsor link to the sidebar for the "sponsorlink" item +# +$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'stratumSponsorsHook'; +function stratumSponsorsHook($skin, $tpl) { + $sponsors = array( + #array( + # "name" => "Stratum 0", + # "image" => "120px-Sanduhr-wiki-logo.svg.png" + #), + array( + "name" => "TRIOLOGY – Agility for your business", + "image" => "TRIO_Logo-o-Slogan_web.png" + ), + #array( + # "name" => "GNS Systems", + # "image" => "GNS-Systems-Logo-1c-HKS41_neu2014-120x120.png" + #), + #array( + # "name" => "BEL NET", + # "image" => "RZ_BelnetLogo_120x120.jpg" + #), + #array( + # "name" => "LINET Services", + # "image" => "Linet_logo_cmyk.png" + #), + ); + + if(isset($tpl->data['sidebar']['sponsorlink'])) { + $i = rand(0, count($sponsors) - 1); + $v = $sponsors[$i]; + $tpl->data['sidebar']['sponsorlink'] = + sprintf("<p style='text-align:center'><img alt='%s'". + " title='%s' src='/mediawiki/images/sponsors/%s' /></p>", $v["name"], + $v["name"], $v["image"]); + } + return true; +} +?> diff --git a/StratumFixes.php b/StratumFixes.php index ee97e955495200f73188a017e44983c5dfe83ba0..48d6284b99b75d8c607dc8f6edacc4c3e31108ba 100644 --- a/StratumFixes.php +++ b/StratumFixes.php @@ -1,56 +1,7 @@ <?php - $wgMessagesDirs['StratumFixes'] = __DIR__ . '/i18n'; +$wgMessagesDirs['StratumFixes'] = __DIR__ . '/UploadWizard-i18n'; -# -# Add a sponsor link to the sidebar for the "sponsorlink" item -# -$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'stratumSponsorsHook'; -function stratumSponsorsHook($skin, $tpl) { - $sponsors = array( - #array( - # "name" => "Stratum 0", - # "image" => "120px-Sanduhr-wiki-logo.svg.png" - #), - array( - "name" => "TRIOLOGY – Agility for your business", - "image" => "TRIO_Logo-o-Slogan_web.png" - ), - #array( - # "name" => "GNS Systems", - # "image" => "GNS-Systems-Logo-1c-HKS41_neu2014-120x120.png" - #), - #array( - # "name" => "BEL NET", - # "image" => "RZ_BelnetLogo_120x120.jpg" - #), - #array( - # "name" => "LINET Services", - # "image" => "Linet_logo_cmyk.png" - #), - ); - - if(isset($tpl->data['sidebar']['sponsorlink'])) { - $i = rand(0, count($sponsors) - 1); - $v = $sponsors[$i]; - $tpl->data['sidebar']['sponsorlink'] = - sprintf("<p style='text-align:center'><img alt='%s'". - " title='%s' src='/mediawiki/images/sponsors/%s' /></p>", $v["name"], - $v["name"], $v["image"]); - } - return true; -} - -# -# Add the Open/Close status to the sidebar for the 'openclosestatus' item -# -$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'stratumOpenCloseSidebarHook'; -function stratumOpenCloseSidebarHook($skin, $tpl) { - if(isset($tpl->data['sidebar']['openclosestatus'])) - $tpl->data['sidebar']['openclosestatus'] = '<ul><li><a title="'. - 'Öffnungsstatus" href="/wiki/Open/Close-Monitor">'. - '<img style="border:none; height:2em;" src="https://stratum0.org/status/'. - 'status.png" /></a></li></ul>'; - return true; -} +include("SponsorsSidebar.php"); +include("OpenCloseSidebar.php"); ?> diff --git a/UploadWizard-i18n/de.json b/UploadWizard-i18n/de.json new file mode 100644 index 0000000000000000000000000000000000000000..4e29ed316cbc1a07ab23de88ed9f236414c1e140 --- /dev/null +++ b/UploadWizard-i18n/de.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "rohieb" + ] + }, + + "mwe-upwiz-license-pd-author": "Dieses Werk wurde von seinem Urheber als gemeinfrei veröffentlicht.", + "mwe-upwiz-license-nonfree-head": "Die {{PLURAL:$1|Datei ist|Dateien sind}} nicht unter einer freien Lizenz veröffentlicht worden.", + "mwe-upwiz-license-nonfree": "Mir ist bewusst, dass {{PLURAL:$1|die Datei|die Dateien}} bei Urheberrechtsansprüchen von Dritten jederzeit gelöscht werden {{PLURAL:$1|kann|können}}." +} diff --git a/UploadWizard-i18n/en.json b/UploadWizard-i18n/en.json new file mode 100644 index 0000000000000000000000000000000000000000..ef341174dc96587f8e7582180c6d3df9893619aa --- /dev/null +++ b/UploadWizard-i18n/en.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "rohieb" + ] + }, + + "mwe-upwiz-license-pd-author": "This work has been released into the public domain by its author.", + "mwe-upwiz-license-nonfree-head": "The {{PLURAL:$1|file|files}} have not been published under a free license.", + "mwe-upwiz-license-nonfree": "I understand that the {{PLURAL:$1|file|files}} can be deleted any time if a third party claims copyright." +} diff --git a/UploadWizard-i18n/qqq.json b/UploadWizard-i18n/qqq.json new file mode 100644 index 0000000000000000000000000000000000000000..5db36875a1e217fec11c2d4d92a0e31bf0730a61 --- /dev/null +++ b/UploadWizard-i18n/qqq.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "rohieb" + ] + }, + + "mwe-upwiz-license-pd-author": "statement that file/s are in the public domain", + "mwe-upwiz-license-nonfree-head": "statement that file/s are not licensed under a free license", + "mwe-upwiz-license-nonfree": "notice to users that files with nonfree licenses can be deleted" +} diff --git a/i18n/de.json b/i18n/de.json index 2d70f6a0c41fadd6e4a5cb249860a13aea3cfd5d..9edab0d2c79ef53df04fb25c25f621efdc4dfcf7 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -4,11 +4,6 @@ "rohieb" ] }, - - "mwe-upwiz-license-pd-author": "Dieses Werk wurde von seinem Urheber als gemeinfrei veröffentlicht.", - "mwe-upwiz-license-nonfree-head": "Die {{PLURAL:$1|Datei ist|Dateien sind}} nicht unter einer freien Lizenz veröffentlicht worden.", - "mwe-upwiz-license-nonfree": "Mir ist bewusst, dass {{PLURAL:$1|die Datei|die Dateien}} bei Urheberrechtsansprüchen von Dritten jederzeit gelöscht werden {{PLURAL:$1|kann|können}}.", - "openclosestatus": "Space-Status", "sponsorlink": "Unterstützt durch" } diff --git a/i18n/en.json b/i18n/en.json index e64d1d4be97c79d406880c5e7e60812822d90a8c..2768616bc32e64cc0e2a1c53f45a20a04349d97d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,11 +4,6 @@ "rohieb" ] }, - - "mwe-upwiz-license-pd-author": "This work has been released into the public domain by its author.", - "mwe-upwiz-license-nonfree-head": "The {{PLURAL:$1|file|files}} have not been published under a free license.", - "mwe-upwiz-license-nonfree": "I understand that the {{PLURAL:$1|file|files}} can be deleted any time if a third party claims copyright.", - "openclosestatus": "Opening Status", "sponsorlink": "Supported by" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 87cb6dfe328d0b9248624863e8c10e14ce0b16c8..417baf68201acb2f3810920e497f9a14ea4cde4c 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -4,11 +4,6 @@ "rohieb" ] }, - - "mwe-upwiz-license-pd-author": "statement that file/s are in the public domain", - "mwe-upwiz-license-nonfree-head": "statement that file/s are not licensed under a free license", - "mwe-upwiz-license-nonfree": "notice to users that files with nonfree licenses can be deleted", - "openclosestatus": "Opening status of the space", "sponsorlink": "Heading in the sidebar over the sponsor logo" }