GetDotted Domains

Viewing Thread:
"New Project/phpBB Question"

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.

Sun 17/07/05 at 11:11
Regular
"l33t cs50r"
Posts: 2,956
Been a little busy working on this:
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.
Sun 17/07/05 at 12:02
Regular
"Pouch Ape"
Posts: 14,499
Nice site - goes to prove that CSS can look good.
Sun 17/07/05 at 11:53
Regular
"It goes so quickly"
Posts: 4,083
In theory, yes, that should work, but the result may be unexpected due to PHP / HTML / CSS clashes.

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].
Sun 17/07/05 at 11:41
Regular
"l33t cs50r"
Posts: 2,956
In the main index file I have:

// 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?
Sun 17/07/05 at 11:28
Regular
"It goes so quickly"
Posts: 4,083
I'm sorry to say that I can't help you directly, as I've never used phpBB. But I just wanted to say that I like the site you've put together.

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.
Sun 17/07/05 at 11:11
Regular
"l33t cs50r"
Posts: 2,956
Been a little busy working on this:
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.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

The coolest ISP ever!
In my opinion, the ISP is the best I have ever used. They guarantee 'first time connection - everytime', which they have never let me down on.
Very pleased
Very pleased with the help given by your staff. They explained technical details in an easy way and were patient when providing information to a non expert like me.

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.