You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



IM presence in the addressbook
Seth Spitzer

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 (online)
If "foobar" is offline, we will get redirected to http://ncmail.netscape.com/include/nc/images/offline.gif (offline)

Clicking on a presence icon will launch a IM window by running a goim: url like aim:goim?screenname=foobar

Notes:
  1. We will not show the presence icon if the mozilla application is offline (offline indicator)
  2. This "trick" won't work for all screennames.  (Appears to be privacy related?)
  3. If we had time, we could do the same trick for IM presence in the message header pane.
  4. There is a bug logged about adding prefs to allow this work for other IM services, other than AIM.
References:

[1] http://lxr.mozilla.org/mozilla/source/mailnews/addrbook/resources/content/abCardViewOverlay.js#221
[2] addressbook UI spec