I Bring You Aim Status Helper 2

Well, I've got this whole week off and I've gotten pretty bored pretty quick. So why not update some little projects?

That's what I've done with my little Aim Status Helper. The last one was pretty ghetto. You handed it an aimname, and it basically force fed what I wanted it to. Yeah, you could override the display text, but what if you didn't want any! Or what if you just wanted to know the status, without displaying anything?

I think I've done a good job in taking care of that now. So, I bring you Aim Status Helper 2! Thats right, 2!

I went ahead and created a whole new namespace for this updated version because it uses a completely different method to find out the status of an aim member. Before I was using a fancy URL that you pass the image paths in, and AOL responds with the status image url. Thats great, as long as you're just wondering if the user is ONLINE or OFFLINE. If the user is Away or Idle, they still show as online. Not really helpful.

Now I'm talking directly to the Aim Web API. And let me tell you, boy is it crap. I made a little lemonade out of it though, and I think I came up with something that is dynamic enough that it should cover most bases.

It's really just 4 methods. A request method to get the returning xml. A method to parse that and return the status in plain text, a method to display the icon, and a nice little aim_to method that will provide a link to pop open a message window to the user you pass in.

Ok, so heres some code:

aim_status 'maddox123456' => "online"

oooh, nice. This just returns the status. So you can do anything you want with it. If you have some other fancy way to display AIM status, and are just looking for a way to GET the status, just use this.

aim_status_icon 'maddox123456'

aim status Jon Maddox

This will throw an icon into your page. The normal options for image_tag are available.

aim_to 'Jon Maddox', 'maddox123456'

Jon Maddox

This will wrap one of those fancy "aim://goim?screename=maddox123456" links around whatever you pass to it. The normal options for link_to are available.

aim_to( aim_status_icon('maddox123456'), 'maddox123456')

aim status Jon Maddox

Wrap the last two up, and you get basically what I was doing with the first version of this silly plugin.

So basically, what you get with this new version is a better way to GET the status, and wayyyyy more freedom to do anything you want with it. I know that the first version I made barely worked for 2 instances of use. So I can imagine it probably didn't work for any of you guys. This one should solve that.

Requirements: Rails 1.2 rc1 or Edge

More info here: http://github.com/maddox/aim_status_helper/tree/master

Install:

git clone git://github.com/maddox/aim_status_helper.git vendor/plugins/aim_status_helper

Popularity: 5% [?]

You can skip to the end and leave a response. Pinging is currently not allowed.

4 Thoughts

  1. Mighty handy. Thanks!

  2. It doesn't seem to be working? I am "available" with aim, but the plugin reports offline. My firend is "idle," but reports offline.

    Steven A Bristol -
  3. The plugin requires Rails 1.2 rc1 or Edge. I've noted that in the post. Maybe thats the problem

  4. [...] Sep11 This plugin has been updated. You can find the update here. [...]

Share Your Thoughts?

Please excuse my captcha. But the internets require it these days. Comment triage isn’t billable.