Tuesday, November 01, 2005

Add AIM Presence to your website with a simple IMG tag!


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.

Version 1
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:
  1. Your website is a library website (YES, your library related blogs count :) )
  2. 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.
Sometime in the future, I will add a layer of security that will restrict this to the people who contact me. For now, try it out.

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!


At 11/05/2005 10:02 AM, Blogger The Shifted Librarian said...

Who's the man? You da man!

At 11/07/2005 8:45 AM, Anonymous Michael Casey said...

Very nice little tool! Hope you don't mind me using it!

At 11/08/2005 11:21 AM, Anonymous Matt said...

very cool! just like a webpastie we are currently using, but free! great job!

At 11/08/2005 3:43 PM, Anonymous Anonymous said...


I must be stupid, but I can't find your email address anywhere so I guess I'll be making my request public.

I stumbled upon a mention of your chat status thing-a-bob on the Rowland Institute Library Blog and think it's one nifty ... thing. I'd like to use it. But, shit, my website isn't a library.

But it is a museum, and has pages from publications availalbe for viewing and whatnot. So, please, lemme use it. I typically get like, 100 visitors/day, so it's not like I'll crush your server.

Dennis B. Smith
The Online Drafting Pencil Museum

At 11/11/2005 10:54 AM, Blogger michelle said...

Chris - thanks, thanks, thanks. Our library (St Charles in Illinois) is starting IM on Monday via Trillian. Is it OK to use your nice bit o' programming?

BTW, I am a native of Edwardsville...Go Tigers!

At 11/11/2005 10:55 AM, Anonymous aaron said...

playing around with it, thanks!


At 11/11/2005 1:32 PM, Blogger Chris Deweese said...

Michelle- Go right ahead!

Aaron- let me know what you think. I'm gonna add some things to it. I'm not yet taking advantage of everything AIM makes available with their presence service.

At 12/05/2005 12:34 PM, Anonymous Anonymous said...

Good stuff. Glad you found some use out of the post!


At 1/10/2006 3:07 PM, Anonymous Peter said...


Just wondered if I could use it on my blog at http://blog.fluffles.com I know I'm not a library or anything but I thought I'd at least ask.

At 1/10/2006 4:38 PM, Blogger Chris Deweese said...


Check the updated article. I am no longer offering that service because it was getting flaky. I updated the article with the way to get it straight from AIM.

At 6/18/2007 5:37 AM, Blogger ShadowHarlequin said...

hi there :)
i want to use your script to display the status of the help bot for a project im working on (www.itheme.co.nr)

the url of the page im putting it on is http://grekir.freehostia.com/iskin/index.html

i couldnt get you on aim because this computer doesnt have it, sorry if its not ideal to post it here

(at the moment it wont work if i dont ask you right?)



At 5/22/2008 12:07 AM, Anonymous Anonymous said...

Hi Nice Blog. At Bingo online games site is seen as socially acceptable even though it is technically gambling. From the point of view of many players it is not seen as gambling at all but rather as more of a social gathering online that just happens to have bingo as the catalyst for a common interest.

At 7/18/2010 6:16 PM, Blogger Dean said...

greetings to all.
I would first like to thank the writers of this blog by sharing information, a few years ago I read a book called costa rica investment in this book deal with questions like this one.

At 8/15/2010 2:03 PM, Blogger niz said...

Hello .. firstly I would like to send greetings to all readers. After this, I recognize the content so interesting about this article. For me personally I liked all the information. I would like to know of cases like this more often. In my personal experience I might mention a book called Generic Viagra in this book that I mentioned have very interesting topics, and also you have much to do with the main theme of this article.

At 8/21/2010 4:56 PM, Anonymous Penis Enlargement Pills said...

Erectile Dysfunction FAQ's

Impotence, or penile erectile dysfunction, in men is not as rare as one would think it is.
In fact, one out of ten men around the world is affected by this condition. It is not exclusive to old men either. Impotence is caused not just by physical factors,
but mental factors as well.
Exercising on a regular basis and eating healthy food will increase your ability to sustain prolonged physical effort and we all know that sex is effort.
Smoking, frequently drinking large quantities of alcohol, taking recreational drugs and lack of exercising will sap your stamina and also slow down the flow of blood.
Penis exercises can be used for maintaining fitness, preventing or controlling premature ejaculation and increasing the length and girth of the penis.
by penis enlargement pills you can overcome these problems and not only that you can also enlarge, extend also to strengthen your penis and premature ejaculation will not exist anymore for you.
visit http://www.factspenisenlargement.com for more info.

At 2/14/2011 5:39 PM, Blogger pedro velasquez said...

There WAS and article that appeared to havedominical costa rica tours been written by a CNN staffer about her experience with the auction website xbids.com [see comments at end of post about this]. Sounded fun. You were told you would be initially given 20 free bids to try it (as she had) and so clicked on a link in the article and was taken to a page to sign in or register.

At 6/17/2011 9:21 PM, Anonymous how to get rid of cellulite said...

Good data, numerous thank you to the author. It’s puzzling to me now, typically, the usefulness as well as significance is overpowering. Drastically thanks again and better of luck!


Post a Comment

Links to this post:

Create a Link

<< Home