OK, I give up. How do I (properly) put my own navigation buttons the forum?

Started by destalk, November 09, 2004, 09:35:13 PM

Previous topic - Next topic

destalk

I promise I have searched for and read everything I can find, but I have been unable to either locate, or understand (my problem, I supppose), how to do the following;

My forum is part of my general web site. What I am trying to do is to have my web site's navigation buttons (and Google ads etc), running along the top (or side for that matter) of the forum. The only way that I have managed to achieve this is to paste my code before the SM PHP code kicks in. I.E.
<HTML>
<HEAD>
</HEAD>
<BODY>
<---my navigation code etc...--->
<---Followed by the SMforum php code --->
<?php
// Version: 1.0 RC2; index

/*   This template is, perhaps, the most important template................. etc.

Obviously, the downside of this is that when I try and implement any SSI, it will also bring in my navigation bar stuff. Which is embarrassing and, quite frankly wrong. I know this is the wrong way to do things, but I have tried for hours a day, for weeks now, and I can't work out the right way to do this. I even asked a mate who understands PHP fairly well and he was confused (although he didn't have time to go through these forums).

If anyone can simply tell me where to paste my code, I would be overwhelmed. Every time I try, I stuff up the template and have to revert to the default.

Thanks.

Jerry



- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

[Unknown]

Okay, okay... here's the simplest and most proper way to do it:

Step 1. Make a new file, and name it "header.php".  Put everything in there.  You can have PHP code in there if you like, or just html.  It doesn't matter.  Make sure you put the file in the same place SMF's index.php and SSI.php are.

Step 2.  Find where you want to put it in index.template.php.  For your case, and many people's case, it will be after the following:
<body>

Step 3.  Add after the above (before the '; part) the following:
'; include('header.php'); echo '

Done.  If you want to add a footer, do all the same stuff, but replace "header" with "footer", and probably find the following instead for step 2:
</body>

-[Unknown]

destalk

Thank you, thank you. I'll try this later and report back.

Much appreciated.  ;)


destalk

Believe me, I've been there. But I will try again. I've read and re-read it, but I have real propblems fathoming out what the instructions are referring to sometimes. This may be me being a bit thick, as others have obviously worked it out, but I do usually manage to work these things out, and this has just stumped me. Perhaps there is too much explanation. I'm a graphic designer, who has, over the years, got more into the web side of things. But I will never have an apptitude for hand coding. :(

Anyway, I've followed your instructions here and they work like a dream. So, thank you very much.

[Unknown]

Quote from: destalk on November 10, 2004, 04:19:28 AM
Believe me, I've been there. But I will try again.

Well, actually, that tutorial there was only just written *after* the post above.

Anyhow, I'm glad you got it working ;).

-[Unknown]

destalk

 :-[

Oooops. General frustration taking over, I'm afraid - and all logic out of the window. I did have a quick look though,  and it all glazed over. But I probably need a strong coffee, methinks.

You certainly move fast though.  :)

Next step is the sidebar... for another day though.

Advertisement: