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

Author Topic: Coppermine And Wordpress Theme Integration  (Read 3016 times)

0 Members and 1 Guest are viewing this topic.

Cron

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Coppermine And Wordpress Theme Integration
« on: January 17, 2006, 10:14:29 am »

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

Code: [Select]
<?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
Logged

iRob

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Coppermine And Wordpress Theme Integration
« Reply #1 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 15 queries.