Category Archives: Editorial

Blog acting weirdly..

If you have wondered where expandable code examples have gone and what has happened to non-expandable ones, they have not gone anywhere. I am just making some changes to WordPress to make my own updates easier in the future. I have been implementing new plugin for WordPress and because I have no sandbox installation of WordPress to play with I am doing changes in live.

When I started to write my blog I had no means to present code examples in visually appealing way. First I modified WordPress style sheets and added new css class .code to apply into my examples. Soon after I started to add longer examples and noticed that they destroy the readability of the post. So I created expandable code blocks.

These blocks were created using javascript and embedded php code – needless to say they were really hard to use and extremely prone to errors. So I started to experiment different ways to do the same. In my best attempt I managed to get rid of javascript inside posts but php was still needed, and I was not happy with the solution.

Then I figured out that WordPress plugin is the way to go. It is possible to add new tags using plugin and it is not even hard to do so. Couple hours later I had two new tags to play with and everything looked great for a while. Then I remembered that I still had some customisations in the WordPress style sheets and a javascript file, that my plugin is dependent of, located under some WordPress directories. So I started to move these files under plugin but before I managed to get my job done, I had to stop for a night. And this is where we are now. Hopefully I have time to finish what I have already started today so you can enjoy reading the blog again.

Please, bear with me..