coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Cron on January 17, 2006, 10:14:29 AM

Title: Coppermine And Wordpress Theme Integration
Post by: Cron on January 17, 2006, 10:14:29 AM
I am currently trying to integrate my wordpress (http://www.wordpress.org (http://www.wordpress.org)) and Coppermine themeing schemes into one. This way if I ever change to the look of my blog Coppermine will automatically mimic the change.  What I would like is for Coppermine to look at my wordpress theme files and then to automatically add in the {GALLERY} code in the place where content would go. To do this I tried to put the following code into my Coppermine template:


<?php
require('wp-blog-header.php');
include (
TEMPLATEPATH '/header.php');
echo 
"{GALLERY}";
include (
TEMPLATEPATH '/footer.php');
?>



(For those of you who do not know wordpress the first line links to a document that defines the TEMPLATEPATH command and the second and fourth lines reference my theme files, quite self explanatory I know...)

However I have run in to two problems in doing this. The first problem was that the main template file is a HTML file not a PHP file. I tried renaming it to template.php but I got an error saying Coppermine could not find the file. To work around this I used the {CUSTOM_HEADER} and {CUSTOM_FOOTER} commands to reference two PHP files. However when I did this none of the {TITLE} or other such commands worked any more.

So my two questions are thus, first is there any workaround that enables you to use a "template.php" file instead of a "template.html" file? And secondly, how can I get the  {TITLE}(and other) Coppermine commands to work in custom header templates?

I am new to Coppermine and I would really appreciate any help you guys can give me. I am comfortable with PHP and am willing to try anything even if there is a risk of totally screwing up my gallery.

Thanks for all the help,

Cron
http://tokyocrew51.zaeat.com (http://tokyocrew51.zaeat.com)
Title: Re: Coppermine And Wordpress Theme Integration
Post by: iRob on February 12, 2006, 03:27:27 AM
I'm very keenly interested in this as well!  I'd love to just embed my CPG gallery inside a WP page and be done with it.  That way, I'm not hand editing two different themes (one WP and the second CPG).

Keep us up to date if you succeed.