Browse Source

Added $CONF passthrough

pull/24/head
Teknikode 8 years ago
parent
commit
4604c89b08
  1. 4
      includes/common.php
  2. 12
      templates/default/header.php

4
includes/common.php

@ -75,7 +75,7 @@ function get_http($CONF) @@ -75,7 +75,7 @@ function get_http($CONF)
return $http;
}
function get_active($page)
function get_active($page, $CONF)
{
$cur_page = '';
switch ($CONF['url_type'])
@ -95,7 +95,7 @@ function get_active($page) @@ -95,7 +95,7 @@ function get_active($page)
{
return 'active';
}
return $cur_page;
return "";
}
function checkemail($email)

12
templates/default/header.php

@ -228,10 +228,10 @@ @@ -228,10 +228,10 @@
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="<?php echo get_active("home"); ?>"><a href="<?php echo get_page_url("home", $CONF); ?>">Home</a></li>
<li class="<?php echo get_active("about"); ?>"><a href="<?php echo get_page_url("about", $CONF); ?>">About</a></li>
<li class="<?php echo get_active("blog"); ?>"><a href="<?php echo get_page_url("blog", $CONF); ?>">Blog</a></li>
<li class="<?php echo get_active("podcast"); echo get_active("pod"); ?>"><a href="<?php echo get_page_url("podcast", $CONF); ?>">Podcast</a></li>
<li class="<?php echo get_active("home", $CONF); ?>"><a href="<?php echo get_page_url("home", $CONF); ?>">Home</a></li>
<li class="<?php echo get_active("about", $CONF); ?>"><a href="<?php echo get_page_url("about", $CONF); ?>">About</a></li>
<li class="<?php echo get_active("blog", $CONF); ?>"><a href="<?php echo get_page_url("blog", $CONF); ?>">Blog</a></li>
<li class="<?php echo get_active("podcast", $CONF); echo get_active("pod", $CONF); ?>"><a href="<?php echo get_page_url("podcast", $CONF); ?>">Podcast</a></li>
<li class="divider-vertical"></li>
<li class="dropdown">
@ -260,10 +260,10 @@ @@ -260,10 +260,10 @@
-->
</ul>
</li>
<li class="<?php echo get_active("contact"); ?>">
<li class="<?php echo get_active("contact", $CONF); ?>">
<a href="<?php echo get_page_url("contact", $CONF); ?>">Contact</a>
</li>
<li class="<?php echo get_active("help"); ?>">
<li class="<?php echo get_active("help", $CONF); ?>">
<a href="<?php echo get_page_url("help", $CONF); ?>">Help</a>
</li>
</ul>

Loading…
Cancel
Save