Subs.php problem with SMF Bridging Subs.php problem with SMF Bridging
 

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

Main Menu

Subs.php problem with SMF Bridging

Started by Avinash, July 27, 2006, 09:48:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Avinash

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

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

Nibbler

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


function latex_content($foo){
    return $foo;
}

Avinash

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?

Nibbler

If you want to try to code yourself a fix then yes, otherwise add the dummy function and forget about it.

Avinash

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

Nibbler

Add the dummy function into the bridge file in Coppermine, not into Subs.php

Avinash

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?


Avinash

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!