Windows Gadget: WordPress Statistics v1.0.4


It appears that WordPress has recently changed the way in which they deliver blog statistics through their API. This change caused the WordPress Statistics Windows Gadget that I created to break. I have submitted an update to the Windows Live Gallery and it is currently pending approval. From my experience it usually takes about one or two days for it to be approved. Please click here to check the gallery over the next few days to get an updated version of the gadget.

Windows Gadget: Running Flash and Silverlight Gadgets


If you have a 64-bit operating system and you have ever tried to install a Windows Gadget implemented with Silverlight of Flash, you will quickly realize that the gadget will not run. It turns out that the issue lies in the fact that there is not a 64-bit version of either Silverlight or Flash but the default Windows Sidebar application that loads on start up is a 64-bit application. Thus, the gadget and the Sidebar won’t play nicely together. To fix this issue, all you need to do is have the 32-bit version of Windows Sidebar startup with Windows loads. To do this follow the instructions below:

Windows Vista

  1. Click the Start orb.
  2. Click All Programs.
  3. Right click on the Startup folder and click Open or Explore.
  4. In the window that appears, right click and select New -> Shortcut.
  5. In the Create Shortcut window, copy and paste the following text, including the quotes, into the Location text box: “C:\Program Files (x86)\Windows Sidebar\sidebar.exe”
  6. Click Next.
  7. Click Finish.

Windows 7

  1. Click the Start orb.
  2. Type regedit and press enter.
  3. Navigate to the following registry entry: HKEY_CLASSES_ROOT\DesktopBackground\Shell
  4. Right click on the Gadgets registry folder and click Permissions…
  5. In the permissions window, click on the Advanced button.
  6. Click on the Owner tab.
  7. Find your login in the Change owner to list view and select it.
  8. Click Ok.
  9. In the Permissions for Gadget window, click the Add… button.
  10. Enter your login name for the computer and click OK.
  11. Back in the Permissions for Gadget window, make sure your login name is selected in the Group or user names list and check the Allow check box for the Full Control permission.
  12. Click Ok.
  13. Repeat steps 4 through 12 for the HKEY_CLASSES_ROOT\DesktopBackground\Shell\Gadget\command registry folder.
  14. Double click the following registry keys in the HKEY_CLASSES_ROOT\DesktopBackground\Shell\Gadget registry folder and change the Value data field to the specified value:
    Icon: C:\Program Files (x86)\Windows Sidebar\sidebar.exe,-100
    MUIVerb: @%ProgramFiles86%\Windows Sidebar\sidebar.exe,-11100
  15. Double click the following registry keys in the HKEY_CLASSES_ROOT\DesktopBackground\Shell\Gadget\command registry folder and change the Value data field to the specified value:
    (Default): C:\Program Files (x86)\Windows Sidebar\sidebar.exe /showGadgets
  16. Close the registry and restart your computer.

This should make the 32-bit version of Windows Sidebar start when you right click your desktop and select Gadgets and thus allow Silverlight and Flash gadgets to work correctly.

Windows Gadget: WordPress Statistics Updated


WordPress recently updated the statistical charts and I got a request from a user to update the WordPress Stats Windows Gadget to reflect the changes as well. I have released a new version of the Windows Gadget here which includes the following changes.

Column Chart

The option of selecting either a line or a column graph as pictured above.

Updated Tooltip

The tooltip that appears when hovering over a data point is much more aesthetically pleasing and allows you to include the published posts when viewing the statistics grouped by day.

Windows Gadget: WordPress Statistics


I just wanted to mention that I released an updated version of my WordPress Stats Windows gadget. This release fixes a small inconvenience that occurs when waking the computer up from sleep or hibernation. On such an event a message box appears indicating that there is no internet connection. The problem occurs because a request is sent directly to WordPress.com when the computer wakes up before an internet connection can be established. The gadget will now not show an error message until two consecutive request fail due to a lack of internet connection.

The gadget can be downloaded here.

Windows Gadget: WordPress Statistics


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

Follow

Get every new post delivered to your Inbox.

Join 70 other followers