Gossamer Forum
Home : Products : DBMan : Customization :

Instant Messaging

Quote Reply
Instant Messaging
I have a personals site set up with the private email mod working great but I would like to add an instant messaging feature.

Ultimately I would like to give the user who has a profile in the system the ability to have their own mailbox according to user id. A second user that views their profile would be presented with a link as part of the page if they want to send an instant message. (like the private email works now) When the first user logs in they would get a mailbox link that would have either a "new mail" or just a regular mail-type icon and have the ability to access messages and view,reply or delete them.

Is this easy to do or am I asking for the world?

Thanks in advance Smile

Cher
Quote Reply
Re: Instant Messaging In reply to
There is a feature like this with the Matchmate Mod referenced in the resource center.

You may be able to remove the appropriate coding from that mod and use it within your database. I think most of that feature uses external .cgi files to run the message system.

Check it out, you may get some ideas, if the mod is still available.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Instant Messaging In reply to
Unfortunately the URL isn't active anymore. I wonder if it would as simple as adding an additional database to manage mail? Or maybe using some of the features of Gossamer Mail? What do you think?

Cher
Quote Reply
Re: Instant Messaging In reply to
Cher:

I sent you the .zip file in an email message.



Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Instant Messaging In reply to
LoisC, I was following this thread closely because I want to do exactly what chronisca asked about.

May you please send me the zip file too. And, do I need to be thorouhly familar with cgi scripting to install this MOD. I ask because you mentioned the following in your previous post:
In Reply To:
You may be able to remove the appropriate coding from that mod and use it within your database.
Thanks.

Quote Reply
Re: Instant Messaging In reply to
Thanks a bunch! I'll check it out and let you know the results!

Cher
Quote Reply
Re: Instant Messaging In reply to
Hello,

Where can we find this matchmate MOD?
It would be interesting to see how this works.

Thanks!

Quote Reply
Re: Instant Messaging In reply to
Hi Lois,

I tried the Matchmaker Mod but the system I developed myself using the various mods that are available through the resources section enabled me to build a much better solution.

I do have an Instant Messenger program that seems to work okay but it is not a DBMan mod. I might just see if I can adapt it to use the pass file. If I can then it would be perfect.

Anyway, thanks for you help and if I can get it to work I will publish it for all...

Cher
Quote Reply
Re: Instant Messaging In reply to
if your current solution does not work out exactly as you wanted, i recommend using the program Web-b-mail.
it can be located at http://www.tesol.net/scripts/ I made a mod that uses this and allows my dbman users to talk. Although i don't use dbman and i just modded parts of it into links 2, it should still work with a full dbman. if you want to see how i did it, its here.
http://lookhard.hypermart.net/...Look/admin/admin.cgi Just login with one of the names and on the side you'll see private messages and send private messages. Check it out.

Quote Reply
Re: Instant Messaging In reply to
Thanks! This is exactly what I am looking for!!! Hope you don't mind if I pick your brain as I add it to my site Smile



Cher
Quote Reply
Re: Instant Messaging In reply to
no, go right ahead.

Quote Reply
Re: Instant Messaging In reply to
Bmxer:

That is pretty slick, it would be nice to get this integrated with DBMan also.


Chronisca:

Could you please keep notes as you integrate it into DBMan and then provide the instructions for others?
I'll post a link to it in the FAQ and you may also want to add it to the Resource Center.

Thanks,

Lois

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Instant Messaging In reply to
poniterman:

It would involve looking through the whole matchmate script and taking out portions of the coding to work in your database. You may have better luck following the new idea being discussed. If you still want a copy of Matchmate, please send me a private message with your email, and I'll send you a copy.


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Instant Messaging In reply to
Thanks LoisC, of course its not exactly how i would want it since its a 3rd party script but oh well.
Chronisca,
Since, i really didn't have to change much to put this in, i'll gladly help you. Although, the profiles part that you may see on my admin is not part of web-b-mail. And putting that in would involve changing the database. I had to make that part myself. I always go off topic. Anyway, just letting you know i'll help if needed.

Quote Reply
Re: Instant Messaging In reply to
That's okay...I'll try to integrate it into what I have done already. Ideally I am trying to create a totally confidential personals site so if I can do this it would be great. If all else fails though I can simple use the private email mod I have already added.

Cher
Quote Reply
Re: Instant Messaging In reply to
No problem...cross your fingers Smile

Cher
Quote Reply
Re: Instant Messaging In reply to
I'm also working on integrating web-b-mail into my DB Man. I want the users mailbox and account to be created seamlessly at same time as s/he creates the DB Man account.

Would the best way to be to integrate the web-b-mail.cgi into db.cgi? Any suggestions?

A more messy solution I guess would be to trigger both cgi's at the sign up process, but like I said... probably pretty messy.

Thanks! :)

Quote Reply
Re: Instant Messaging In reply to
No, the way i did it is like this:
I might have the file names wrong as since its a Links file name but bare with me:

in db.cgi in the - sub signup
after
Code:
print PASS "$in{'new_username'}:$encrypted:$in{'per_view'}:$in{'per_add'}:$in{'per_del'}:$in{'per_mod'}:$in{'per_admin'}\n";

close PASS;
put
Code:
system("mkdir -p /path/to/your/cgi-bin/admin/mail/mailboxes/$in{'userid'}");
So when someone signs up, the folder will be created then.
If you already have web-b-mail reading the dbman password file, then you don't have to worry about that part. Now lets say the admin adds a user: Still in db.cgi-
In the first section of sub admin_display
in the
Code:
$in{'new_username'} and do {
part, go down and find :

Code:
$message = "User: $in{'new_username'} created.";
under it put:
Code:
system("mkdir -p /path/to/your/cgi-bin/admin/mail/mailboxes/$in{'new_username'}");
That should work. I also added a part in db.cgi so when a user is deleted by the admin, it will delete all of his messages and delete his folder, try this:
in sub admin_display in the section that begins with
Code:
$in{'delete'} and do {
find the close PASS; right above
Code:
$found ?
$message = "User: $in{'username'} deleted.") :
($message = "Unable to find userid: $in{'username'} in password file.");
now under that specific close PASS;

put :
Code:
unlink </path/to/your/cgi-bin/admin/mail/mailboxes/$in{'username'}/message*>;

rmdir ("/path/to/your/cgi-bin/admin/mail/mailboxes/$in{'username'}");
That should be pretty much it for adding the mailbox to web-b-mail for dbman users.

Quote Reply
Re: Instant Messaging In reply to
Thanks!!

Thats really cool. What I want is to truly integrate it into db man. Do you suggest inserting the whole web-b-mail.cgi into dbman.cgi? is that a good idea?

The benefits would be that I then could keep the session going and also grab values from db man fields easily.

Cheers :)

Quote Reply
Re: Instant Messaging In reply to
I don't know. Its up to you if you would want to integrate it into dbman. I can't really help you since i didn't do it that way, and wouldn't want to. The web-b-mail file is over 60 KB's worth of info, and db.cgi unedited is about 47 Kb's. I would not want to have to upload that much if i make one little change. This way if i change something to the mail part, i don't have to upload the whole db.cgi. Anyway, i'm sure you could make web-b-mail accept only the people with sessions, since you can pass the user session field to it through the browser. But like i said i am not really thinking this is that great of an idea. Anyway, if you did insert the whole web-b-mail.cgi into db.cgi, it would not keep sessions alive unless you come up with the code to do it, which can be done in web-b-mail w/o integration, and you can pass fields by simply requiring the dbman files in web-b-mail.cgi
Quote Reply
Re: Instant Messaging In reply to
Good points... At the moment I am opening a new window - overriding the "check password" routine and sending the loginname as a hidden field. This works good and lets the user seamlessly log in.

What I need to be able to do is to also pass on a "send to" value form db man, so that in the sendmessage mode it automatically sets the sendto field to a value I have grabbed from DB Man before opening that new window.

How can this be done?

Thanks!! :)

Quote Reply
Re: Instant Messaging In reply to
Got it! It was a typo.....

:)

Quote Reply
Re: Instant Messaging In reply to
Hi again... I have now wisely started using the secure(r) solution and run my web-b-mail script under a scgi-bin directory. It runs fine and is unaccessible from outside.

The problem I face now however, is that DB Man .cgi (which is under my cgi-bin dir) arent able to create new subdirs in the sub signup process anymore... I guess it simply doesnt have permissions for it. Do you know how (if) this could be fixed?

Many thanks!! :)