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 |
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. :)
|
seems that some codes have changed since 1.8
i couldnt find some of the to-replace codes... |
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. :) |
All times are GMT -8. The time now is 07:10 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.