Do you love telling everybody whether you are online or not by adding your Yahoo Messenger online status to your blog? If you do, you might have been familiar to these standard YM online status button:
Bored with these button?
For you, WordPress users, I’ve written a simple plugin which allows you to show your YM online status using your custom images, so you can make sure that your online status button looks good on your blog’s theme and layout. My Yahoo Messenger online status button on the sidebar of this blog is a simple example for this plugin. Of course, this is only an example. You can create better buttons on your own.
Interested? Just download the latest version of this plugin and put it on your blog
Latest stable version:
Installation and Usage:
- Decompress this plugin’s archive file. It contains a folder named ‘ym-online-status’
- Upload the folder into your plugins directory which is located by default in
/wp-content/plugins/After uploading this folder, you should have a structure like this:
/wp-content/plugins/ym-online-status/[some files + folder]
- Go to your admin section and select Plugins menu. Activate this plugin from the panel.
- Now go to Options, select the YM Status submenu (you’ll find this new submenu after activating this plugin). Fill in the ‘Yahoo Messenger ID’ field with your yahoo id. If you’d like to enter some different ids, separate each id with a space (see further notes about using multiple yahoo ids). The ‘Text’ field on the options represents the value of ‘alt’ and ‘title’ attributes of your button. It will show up as a tooltip when you hover your mouse pointer on your button and where browsers doesn’t load your button image.
- Select your preferred YM status button to display.
- Click the ‘Update Options’ button.
- Enter this code into your theme file, in which your online status button will be displayed:
<?php get_ym_status() ?>It’ll be nice to put it in your sidebar.php, but it is up to you where you would like it to be displayed.
- Congratulations! Now you have a unique YM online status button.
Using your own image
I have included some sample online status buttons which you could use on your blog. But if you’d like to use your own creation, please follow these steps:
- Prepare a pair of images. One is for showing the visitors that you are online, and the other one is for showing that you are offline. These paired image’s format and extension have to be identical. You can’t pair an online .jpg image with an offline .gif image. I also suggest that you use a pair of image with the same pixel dimension, although this isn’t a must.
- Name each of the images as
offline-[image_name].[extension]As an example, you might want to name them as online-myimage.gif and offline-myimage.gif.
- Upload these images into this directory:
- Get into the admin panel, select the Options menu and then the YM Status submenu. Select your custom images as your online status button just like you did before, and then click the Update Options button.
If you would like to share your custom images to WordPress communities, I would be glad to include them in this plugin, accompanied with the author’s credits and blog urls of course. Please send me your custom images via email: hudatoriq [at] gmail [dot] com. The images must be in PNG format, with 32 bits per pixel color depth (with 8 bit per pixel transparency).
If you want to display the online statuses of several yahoo ids, please follow these steps:
- In the YM Status Option page, specify multiple yahoo ids in the field labeled ‘Yahoo Messenger ID’. Separate each ids with a space.
- To display all these ids at once, simply use this function on your theme file:
<?php get_ym_status('list') ?>This will display the YM status of the given ids in an unordered list format.
If it doesn’t fit your theme/layout, you can create your own HTML tags structure. Use this tags to show your custom image with link that executes Yahoo Messenger program when clicked:
<a href='ymsgr:sendim?[yahoo_id]' title='[title text]'>
<img src='[weblog root]/wp-content/plugins/ym-online-status/image.php?id=[id number]' alt='[title text]' />
You should replace the value inside [ and ] as noted below:
- [yahoo id] with your yahoo id/username
- [title text] with your custom text that you will use as a tooltip
- [weblog root] with your web log root url
- [id number] with the number dengan urutan keberapa id tersebut ditulis dalam field ‘Yahoo Messenger ID’. Misalkan Anda mengisi id-id berikut: tono tini tina. Jika ingin menampilkan status online tina, ganti nilai ini dengan nomor 3. Jika ingin menampilkan status online tono, ganti dengan nomor 1.
Available translation file:
- Bahasa Indonesia
Frequently Asked Questions
Can somebody else use my image URL to show their YM online status on other site/weblog?
Yes, they can, provided that you allow them by specifying their yahoo username in the Options panel. Otherwise, they won’t be able to do this. You actually are able to lend your friends some help by hosting their custom image status while they don’t have the ability to use it due to their bloghost service limitation. Just tell them to use this url as their image source:
[your weblog url]/wp-content/plugins/ym-online-status/image.php?id=[id number]
Why does the button look bad on my blog? There is a rectangular gray background surrounding the button.
That’s probably due to incompatibility with your browser. The images included in this plugin is in PNG format. Besides storing color information, it also stores 256 level of transparency information for each pixel. It makes PNG image’s transparency look perfect on any background color. But unfortunately not all browser support this. If you use Internet Explorer prior to version 7.0, then you’ll have a good chance to face this problem. If you want your button to look fine in browsers that doesn’t support PNG’s transparency, try editing the image with some graphic editor. Remove the image transparency. Use your blog’s background color as your image’s background, then upload it back to your server.
How do I upload my custom images into the designated directory? I can’t find any upload panel to do this from the YM Status Options Menu
Unfortunately I haven’t provided a form to upload images from the Admin panel yet. You have to upload it via FTP or your web host file manager.
This YM Online Status plugin for WordPress is released under GPL (General Public License).
Yahoo!, Yahoo! Messenger, Yahoo! logo, and some smiley image taken from Yahoo! website or Yahoo Messenger software are registered trademark and properties of Yahoo! Inc. This plugin is not officially released nor supported by Yahoo! Inc. Yahoo! is not responsible for the usage of this plugin on your blog.
- Jul 14 2007 – Version 0.2
Bug repair – collision with other admin buttons named ‘submit’ that creates undesired update triggers
Compatibility fixes with WordPress 2.0 regarding array serialization
Auto redirection to configuration page after activation
Automatically assign smile.png as the default status button after plugin activation
Notification messages in configuration page
Using WP’s built in ‘init’ hook to intercept user (admin) input (I should’ve done it earlier )
Other minor changes (localizations, code cleaning, etc)
- May 3 2007 – Version 0.1
Now PHP 4 compatible (tested with PHP 4.3.11)
- May 2 2007 – Version 0.1 Beta
Initial release, still having problems with PHP 4.x.x