Gossamer Forum
Home : Products : Gossamer Links : Discussions :

internal message system

Quote Reply
internal message system
hello, is there a mod to create an internal message system for registered users, like this forum have.
or how to create such things.


Quote Reply
Re: internal message system In reply to
It would not be that hard...

All you would have to do is create another table called something like Messages, which should include the following columns/fields:

Code:

MessageID
SenderID
RecipientID
Subject
Body


The SenderID should be the UserID pulled from the $USER{'UserID'} variable when the user wanting to send the message is logged in. Then the RecipientID is the recipient's ID number, which can be pulled by creating a link like the following:

Code:

<a href="<%build_message_url%>?UserID=<%UserID%>">Send Private Message</a>


The connection between the Users table and Messages table would be a M<->M connection, meaning that many users can send and receive many messages.

Of course, you could create an intersection table like User_Messages with the following concantenated foreign keys:

Code:

MessageID
UserID


But in terms of database design, you could simply carry over the UserIDs as foreign keys from the Users table.

Then use similar codes in the add.cgi and modify.cgi to add/modify private messages. Rather than adding records into the Links table, you would add/modify the Messages table.

Of course, the easier solution would be to install WWWThreads and install the WWWThreads Authentication Plug-in.

Regards,

Eliot Lee
Quote Reply
Re: internal message system In reply to
hehe or vbulletin (when a 2.0 auth module is made), the private messaging is sooo good with vbulletin.

http://www.ASciFi.com/ - The Science Fiction Portal