I refined this a little to make it a bit easier to use. All credit goes to the previous author, I just shuffled the code around a little. I have used this contrib for 5 years now and always forget the syntax so I combined all the code into one function.

Complete package +update guide

More...