Header changes

Posted by charlier 
Header changes
May 22, 2007 12:11AM
Hi guys,

I didn't find any specific help for my problem. Or if I did, I failed to reconize it.

I had phorum setup as just a simple stand alone to see if it'd work. Well tada, it does. Great. Now I want to create a website around it. I'm pretty new to this stuff so please bear with me, I need a little hand holding here.

On the default index.php page. I have on the top, the logo, and the name of the site. Go here to see what i have - http://bmxforums.net

I have created a header file that I want on top instead. Check out this page - http://bmxforums.net/links.php

How can I put my header in there, and get rid of everything without messing it all up? I have messed around with header.tpl, with close results, but it's still not quite right. I can get ride of the logo and stuff easy enough. Getting rid of the "bmxforums.net" seems to be part of the problem. I always end up with a stray /> on the screen. What do I need to add or remove for that one?


Here's the code I use to put header files on my other pages:

<?php
// links.php
// set the page title and include the html header
$page_title='BMXforums.net - Kicking ass and taking names';
include ('./includes/header.php');
?>


Here's my header file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo $page_title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body>
<img src="images/banner.png" usemap="#navbar" border="0">
<map name="navbar">
  <area shape="rect" coords="16,18,283,55" href="[bmxforums.net];
  <area shape="rect" coords="690,139,795,161" href="./control.php?0">
  <area shape="rect" coords="690,117,755,137" href="./register.php?0">
  <area shape="rect" coords="690,95,744,116" href="./login.php?0">
  <area shape="rect" coords="690,72,744,93" href="./links.php">
  <area shape="rect" coords="690,51,750,72" href="./gallery.php">
  <area shape="rect" coords="690,30,744,51" href="./about.php">
  <area shape="rect" coords="690,6,744,27" href="[bmxforums.net">];
</map>
</body>
</html>


Re: Header changes
May 22, 2007 12:18AM
Let me add some more stuff as well. So I have also messed around in the admin.php page. The part of the page I want to just disappear is the "phorum title". If I blank it out, it says "phorum5". That's the part I want gone, and I want my header to be in the place of that stuff.
Re: Header changes
May 22, 2007 02:13AM
To start with: there should be no </body> and </html> in your header template. Those should go in your footer.tpl instead. Else, you are ending the html page before the end of the page, which is invalid HTML code. So fix your header file for that.

Modifying the header.tpl is the best you can do, because that will keep some things like page redirects and {HEAD_DATA} intact. To get rid of the Phorum title, you'll have to change this block of code in the header.tpl:

        <span class="PhorumTitleText PhorumLargeFont">
          {IF NAME}<a href="{URL->TOP}">{NAME}</a>&nbsp;:&nbsp;{/IF}
          {TITLE}
        </span>

You could change this to the following code by removing the red blocks from the above example for example (depending on what you are trying to accomplish):

        <span class="PhorumTitleText PhorumLargeFont">
          {IF NAME}<a href="{URL->TOP}">{NAME}</a>{/IF}
        </span>

If you see a stray "/>" on the page, then somewhere you broke the HTML code. This could be anywhere, so without seeing an actual page with that symptom, it's impossible to tell what's going wrong in what spot.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Your IP address, domain or ISP has been blocked. Please contact the forum administrators.
Sorry, only registered users may post in this forum.

Click here to login