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 [2]   Go Down

Author Topic: Renameing template.html to php  (Read 11465 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Re: Renameing template.html to php
« Reply #20 on: November 15, 2005, 03:26:13 pm »

If it contains static content then use

Code: [Select]
return file_get_contents('file');
If it contains php code then do

Code: [Select]
ob_start();
include('file');
return ob_get_clean();
Logged

NeoID

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: Renameing template.html to php
« Reply #21 on: November 15, 2005, 09:28:35 pm »

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

Code: [Select]
ob_start();
include('file');

...and this into the template.html

Code: [Select]
return ob_get_clean();
The content of the php shows up on the template fil, but the command wipes everything else..
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Renameing template.html to php
« Reply #22 on: November 16, 2005, 12:00:50 am »

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

NeoID

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: Renameing template.html to php
« Reply #23 on: November 16, 2005, 06:39:41 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Renameing template.html to php
« Reply #24 on: November 16, 2005, 06:53:15 pm »

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.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.019 seconds with 19 queries.