info on making a custom bridge file info on making a custom bridge file
 

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

info on making a custom bridge file

Started by snuggles, July 29, 2006, 11:28:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

snuggles

Hi :)
I'm working on a sort of internet movie database for horror and cult films, much like the imdb.com.
I've based my main code on the old torrentbits source code (a popular filesharing script for torrents, however I've removed all refrences to torrents and filesharing)

I have done much work on it, and have included coppermine as a place for movie posters, coverscans, and lobby cards. (with more plans for it in the future)

I have been using it as a seperate thing (within an iframe) and have been allowing non-registered users to upload images, but as the site grows, I see the need to bridge it's members directly with coppermine.

I've been scanning the board here looking for a solution, or information on how to make a custom bridge file, but to no avail.

I've looked at the user table in coppermine, and I'm familiar with php and sql, but I do not want to alter coppermine... (upgrades etc) I would rather bridge it.

could someone please point me in the right direction :)

thank you verry much, both for any information, and for a really great photo gallery!

cheers,
snuggles
http://www.hmdb.horrorcharnel.org/

Nibbler

We don't yet have any formal bridge documentation unfortunately. You'll need to take a look at the bridge files that already exist and modify one of the simpler ones to suit your system. Feel free to ask questions about the code though.

You seem to be using 1.3.3 however, and the bridge system is massively altered from 1.3 to 1.4. You really should update your gallery. I'll move your post to the 1.3 section to avoid confusion.

snuggles

Hi,
thanks, actually I have installed 1.4 and was hoping to bridge that, I do have  1.3  up and running, but wanted to leave that one "as is" untill I get the bridge working with my forums/site.

also I read here that to avoid confusion the coppermine gallery should be installed in folder in the same directory as the forums to be bridged with, and at the moment my 1.3 is not, but the 1.4 is :)

could you suggest a simple bridge file that I should start with?

thanks again,
cheers,
snuggles

Nibbler

Quote from: snuggles on July 30, 2006, 05:39:42 PM
also I read here that to avoid confusion the coppermine gallery should be installed in folder in the same directory as the forums to be bridged with, and at the moment my 1.3 is not, but the 1.4 is :)

That would make things more confusing, please don't do that.

Quote from: snuggles on July 30, 2006, 05:39:42 PM
could you suggest a simple bridge file that I should start with?

Simplest bridge is punbb115

snuggles

Thanks :)

now I have another question, I've installed coppermine 1.4 and have it using the same DB as my board already, so I assume that there is no need to set any "// Database connection settings", as it's already connected to it.

so my guess is that I just have to define the table field names in this part:
$this->field = array(
         'username' => 'username', // name of 'username' field in users table
         'user_id' => 'id', // name of 'id' field in users table
         'password' => 'password', // name of 'password' field in users table
         'email' => 'email', // name of 'email' field in users table
         'regdate' => 'registered', // name of 'registered' field in users table
      );

but how do I keep the same DB settings as the default in bridge?

cheers, and sorry for the stupid questions,
snuggles

Joachim Müller

Don't use cpg1.4.2, as it's 6 versions out of date. Use the most recent stable cpg1.4.8 - upgrade now.

Nibbler

You should specify the db details, since Coppermine needs to determine whether or not to open a new database connection. You don't need to put the password in though.

Quote from: snuggles on July 30, 2006, 10:39:46 PM
but how do I keep the same DB settings as the default in bridge?,

I don't know what that means. You should enter the field names of the users table of your software so that Coppermine can read user account details from it.

snuggles

ok, perhaps I'm not being specific enough.
I am using cpg1.4.8
I have used the same database for coppermine that my forums use, so coppermine is allready connected to my database.

coppermines users table is called "cpg148_users" my forums users table is called "users" (in the same DB)

but I can't seem to get the bridge connected to my database...

I have tried this:
                       // URL of site
         $this->boardurl = 'http://hmdb.horrorcharnel.org';

         // local path to config file
         require_once('../include/bittorrent.php');

      } else { // the vars from the bridgemgr
         $this->boardurl = $BRIDGE['full_forum_url'];
         require_once($BRIDGE['relative_path_to_config_file'] . '../include/bittorrent.php');
                      //require_once($BRIDGE['relative_path_to_config_file'] . 'bittorrent.php'); // tried this too
         $this->use_post_based_groups = $BRIDGE['use_post_based_groups'];
      }
      
      $this->multigroups = 0;
      $this->group_overrride = 0;
      
      // Database connection settings
      $this->db = array(
         'horrorcharnel_org_-_hmdb' => $db_name,
         'localhost' => $db_host,
         //'**********' => $db_username, // tried with and without
         //'*******' => $db_password,       // tried with and without
         '' =>$db_prefix                             // I have no DB prefix
      );

and several variations on that.

I think if I can get it to "connect to UDB database !" then I can figure out the rest, but that's what I'm finding hard ???

sorry if it's a stupid question, I love the gallery, and look forward to working it out :)

cheers,
snuggles

Nibbler

You are editing the wrong parts of the code. You need to know php to be able to make a bridge file.


// Database connection settings

$this->db = array(
'name' =>'database name goes here',
'host' =>'localhost',
'user' => 'database user goes here',
'password' =>'',
'prefix' => 'db prefx goes here'
);