forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Cailean on August 24, 2004, 02:50:08 am

Title: Embedding into existing site with PHP includes in template.html
Post by: Cailean on August 24, 2004, 02:50:08 am
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?
Title: Re: Embedding into existing site with PHP includes in template.html
Post by: kegobeer on August 24, 2004, 02:51:24 am
Have you searched thru the forums yet?  I remember this being discussed before.
Title: Re: Embedding into existing site with PHP includes in template.html
Post by: Cailean on August 24, 2004, 03:25:45 am
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...
Title: Re: Embedding into existing site with PHP includes in template.html
Post by: Joachim Müller on August 24, 2004, 10:28:35 am
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