|
03-16-2004, 06:23 AM | #1 |
Green Mole
Join Date: Jan 2004
Location: Hamm/NRW/Germany
Posts: 26
|
footer/header with php
Hi,
i've got the problem that i cant use php in the templates... so i want to ask.. how can i add php code as a header and/or footer? :p |
03-16-2004, 07:25 PM | #2 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
This thread has just what you need. After reading that, if you have any questions, feel free to ask, because I've done exactly what you're wanting to do.
|
03-17-2004, 03:29 AM | #3 |
Green Mole
Join Date: Jan 2004
Location: Hamm/NRW/Germany
Posts: 26
|
seems that some codes have changed since 1.8
i couldnt find some of the to-replace codes... |
03-18-2004, 07:59 PM | #4 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
Perhaps I had some customized code that I forgot about. I downloaded a fresh copy of 1.8.0, set it up and configured it in a different directory on my site to test all this out, so here is a step-by-step explanation of how to do it.
Make a file called makeheadfoot.php which calls the PHP class that creates your header and footer. Here is the way I've done it. Here is a very oversimplified example of my header/footer PHP classes. Make a file called header.php with the following: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Here is a text version of my search_function.php file so you can take a look at exactly how I did it. In your template file, replace everything at the top, through the <body> tag with the following: PHP Code:
PHP Code:
PHP Code:
Let me know if I've missed anything, and if you still have problems. I'll be glad to help. Last edited by vinyl-junkie; 03-18-2004 at 08:02 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
skipping header and footer | joelstein | How-to Forum | 1 | 10-19-2005 07:55 AM |
"1 1" between page header and search result | jensb | Troubleshooting | 2 | 01-13-2005 01:37 PM |
Mod to follow header redirects | Charter | Mod Submissions | 0 | 02-25-2004 10:33 AM |