Gossamer Forum
Home : Products : DBMan : Customization :

DBMAN and phpBB2 integration

Quote Reply
DBMAN and phpBB2 integration
First off, I've been searching the net, forums and every thing I can think of going bloodshot...

I've got DBMAN installed and just recently added a phpBB. Got my http://www.izmirhigh.com/phpBB2/izmir.php website integrated w/one login for the main site and phpBB. Now I'm trying to further integrate DBMAN into this same one login. K, can't be done from what I've read so far, but I just happened upon http://www.phpbb.com/...egration&start=0. Does gcrocker's code make any sense to you guru's? Specifically, is it worth me tearing apart DBMAN to give it a whirl ... or, it can't be done?
Webmaster
http://www.izmirhigh.com/
Quote Reply
Re: [joebagodonuts] DBMAN and phpBB2 integration In reply to
php in general uses MySQL databases, from what I've seen. You might have more luck integrating the MySQL version of DBMan with something that uses php.

Let me put it this way.... It's nothing that I would want to begin to attempt. :-)


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] DBMAN and phpBB2 integration In reply to
Y I asked. Thx 4 the reply Wink
Webmaster
http://www.izmirhigh.com/
Quote Reply
dbman & webapp integration In reply to
I'm back ... to perl integration -v- php. Happened upon webApp, a flat file perl portal. So ... can dbman & webapp be integrated. Changed my site to http://www.izmirhigh.com if you want to have a peek at what I'm starting with.
Webmaster
http://www.izmirhigh.com/
Quote Reply
Re: [joebagodonuts] dbman & webapp integration In reply to
Your portal is written in Perl, so it's theoretically possible to use the same logins for DBMan and the Portal. Two things would have to be the same -- the structure of the user files, and the way that sessions are defined. It's almost certain that both would have to be changed in one of the programs to match the other one.

It would be quite an undertaking. Creating a bridge between two programs ain't for the fainthearted. :)


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] dbman & webapp integration In reply to
Agreed. Below is in my terms, what I sent to the admin over there. Am I on target?

Quote:
My database is DBMan, a flat file Perl database. Thing is, DBMan's default.db holds all the delimited user info (left to right on one line) in one file. From what I can see in webApp, each user gets their own user.dat file (delimited top to bottom) under the members directory. To that each has their own definitions.

There's got to be a way, albeit an undertaking! Admin at webApp commented interesting as she had been thinking about integrating some sort of database in her webApp project anyway ... I'm still waiting to see if she wants to take it on.

All said, I'm not asking yall to do the work for me, just help me get this integration thing out of my head ............. if it can't be done.
Webmaster
http://www.izmirhigh.com/
Quote Reply
Re: [joebagodonuts] dbman & webapp integration In reply to
That's at least part of it. The other part is the session data -- the files that are saved to the auth directory when someone logs in. Or whatever the session data is for the portal.

It could be done, definitely, and even more likely if the developer of webApp is interested in working in a database. Since she's already familiar with how webApp works, it ought not be too difficult for her to figure out how DBMan works. If she has any questions, I'd be happy to help as much as I can.

Or did you want me to talk you out of it? ;)


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] dbman & webapp integration In reply to
Been trying to get this integration booger off my finger for a least a couple years now. I know I'm getting closer ... Cool
Webmaster
http://www.izmirhigh.com/
Quote Reply
Re: [joebagodonuts] dbman & webapp integration In reply to
JPD,

Trying to learn and do here, so bear with me ...

DBMan uses default.cfg where it outlines paths and defs; webapp uses config.pl to outline a path to config.dat and uses config.dat to show the defs?

DBMan uses default.db as a pipe delimited text file outlining ALL users in one file, while webapp creates a user.dat tab separated file for each user?

There's (currently) 717 rows filling up 20 fields in my DBMan default.db while webapp has 145 fields taking up 2 columns in config.dat. Being simplistic I would have to script a way to open default.db and sum 20 fields to the existing 145 fields in config.dat. Then somehow/someway create 700+ user.dat files pulling from 165 fields in config.dat?

Then, if an alumni were to update their database information...it would also update their user.dat file?

Below is a SQL way. I have phymyAdmin and "think" I can create a table to do this, but then how much work would their be to call from my flat file database?

Code:
#!/usr/local/bin/perl
use DBI;

#These are the configuration variables
$host ="host on which mysql is running";
$uname = "database user";
$pword = "user password pass";
$dbase = "database name";

#Connect to the database
$dbh = DBI->connect("DBI:mysql:database=$dbase;host=$host","$uname","$pword");

#Open the file that has the data and loop thru the file getting the data
open (FILE,'/path/to/tab delimited/textfile');
while (<FILE>) {
($field1,$field2)=split (/\t/,$line);
$sql = "INSERT into tbl_name ........"
$result=$dbh->prepare($sql);
$result->execute();
}
Webmaster
http://www.izmirhigh.com/
Quote Reply
Re: [joebagodonuts] dbman & webapp integration In reply to
I don't know how webApp is set up. I've never looked at the files. But I can tell you about DBMan.

Quote:

DBMan uses default.db as a pipe delimited text file outlining ALL users in one file,

Sorta. Actually, DBMan uses the password file (default.pass) for the users. The .db file is for the records. The .pass file is set up as

username:encrypted password:view permission:add permission:delete permission:modify permission:admin permission

If you've added the lookup mod, there is also the email address. Notice that this file uses a : to define the fields.

It is the password file that you need to coordinate first with webApp so that your users can log in just once and be able to access both your forum and your database.

Your .db file is further information about the user, which is the sort of thing that is stored in profile of a message board.

I'm not exactly sure what you want to do. At first I thought that you were going to use DBMan to store the profiles of your users. But it seems that webApp already has a profile and what you really want to do is copy the information from the fields into the files that webApp uses.

I'm really not sure how to answer your questions until I know where you're heading. I'm a bit dense these days. :)


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] dbman & webapp integration In reply to
I apologize JPD. Simply put I want one day for webApp to have 1 user, the next 717. I gave her a link to this post, hopefully the 2 of you, who speak the same perl language, can tell me what needs to happen. Sorry for the confusion.
Webmaster
http://www.izmirhigh.com/