~registry/do/www

« back to all changes in this revision

Viewing changes to wiki/skins/Do.php

  • Committer: Peng Deng
  • Date: 2009-07-24 16:56:19 UTC
  • Revision ID: dengpeng@gmail.com-20090724165619-52y9hfv0iy8z0szd
Add missing Do wiki skin files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Do Skin, derived from Modern skin, derived from monobook template.
 
4
 *
 
5
 * @todo document
 
6
 * @addtogroup Skins
 
7
 */
 
8
 
 
9
if( !defined( 'MEDIAWIKI' ) )
 
10
        die( -1 );
 
11
 
 
12
/**
 
13
 * Inherit main code from SkinTemplate, set the CSS and template filter.
 
14
 * @todo document
 
15
 * @addtogroup Skins
 
16
 */
 
17
class SkinDo extends SkinTemplate {
 
18
        function initPage( &$out ) {
 
19
                SkinTemplate::initPage( $out );
 
20
                $this->skinname  = 'do';
 
21
                $this->stylename = 'do';
 
22
                $this->template  = 'DoTemplate';
 
23
        }
 
24
}
 
25
 
 
26
/**
 
27
 * @todo document
 
28
 * @addtogroup Skins
 
29
 */
 
30
class DoTemplate extends QuickTemplate {
 
31
        /**
 
32
         * Template filter callback for Do skin.
 
33
         * Takes an associative array of data set from a SkinTemplate-based
 
34
         * class, and a wrapper for MediaWiki's localization database, and
 
35
         * outputs a formatted page.
 
36
         *
 
37
         * @access private
 
38
         */
 
39
        function execute() {
 
40
                global $wgUser;
 
41
                $skin = $wgUser->getSkin();
 
42
 
 
43
                // Suppress warnings to prevent notices about missing indexes in $this->data
 
44
                wfSuppressWarnings();
 
45
 
 
46
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
47
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php 
 
48
        foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
 
49
                ?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
 
50
        } ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
 
51
        <head>
 
52
                <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
 
53
                <?php $this->html('headlinks') ?>
 
54
                <title><?php $this->text('pagetitle') ?></title>
 
55
    <link rel="stylesheet" href="http://yui.yahooapis.com/2.5.1/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css">
 
56
                <style type="text/css" media="screen, projection">/*<![CDATA[*/
 
57
                        @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
 
58
                        @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
 
59
                /*]]>*/</style>
 
60
                <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/print.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
 
61
                <!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
 
62
                <link rel="icon" type="image/png" href="http://do.davebsd.com/images/favicon.png"/>
 
63
 
 
64
                <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
 
65
                
 
66
                <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
 
67
                <!-- Head Scripts -->
 
68
<?php $this->html('headscripts') ?>
 
69
<?php   if($this->data['jsvarurl'  ]) { ?>
 
70
                <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl'  ) ?>"><!-- site js --></script>
 
71
<?php   } ?>
 
72
<?php   if($this->data['pagecss'   ]) { ?>
 
73
                <style type="text/css"><?php $this->html('pagecss'   ) ?></style>
 
74
<?php   }
 
75
                if($this->data['usercss'   ]) { ?>
 
76
                <style type="text/css"><?php $this->html('usercss'   ) ?></style>
 
77
<?php   }
 
78
                if($this->data['userjs'    ]) { ?>
 
79
                <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
 
80
<?php   }
 
81
                if($this->data['userjsprev']) { ?>
 
82
                <script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
 
83
<?php   }
 
84
                if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
 
85
        </head>
 
86
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
 
87
<?php if($this->data['body_onload'    ]) { ?> onload="<?php     $this->text('body_onload')     ?>"<?php } ?>
 
88
 class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>">
 
89
 
 
90
  <div id="doc4" class="yui-t7">
 
91
      <div id="hd">
 
92
        <div id="top" class="yui-gd">
 
93
          <div>
 
94
            <a href="/index.shtml"><img src="http://do.davebsd.com/images/logo.png" alt="GNOME Do" /></a>
 
95
          </div>
 
96
          <div class="navigation">
 
97
            <ul>
 
98
              <li><a href="/index.shtml">Home</a></li>
 
99
              <li><a href="/download.shtml" >Download</a></li>
 
100
              <li><a href="/preview.shtml" >Preview</a></li>
 
101
              <li><a class="active" href="/wiki" >Wiki</a></li>
 
102
              <li><a href="/development.shtml" >Development</a></li>
 
103
              <li><a href="/release.shtml" >Release</a></li>
 
104
            </ul>
 
105
          </div>
 
106
      </div>
 
107
 
 
108
        <!-- heading -->
 
109
        <div id="mw_header">
 
110
                <h1 id="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
 
111
                <!-- personal portlet -->
 
112
        <div class="portlet" id="p-personal">
 
113
                <h5><?php $this->msg('personaltools') ?></h5>
 
114
                <div class="pBody">
 
115
                        <ul>
 
116
<?php                   foreach($this->data['personal_urls'] as $key => $item) { ?>
 
117
                                <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
 
118
                                        if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
 
119
                                echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
 
120
                                if(!empty($item['class'])) { ?> class="<?php
 
121
                                echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
 
122
                                echo htmlspecialchars($item['text']) ?></a></li>
 
123
<?php                   } ?>
 
124
                        </ul>
 
125
                </div>
 
126
        </div>
 
127
        </div>
 
128
 
 
129
        <div id="mw_main">
 
130
        <div id="mw_contentwrapper">
 
131
        <!-- navigation portlet -->
 
132
        <div id="p-cactions" class="portlet">
 
133
                <h5><?php $this->msg('views') ?></h5>
 
134
                <div class="pBody">
 
135
                        <ul>
 
136
        <?php                   foreach($this->data['content_actions'] as $key => $tab) { ?>
 
137
                                 <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
 
138
                                                if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
 
139
                                         ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $skin->tooltipAndAccesskey('ca-'.$key) ?>><?php
 
140
                                         echo htmlspecialchars($tab['text']) ?></a></li>
 
141
        <?php                    } ?>
 
142
                        </ul>
 
143
                </div>
 
144
        </div>
 
145
 
 
146
        <!-- content -->
 
147
        <div id="mw_content">
 
148
        <!-- contentholder does nothing by default, but it allows users to style the text inside
 
149
             the content area without affecting the meaning of 'em' in #mw_content, which is used
 
150
             for the margins -->
 
151
        <div id="mw_contentholder">
 
152
                <div class='mw-topboxes'>
 
153
                        <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
 
154
                        <?php if($this->data['newtalk'] ) {
 
155
                                ?><div class="usermessage mw-topbox"><?php $this->html('newtalk')  ?></div>
 
156
                        <?php } ?>
 
157
                        <?php if($this->data['sitenotice']) {
 
158
                                ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div>
 
159
                        <?php } ?>
 
160
                </div>
 
161
 
 
162
                <div id="contentSub"><?php $this->html('subtitle') ?></div>
 
163
 
 
164
                <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
 
165
                <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
 
166
 
 
167
                <?php $this->html('bodytext') ?>
 
168
                <div class='mw_clear'></div>
 
169
                <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php       $this->html('catlinks') ?></div><?php } ?>
 
170
        </div><!-- mw_contentholder -->
 
171
        </div><!-- mw_content -->
 
172
        </div><!-- mw_contentwrapper -->
 
173
 
 
174
        <div id="mw_portlets">
 
175
 
 
176
        <!-- other portlets -->
 
177
        <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
 
178
        <div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $skin->tooltip('p-'.$bar) ?>>
 
179
                <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
 
180
                <div class='pBody'>
 
181
                        <ul>
 
182
<?php                   foreach($cont as $key => $val) { ?>
 
183
                                <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
 
184
                                        if ( $val['active'] ) { ?> class="active" <?php }
 
185
                                ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
 
186
<?php                   } ?>
 
187
                        </ul>
 
188
                </div><!-- pBody -->
 
189
        </div><!-- portlet -->
 
190
        <?php } ?>
 
191
 
 
192
        <!-- search -->
 
193
        <div id="p-search" class="portlet">
 
194
                <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
 
195
                <div id="searchBody" class="pBody">
 
196
                        <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
 
197
                                <input id="searchInput" name="search" type="text"<?php echo $skin->tooltipAndAccesskey('search');
 
198
                                        if( isset( $this->data['search'] ) ) {
 
199
                                                ?> value="<?php $this->text('search') ?>"<?php } ?> />
 
200
                                <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;
 
201
                                <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
 
202
                        </div></form>
 
203
                </div><!-- pBody -->
 
204
        </div><!-- portlet -->
 
205
 
 
206
        <!-- toolbox -->
 
207
        <div class="portlet" id="p-tb">
 
208
                <h5><?php $this->msg('toolbox') ?></h5>
 
209
                <div class="pBody">
 
210
                        <ul>
 
211
<?php
 
212
                if($this->data['notspecialpage']) { ?>
 
213
                                <li id="t-whatlinkshere"><a href="<?php
 
214
                                echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
 
215
                                ?>"<?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
 
216
<?php
 
217
                        if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
 
218
                                <li id="t-recentchangeslinked"><a href="<?php
 
219
                                echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
 
220
                                ?>"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
 
221
<?php           }
 
222
                }
 
223
                if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
 
224
                        <li id="t-trackbacklink"><a href="<?php
 
225
                                echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
 
226
                                ?>"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
 
227
<?php   }
 
228
                if($this->data['feeds']) { ?>
 
229
                        <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
 
230
                                        ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
 
231
                                        echo htmlspecialchars($feed['href']) ?>"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
 
232
                                        <?php } ?></li><?php
 
233
                }
 
234
 
 
235
                foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
 
236
 
 
237
                        if($this->data['nav_urls'][$special]) {
 
238
                                ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
 
239
                                ?>"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
 
240
<?php           }
 
241
                }
 
242
 
 
243
                if(!empty($this->data['nav_urls']['print']['href'])) { ?>
 
244
                                <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
 
245
                                ?>"<?php echo $skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
 
246
                }
 
247
 
 
248
                if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
 
249
                                <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
 
250
                                ?>"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
 
251
                } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
 
252
                                <li id="t-ispermalink"<?php echo $skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
 
253
                }
 
254
?>
 
255
                        </ul>
 
256
                </div><!-- pBody -->
 
257
        </div><!-- portlet -->
 
258
 
 
259
        <!-- languages -->
 
260
<?php
 
261
                if( $this->data['language_urls'] ) { ?>
 
262
        <div id="p-lang" class="portlet">
 
263
                <h5><?php $this->msg('otherlanguages') ?></h5>
 
264
                <div class="pBody">
 
265
                        <ul>
 
266
<?php           foreach($this->data['language_urls'] as $langlink) { ?>
 
267
                                <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
 
268
                                ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
 
269
<?php           } ?>
 
270
                        </ul>
 
271
                </div><!-- pBody -->
 
272
        </div><!-- portlet -->
 
273
<?php   } ?>
 
274
 
 
275
        </div><!-- mw_portlets -->
 
276
 
 
277
 
 
278
        </div><!-- main -->
 
279
 
 
280
        <div class="mw_clear"></div>
 
281
 
 
282
        <!-- footer --> 
 
283
 
 
284
 
 
285
<div id="ft">
 
286
        <div class="bottom">
 
287
          <hr />
 
288
          <div class="navigation">
 
289
            <ul>
 
290
              <li><a href="/index.shtml">Home</a></li>
 
291
              <li><a href="/download.shtml" >Download</a></li>
 
292
              <li><a href="/preview.shtml" >Preview</a></li>
 
293
              <li><a class="active" href="/wiki" >Wiki</a></li>
 
294
              <li><a href="/development.shtml" >Development</a></li>
 
295
              <li><a href="/release.shtml" >Release</a></li>
 
296
            </ul>
 
297
          </div><!-- end of .navigation -->
 
298
          <div id="motto">
 
299
              Do things as quickly as possible (but no quicker) with your files, applications, contacts and more!
 
300
          </div>
 
301
        </div> <!-- end of #bottom -->
 
302
        <p>&copy; GNOME Do Developers. All rights reversed. <a href="mailto:djsiegel+dohomepage@gmail.com">Contact us.</a></p>
 
303
 
 
304
      </div>
 
305
    </div>
 
306
  </div>
 
307
 
 
308
        <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
 
309
<?php $this->html('reporttime') ?>
 
310
<?php if ( $this->data['debug'] ): ?>
 
311
<!-- Debug output:
 
312
<?php $this->text( 'debug' ); ?>
 
313
-->
 
314
<?php endif; ?>
 
315
</body></html>
 
316
<?php
 
317
        wfRestoreWarnings();
 
318
        } // end of execute() method
 
319
} // end of class
 
320
?>