Plugin to re-refrence coppermine functions Plugin to re-refrence coppermine functions
 

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]

Main Menu

Plugin to re-refrence coppermine functions

Started by Cron, January 18, 2006, 01:31:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cron

After installing Coppermine Gallery  I get this error message :

Fatal error: Cannot redeclare load_template() (previously declared in /home/zaeatco/public_html/tokyocrew51/gallery/include/functions.inc.php:653) in /home/zaeatco/public_html/tokyocrew51/wp-includes/functions.php on line 2085

Does anyone have any sugestions? I know that wordpress and coppermine both have a function called load_template() and that they are intefering with each other. After extensive testing I have found 3 such functions --> load_template(), make_clickable() and get_setings().

I have tried putting cmg_ in front of the coppermine ones and wp_ in front of the wordpress ones but they are refrenced in a ton of diffrent files and I am afraid that this will ruin future proofing.

Is there any way I could use a plugin to automaticly put cmg_ in front of all the coppermine functions. That way it will automaticly re-refrence all the calls to that function and I can dissable it whenever I want.

Is this posible? Your input is greatly appreciated,

Cron

Joachim Müller

you can't embedd coppermine using php includes. It doesn't work that way.

Cron

Thanks for the reply however I think you mis-understood what I am trying to do. I am not trying to embed coppermine in another page, rather I am trying to uses PHP include to include common items (such as menus) all through my site INCLUDING coppermine. So I am planning on putting the includes in my "template.php" file.

Sorry for not making that clearer, thanks for your time.

Joachim Müller

Coppermine doesn't conatin a file named template.php, so I guess you're refering to another page/script that has a file with that particular name. If this file/app is trying to include coppermine, then my answer does apply: you can't do that.
If it's the other way round and you refered to coppermine/themes/yourtheme/template.html (meaning that you just made a typo), then the answer is: you mustn't set up template.html to parse PHP, but you should apply the custom header and footer stuff available as an option in coppermine's config. Using this technique, you can't manipulate headers nor the <head> section, but only add dynamic html markup to the <body> section of a coppermine page. This way, you can include a custom php script into coppermine, but not any script: it has to meet certain criteria.

If you actually want a detailed answer, you should post more details first.