klenwell information services : WikkaSkinHeader

Wiki source for WikkaSkinHeader


Show raw source

This is the modified header.php file I use to achieve [[WikkaSkinCustomization | the layout as it appears on this site.]] I am continually tweaking it, so this isn't necessarily the latest version, but it covers the key changes:

%%
<?php
$message = $this->GetRedirectMessage();
$user = $this->GetUser();
$site_base = $this->GetConfigValue("base_url");
if ( substr_count($site_base, 'wikka.php?wakka=') > 0 ) $site_base = substr($site_base,0,-16);

// *** Some Variable Settings

// Onload Message
$onload = ( !empty($message) ) ? "onLoad=\"alert('".$message."');\" " : '';

// Site Home (this will put a link back to another page -- like a website home page -- on every page)
// array(href, label)
$HOME = array('../', 'website home page');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo $this->GetWakkaName().": ".$this->PageTitle(); ?></title>
<base href="<?php echo $site_base ?>" />
<?php if ($this->GetMethod() != 'show' || $this->page["latest"] == 'N' || $this->page["tag"] == 'SandBox') echo "<meta name=\"robots\" content=\"noindex, nofollow, noarchive\" />\n"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<?php echo $this->GetConfigValue("meta_keywords") ?>" />
<meta name="description" content="<?php echo $this->GetConfigValue("meta_description") ?>" />
<link rel="stylesheet" type="text/css" href="css/<?php echo $this->GetConfigValue("stylesheet") ?>" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<?php
if ($this->GetMethod() != 'edit') {
$rsslink = ' <link rel="alternate" type="application/rss+xml" title="'.$this->GetWakkaName().': revisions for '.$this->tag.' (RSS)" href="'.$this->Href('revisions.xml', $this->tag).'" />'."\n";
$rsslink .= ' <link rel="alternate" type="application/rss+xml" title="'.$this->GetWakkaName().': recently edited pages (RSS)" href="'.$this->Href('recentchanges.xml', $this->tag).'" />'."\n";
echo $rsslink;
}
?>
</head>


<body <?php echo $onload; ?>>

<!-- .header (moved from actions/header.php) -->
<div class="header">
<h2>
<div class="site_home"><a href="<?php echo $HOME[0]; ?>"><?php echo $HOME[1]; ?></a></div>
<?php echo $this->config["wakka_name"] ?> : <a href="<?php echo $this->href('backlinks', '', ''); ?>" title="Display a list of pages linking to <? echo $this->tag ?>"><?php echo $this->GetPageTag(); ?></a>
</h2>
</div>
<!-- end .header -->


<!-- .navbar -->
<div class="navbar">
<?php echo $this->Link($this->config["root_page"]); ?>
<?php
if ($this->GetUser()) {
echo $this->config["logged_in_navigation_links"] ? $this->Format($this->config["logged_in_navigation_links"])." " : "";
echo '<span class="user">You are '.$this->Format($this->GetUserName()).'</span>';
} else {
echo $this->config["navigation_links"] ? $this->Format($this->config["navigation_links"]) : "";
}
?>
</div>
<!-- end .navbar -->


<!-- .page_outer : container for .sidebar_left, .page, and .comment_block -->
<div class="page_outer">


<!-- .sidebar_left -->
<!-- TO DO: move to file actions/sidebar_left.php? -->
<div class="sidebar_left_outer">
<div class="sidebar_left">

<h3>index</h3>
<ul>
<li><a href="../">website home</a></li>
<li><a href="./">wiki home</a></li>
</ul>

<h3>reference</h3>
<ul>
<li><a href="./FormattingRules">wikka syntax</a></li>
<li><a href="http://wikkawiki.org/HomePage">wikkawiki.org</a></li>
<li><a href="./">css settings</a></li>
</ul>

</div>
</div>
<!-- end .sidebar_left -->
%%

CategoryWiki