It's my first Attempt to write a drupal Module. It's 4k big at the Moment and i hacked it together in 1 Hour.
But it seems many People are in need for this Feature.

onlinestatus.module generates "Status Indicators" of all your favorite Instant Messangers

  • AIM
  • ICQ
  • IRC
  • Jabber
  • MSN
  • Yahoo

WARNING: The Module is in a "Proof of Concept" Phase, if you are Brave dowload it from my Site.
If you are Serious try it on my Site: http://j-fan.at/?q=user/1
Ps: The page ist drupal.module enabled, use your nick@drupal.org for a login and fill out the "Instant Messanger" Tab for a Test.

Please give me some Feedback how i could improve the Module to make it really useful.

Comments

chx’s picture

I can not see any obvious security problems, that's good (this does not mean anything more than that -- some sechole could be there, just it's not obvious for me). A few things... t('%aimName Online Status Indicator',array('%aimName' => $aimName) where $aimname is defined? Isn't that $imname? theme_image(...) that should be theme('image',... ) so that it is overrideable.

$result = db_query("SELECT fid, title FROM {profile_fields}", PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); nothing wrong with this per se, but probably does not do what you want -- no placeholders for the parameters in the query.
--
Read my developer blog on Drupal4hu.

--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.

ShaiHulud’s picture

How about adding skype (and possibly other voice messengers) to the status indicators..
Would that be a possilibity?

sepeck’s picture

This is pretty cool. I personally am not a fan of handing out my online status but I have a friend who runs his gaming guild website off Drupal and I will pass this link along to him. He's been asking me if there was a Drupal module that did this for a month now. (ahh co-workers :)

Thanks and keep on having fun.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

xeniac’s picture

@chx: 80 Lines of Code (including Comments) and 3 Bugs, this is bad :(
I fixed the Errors, the new Version is ready for download:
http://j-fan.at/files/onlinestatus.zip

@ShaiHulud:
It is not possible with this approach because the OIM server does not support skype at the moment.

The current solution has many flaws.

  • i can't check if the Userinput is valid. (int only in ICQ, no specialchars than '_' in Yahoo and so on.)
  • The whole script is lame, it needs caching support.
  • Onlinestatus should show up in the Userlist, but the queries are to slow for this.
  • It should support other queryserver for Skype, Asterisk, SIP, OpenH323, Silk, GaduGadu - but i don't know if anything like this exists. :(
  • We need some sort of access control
  • You should have the possibility to hide your onlinestatus.
kerrizor’s picture

Not to be utterly lazy, but how much effort would it take to make this backwards compatible to 4.6?

pol’s picture

I dont think that a module developped for 4.7 should be backword with previous version...
Come on ! Go ahead !

-Pol-

kerrizor’s picture

Oh, if only I could... I've hacked on Drupal so much that I'm not even sure its fair to call it Drupal anymore :)

I'm actually just going to rewrite this module for 4.6.*

neablo’s picture

In the 4.7 module, theres CURL needed... it would be cool to find a solution (for the new developped module 4.6.*) without CURL because some people dont have access to the php settings of a server but want to use this feature.
thanks

hazimal’s picture

i can't download