diff options
author | Brian Evans <grknight@gentoo.org> | 2019-09-12 12:59:59 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2019-09-12 12:59:59 -0400 |
commit | 77144de48bb64bc448d941a966a9d7813c52bc28 (patch) | |
tree | f197bc610a79d9efda735e107be04d4b4e289172 | |
parent | Have header template match main site for sources (diff) | |
download | skin-tyrian-77144de48bb64bc448d941a966a9d7813c52bc28.tar.gz skin-tyrian-77144de48bb64bc448d941a966a9d7813c52bc28.tar.bz2 skin-tyrian-77144de48bb64bc448d941a966a9d7813c52bc28.zip |
Make year dynamic and reduce some output breakouts
Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r-- | TyrianTemplate.php | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php index eae7b30..8387d33 100644 --- a/TyrianTemplate.php +++ b/TyrianTemplate.php @@ -45,8 +45,9 @@ class TyrianTemplate extends BaseTemplate { <a href="#searchInput"><?php $this->msg( 'jumptosearch' ); ?></a> </div> - <!-- start content --> - <?php $this->html( 'bodytext' ); + <?php + //<!-- start content --> + $this->html( 'bodytext' ); if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } @@ -150,6 +151,7 @@ class TyrianTemplate extends BaseTemplate { private function footer() { $validFooterIcons = $this->getFooterIcons( "icononly" ); $validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links + $currentYear = date('Y'); ?> <footer> <div class="container"> @@ -178,7 +180,7 @@ class TyrianTemplate extends BaseTemplate { </ul> </div> <div class="col-xs-9 col-md-9"> - <strong>© 2001–2019 Gentoo Foundation, Inc.</strong><br /> + <strong>© 2001–<?=$currentYear ?> Gentoo Foundation, Inc.</strong><br /> <small> Gentoo is a trademark of the Gentoo Foundation, Inc. The contents of this document, unless otherwise expressly stated, are licensed under the @@ -398,11 +400,15 @@ class TyrianTemplate extends BaseTemplate { } $msgObj = wfMessage( $bar ); - if ( $bar !== 'navigation' ) { ?> + if ( $bar !== 'navigation' ) { + $barQuoted = htmlspecialchars( $bar ); + $messageQuoted = htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); + echo <<<EOT <li class="dropdown"> - <a href="/wiki/Gentoo_Wiki:Menu-<?php echo htmlspecialchars( $bar ) ?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?> <span class="caret"></span></a> + <a href="/wiki/Gentoo_Wiki:Menu-{$barQuoted}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{$messageQuoted} <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> - <?php } +EOT; + } if ( is_array ( $cont ) ) { foreach ( $cont as $key => $val ) { @@ -418,9 +424,11 @@ class TyrianTemplate extends BaseTemplate { echo "<!-- This would have been a box, but it contains custom HTML which is not supported. -->"; } - if ( $bar !== 'navigation' ) { ?> + if ( $bar !== 'navigation' ) { + echo <<<EOT </ul> </li> - <?php } +EOT; + } } } |