Add AIM Presence to your website with a simple IMG tag!
*SEE UPDATE BELOW*
I spent a little time this afternoon working on my AIM Presence project. A lot of people want to put online/offline status icons on their websites so patrons and/or readers can see if the person is online and likely available.
AIM offers its presence service, but the big hold up is that connecting to it requires a knowledge of making SOAP requests using some server side language.
I see a lot of glazed over eyes right now.
This is where I come in. After hearing Jenny's enthusiasm over my addition of AIM status icons to the LCLS site, I realized I could probably come up with a way to make it easy for people to hook into the AIM Presence service via a simple webservice I created.
This afternoon I hacked out version 1 of my AIM Presence hook. After a 2 minute IM with Jenny, I realized something. I had not helped at all! I asked her if she knew how to do SOAP requests in Cold Fusion. Duh, Chris, the whole point of this was so people wouldn't have to do that.
Wow did I miss the mark.
Then I remembered something. You see, I do a lot of programming research via Google. A lot. There are tons of coders out there, just like me who write code and share it. When I do projects, I map out what I need to do, and then I hit Google and some of my favorite programming resource sites to find the nuts and bolts of how to do it. So I come across a lot, A LOT of articles.
I found this little gem from from Jeremy Rule's blog over at MSDN (Microsoft Developer Network). What is it you ask? Well, with the power of server side programming, you can do a lot of neat things. One of those happens to be changing the content type you send to the browser.
Ok, what does that mean? That means..I can do things like tell your browser my website is sending you an image, and create that image with programming code either by A) Creating it from scratch and writing the programming to do it, or B) Loading another image and create a new image based off that.
I can write a web page that when you go to it, instead of getting an HTML webpage, you get an image.
So thanks to Jeremy's article (who, incidentally, has no idea who I am...just another anonymous reader), I crafted up a simple webpage that you can put inside an HTML IMG tag and get an online or offline icon.
It's that simple. (For you)
How can you use this on your website?? Easy! Anywhere you want to show an AIM status icon, use this code:
/* UPDATED 1/10/2006 - The old method is going away, please switch to this one */
<a href="aim:GoIM?screenname=PUT_YOUR_SCREENNAME_HERE"><img src="http://big.oscar.aol.com/YOUR_SCREEN_NAME_HERE?on_url=http://PATH_TO_ONLINE_IMAGE&off_url=http://PATH_TO_OFFLINE_IMAGE" border="0" /></a>Where you see "PUT_YOUR_SCREENNAME_HERE", do just that. Replace that text with your screen name, paste this code into your website and wah-la. Your online status is now available the world over.
Where you see PATH_TO_ONLINE_IMAGE and PATH_TO_OFFLINE_IMAGE, replace those with the http:// path to the ONLINE and OFFLINE images you want to use.
/* This Q&A is no longer valid because of the changes I suggested. So just ignore it */
Q: Can I use this one my website?
A: Yes. You are free to use this if:
- Your website is a library website (YES, your library related blogs count :) )
- You kindly email or IM me with your library name and website URL, so I know who is using it and where they are coming from.
For the curious out there, I bet you're looking at my Svc= querystring going, hmmm, why would he make us specify AIM. What else could we put there?
Well, as of now, just AIM. But over the next few weeks I hope to tap into Yahoo!, and ICQ. If possible, I will put MSN on there as well. But as of today, I do not think MSN offers a web presence service like AOL, Yahoo!, and ICQ.
That's it for this evening (I know you're thinking, that's it??). But I'm off to play some Star Wars: Battlefront 2 on the Xbox with my wife, who decided that she had to have the game the day it came out! Seriously, it was her idea!