Archive

Archive for July, 2006

New Theme

July 23rd, 2006 alex 2 comments

I ported my site’s theme to WordPress using Kubrick as the template.
After a lot of effort, I got Internet Explorer to render it reasonably well. It still doesn’t draw the underlines beneath the headers (h1, h2, etc). But at least it has got the layout right.

The main problem was that IE doesn’t recognise the CSS selectors I was using. I wanted to use the child selector: .parentClass > *. Instead I have to use the descendant selector: .parentClass *. But for relative sizes, like { font-size: 85% }, using that selector causes grandchildren to be shrunk twice. So I had to override it for them:

.parentClass *
{
font-size: 85%;
}

.parentClass * *
{
font-size: 100%;
}
Categories: Technical Tags:

Installation Notes

July 20th, 2006 alex No comments

Installing WordPress is really easy.

One thing I worried about was security. Being written in PHP, WordPress has the disadvantage that all of its files are public: even the configuration file that stores your database credentials. They can’t be read in a browser, but they can be read by anyone with a site on the same server.

Under UNIX, PHP scripts are usually run as the user ‘nobody’. This is why the config files have to be public. Ideally, WordPress should impersonate you. Then you can make the config file private to protect it from other users.

After a bit of searching, I found a solution that does just that. The trick is to make WordPress run as a CGI script. You can’t just put its files in the CGI directory because you’d need to modify every WP page. Instead, you redirect all browser requests to a single CGI script. The script then calls PHP to render your page. See PHP Wrap, and The WordPress forums

Categories: Technical Tags:

untitled blog

July 20th, 2006 alex No comments

So, my first post in my new blog. I had one a couple of years ago that I hosted myself (PyBlosxom). When I moved house, though, my computer ended up in my bedroom and is too noisy to be left on overnight. And so my blog died. This time I’m trying WordPress, mostly because it written in PHP like the rest of my site. Getting PyBlosxom to use my dynamic PHP headers was a pain. Hopefully this will be easier.

WordPress asks for a blog title when you install it. I wasn’t expecting that, though I should have. I thought of some long and boring titles first, then some silly short ones. I liked “snowblind” except that it sounds a bit lame. I’ve settled on “undershot” until i find out whether it’s already taken.

Categories: Technical Tags:

Switch to our mobile site