Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: PHP include in header table  (Read 5762 times)

0 Members and 1 Guest are viewing this topic.

BrokenRules

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
PHP include in header table
« 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  ??? ???
Logged

BrokenRules

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: PHP include in header table
« Reply #1 on: July 22, 2004, 01:53:25 am »

Logged

erroneus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: PHP include in header table
« Reply #2 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.
Logged

cbx040

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: PHP include in header table
« Reply #3 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.

Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.