Archive for the ‘Programming’ Category

New: Python hacks

March 17th, 2011 Comments off

I have finally come around to upload two tools written in Python, namely a search tool (MiOsearch) and a tool for giving talks about Python programming (MiOsem). You find both from the following page:

Categories: Python Tags:

Neat tool: Firebug

May 15th, 2010 1 comment

I wanted to track down some CSS bugs, so I searched for some tool to do that. I came across a plugin to Firefox called Firebug. It is simply fantastic. The developers of this tool really knew what they were doing. You can point and click in the HTML code of a page and see exactly what css code defines each element. The padding, border and margin of the elements are displayed directly in the page. You can even edit that CSS code and immediately see the impact in the page. Perfect! This tool will definitely make my life easier. Whenever you want to design CSS code for a site, or track down some odd behaviour due to CSS, I suggest you take a look at Firebug.

Categories: CSS Tags:

Drain Hole template: Listing the contents of a hole with nested file structure, v.1.1

April 29th, 2010 Comments off

Two days ago, I published a template for Drain Hole, that displays the nested structure of a hole. That was version 1.0. Yesterday I realized that I had made a simple mistake, that resulted in an annoying bug. It was impossible to display more than one hole on the same page. The fix was simple enough, so I have now released a version 1.1 of the template, without that particular bug.

Categories: WordPress Tags:

Drain Hole template: Listing the contents of a hole with nested file structure, v.1.0

April 27th, 2010 Comments off

Drain holes normal list template only lists the files in the hole without showing the nested file structure. It is as if all files are on the same level. I wanted to list files such that the file structure is visible, somewhat the way you can view the structure in the left pane of Windows Explorer. Therefore, I have written a template for Drain Hole that reveals the nested structure.

Categories: WordPress Tags:

WordPress twist: Combining NextGen and DrainHole

April 11th, 2010 Comments off

So, my WordPress Hack that ended up as a simple plugin which needed a few tweaks to the NextGen plugin turned out to be overkill. No surprise! The real problem was that the .htaccess file that Drain Hole suggested assumed that the Apache module mod_rewrite was around. Turned out it’s not. So all I needed to do was to provide another .htaccess file.

See also:

Categories: WordPress Tags:

WordPress hack: Combining NextGen and DrainHole

April 7th, 2010 Comments off

NextGen is a really well thought through plugin handling image galleries. It has one obvious drawback; It does not allow me to limit the access to the images themselves. Granted, you can limit the access to pages displaying the images using WordPress user settings, but not the images. Drain Hole is another well thought through plugin that among other things allows you to limit access based on wordpress user status. It does a lot more if you want it to, but I needed access limitation.

Good, then we combine them. Just install them and we’re off. Yeah, right! You could wish it would be that simple. It’s not. Their file placement and URLs do not fit, unless we adjust the way NextGen generates URLs. Therefore I have produced a dead simple plugin that, combined with adjustments to a few of the files in the NextGen plugin, does the trick. For details, go to

Categories: WordPress Tags: