Arrg kxrrt!

Blog : Posts tagged with 'Wordpress' : Page 1



In which things are fresher

We’re now running on WordPress 3.0, the very latest hot-off-the-presses version I could find. I think everything works, but haven’t tested everything 100% thoroughly yet, so you never know. The PHP version has been updated, too; I did squelch a couple of bugs that popped up in the home-grown parts of the code when passing PHP v5.2, but I think I managed to get them all. Let me know if you can spot any problems. I even managed to remember to update the copyright date at the same time – only 6 months late there.

No comments yet. »

Keyword noise: , , ,



In which there’s no internet, so we’re tweeting instead

We’re still stuck in internet-connection limbo at Symbolic Towers, as mentioned a week ago. We’ve got the phone line all wired up, we’ve told our broadband people that our phone line has changed, and now we’re waiting to be Jumpered. A nice chap from BT Openreach,* to finish the job, has to pop down to our local exchange and plug in a jumper, a short bit of wire that connects our phone line to the rest of the universe. Before then, no internet.**

In the meantime, I thought I might mention that a few weeks ago I thought I might get up-to-date with the top trends of 2008; so I set up an account on Twitter. Well, I thought I’d better get around to it before my preferred username was taken; and it is rather easier to update on my phone than this site is. I’m @forestpines on there, posting such exciting things as “ooh, I’m in the library” and “look, a nice photo”. At some point I will wire up the blog and the twitter account together, so everything is nicely linked, my twitter posts appear here, my blog posts automatically appear there, and so on. That, though, will have to wait; indeed, I’ll probably upgrade to WordPress 3 before that point.

* BT Openreach, I’m told, only employs Nice Chaps. They do tend to drink a lot of tea and eat a lot of biscuits, though.

** I’m in our local library right now, in case you were wondering, just like I had to do last time we moved house.

No comments yet. »

Keyword noise: , , , , , , , , , ,



In which things turn to treacle

I’ve noticed, over the past few months or so, that sometimes this site seems to load rather slowly. The slow periods didn’t seem to match any spikes in my own traffic, though, so I didn’t see that there was necessarily much I could do about it; moreover, as it wasn’t this site’s traffic that seemed to be causing the problem, I wasn’t under any obligation to do anything about it.

As I’ve mentioned before, a few months back I switched to Google Analytics for my statistics-tracking. Which is all well and good; it has a lot more features than I had available previously. Its only limitation is: it uses cookies and Javascript to do its work. Because of that, it only logs visits by real people, using real browsers,* and not spiders, robots, RSS readers or nasty cracking attempts. Often, especially if you’re a marketing person, that’s exactly what you want. If you’re into the geekery, though, it can cover up what’s exactly going on, traffic-wise, at the server level.

Searching my logs, rather than looking at the Google statistics, showed that I was getting huge numbers of hits for very long URLs, consisting of valid paths joined together by lots of directories named ‘&':

Log file extract

That’s a screenshot of a single request in the logfile – the whole thing being about 850 characters long. ‘%26′ is an encoded ‘&’ character. Because of the way WordPress works, these things are valid URLs, and requests for them were coming in at a pretty fast rate. Before long, the request rate was faster than the page generation time – and that’s when the problem really starts to build up, because from there things snowball until nobody gets served.

All these requests were coming from a single IP address, an ordinary consumer type of address in Italy.** Moreover, the user-agent was being disguised. Each hit was coming in from the same IP address, but with a different-but-plausible-looking user-agent string, so the hits looked like a normal, ordinary browser with a real person behind it.

The problem was solved fairly easily, to be honest; and the site was soon behaving itself again. It should still be behaving itself now. But if you came here yesterday afternoon and thought the site didn’t seem to be working very well, that’s why it was. I’m going to have to keep an eye on things, to see if it starts happening again.

* and only if they have Javascript enabled, at that, although I know that covers 99% of the known world nowadays.

** which made me think to myself: “I know I’ve pissed people off … but none of them are Italian!”

No comments yet. »

Keyword noise: , , , , , , , , , , ,



In which we anticipate the new design

Incidentally, the Grand Redesign plans, as mentioned here several times previously, are still trundling along at their own pace. Parts, indeed, have already been finished and are up on the server; although, as they’ve not been linked-to, nobody can get to them yet.

The slowest part, though, has been: backtracking through the entire post history and editing every post to conform to the new type: proper tags, proper excerpts, and so on. It’s a long slog, given that there are 3 1/2 years’ worth of posts,* and rereading them all has been hard work. It’s been a strange experience, too, because in many cases I’d forgotten an event, and reading all the posts jogged my memory in unexpected ways.**

The end is in sight now, though; so it won’t be long before I can check everything over, finish tidying up the new design, and put it all live. Fingers crossed that when it does go live, it’s all going to work.

* about 750ish, following the long hiatus last summer

** In some cases I’ve completely forgotten events – there are some posts where, if someone had showed them to me, I wouldn’t even have realised that I’d written them myself. And there are plenty of “guarded posts” where, now, a few years later, I’ve forgotten exactly what events I was describing

3 comments so far. »

Keyword noise: , , , , , , , , , , , , , ,



In which we discuss tagging and filksonomies

Another design point that’s come up as part of the Grand Redesign I keep promising you: tagging. The little bundle of links at the bottom of each post that I didn’t really think did very much.

I was a latecomer to tagging. When this site first started, it didn’t have any for the first month or so. After a while I started adding them, pointing them to Technorati. Back then, WordPress was still on version 1.5.something, and it didn’t have any built-in tagging support. I don’t like to have too many plugins, and I didn’t think that tag management* mattered that much; so I wrote all the tags manually. Like this:

<small>Keyword noise: <a class=”tag” rel=”tag” href=”…”>tag</a></small>

Which worked, quite well; there was a visually distinct “tag” class, because I wanted tag links – which all led to Technorati – to be visually distinct from the rest, which would go to something more topically relevant.

Things move on, though, and WordPress has since gained built-in tagging functionality. Given that I’m redesigning the whole site, and putting in new built-from-scratch layout templates, I thought I may as well switch to using a more organising tagging system. For one thing, it means less typing each time I write a post. All that code up above is replaced by one little chunk in the template:

<p id=”thetags”><small><?php the_tags(‘Keyword noise: ‘, ‘, ‘ ,”);?></small></p>

I know all those commas and quotes look a bit confusing; but really they’re not that bad. And the point is: that bit of code there only has to be written once; the previous chunk had to be typed out every time. The most awkward part is that WordPress isn’t flexible enough to let you set the class of each link individually, hence the <p class=”…”> at the start.** The big change this leads to, though, is that the tag links no longer point to Technorati. Now, they point back to the site itself: you get a page containing every post with that tag on. And, already, that’s shown that people do indeed click on the tags. People, particularly people coming from searches, do seem to use them. Whether they find them useful or not is another matter, of course;*** but they do get used.

Doing it this way means that I put more tags on each post, simply because there’s much less typing to do. Conversion, though, is going to be a bit of a job. There are 760-odd posts on this site, all of which I’m having to reread and re-tag. It’s going to take a while, but hopefully the majority of it will be done by the time the new design is finished.**** The only problem with this transitional phase is that: the current template is, because of its age, completely unaware of tags. So it doesn’t really know what a tag-based archive page is; so when you click on a tag, there’s no explanation as to what you’re looking at. I’m not sure if this is going to be a problem for you readers or not; and, hopefully, it’s only going to be a short-lived situation.

The word “folksonomy” has often been used to describe this sort of tagging system. I’m not sure it’s an ideal term for what I’m doing, though. “Filksonomy” might be more relevant: a bit like a folksonomy, but rather more whimsical and silly.

* as opposed to tagging itself.

** it has also buggered about with the quote marks in that fragment of code. Whatever you do, don’t copy and paste it – if you want to use it, retype it!

*** particularly now they point back within the site rather than outwards to see what other people have said on the topic.

**** In any case, there are other parts of the new design that also need each post checking and editing.

No comments yet. »

Keyword noise: , , , , , , , , , , ,


Design points

In which nothing, design-wise, is accomplished

As I mentioned recently, I’m embarking on a Grand Epic Ground-Upwards Redesign of this site, because, well, the design hasn’t been changed since I first set it up. I knocked it together in a few days holiday in August ’05; back then my holiday year ended in August and I often had a few spare days at the end of the month where I had nothing to do and needed to keep myself occupied. In 2005, this blog was the result.

Anyway, my point is: it was put together in a bit of a hurry, with most of the design code ripped out of a standard theme I downloaded, without me really understanding what each bit did. The design’s always had a few rough edges, and there are lots of things that I’ve meant to develop further but never have. Hopefully, some of those points will be addressed, attacked, and taken by storm.

Thinking about the design, though, and what I want it to achieve, has made me thnik about one of the things I was most unhappy with when I first put this site together. One of the things I liked about this theme when I first saw it was:* the little boxes for the date on each post. You know, these ones:

Date with cardinal number

But one thing I didn’t like, though, was the cardinal number. Maybe it’s because I’m English, that that’s how I was taught, but when I read a date, I always read it with an ordinal number. “January 11th”, not “January 11″.

I can’t remember, to be honest, if it was possible to fix that easily when I first started using WordPress. Possibly it was, possibly it was something that’s been added later.** In any case, I didn’t fix it. I know I tried to, at one point; but abandoned the fix and didn’t go back to it. Then I forgot the issue, until, coming back to the redesign, I tried the fix again the other day. When I retried it, I remembered that I’d given it a go before. Because this is the result

Date with ordinal number

Those two extra characters mean that on most days, the text is just marginally too long to fit in the box. The box gets pushed down. Which isn’t so bad; but, it doesn’t always happen. You can’t necessarily know what the date box will look like; how it will relate to the elements around it. Moreover, I don’t know how it will look on other computers, where the fonts have slightly differing metrics to mine.

There are ways to fix it, of course. The box could be slightly wider. I could make sure that the horizontal line always comes underneath the date box, although that might leave annoying white space under the post title. The question, though, is whether it’s worth doing. However many times I tweak it, I’m not sure I’d ever get it quite right based on the current design.

And so, this all is partly why I’m going to start pretty much from scratch. The risk is that I’ll reinvent the wheel; the upside is that at least I’ll know how it works from its heart.

* and still is

** To be pedantic: it’s not a feature of WordPress itself, it’s a feature of PHP, the underlying language. I’m too lazy to go back through PHP’s version change logs and find out when the feature in question – the “S” character in date formatting strings – was added.

No comments yet. »

Keyword noise: , , , , , , , , ,



In which I try to update the site

An administrative note: I’ve just upgraded the site to WordPress 2.7, the new, latest version, before I start on the planned epic redesign. And: it’s different. To you, the site itself should look just the same as before. On the underside, writing and managing the site, it looks completely different. I’m all-at-sea. Everything has moved about, and it’s going to take me a few days to relearn how to work the thing. That’s upgrades for you.

One comment. »

Keyword noise: , , , , ,


Defence In Depth

In which we discover we’ve been bad, and have a rant about why

A couple of weeks ago, I discovered that my site had, apparently, been compromised, but my hosting company had handled it. WordPress had been broken in the process; but I’m not entirely surprised. Nevertheless, I thought everything was now happy.

This morning, though, a letter from Google lets me know: it hadn’t been fixed. My site has, for the past fortnight, been serving up crap to any passing search engine. This can’t be good. I don’t blame my hosting company: what they did do was above and beyond the call of duty, and they can’t be expected to understand and trace every twisty little maze of code paths in WordPress that might result on something being sent back to the client’s screen.*** What it does make me want to rant about, though, is PHP.

PHP is – if you’re not a geek and haven’t heard about it – by far the most common “web-programming” language around today. Its modus operandi is: you intersperse chunks of programming code in and around the static content in your web pages. When your webserver reads a page, it will run the chunks of code as a program. In WordPress’s case, the chunks of code run off to a database and fetch my posts, your comments, and so on, from it, and send them back to a client. Thus, one web page can output many posts, managing them is much easier, and so on. All well and good.

PHP, though, is … well. It’s not exactly the best language for the job, which is being polite about it. I’ve been doing lots of programming in it myself lately, for our Office Intranet, and it’s just not as rigorous as other languages. The syntax doesn’t somehow seem as thorough. Apart from the little differences you always get between languages,* it has little corners that feel slightly wrong when I use them, as if I’m transgressing the boundaries between types of programming object in a bad and dirty way.

That’s just a minor thing, really, just me quibbling. What my big problem is, what makes PHP an utterly unsuitable programming language for its job, is one particular feature much adored by people who want to take control of your website and use it to advertise pr0n and drugs. It’s a feature which is unutterably stupid, so stupid I can’t believe anyone thought it should have been created. PHP will, if you like, go and read a file from anywhere on the internet, and run it for you. Which means that a shifty-looking programmer who gets illicit access to the files on your website only has to add a couple of lines of code, to get complete control of everything. Bang. Like that.

Now, you could say: well, FP, you shouldn’t have been using FTP. And you’re right.** My hosts offer SFTP instead, and I should have been using that. There’s no good reason to use FTP either if you have an alternative available. But that doesn’t mean that the next hole along the line shouldn’t be blocked either. It’s called: defence in depth. At work, we have a high fence round the whole site, and an alarm system just inside it; but that doesn’t mean that we leave the office buildings unlocked. Security shouldn’t be brittle; ideally it shouldn’t be thin either. Once you’ve breached the first layer, the tools to complete the job shouldn’t be left lying around.

* The difference between ‘elseif’ – which is a PHP keyword – and ‘elsif’, Perl‘s spelling of the same thing – will forever damage my brain.

** I have a good story about how weak FTP can be – but it can wait for another time.

*** and, indeed, it’s my own fault; I should right away have compared the live files with my known-good backups.

2 comments so far. »

Keyword noise: , , , , ,


Bad news

In which we get hacked

It’s never a good sign when you come back from tent-shopping (a story for another day), check your email and find an emergency security alert from your web-hosting people. It’s an even worse sign when it says: your site has been compromised. Ah. Oh dear.

My FTP details had been compromised, apparently. This is intriguing, because my FTP password is unique, unrelated to any other I have, and stored solely inside my head. Either some sort of network-sniffing was going on – entirely plausible with the entirely insecure FTP* – there’s some flaw in my hosts’ FTP daemon, or the fault lay elsewhere.

Anyway, it’s prompted me to upgrade myself to WordPress 2.5, released recently. Upgrading WordPress is one of those jobs which I tend to put off and put off, for no good reason because it’s really not that painful; and there’s a good chance that WordPress was the loose link here. Old versions do have known holes, and if I’d upgraded sooner, the break-in might never have happened.

* I nearly said “FTP protocol” there. But that would be “File Transfer Protocol protocol”, which is Just Wrong.

8 comments so far. »

Keyword noise: , , , , , ,


Grumble grumble

In which we have problems

Well, in addition to not being able to find any of the Christmas presents I want to buy in the shops; the computer has started misbehaving. It crashed in the middle of an update, and hasn’t been working right ever since. For those of you who have been on the internet since the early 90s: I’m posting this using the text-only browser Lynx. because it was the only one I could get working quickly whilst getting the rest of the machine back on its feet.

So if anything in this post looks a bit strange, that’s because I can’t really see what I’m doing, because the text-entry widget in Lynx is a bit…

The Plain People Of The Internet: So what was the explanation for all those other posts looking a bit strange, then?

Me: Har har.

More whining posts tomorrow; or if I’m in a good mood, I’ll tell you about the pantomime I went to see.

Update: Although Lynx lets you create posts in WordPress, it doesn’t seem to like you editing them. Grrr, again.

One comment. »

Keyword noise: , , , , , , ,


Search this site



E: feedback [at] symbolicforest [dot] com

IM: Ask me if you'd like to know


Post Categories

Artistic (118)
Dear Diary (349)
Feeling Meh (48)
Geekery (109)
In With The Old (34)
Linkery (37)
Media Addict (164)
Meta (79)
Photobloggery (94)
Political (113)
Polling (7)
Sub category (19)
The Family (31)
The Office (70)
Unbelievable (53)