Just follow the instruction on my previous post by moving the code you have posted.
I think it can be done by manipulating the database entries.