Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Plugin to re-refrence coppermine functions  (Read 3107 times)

0 Members and 1 Guest are viewing this topic.

Cron

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Plugin to re-refrence coppermine functions
« on: January 18, 2006, 01:31:48 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Plugin to re-refrence coppermine functions
« Reply #1 on: January 18, 2006, 11:21:23 pm »

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

Cron

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Plugin to re-refrence coppermine functions
« Reply #2 on: January 19, 2006, 10:40:45 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Plugin to re-refrence coppermine functions
« Reply #3 on: January 19, 2006, 06:10:49 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.