shauntaylor88
08-25-2006, 03:10 PM
Again, I appogise, if this is in the wrong forums.
At the moment if I wish to edit my navigation menu, I need to go through each of my pages seperatly, and alter them.
What im curious about is, is it possible for me to make another .php file and call the navigation menu onto each page I produce, this would mean instead of my having to edit 20-50pages, I can just edit one file and its all done.
If so can I have some assistance on this matter as I have no clue on where to start if this is at all possible.
Below is my code, if it that would help someone skim through and see if it is possible with my layout e.t.c
Index.php
<?php
include_once('statistics.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>The Matrix Online | Viper Gaming | homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css1.css">
<link rel="shortcut icon" href="favicon.ico" >
</head>
<body>
<div id="container">
<div class="header1"></div>
<div id="header2"></div>
<div id="navigation_left">
<div class="nav"><b><span style="font-size: 14px;"> Main Navigation</span></b></div>
<ul>
<li><a href=""><span style="font-size: 12px;">Home</span></a></li>
<li><a href=""><span style="font-size: 12px;">News</span></a></li>
<li><a href=""><span style="font-size: 12px;">Community</span></a></li>
<li><a href=""><span style="font-size: 12px;">IRC Chat</span></a></li>
<li><a href=""><span style="font-size: 12px;">Official Clan</span></a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Game Resources</span></b></div>
<ul>
<li><a href="">Game Information</a></li>
<li><a href="">News</a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Game Media</span></b></div>
<ul>
<li><a href="">Movies</a></li>
<li><a href="">Screenshots</a></li>
<li><a href="">Wallpapers</a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Game Links</span></b></div>
<ul>
<li><a href="">Official Site</a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> User Statistics</span></b></div>
<ul>
<li><a href="">Online:<span style="position: relative; top: 0px; left: 160px;"><?php echo $online; ?></a></span></li>
<li><a href="">Today:<span style="position: relative; top: 0px; left: 162px;"><?php echo $today; ?></a></span></li>
<li><a href="">Yesterday:<span style="position: relative; top: 0px; left: 142px;"><?php echo $yesterday; ?></a></span></li>
<li><a href="">Total:<span style="position: relative; top: 0px; left: 168px;"><?php echo $total; ?></a></span></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Donate</span></b></div>
<ul>
<li><a href="">Target:</a></li>
<li><a href="">Recieved:</a></li>
<li><a href="">Remaining:</a></li>
<li>
<p align="center"><a href=""><span style="float:center;"><b>Donate Now</b></span></a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></div>
<div id="right">
<div id="main_menu"><b><span style="font-size: 12px;">Home</span></b></div>
</div>
<span style="font-size: 12px;">Welcome to <b>vipergaming.co.uk</b></span><div id="bottom" style="width: 975px; height: 30px">
<div id="footer">
<p style="text-align: center"><span style="font-size: 10px; float:center">Copyright 2006, Viper Gaming Network, All rights reserved.
</span></div>
<p align="center">
<span style="font-size: 9px;">THE MATRIX ONLINE, characters, names and all related indicia are trademarks of and © Warner Bros. Entertainment Inc. SOE and the SOE logo are registered trademarks of Sony Online Entertainment LLC. WBIE LOGO, WB SHIELD, MONOLITH and MONOLITH LOGO: TM & © Warner Bros. Entertainment Inc. All other trademarks or tradenames are properties of their respective owners.</span>
</div>
</body>
</html>
Css1.css
<!--
*{
margin:0;
padding:0;
}
body {
background-color:#000;
font-family:arial,sans-serif;
color:#fff;
margin-top:0px;
margin-left:0px;
}
#container {
width:975px;
margin:auto;
}
.header1 {
height:30px;
width:975px;
background-image:url(webimages/topheader.jpg);
}
#header2 {
height:150px;
width:975px;
background-image:url(webimages/blankheader.jpg);
}
.header3 {
height:30px;
width:975px;
background-image:url(webimages/bottomheader.jpg);
}
#navigation_left {
float:left;
width:215px;
margin-left:0px;
}
.nav {
line-height:30px;
background-image:url(webimages/navigationtop.jpg);
margin-top:0px;
margin-left:0px;
}
#navigation_left ul {
list-style:none;
margin-left:0px;
}
#navigation_left ul li {
height:20px;
background-image:url(webimages/navigationbutton.jpg);
margin-left:0px;
padding-right:5px
}
#right {
float:left;
width:760px;
margin-top:0px;
margin-left:0px;
}
#bottom {
float:left;
width:975px;
margin-top:0px;
margin-left:0px;
}
#right p {
margin:0px 0px 0px 0px;
text-align:justify;
margin-left:0px;
}
#main_menu {
line-height:30px;
background-image:url(webimages/contenttop.jpg);
text-align:right;
margin-bottom:0px;
margin-left:0px;
margin-right:0px;
}
#footer {
line-height:30px;
background-image:url(webimages/footer.jpg);
text-align:right;
margin-bottom:0px;
}
a:link,a:visited,a:active {
font-size:12px;
color:#fff;
background-color:inherit;
text-decoration:none;
margin-left:5px;
}
a:hover {
color:#ff9933;
background-color:inherit;
margin-left:5px;
}
-->
Kind Regards,
Shaun.
At the moment if I wish to edit my navigation menu, I need to go through each of my pages seperatly, and alter them.
What im curious about is, is it possible for me to make another .php file and call the navigation menu onto each page I produce, this would mean instead of my having to edit 20-50pages, I can just edit one file and its all done.
If so can I have some assistance on this matter as I have no clue on where to start if this is at all possible.
Below is my code, if it that would help someone skim through and see if it is possible with my layout e.t.c
Index.php
<?php
include_once('statistics.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>The Matrix Online | Viper Gaming | homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css1.css">
<link rel="shortcut icon" href="favicon.ico" >
</head>
<body>
<div id="container">
<div class="header1"></div>
<div id="header2"></div>
<div id="navigation_left">
<div class="nav"><b><span style="font-size: 14px;"> Main Navigation</span></b></div>
<ul>
<li><a href=""><span style="font-size: 12px;">Home</span></a></li>
<li><a href=""><span style="font-size: 12px;">News</span></a></li>
<li><a href=""><span style="font-size: 12px;">Community</span></a></li>
<li><a href=""><span style="font-size: 12px;">IRC Chat</span></a></li>
<li><a href=""><span style="font-size: 12px;">Official Clan</span></a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Game Resources</span></b></div>
<ul>
<li><a href="">Game Information</a></li>
<li><a href="">News</a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Game Media</span></b></div>
<ul>
<li><a href="">Movies</a></li>
<li><a href="">Screenshots</a></li>
<li><a href="">Wallpapers</a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Game Links</span></b></div>
<ul>
<li><a href="">Official Site</a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> User Statistics</span></b></div>
<ul>
<li><a href="">Online:<span style="position: relative; top: 0px; left: 160px;"><?php echo $online; ?></a></span></li>
<li><a href="">Today:<span style="position: relative; top: 0px; left: 162px;"><?php echo $today; ?></a></span></li>
<li><a href="">Yesterday:<span style="position: relative; top: 0px; left: 142px;"><?php echo $yesterday; ?></a></span></li>
<li><a href="">Total:<span style="position: relative; top: 0px; left: 168px;"><?php echo $total; ?></a></span></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></p>
<div class="nav"><b><span style="font-size: 14px;"> Donate</span></b></div>
<ul>
<li><a href="">Target:</a></li>
<li><a href="">Recieved:</a></li>
<li><a href="">Remaining:</a></li>
<li>
<p align="center"><a href=""><span style="float:center;"><b>Donate Now</b></span></a></li>
</ul>
<p>
<img src="webimages/blanknavigationspacer.jpg" width="215" height="2" alt=""></div>
<div id="right">
<div id="main_menu"><b><span style="font-size: 12px;">Home</span></b></div>
</div>
<span style="font-size: 12px;">Welcome to <b>vipergaming.co.uk</b></span><div id="bottom" style="width: 975px; height: 30px">
<div id="footer">
<p style="text-align: center"><span style="font-size: 10px; float:center">Copyright 2006, Viper Gaming Network, All rights reserved.
</span></div>
<p align="center">
<span style="font-size: 9px;">THE MATRIX ONLINE, characters, names and all related indicia are trademarks of and © Warner Bros. Entertainment Inc. SOE and the SOE logo are registered trademarks of Sony Online Entertainment LLC. WBIE LOGO, WB SHIELD, MONOLITH and MONOLITH LOGO: TM & © Warner Bros. Entertainment Inc. All other trademarks or tradenames are properties of their respective owners.</span>
</div>
</body>
</html>
Css1.css
<!--
*{
margin:0;
padding:0;
}
body {
background-color:#000;
font-family:arial,sans-serif;
color:#fff;
margin-top:0px;
margin-left:0px;
}
#container {
width:975px;
margin:auto;
}
.header1 {
height:30px;
width:975px;
background-image:url(webimages/topheader.jpg);
}
#header2 {
height:150px;
width:975px;
background-image:url(webimages/blankheader.jpg);
}
.header3 {
height:30px;
width:975px;
background-image:url(webimages/bottomheader.jpg);
}
#navigation_left {
float:left;
width:215px;
margin-left:0px;
}
.nav {
line-height:30px;
background-image:url(webimages/navigationtop.jpg);
margin-top:0px;
margin-left:0px;
}
#navigation_left ul {
list-style:none;
margin-left:0px;
}
#navigation_left ul li {
height:20px;
background-image:url(webimages/navigationbutton.jpg);
margin-left:0px;
padding-right:5px
}
#right {
float:left;
width:760px;
margin-top:0px;
margin-left:0px;
}
#bottom {
float:left;
width:975px;
margin-top:0px;
margin-left:0px;
}
#right p {
margin:0px 0px 0px 0px;
text-align:justify;
margin-left:0px;
}
#main_menu {
line-height:30px;
background-image:url(webimages/contenttop.jpg);
text-align:right;
margin-bottom:0px;
margin-left:0px;
margin-right:0px;
}
#footer {
line-height:30px;
background-image:url(webimages/footer.jpg);
text-align:right;
margin-bottom:0px;
}
a:link,a:visited,a:active {
font-size:12px;
color:#fff;
background-color:inherit;
text-decoration:none;
margin-left:5px;
}
a:hover {
color:#ff9933;
background-color:inherit;
margin-left:5px;
}
-->
Kind Regards,
Shaun.