- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 162 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
How to create a top navigation bar as in NukeNews theme
Sometimes, like in the case of the NukeNews theme, the themeheader() function will include the contents of a separate file, written in pure HTML:
$tmpl_file = "themes/NukeNews/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
The header.html file, which is "evaluated" here, contains HTML code that creates the "top navigation bar", the one with the "Home", "Topics", "Downloads", "Your Account" etc. links (Figure 14-3 ):
<tr valign="middle" bgcolor="#dedebb">
<td width="15%" nowrap><font class="content" color="#363636">
<b>$theuser</b></font></td>
<td align="center" height="20" width="70%"><font class="content"><B>
<A href="index.php">Home</a>
·
<A href="topics.html">Topics</a>
·
<A href="downloads.html">Downloads</a>
·
<A href="modules.php?name=Your_Account">Your Account</a>
·
<A href="submit.html">Submit News</a>
·
<A href="top.html">Top 10</a>
</B></font>
</td>
<td align="right" width="15%"><font class="content"><b>
<script type="text/javascript">
<!-- // Array ofmonth Names
var monthNames = new Array(
"January","February","March","April","May","June","July","August","September",
"October","November","December");
var now = new Date();
thisYear = now.getYear();
if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
document.write(monthNames[now.getMonth()] + " " + now.getDate() + ", " + thisYear);
// -->
</script></b></font></td>
<td> </td>
</tr>
Thus, if you want to delete or change this top navigation bar, you will have to delete or change the above code to reflect your needs (see How to change the top menu (top navigation bar) of PHP-Nuke and how to remove the search box from the top menu of PHP-Nuke ). A similar technique is used in the Odyssey theme, where one
uses the contents of themes/Odyssey/left_center.html, additionally to themes/Odyssey/header.html.