In the addressbook card pane, we show IM presence if the card has a screenname.
We do this by setting the src for an <image> tag to the "oscar" url. (I stole this trick from Netscape WebMail)
The url we use for the img src is:
http://big.oscar.aol.com:80/foobar?on_url=http://ncmail.netscape.com/include/nc/images/online.gif&off_url=http://ncmail.netscape.com/include/nc/images/offline.gif
If "foobar" is online, we will get redirected to http://ncmail.netscape.com/include/nc/images/online.gif ()
If "foobar" is offline, we will get redirected to http://ncmail.netscape.com/include/nc/images/offline.gif ()
Clicking on a presence icon will launch a IM window by running a goim: url like aim:goim?screenname=foobar
Notes:
- We will not show the presence icon if the mozilla application is
offline ()
- This "trick" won't work for all screennames. (Appears to be privacy related?)
- If we had time, we could do the same trick for IM presence in the message header pane.
- There is a bug logged about adding prefs to allow this work for
other IM services, other than AIM.
[1] http://lxr.mozilla.org/mozilla/source/mailnews/addrbook/resources/content/abCardViewOverlay.js#221
[2] addressbook UI spec