Renameing template.html to php - Page 2 Renameing template.html to php - Page 2
 

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]

Main Menu

Renameing template.html to php

Started by NeoID, November 12, 2005, 03:21:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nibbler

If it contains static content then use

return file_get_contents('file');

If it contains php code then do

ob_start();
include('file');
return ob_get_clean();

NeoID

Thanks for the suggestion, but those two commands were the first one I tried and both gives me a blank (white) screen.  :(

Edit: When I put this into the theme.php

ob_start();
include('file');


...and this into the template.html

return ob_get_clean();

The content of the php shows up on the template fil, but the command wipes everything else..

Joachim Müller

why don't you post what file.php is suppossed to do instead?

NeoID

Quote from: GauGau on November 16, 2005, 12:00:50 AM
why don't you post what file.php is suppossed to do instead?

I want to include a php file(s) that allows me to get information from my phpbb forum. I've included two files (there are more)
that gives an example of what I mean. While the engine file connects to the forum, the newposts file shows the actual content.

Joachim Müller

The database connectors of phpbb and cpg will interfere, you can't do that. If you have bridged coppermine and phpbb already, you won't have to connect twice to phpbb. You simply can't include anything.