NaiadSamples MediaWiki extension 1.0.0
[NaiadSamples.git] / NaiadSamples.php
blobf65f73d566b9bf465847678fc3d8e13b16c6916f
1 <?php
2 /*
3 * Copyright (c) 2015 Marcin Cieślak (saper.info)
4 *
5 * Naiad is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * Naiad is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Naiad. If not, see <http://www.gnu.org/licenses/>.
19 /**
20 * Naiad skin extension
22 * @file
23 * @ingroup Extensions
24 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 3.0 or later
28 class NaiadSamples {
30 public static function NavTree( &$value ) {
31 wfDebugLog( 'naiad', __METHOD__ . ": received [$value] ");
32 if ( $value === '' ) {
33 $value = '{{#tree:id=main-index|root=MediaWiki index|
34 * [[Main_Page|Main Page]]
35 * [[Special:RecentChanges|Recent Changes]]
36 * [[Special:Categories|Categories]]
37 }}';
38 return true;
42 public static function NavTreeTopPages( &$value ) {
43 wfDebugLog( 'naiad', __METHOD__ . ": received [$value] ");
44 if ( $value === '' ) {
45 $value = "<div id=\"navtree_selector\">\n<div class=\"dd_button\"><p>{{#switch:{{NAMESPACE}}\n|Special|File={{NAMESPACE}} Page\n|{{FULLPAGENAME}}}}</p></div>\n<div class=\"dd_content\">\n* [[Main Page|Main Page]]\n* [[Special:RecentChanges|Recent Changes]]\n*<span>Page lists</span>\n* [[Special:AllPages|All pages]]\n* [[Special:Categories|All categories]]\n</div>\n</div>";
46 return true;
50 public static function Languages( &$value ) {
51 wfDebugLog( 'naiad', __METHOD__ . ": received [$value] ");
52 if ( $value === '' ) {
53 $value = '<div id="sel_lan" class="dd_item">
54 <div class="button grey">
55 English
56 </div>
57 <div class="dd_menu languages">
58 * [[:{{FULLPAGENAME}}|English]]
59 * [[:{{NAMESPACE}}:DE/{{PAGENAME}}|Deutsch]]
60 </div>';
61 return true;
65 public static function Series( &$value ) {
66 wfDebugLog( 'naiad', __METHOD__ . ": received [$value] ");
67 if ( $value === '' ) {
68 $value = '<div id="sel_ser" class="dd_item">
69 <div class="button grey">
70 Version 2.0
71 </div>
72 <div class="dd_menu series">
73 * Version 1.0
74 * Version 2.0
75 </div>';
76 return true;
80 public static function BuildSidebar ( $skin, &$bar ) {
81 wfDebugLog( 'naiad', 'Sidebar!' . var_export($bar, true));
82 if ( !isset( $bar[ 'maintenance' ] ) ) {
83 $bar = $skin->addToSidebarPlain( $bar, "
84 * maintenance
85 **http://projects.blender.org/tracker/?atid=510&group_id=163&func=browse | Report a wiki bug
86 **Meta:Guides/Writer_Guide|Wiki Guidelines
87 *monitoring
88 **Special:Categories|Categories
89 **Special:Popularpages|Popular pages
90 **Special:Newimages|New files
91 **Special:Newpages|New pages
92 **recentchanges-url|recentchanges
94 *navigation
95 **http://www.blender.org | blender.org | Don't go to blender.org website
96 **http://code.blender.org | code.blender.org | Don't go to blender development blog");
97 return true;