Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Pop-up status window

Quote Reply
Pop-up status window
I have put together a simple extension for creating a pop-up status window for your GM users. The status window can check a GM email account at some predetermined interval and tell users when they have new mail. It also allows them to login when they do have mail.

Requires PHP, but could easily be modified as a perl script.

If you want to see how to set it up visit:
http://www.seaturtle.org/junk/mailcheck.shtml

Let me know if you have any comments, questions or suggestions.


Michael Coyne
seaturtle.org
Quote Reply
Re: Pop-up status window In reply to
Hi,

Once the user has the status window open, can they log out of GM and leave it open to check their mail? Or does their session end when they log out of the GM system?

Cheers,
R.


Quote Reply
Re: Pop-up status window In reply to
The status window operates independently, like a mini-GM with limited information. So they can log out and/or close the main window.


Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window In reply to
I've made some minor updates to this script if anyone out there uses it.

http://www.seaturtle.org/junk/mailcheck.shtml
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window In reply to
Hi,

It just doesn't work in my case....

It always shows following:

No new messages.
since last login


although there are unread messages . Any suggestions?

Thnx

Anup


=_= =_= =_= =_= =_= =_=


You can chain me, you can torture me, you can even destroy this body, but you will never imprison my mind.
-Mahatma Gandhi

Last edited by:

anup123: Oct 6, 2002, 5:50 PM
Quote Reply
Re: [anup123] Pop-up status window In reply to
Do you see anything else in the window or just that?

Also, try leaving the status window open for a while (ie until you receive new mail) and see what it does. It check for new mail since you last logged in.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window In reply to
Hi,

The refresh takes place but the new messages are never reflected in the pop up window.

Next what I did was removed the UNIX_TIMESTAMP(msgs_sent)>user_last_login from the query

and the total unread messages was shown in the POP up window.

Any clues?

Thnx

Anup
Quote Reply
Re: [mcoyne] Pop-up status window In reply to
Hi,

Tried executing the query as follows from the command prompt:

SELECT COUNT(*), password FROM webmail_msgtrack,webmail_msgs, webmail_users WHERE msgtrack_mid = msgs_mid AND userid = msgtrack_userid AND UNIX_TIMESTAMP(msgs_sent) > users_last_login AND email = 'mymail@domain.com' AND msgtrack_status = 'New' GROUP BY email;


Result: Empty set (0.00 sec)

There is a New Message (not unread message) though but the query does not reflect that.

Any Suggestions

Thnx

Anup

Anup
Quote Reply
Re: [anup123] Pop-up status window In reply to
I believe the "New" in msgtrack_status means "unread". Once a message is read it is not "New" anymore. So the message must be unread and have arrived since your last login for it to be counted. If you take out the UNIX_TIMESTAMP part it will tell you how many total unread messages you have.

I promise you that this works Smile perhaps not as you expect. I have been using it for a long time now.
Michael Coyne
seaturtle.org
Quote Reply
Pop-up status window - new version In reply to
FYI, I have uploaded a new version of the mailcheck.php script. You can find details and instructions here:

http://www.seaturtle.org/junk/mailcheck.shtml

Essentially this update adds the ability for the user to switch back and forth between viewing number of unread messages and number of new messages. It also includes the option of reading the GM username from a cookie, so a user doesn't have to log in to GM first (just your site where they are assigned a cookie).
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window - new version In reply to
Hi,

I use wwwthreads forums, when i login into forums i need to check mails when new mails are arrived. I would like to give a link saying new mail arrived when new mail is arrived. ofcourse i use GM for mails. Laugh

I hope you can help me.

thanks in advance,
Praveen
Quote Reply
Re: [b_praveen_kumar] Pop-up status window - new version In reply to
Sorry, I don't know anything about wwwthreads. I'm afraid I can't help.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window - new version In reply to
Hi,

I had this version and its running OK. As with the previous version, the following problem still persists:

Any visitor, if he knows the path to mailcheck.php (which is always easy) then he/she can peep into the status of mails in other users. If i am user abc@x2z.com and i know a user def@x2z.com (both obviously under GM using mail alert) then i can use:

http://x2z.com/...php?user=def@x2z.com

to see sort of how many unread/new mails are there in def@x2z.com after i send a mail to def@x2z.com and in a way get an idea (rough) as to whether my mail has "probably" been read or not.

Any workaround for this?

Thnx

Anup


=_= =_= =_= =_= =_= =_=


You can chain me, you can torture me, you can even destroy this body, but you will never imprison my mind.
-Mahatma Gandhi
Quote Reply
Re: [anup123] Pop-up status window - new version In reply to
If you set the $use_cookie option to 1 then a preset cookie with the GM username will be required for the script to work. If there is no cookie then the script should print "You are not logged in."

You are correct that all you need to know is someone's username to check their mail status if you are not using cookies. I do not recommend using the script without a cookie set, but the option is there for admins that don't want to use cookies.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window - new version In reply to
I took your brilliant idea and made a perl script out of it. I wasn't really satisfied with the authentication (even with the cookie version, you were easily able to see how many unread messages everyone had). The script I have asks you to log in if you are not logged in, and the page will refresh as yours does.

I still need to do some testing, and I'll post the script here, if anyone is interested.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Pop-up status window - new version In reply to
If you have the script configured properly for cookies you shouldn't be able to see anyone's mail but your own, and you can only see your own if you have the proper cookie.

I must be missing something because I can't figure out how to reproduce what you are talking about. Can you tell me how you are able to see unread messages for another user when it is set-up to use cookies?

thanks,
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Pop-up status window - new version In reply to
I can just change the value of my 'username' cookie. I admit it's not something that the avarage user will do, but it can done quite easily.

You could change your script so that it uses the session id cookie. Then you would have to look up the user belonging to the session.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Pop-up status window - new version In reply to
OK, I see what you mean. If someone edits their browser's cookie file they could put whatever username they want in there.

That's true, but a general problem with my site then because I use cookies for user authentication. GMail is the least of my worries Smile

Using a session id cookie might be a good idea. I'll have to take a look at that. But that would mean that's I'd have to implicitly log each user into GMail at the same time they logged into my site.

I wonder if using encrypted cookies would make it any more difficult for someone to add a "fake" cookie to their cookies file?

cheers,
Michael Coyne
seaturtle.org
Quote Reply
Re: [yogi] Pop-up status window - new version In reply to
In Reply To:
I took your brilliant idea and made a perl script out of it. I wasn't really satisfied with the authentication (even with the cookie version, you were easily able to see how many unread messages everyone had). The script I have asks you to log in if you are not logged in, and the page will refresh as yours does.

I still need to do some testing, and I'll post the script here, if anyone is interested.



Yes please Ivan! Smile

Regan.