The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
http://www.uti-clan.co.uk/
Still in progress and there's still bits that don't work. And yes, I already know some of the code is questionable and the code in the forum section isn't my doing either, but that leads me onto this question...
In the overallheader.tpl file of phpBB, is there a way to insert an include?
I need to replicate the header/navigation from the rest of the site into the header of the forum but I get the impression they can only handle html!
Have tried the obvious php require but that failed to work as I think the .tpl files don't allow php to be parsed before output!
Recoding phpBB is a biatch as it is without the hassle of this too.
All I'd suggest at the moment is simply adding it, and checking out the resulting view / code.
Is there much PHP in your own file? Perhaps you should add a prefix to any variables, constants or functions you've defined, just in case any clashes are present. For example, rather than $MyVar and MyFunction(), use $tyla_MyVar and [B]tylaMyFunction()[/I].
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'index_body.tpl')
);
So in includes/page_header I have:
// Parse and show the overall header.
//
$template->set_filenames(array(
'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
);
//
// Generate logged in/logged out status
//
If I added the include:
//
require ('MyHeader.php');
$template->set_filenames(array(
In threory would this work?
I don't think a .tpl file will parse as PHP by default on any install (correct me if I'm wrong anybody) so I doubt phpBB is set to do this, more likely it is a case that the file calling the .tpl file is just a standard PHP require function too, in which case, you just need to add your header include / require call in to that one, above the .tpl call, such as:
require('tylasheader.php'); - your header file.
require('overallheader.tpl'); - existing code.
.. if that doesn't work (as it may cause HTML code clashes), you may need to alter the code more so, rather than having the .tpl file just drop in to the web page, you could call it and save it in a variable ($overallheader = file_get_contents('overallheader.tpl')), and cut out / replace the code to add your navigation before outputting it to the site. Sounds complicated I know, but with PHP's string functions, it could be a snap, and I'll give any help I can if need be.
http://www.uti-clan.co.uk/
Still in progress and there's still bits that don't work. And yes, I already know some of the code is questionable and the code in the forum section isn't my doing either, but that leads me onto this question...
In the overallheader.tpl file of phpBB, is there a way to insert an include?
I need to replicate the header/navigation from the rest of the site into the header of the forum but I get the impression they can only handle html!
Have tried the obvious php require but that failed to work as I think the .tpl files don't allow php to be parsed before output!
Recoding phpBB is a biatch as it is without the hassle of this too.