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: WP Theme Options in Coppermine  (Read 5798 times)

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
WP Theme Options in Coppermine
« on: June 29, 2014, 09:11:43 pm »

Is it possible for me to display theme options from wordpress in the photo gallery?

http://www.solidsnakelegacy.net/gallery
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: WP Theme Options in Coppermine
« Reply #1 on: June 29, 2014, 10:44:28 pm »

Can you explain in more detail as I am not quite sure what you are asking.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: WP Theme Options in Coppermine
« Reply #2 on: June 30, 2014, 01:49:39 am »

With Wordpress themes you can create an options file that it is setup like the coppermine admin.php file.   You can basically set it up for any kind of content.  I have mine set up for my various affiliates on my site so I don't have to adjust the code everytime I add a new one.  I tried using the custom header feature of coppermine, and created a special header and got this error message:

Fatal error: Cannot redeclare stripslashes_deep() (previously declared in /home/username/public_html/gallery/include/inspekt/cage.php:767) in /home/username/puplic_html/wp-includes/formatting.php on line 1581
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: WP Theme Options in Coppermine
« Reply #3 on: June 30, 2014, 01:58:32 pm »

I tried using the custom header feature of coppermine, and created a special header and got this error message:

Fatal error: Cannot redeclare stripslashes_deep() (previously declared in /home/username/public_html/gallery/include/inspekt/cage.php:767) in /home/username/puplic_html/wp-includes/formatting.php on line 1581
Please attach your custom header file to your next reply.

To answer your question: it may be possible with the theme engine, but it's probably easier to use the plugin engine or the custom header feature.
Logged

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: WP Theme Options in Coppermine
« Reply #4 on: June 30, 2014, 02:35:47 pm »

sorry put the wrong site in the start of the topic

I added the footer and header in a zip file
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: WP Theme Options in Coppermine
« Reply #5 on: July 01, 2014, 11:36:12 am »

I just had closer look at the error message and seems that Coppermine and WordPress both want to declare the function stripslashes_deep. You have the following options:
1. Rename one of the functions and all function calls in either Coppermine or WordPress
2. Compare both functions and if they don't differ, wrap the Coppermine function in if (!functions_exists('stripslashes_deep')) { ..... }
3. Don't include /home/username/public_html/wp-blog-header.php, but try to fetch the data somehow else
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: WP Theme Options in Coppermine
« Reply #6 on: July 01, 2014, 04:25:39 pm »

Looks like that function is part of "Inspekt"... If WP uses this as well, it won't be the only conflict...
Also appears the CPG version is being called first (previously declared in cpg...). So the 'if' logic would need to be in the WP file.

Cleaner might be to separate the affiliates data into its own file and then include just that (wrapped in whatever each program needs) in CPG and WP? (building on suggestion 3 from Andre.)
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.