* Added a new hook which allows an extension to control whether or not the
[lhc/web/wiklou.git] / skins / MonoBook.php
index 17a952d..46c7e99 100644 (file)
@@ -60,11 +60,12 @@ class MonoBookTemplate extends QuickTemplate {
     <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css" />
     <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]-->
     <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]-->
-    <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]-->
+    <!--[if gte IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]-->
     <!--[if IE]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script>
     <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
     <?php if($this->data['jsvarurl'  ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl'  ) ?>"></script><?php } ?>
     <script type="<?php $this->text('jsmimetype') ?>" src="<?php                                   $this->text('stylepath' ) ?>/common/wikibits.js"></script>
+    <?php if($this->data['pagecss'   ]) { ?><style type="text/css"><?php              $this->html('pagecss'   ) ?></style><?php    } ?>
     <?php if($this->data['usercss'   ]) { ?><style type="text/css"><?php              $this->html('usercss'   ) ?></style><?php    } ?>
     <?php if($this->data['userjs'    ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs'    ) ?>"></script><?php } ?>
     <?php if($this->data['userjsprev']) { ?><script type="<?php $this->text('jsmimetype') ?>"><?php      $this->html('userjsprev') ?></script><?php   } ?>
@@ -82,7 +83,7 @@ class MonoBookTemplate extends QuickTemplate {
          <div id="bodyContent">
            <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
            <div id="contentSub"><?php $this->html('subtitle') ?></div>
-           <?php if($this->data['undelete']) { ?><div id="contentSub"><?php     $this->html('undelete') ?></div><?php } ?>
+           <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
            <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk')  ?></div><?php } ?>
            <!-- start content -->
            <?php $this->html('bodytext') ?>
@@ -126,7 +127,7 @@ class MonoBookTemplate extends QuickTemplate {
        <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
        <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
        <div class='portlet' id='p-<?php echo htmlspecialchars($bar) ?>'>
-         <h5><?php $this->msg( $bar ) ?></h5>
+         <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
          <div class='pBody'>
            <ul>
            <?php foreach($cont as $key => $val) { ?>
@@ -180,7 +181,14 @@ class MonoBookTemplate extends QuickTemplate {
              <li id="t-print"><a href="<?php
                    echo htmlspecialchars($this->data['nav_urls']['print']['href'])
                    ?>"><?php echo $this->msg('printableversion') ?></a></li>
-             <?php } ?>
+                 <?php } ?>
+             <?php if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
+             <li id="t-permalink"><a href="<?php
+                   echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
+                   ?>"><?php echo $this->msg('permalink') ?></a></li>
+                 <?php } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
+                   <li id="t-ispermalink"><?php echo $this->msg('permalink') ?></li>
+                 <?php } ?>
            </ul>
          </div>
        </div>
@@ -189,7 +197,7 @@ class MonoBookTemplate extends QuickTemplate {
          <div class="pBody">
            <ul>
              <?php foreach($this->data['language_urls'] as $langlink) { ?>
-             <li>
+             <li class="<?php echo htmlspecialchars($langlink['class'])?>">
              <a href="<?php echo htmlspecialchars($langlink['href'])
                ?>"><?php echo $langlink['text'] ?></a>
              </li>