Gossamer Forum
Home : Products : DBMan : Customization :

Global Messaging

Quote Reply
Global Messaging
Ok now here is a totally werid one, and if anyone wants to help, please do, im having problems.

I want to have a global message. Write the message to a txt file, from a web based form, assinged a number. When users log in, or use anything in the footer, if there is a message they have not seen, it will appear on its own page, then with a button, confirm with a button, that moves on to the actual action they requested.

Any ideas? Im still new to Perl, but am learning fast, and am working on this....thanks.

Quote Reply
Re: Global Messaging In reply to
The first problem is keeping track of the messages the user hasn't seen. It would mean maintaining a file for each user with all of the message numbers in it.

Then, whatever they clicked, the database would have to pull in the message list, compare it to the user's file and print whatever message(s) he/she had not yet seen. At the same time, it would have to keep track of what the user wanted to do.

When they clicked the "I've read it" button, the script would then write the id of the message to the user's file and then go on to do what it was supposed to do.

Aside from the monumental task of writing this, it would slow down the functioning of your database a lot.

I think a better way of doing this (although it would still be a pain to write) would be to have the messages come up on the DBMan home page. The user would log in and the script would open the user's file and open the message file and compare the two. Messages would then be displayed on the home page and the ids of the messages would be written to the user's file.

JPD
http://www.jpdeni.com/dbman/