Quantcast
Channel: Nick Olsen's Programming Tips » Windows 7
Viewing all articles
Browse latest Browse all 7

Windows Gadget: WordPress Statistics

$
0
0

For those of you who don’t like to read, this Windows Gadget can be downloaded from CodePlex here.

I have never actually used a Windows Gadget as I’m kind of a neat freak when it comes to my desktop. But, a couple of weeks ago I actually thought of a gadget that I would actually use: a WordPress gadget that allowed me to see view statistics of my blog as well as provide a few shortcuts to help administer my blog. I searched the internet and found one that has been developed that provides links to various actions on your blog here, but it didn’t provide any statistical information. So, I decided to create my own gadget.

For those who aren’t familiar with the development of a Windows Gadget, it is simply a set of web pages. When I discovered this, my first question was whether or not I could use Silverlight to develop my gadget and it turns out you can! I found a Visual Studio Project template created by Ioan Lazarciuc here that does all the setup and configuration for you. It is a great starting point and allows you to get right to the development instead of having to waste time figuring out which javascript methods have to called when, what the required markup is for the html pages, etc.

Here is a run through of the gadget:

Out of the Box – When you startup the gadget for the first time you will notice the “Configuration required” text at the bottom. Before you can view your stats and manage you blog you need to enter your blog information. Click on the wrench to open the gadget settings.

Settings – To use this gadget it must know two things: your blog uri, and your blog API key. The API key is like a password provided to you by WordPress and allows programs like this Windows Gadget to access statistical information. You can find it by logging into your WordPress account and clicking Users -> Personal Settings on the left hand navigation bar. At the top of the page you will see your API key. Copy and paste that into the Blog API Key text box.

Alternatively, you can enter your blog uri and click the Show Me link and a web browser will be opened directly to the page containing your API key.

Statistics – After you define the gadget settings and you click OK, the statistics for you blog will be loaded and you should see a line graph like the one pictured above.

Menu Options – If you click the arrow on the bottom right corner of the gadget you will see various menu items that will allow you to administer your blog. If you double click on any of them, you will be taken directly to the corresponding page.

Since this gadget was written with the Silverlight 4 Framework, you must have Silverlight installed on your machine for it to run. If you don’t have it installed, you will see the following image appear when you place the gadget on your desktop. If you click on the image, Silverlight will be downloaded and installed.

64-bit Users: If you have a 64-bit system, this image will appear even if you have Silverlight installed. The problem is that there is no 64-bit Silverlight Framework (just as there is no 64-bit version of Flash) but there is a 64-bit Windows Sidebar application which is started by default if you have a 64-bit system. Thus, if you want to run this gadget, you will need to have the 32-bit version of the Windows Sidebar application startup when Windows starts. John McClelland has posted instructions here on how to solve this problem (it says it is for Windows Vista but it works on Windows 7 as well).

This Windows Gadget can be downloaded here and the source code is available here. I consider this project still in beta but I currently use it every day and it appears stable enough for release. Let me know if you run into any issues by posting to the Issue Tracker on CodePlex.

Resources – I built this Silverlight based Windows Gadget using the following tools



Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images