digital adj. Having digits.     peer n. A comrade; a companion; a fellow; an associate. inmotion    
   
Recent Articles
Stop DNSMasq From Forwarding Local Hostnames
Saturday, September 25, 2010
Securing your Wireless LAN
Wednesday, August 18, 2010
Some tips and things you might not know about your wireless network.
Using Different Subversion Client Versions
Wednesday, August 18, 2010
Handling a Subversion Repository URL Change
Sunday, May 3, 2009
If your repository URL changes, you can use the following command to fix existing snapshots.
vfat Mounts Default to Lowercase Shortnames
Tuesday, April 21, 2009
I want a "this is brain-damage" quote from Linus for this mess.
VirtualBox or VMWare Virtual Machine at Login
Sunday, April 12, 2009
How to start a virtual machine in X when a user logs in.
Dialog Progress Bar Through Pipe
Sunday, April 12, 2009
How to use dialog to display a script progress bar and communicate progress to it through a named pipe.
Mount JFFS2 Image
Saturday, October 25, 2008
Example of how to mount a JFFS2 image using mtdblock.

Just do it.
- Nike

Projects-Gaim Plugins-GaimStat

GaimStat

Tuesday, July 13, 2004 by digitalpeer, updated Monday, January 17, 2005

What is GaimStat?


If you've ever used the old ICQ service, you probably knew that they had a way for you to put your status on your website. Well, this is that, and more- the Gaim way. This allows you to show an online/offline image on your website for every service that Gaim supports all through a simple Gaim plugin.

How It Works


There are two parts to to the service. There are some PHP scripts to put on a web server and there is a Gaim plugin. When you load the plugin, it monitors the active services you are using and it sends a HTTP GET request to a web server at a set time interval. This updates your status through a PHP script in a MySql database. Then, when you request the image for your status from the same web server with your username and the service you want to know about, the server returns the correct image. When you kill the plugin (quit gaim) it sends a request to set your status as offline on all services. If you get disconnected, and the server has not heard from you in more than 5 minutes, you are also determined offline.

For more information on how to compile and use the plugin with Gaim, see http://gaim.sourceforge.net/faq.php and the README file with the plugin.

Public Status Server


If you don't have the resources to have your own web server setup, you can use the server here at digitalpeer.com. The only picture types on this server are the ones issued in the default package. Of course, if you setup your own server, you can create your own images.

The URL's to set and get your status on this server are as follows:
"http://www.digitalpeer.com/gaimstat/setstat.php" and "http://www.digitalpeer.com/gaimstat/getstat.php"

Note: If you use digitalpeer.com's public server, your information is NOT permanently saved or used in any way. If your status is in any way requested, and you have timed out or set your status to offline, your information is permanently deleted. The scripts aim to keep the data in the database pretty minimal.

Getting your Status


To get your status, simply request the image at:
http://www.digitalpeer.com/gaimstat/getstat.php?user=[screenname]&service=[service]&pictype=[a,c...]&ext=[gif,png,,jpg]&showoffline=[1,0]

[service] is required and can be any of the following (and more):
"aim" (this is both for TOC and AIM/ICQ)
"icq"
"irc"
"msn"
"jabber"
"yahoo"

[user] is required and is your screenname as Gaim knows it. With MSN, this may mean your e-mail address and not your alias.

[pictype] is optional. The default is "a" in the package. This tells the status script what style of picture to return.

[ext] is required only when [pictype] is set. Valid arguments are "jpg", "gif", and "png". If no [ext] is specified the default is "png".

[showoffline] is optional. The default is 1 (true). If you set this to 0 (false), a 1x1 transparent blank gif image will be returned instead of the offline image for the current [pictype].

If you want to display an image for each of your services on your website, then include a picture like:

<img border="0" src="http://www.digitalpeer.com/gaimstat/getstat.php?user=[screenname]&service=[service]&pictype=[yourstyle]">

Feel free to include one for each service you want visible on your website.

Setting Your Status


Of course, the plugin handles this automatically, but if you need to test it or want to set it manually, this is how it is done.

Statuses: 1 = Online, 0 = Offline

Example 1: "http://www.digitalpeer.com/gaimstat/setstat.php?status=1&[service]=[screenname]"

There are plenty of ways to update multiple services with multiple statuses. Any service following a status is set to that status. If no status is specified, the default is 0.

Example 2: "http://www.digitalpeer.com/gaimstat/setstat.php?msn=myname&status=1&aim=myname&jabber=myname&status=0&yahoo=myname"

This will set msn to offline, aim to online, jabber to online, and yahoo to offline.

Thanks


A special thanks to the developers that have majorly contributed to the plugin because of the ever changing Gaim API.
Attached Files
gaimstatserver-0.3.1.tgz, uploaded Monday, January 17, 2005
The PHP server scripts.

gaimstat-0.4.0.tgz, uploaded Monday, January 17, 2005
The plugin for Gaim 1.1.1.

Related Local Pages
IRC Chat Autoresponder
Gaimmy
Comment Monday, January 17, 2005 by  digitalpeer
The download links have been fixed.
Comment Saturday, January 22, 2005 by  by inc_everlasting4
I wish you guys would make this for windows :(
Comment Monday, January 24, 2005 by  Zaphod
Hi, I can't get this to compile on Gaim 1.1.2. Tried previously with the src tree of 1.1.0 that I still had lying around, but to no avail. Here's the relevant errors:

~/src/gaim-1.1.2/plugins$ make gaimstat.so
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I.. -DDATADIR=\" /usr/local/share\" -DVERSION=\"1.1.2\" -I../src -I/usr/include/gtk-2.0 -I/usr/l ib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/ include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/inc lude -g -O2 -Wall -g3 -c gaimstat.c -o tmpgaimstat.so.lo
gaimstat.c: In function `sendstatus':
gaimstat.c:143: warning: implicit declaration of function `gaim_status_get_name'
gaimstat.c:144: warning: implicit declaration of function `gaim_presence_get_act ive_status'
gaimstat.c:145: warning: implicit declaration of function `gaim_account_get_pres ence'
gaimstat.c:152: warning: format argument is not a pointer (arg 4)
gaimstat.c:165: warning: implicit declaration of function `gaim_debug_info'
gaimstat.c: In function `init_plugin':
gaimstat.c:378: error: `connect_handle' undeclared (first use in this function)
gaimstat.c:378: error: (Each undeclared identifier is reported only once
gaimstat.c:378: error: for each function it appears in.)
gaimstat.c:379: error: `account_handle' undeclared (first use in this function)
/usr/include/bits/string2.h: At top level:
gaimstat.c:87: warning: `querystring' defined but not used
gaimstat.c:92: warning: `setstatusoffline' declared `static' but never defined
gaimstat.c:93: warning: `setstatusonline' declared `static' but never defined
make: *** [gaimstat.so] Error 1


Other plugins compile ok, eg: Account State:

~/src/gaim-1.1.2/plugins$ make account_state.so
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I.. -DDATADIR=\" /usr/local/share\" -DVERSION=\"1.1.2\" -I../src -I/usr/include/gtk-2.0 -I/usr/l ib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/ include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/inc lude -g -O2 -Wall -g3 -c account_state.c -o tmpaccount_state.so.lo
/bin/sh ../libtool --silent --mode=link gcc -g -O2 -Wall -g3 -o libtmpaccount _state.so.la -rpath /usr/local/lib/gaim tmpaccount_state.so.lo -lnsl -module - avoid-version


Thanks for any help you can give me. I really like the idea of this plugin, looking forward to using it.
Comment Monday, January 24, 2005 by  by Zaphod
Oops, the linebreaks seem all messed up on the bug report I just sent in. I hope you can make anything of it, if not email me please. Thanks
Comment Sunday, February 20, 2005 by  by Vinicius
I have the same error, did you solve it? If yes, tell my how....
Comment Sunday, March 6, 2005 by  by Leben
Broken files, due to Gaim Updates. Please fix?
Comment Tuesday, May 3, 2005 by  by ryan
is there any way to run this on windows, i do have linux, and am trying to migrate to it, but for now windows is my primary os.
Comment Tuesday, February 14, 2006 by  anonymous
I too would ike to have this working on windows

Submit Comment to This Article
Please post a comment if you have something to add, find something wrong, or would like more information on the topic at hand. Do not use the comment form to contact the author about unrelated concerns!

Name: Email (optional):
Enter verification number here: