Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: Owdy on March 11, 2005, 01:47:23 PM

Title: SMF ssi to Coppermine
Post by: Owdy on March 11, 2005, 01:47:23 PM
Has anyone done this? Use smf SSI features in coppermine integration?
Title: Re: SMF ssi to Coppermine
Post by: kegobeer on March 11, 2005, 01:56:44 PM
Coppermine 1.3.2 shares common function names with SMF, especially the database connection functions, so it isn't possible to use SMF ssi calls.  In 1.4 we've added a unique prefix to our functions to prevent this from happening, but this version is still late-alpha.  Doesn't help you right now though.
Title: Re: SMF ssi to Coppermine
Post by: Owdy on March 11, 2005, 02:00:35 PM
Hmmm, too bad. I would like to include smf menu to coppermine.
Title: Re: SMF ssi to Coppermine
Post by: kegobeer on March 11, 2005, 02:49:44 PM
So would I.   ;D  That's why I renamed all of our functions when we started working on 1.4.

You could always rename Coppermine's database functions, and then go thru all the Coppermine files and rename the calls.  It's a lot of tedious work, but you'd be able to use SSI.
Title: Re: SMF ssi to Coppermine
Post by: Owdy on March 11, 2005, 02:57:34 PM
Any hints what to search? Just for menu.
Title: Re: SMF ssi to Coppermine
Post by: kegobeer on March 11, 2005, 07:27:01 PM
You'd need to change functions db_error, db_query and db_fetch_rowset in functions.inc.php (just prefix them with cpg_), then search thru all of the Coppermine files for those function calls and add the cpg_ prefix.

I don't remember exactly what files needed to be edited - I just used the XP search function for a "phrase in the file" and it found all the files.  I think most php editors support some sort of search function on all open files, so you could open a bunch and search that way if you don't have XP.

There might be one or two other functions that have the same name.  The easiest way to find those is to do a ssi include and see what error message you get.  ;)
Title: Re: SMF ssi to Coppermine
Post by: Owdy on March 14, 2005, 06:17:02 AM
http://coppermine.sourceforge.net/board/index.php?topic=15737.msg73719#msg73719