WordPress and Coppermine Theme Integration (3 posts)

  1. cron
    Posted 9 years ago #

    I am currently trying to integrate my wordpress 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:

    include (TEMPLATEPATH . '/header.php');
    echo "{GALLERY}";
    include (TEMPLATEPATH . '/footer.php');

    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,


    P.S. I understand that this is more of a coppermine question than a wordpress question but I was hoping that some other wordpress user had tried this before and figured out how to get it to work.

  2. WarAxe
    Posted 9 years ago #

    Cron :: How did this go? I'm trying to do the same thing right now.

  3. The Dro
    Posted 9 years ago #

    You have to go into the INCLUDE folder in your Gallery directory and search for the file init.inc.php. In there you have to change the line:

    define('TEMPLATE_FILE', 'template.html');


    define('TEMPLATE_FILE', 'template.php');

    Then make sure your template.html in your coppermine templates folder is also renamed to template.php.

Topic Closed

This topic has been closed to new replies.

About this Topic