forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: Avinash on July 27, 2006, 09:48:38 pm

Title: Subs.php problem with SMF Bridging
Post by: Avinash on July 27, 2006, 09:48:38 pm
I have Coppermine Bridged to SimpleMachines Forum, and it was working perfectly fine. I'm using the latest version of coppermine 1.4.8 I believe. I recently installed latex rendering on my site, which required me to add two lines to my Subs.php file in /smf/Sources. Now when I go to the coppermine gallery, I receive this error: Fatal error: Call to undefined function: latex_content() in /home/*****/public_html/smf/Sources/Subs.php on line 962.

This is the line I added to my Subs.php

Code: [Select]
// LATEX
include_once('Sources/latex/latex.php');
$message = latex_content($message);

The line that reads $message = latex_content($message); is line 962 if you were wondering. I want to know why I get this strange error with coppermine, but everything else works fine. I bet its a simple php syntax mistake that I'm making. Please help.
Title: Re: Subs.php problem with SMF Bridging
Post by: Nibbler on July 27, 2006, 09:58:40 pm
You can either locate the file that contains the function latex_content() and include() it into your bridge file or add a dummy function into the bridge file, like

Code: [Select]
function latex_content($foo){
    return $foo;
}
Title: Re: Subs.php problem with SMF Bridging
Post by: Avinash on July 27, 2006, 10:18:02 pm
Thanks for the reply. The line above it says: include_once('Sources/latex/latex.php'); . That file latex.php contains the function latex_content() . Does that make a difference?
Title: Re: Subs.php problem with SMF Bridging
Post by: Nibbler on July 27, 2006, 10:27:56 pm
If you want to try to code yourself a fix then yes, otherwise add the dummy function and forget about it.
Title: Re: Subs.php problem with SMF Bridging
Post by: Avinash on July 27, 2006, 10:32:43 pm
Okay, I added the fuction, and now my main SMF page gives:
Fatal error: Cannot redeclare latex_content() (previously declared in /home/*****/public_html/smf/Sources/latex/latex.php:38) in /home/****/public_html/smf/Sources/Subs.php on line 962
Title: Re: Subs.php problem with SMF Bridging
Post by: Nibbler on July 27, 2006, 10:34:27 pm
Add the dummy function into the bridge file in Coppermine, not into Subs.php
Title: Re: Subs.php problem with SMF Bridging
Post by: Avinash on July 27, 2006, 10:35:24 pm
Where's the bridge file located. I used the bridge wizard. I'm guessing /coppermine/bridge/smf10.inc.php . And does it matter where I add it in the file?
Title: Re: Subs.php problem with SMF Bridging
Post by: Nibbler on July 27, 2006, 10:36:25 pm
Yup.
Title: Re: Subs.php problem with SMF Bridging
Post by: Avinash on July 27, 2006, 10:38:45 pm
I added it at the end of the bridge file, and it works! THANKS SO MUCH FOR YOUR HELP. I can't explain how much time that saved me :D You rock!