Embedding into existing site with PHP includes in template.html Embedding into existing site with PHP includes in template.html
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Embedding into existing site with PHP includes in template.html

Started by Cailean, August 24, 2004, 02:50:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cailean

My site uses php includes and CSS to build the header, navbar, and footer.  I would like my CPG to share these elements.  I tried to change template.html to a .php file (changing the reference also in init.inc.php) but then discovered that CPG parses template.html before serving it.

Is there a way to have CPG run templete.php (with includes, etc.) and then parse that for layout?

kegobeer

Have you searched thru the forums yet?  I remember this being discussed before.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Cailean

Yes, I have searched....  again...

Alright, so forget template.html....   focussing now on theme.php...  I tried the FAQ suggestion of editing the pageheader function but get a parse error on lthe line that contains: static $custom_header = ob_get_contents();  The error reads: Parse error: parse error, unexpected '(', expecting ',' or ';' in /.../theme.php on line 822

None of the other solutions seemed to meet my needs...

I found a few promising references to this thread: http://forum.coppermine-gallery.net/index.php?topic=2988.0 but it appears to be unavailable...

Joachim Müller

the thread is longer available, it's ID has changed. Can't tell you by heart where it is now, but searching will definitely help, search for "custom header" or "custom footer". There is as well a mod that let's you add php to your template.html (you will have to search again).

GauGau