What I do for mail can easily be expanded to provide messaging.  Because
of legacy issues with the mail action (took too long) I queue messages
into a database and use a cron job  to remove them from the queue and
send them.  You could likewise queue messages and check the queue on
login.



Since messages could have multiple recipients, I split the system into
two tables:

messages.id
messages.sender (foreign key to your users table)
message.subject
messages.q_timestamp
messages.text
messages.retain (enumerated yes/no)

recipients.id
recipients.address (foreign key to your users table) -- in my case it's
the email address
recipients.q_timestamp
recipients.sent_timestamp
recipients.status (enumerated sent/pending -- in your case read/pending)
recipients.retain (enumerated yes/no)
recipients.messages_id (foreign key to the messages table)

Creating a message is straightforward.  My cron job, checks for a pending
recipient.  If one is present, the corresponding message is sent via an
email action.  Then the recipient row is updated/or deleted based on the
retain column.  If no recipients are present, then I delete all messages
that are not to be retained.

At login, you would just select all unread messages matching the login.
If not null, turn on the message waiting indicator, linked to
read_message.taf.  This selects all messages for the user, sorted by
timestamp, and shows the status, read or not read.




>Off topic and one that I am not for sure is possible.
>
>Fiirst off haven�t posted in a while, but still enjoy this great list!
>Secondly, the question.
>
>I have a users portal that is pretty nice. It contains a lot of different
>data from many different tables. I want to include in my user portal the
>abiliity to leave a user a message.  That is, when the user logs in and
>authenticates, they will see if anyone has left them a message.  I don�t
>want to use email, I don�t want to sue forums.
>
>Has anyone had this situation or has anyone ever seen a taf that would do
>this? Maybe just leave a message for another user that populates a database
>and then it shows until a paramter is met and then it shows Inactive?
>
>Any help or suggestions are appreciated.
>Thanks
>Steve
>
>
>
>________________________________________________________________________
>TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


Bill Conlon

To the Point
345 California Avenue Suite 2
Palo Alto, CA 94306

office: 650.327.2175
fax:    650.329.8335
mobile: 650.906.9929
e-mail: mailto:[EMAIL PROTECTED]
web:    http://www.tothept.com


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to