The development world of a madman

October 15, 2011

WordPress Thickbox Plugin for Live Writer

I’m a huge fan of the Lightbox plugin for blogs, whether it’s on wordpress or or any other blog type. For those who don’t know, the Lightbox plugin enables you to have your blog set so that if a user clicks on an image, that image opens inline, rather than redirecting them away from your blog’s content. I use it on all of my blogs and you can see it in action by clicking on any image on this blog.

It works by you adding rel=”lightbox” into a link’s attributes within the post. If you’re like me and use Live Writer, then you’ll know that Live Writer detects whether a blog has Lightbox installed and will add the rel attribute automatically. But what if you’re blogging on a blog? You can’t install plugins there and there is no native lightbox support. Well, dear Reader, read on.

Looking around, there’s a bit of a “hack” in order to get this to work, which simply involves two steps:

  1. Add the SocialVibe widget to your blog
  2. In your links, add: class=”thickbox”

Then you’ll get the same affect. Now, other than the aside of having the garish SocialVibe box on your blog, the other pain is that it’s not a supported action in Live Writer and going into the source on every image is tedious at best. So I created a quick Live Writer plugin to make this task easier.

Once you’ve installed the plugin and written your blog post, highlight the entire post (ctrl+A), then click on “Wordpress ThickBox” from the Insert tab. That’s it. Done. It will only add that class attribute to a link that points to either jpg, jpeg, png or gif.

Want to see it action? Course you do. Head over to my WebTone blog and click one of the images.

Download the plugin.


October 14, 2011

WebTone Tip: Where To Get Ringtones From

I have moved this post to the new WebTone blog



September 8, 2011

Windows Phone Devs: How To Make Users Love You More

With the new Mango changes and apparent 500+ API changes, including support for multi-tasking, there is one thing you can do to your app that’s a simple change of just 3 lines of code and it will make your users love you just that little bit more.

In your App.xaml.cs, go to your Application_Activated handler, if you have code already in there for reinstating your state after tombstoning, wrap it all up in this:

if (!e.IsApplicationInstancePreserved)
    // Code to reinstate the application's state

Do this and your users will experience a quick reload of apps if they switch back to it from the multi-tasking switcher.


May 24, 2011

WordPress Featured Image Plugin For Live Writer

For a while now, @ kipkniskern (my LiveSide mate) has been asking whether it was possible to be able to set the featured image of a post for WordPress. This would save everyone the job of publishing the post, then having to log into the site and manually set the featured image.

This was a seemingly simple request, but finding out how to do it was a nightmare. I eventually found that to set a post’s featured image, you needed to set a Custom Field for the post of “_thumbnail_id” and give the image’s attachment id as a reference. Simple, right? Wrong!

With the help of Brandon Turner’s excellent Custom Field plugin, I was able to test that this did in fact work and was what I needed to set from my own plugin. So I set about getting it all set up for the plugin. What I eventually discovered was that WordPress is a real pain in the ass. No, really! When you upload an image, all it returns is the image url, and doesn’t include the attachment id. To make matters worse, that custom field only accepts the image id, not the url. This was raised to WP some months ago, but as yet, nothing has been done about it.

Not to be deterred, I created a WordPress plugin that would do exactly the same as the normal image upload function, but returned the id as well. Unfortunately, in doing so, it means that this feature (featured image), which is accessible to both self hosted and users, can only be set in Live Writer for self hosted users. I hope I’ll be able to rectify this in the future.

So, onto the plugin itself. First of all, you need to install my WP plugin, which can be downloaded from Install this through your WP dashboard, there are no settings.

Once that has been installed, download the Live Writer plugin from and install it.

The only real interface for this plugin is the options window:

Now, this plugin uses a new technique for allowing blog specific options (a blog post on how to do this will come soon). You will be presented with all configured WordPress blogs in the drop down, selecting one will give you a list of all the categories for this particular blog. The reason for this is you might only want to set the featured image for certain types of blog post; for example, if you only wanted to do it for posts with the category of ‘Featured.’ If no categories are set, then it will ask you for an image on every post.

The other option you can see is to use the post’s ID as the image name, this is on by default.

When you then go to publish your post, on first run, you’ll be prompted as to whether you would like Live Writer to run the plugin:

If it is your first time running the plugin, or you choose not to save it, you will then be prompted for your blog’s password. Note: You will not be asked for the username, the plugin has already got that from your configured blog in Live Writer. You can choose to save this password (securely) in the plugin’s options. In the main plugin options, if you’ve chosen to save your password, there is an option to unsave it.

Once your password is entered, choose your featured image, and let the plugin do its thing.

I should point out, this plugin uses a modified version of Orbifold’s wrapper. I changed a few things to get the wrapper to talk to my WordPress plugin.

So there we go. Any feedback you have should be directed to me on twitter or in the comments.

WordPress plugin:
Live Writer plugin:


May 15, 2011

Introducing TileSlider: A #WP7 Control

by @ 11:02. Tags: , ,
Filed under TileSlider, Windows Phone 7

Sometimes (ok, a lot of times), Microsoft confuses me. They want a common look and feel and an air of consistency about apps for Windows Phone 7 which is why they provided some great tools in the Windows Phone 7 SDK. However, there seemed to be some omissions. For example, when you’re in the mail app and you want to select multiple mail, you can tap to the left of one email and it will pop out a checkbox next to each item. Where is this control? Why can’t I do that with my app? Well, you can if you use the awesome ListboxWithCheckBox Control.

But it’s not just that. Have you pinned a contact to your start menu? If so, then you’ll know about the user tile, it’s the same one that appears in your people hub for recently interacted with contacts. And you’ll know that it displays the contact’s picture (be it facebook profile pic or custom), slides down to reveal their name, and in some cases flips over to display their facebook status. Where is this control, Microsoft? Again, another omission from the SDK.

But now you can have that control as I’ve built one for you. Introducing TileSlider. But a video is worth a 1000 words, so here’s a 1000 words. I mean a video:

TileSlider Control

The control is easy to use and code examples are on the Codeplex site for the control.

So there we go. Go get it from codeplex

I must also offer a huge thanks to a tremendous amount of guidance from @dereklakin.


March 29, 2011

AutoReplace In Live Writer Makes Triumphant Return

Ages and ages and ages and ages (ok, you get the point) ago I told you of a hidden feature within Live Writer called AutoReplace. At the time, I mentioned that as it was unsupported/hidden, it could go at any moment, and guess what, it did. So I removed the plugin from my SkyDrive area, no point it being there if nothing is gonna happen, right.

But as the philosopher Schwarzenegger once said, “I’ll be back.” And it was. So I’m re-introducing my original plugin for this unofficial feature but with some extra value awesomesauce. As you can see from my original post, you can add what you want to replace and with what, but you have to enter them all manually. Really, Scott? Really?! Manually? So I listened to all the feedback (me!) and decided that entering it all manually is painful, especially as MS Word has one or two you could use from there. And while I’m at it, why not add some preset options that aren’t in Word.

So I did.



There’s even a handy search thing as Word has 925 default things to replace! Oh, and if you add others to Word and want them in Live Writer, just do another import, it only imports all the ones it doesn’t already have.

You can download the plugin from my SkyDrive area. You’ll have to install the plugin manually.

This plugin comes with a standard, legally binding “chin up” clause. If the Live Writer team remove this functionality, chin up!

I should also note that importing from Word works with 2010, but is untested with other versions of Office, so your mileage may vary.


PS, did you know, Schwarzenegger is actually in Live Writer’s dictionary by default. How mental is that?!

March 3, 2011

WordPress [Sourcecode] Plug-in

Whilst checking out my usual “Live Writer” search on twitter, I came across a question from @dereklakin asking if there was a plug-in for users so they can insert code into their blogs using wordpress’ [sourcecode] tag. Well, there wasn’t.

So I volunteered to make one, and make one I did.

Obligatory screenshots:

You can download the plug-in from here, and you’ll need to install this plug-in manually.

Please note, this plugin is for users whose blog is on This will not work on any other platform!


February 13, 2011

Keyboard Shortcut Plug-in For Live Writer

Last year, Aaron Bregal of the Live Writer team, wrote a great, comprehensive list of all the keyboard shortcuts available in Live Writer 2011. Now, unless you’re this guy, you won’t remember all of those shortcuts. You won’t, so stop saying you can. So what do you do? Bookmark the page? I guess this is the best option, as you can then access it from your favourites.

However, I decided that this isn’t the best option and just wasn’t a quick enough quick reference. So I’ve written a plug-in (in the loosest sense of the word) that will display all the keyboard shortcuts for Live Writer 2011, based on Aaron’s post.

This means that when you’re busy typing away, you can get the quick reference with just a single click (yes, I’m aware of the irony of not being able to give it a keyboard shortcut).

Here’s the obligatory screenshot:

Please note, this plug-in does nothing more than display the shortcuts. It doesn’t insert anything into your blog post, bake you a cake, or perform the shortcut for you.

You can download this from here. Oh, there is no installer for this, so you’ll have to install this plug-in manually.


December 3, 2010

Introducing Rollr7–A Dice Game

by @ 09:31. Tags: , ,
Filed under Rollr7, Windows Phone 7

So recently I’ve been looking at Windows Phone 7 apps and learning how to build them, and to be honest, it’s actually been quite fun. So I needed an idea for an app that would really allow me to learn some basics, so I decided upon making a Yahtzee game.

Obviously, for legal reasons, I couldn’t call it Yahtzee, so we have Rollr7 (thanks @Gilly2468).

Here are some screenshots:

One of the things I’ve done with the app is to try and keep your preferences for your WP7 themes. So if you have a light background and green tiles, then the app will have a white background and green score tiles.

The app is a meagre 79p (99c) and can be downloaded from the Marketplace.
Download Rollr7 from the Marketplace


July 30, 2010

Clipboard Capture Plug-in Updated

I always say, if you use one of my plug-ins and you want some enhancement, I can’t do that enhancement if you don’t tell me. Well, I got told. Twice. Granted, one of the requests was a review on the gallery page for my Clipboard plug-in, which was to add the option of setting the quality level for when you use jpgs. The second request was to have somewhere to put in custom alt text for an image.

Both of these additions have now been put in:

This can be downloaded from the Windows Live Gallery


[InsertableContentSource is proudly powered by WordPress.]