forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: SolidSnake2003 on June 29, 2014, 09:11:43 pm

Title: WP Theme Options in Coppermine
Post by: SolidSnake2003 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
Title: Re: WP Theme Options in Coppermine
Post by: phill104 on June 29, 2014, 10:44:28 pm
Can you explain in more detail as I am not quite sure what you are asking.
Title: Re: WP Theme Options in Coppermine
Post by: SolidSnake2003 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
Title: Re: WP Theme Options in Coppermine
Post by: Αndré 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.
Title: Re: WP Theme Options in Coppermine
Post by: SolidSnake2003 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
Title: Re: WP Theme Options in Coppermine
Post by: Αndré 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
Title: Re: WP Theme Options in Coppermine
Post by: gmc 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.)