Page 1 of 1

Blending a script I wrote into IM

PostPosted: Thu Aug 31, 2006 9:13 am
Author: BMD
I have written a couple of very basic php scripts that I have called from my site.

They open as a new page but are stripped down bare bone pages ( no header, background, footer etc).

What i want to do is add the overall header and style to the pages called (no blocks at all, just the banner, qbar menu, and overall footer)

What is the best way to do this?

:la:

Once on the portal page click either the 24 Hr or 72 Hr forecast to see what I'm trying to blend.

Thanks for any help in advance.

D

Re: Blending a script I wrote into IM

PostPosted: Mon Sep 04, 2006 6:25 am
Author: computerz
Put near the top of your code somewhere the following line:

include ($phpbb_root_path . 'includes/page_header.'.$phpEx);

This calls the page header which calls the overal_header.tpl, the qbar and the header blocks, and phpbb security if you have that installed.

You may also want to define your scripts in phpbb as such]define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);[/color]

And to make the page look like other pages, you may want to call the page footer as well, by putting the following at the bottom of your script

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);