coppermine-gallery.com/forum

No Support => Feature requests => Topic started by: BrokenRules on July 22, 2004, 01:39:01 AM

Title: PHP include in header table
Post by: BrokenRules on July 22, 2004, 01:39:01 AM
I have a site using the caliSkinV6 template

I want to include a page in the header

Now -> http://cu2.noinfo.nl

But I want it like this -> http://cu2.noinfo.nl/index2.php?pagina=vragenlijst&soort=abc
(with the scrollbar in the top)

how can I include a .php file in the template in a table  ??? ???
Title: Re: PHP include in header table
Post by: BrokenRules on July 22, 2004, 01:53:25 AM
http://forum.coppermine-gallery.net/index.php?topic=8041.0


FOUND it.....

;D ;D ;D
Title: Re: PHP include in header table
Post by: erroneus on July 22, 2004, 05:54:28 AM
If you're using cpg1.3.x, and the solution you found worked for you. Let us know!
Reason I ask is I noticed they said it worked for them on 1.2.1, and someone using 1.3.0 was unable to get it working.
Title: Re: PHP include in header table
Post by: cbx040 on July 25, 2004, 12:22:49 PM
Hi,

I did this change for v1.31 and it works great.

In functions.inc.php I replaced

$template = fread(fopen($template_file, 'r'), filesize($template_file));

with

//$template = fread(fopen($template_file, 'r'), filesize($template_file));
ob_start();                     // Start output buffering
include ($template_file);       // Parsed file goes to buffer
$template = ob_get_contents();  // Assign buffer to $template
ob_end_clean();                 // Clear buffer and turn off output buffering

and in my template.html I have added

<?php include 'file.html'; ?>

I have .html defined aswell as .php in my .htaccess file

AddType application/x-httpd-php .html

Hope this helps to make things clear.