Wordpress Sidebar widgets are cool but can have an impact on some plugins. Sparkstats for example is a very nice little plugin that I like to use. But it no longer works when you use the new sidebar widgets.
In trying to fix Sparkstats I first used one of the built-in text widget and pointed an IMG link directly to the sparkstats .png file.
eg:
<img alt="SparkStats" src="/wp-content/plugins/sparkstats/curstats.png" />
This is a simple fix that “just works”. It also shows how useful the text and rss widgets can be.
Another fix was to play with Stewart Ugelow’s “theme widgets“. This is kind of a plugin on a plugin but was a good intro to the whole custom widget world. So following his notes I created a file called “widget-sparks” using the sparkStats_imgURI() as a variable. This was a little cleaner but I’m not sure if I will keep on using the theme widgets long term.
It was late but why not go the whole way says I. Well thanks to Kaf Under and his example widget I was inspired and able to make my very own sparkstat widget. A few hacks later and a new widget is born.
You can grab a (txt) copy of my beta version here.
Note: You will need the sparkstats plugin and the sidebar widgets plugin. Then rename the sparks file with a php extension and put it in the plugins/widgets directory.