MainDoctor WhoMusicSoftware
Main Page

Alden Bates' Weblog

Website Management Archives

Page 3 of 5

March 10, 2006

More bizarre search queries

Actual query string used to find my weblog:
"use a 1.5gb image for myspace background"

I could cry, I really could. Anyone who thinks that's a good idea should be banned from the internet.

Another recent query to result in someone finding my weblog was "Princess Alden" *boggle*.

Posted at 8:52 PM | Comments (2)

February 20, 2006

Depreciation without Replacement

The new index page design for issues of TSV, as proudly displayed by the newly added TSV 72 is not valid XHTML. If you run it through a validator, you will get an error.

"Why is it not valid XHTML?!" you may cry in anguish. The reason for this is quite simple - the page numbers are displayed alongside each item using a "value" attribute. If you look at the relevant section of the HTML 4.01 spec you'll see that the "value" attribute has been "depreciated". However the writers of the specification did not give an alternative to "value" that doesn't look like arse.

I tried using css to fiddle with li:before, but didn't like the way it displayed the numbers. I'll demonstrate.

Continue reading "Depreciation without Replacement"

Posted at 9:42 PM | Comments (3)

February 16, 2006

NZDWFC site upgrade

You can now pretty much see why I haven't posted in the past week by going and looking at the NZDWFC site. TSV 72, the first with Adam McGechan's new look design, was mailed out, so to go with the new logo (pictured right) the site also got an overhaul dragging it kicking and screaming into the 00s with validating xhtml!

At the moment, only the main pages are converted over - the archive of back issues still sports the old look (and the editor's weblog is still using the default WordPress template), but I'll be upgrading those pages in stages as well. The pages in the archive will have a special "Archive" menu to hopefully make it easier to navigate, plus I'll be improving their looks and so on. That should keep me busy for a wee while. :)

Posted at 12:19 AM | Comments (1)

January 31, 2006

myspace tubgirled

You may recall I was previously having trouble with people on myspace hotlinking to my LJ icons like crazy. Previously I redirected the image requests from the hotlinking sites to a 5120-pixel-wide gif in order to mess up their layouts.

This, however, doesn't seem to have discouraged hotlinking much. I suspect the problem is that many of the myspacers have page layouts which are already so fubar they don't notice when my gif image screws things up further. So a couple of days ago I went to step 2.

Step 2 involved me changing the redirection to a copy of the infamous tubgirl image (If you haven't seen it before, for the love of God, don't Google it). It's amazing how quickly the hotlinking disappears when people suddenly find they have one of the foulest images in existence on their web page.

Posted at 6:35 PM | Comments (1) | TrackBack (1)

December 11, 2005

Outing scumbags

OK, A scant couple of days after we upgraded Teaspoon to a more secure version of eFiction, we were hacked into. The hackers used an exploit in eFiction to break in and add some code to one of the files. I have patched the exploit in the version of eFiction on our site, and notified the eFiction authors.

The hacker (who had a Russian IP address) changed a file to insert a 1x1 iframe on every page on the site. The URL they used was malformed and didn't work, but would have pointed at, which tried to load a Trojan onto the target's PC.

The registration info on is:
Ezhi Brozkevitsh
Al. Armii Ludowej 24
Warszawa 00-609

I'm presuming he pays hackers to put code onto sites so he can infect PCs for whatever nefarious purpose.

Edit: the eFiction authors have already issued a security patch. :)

Posted at 1:27 PM | Comments (0)

December 9, 2005

Converting FRM/MYD/MYI database files to SQL

As I mentioned last night, I had to restore some database files. Unfortunately the backup I'd downloaded was in a tarred/gzip file with each database table represented by three files with the extensions frm, myd and myi. After googling a bit (dear Google: please don't bother giving me "Supplemental result" listings if the target page is gone and you don't have a cache copy of it. That's just dumb.) I found that these were raw SQL database files.

The only way to restore them is appeared to be to copy them directly to MySQL's data directory - the problem being that I didn't actually have access to the MySQL data directory on the web server in question. You would think, given that phpMyAdmin had given me these files as a backup that it would have an easy way to restore them, but if it does, I couldn't find it.

The solution ended up being:

  1. Install MySQL and MySQL Administrator on my home PC.
  2. Copy the appropriate table files to the MySQL data directory.
  3. Use MySQL Administrator to make a backup in SQL format.
  4. Use the SQL script from the backup to restore the table on the web site.

Once the tables were restored, I used a couple of SQL statements to copy the data across to the appropriate table, and all was hunky dory.

Posted at 9:37 PM | Comments (13)

December 8, 2005

Upgrading to eFiction 2 (the revenge)

Some things were still broken after I did yesterday's upgrade, so I took a look tonight. Some of the fixes were easy, because they were things missing from the style template which were necessary for the new version. They'd turned up to have changed the default sort order on the story lists, which was easily fixed.

However two things weren't easily fixed: the chapter titles were gone (I presume this was a bug in the upgrade script) and the stories no longer had hit counters on them (they've been removed from the program for some unfathomable reason). Fortunately I had backups of the database, so I reimplemented hit counters, then restored the appropriate table under a new name and copied the appropriate values across.

The last step took a lot longer than it should have, for various reasons.

It was a lot of work, but hopefully people should be happier.

Posted at 10:21 PM | Comments (0)

December 7, 2005

Upgrading to eFiction 2

Tonight I spent upgrading A Teaspoon and an Open Mind to eFiction 2, because I found a post on the eFiction forum indicating that there were security holes in 1.1 which could allow people to view other user's passwords.

Looking at my previous entries on eFiction (keep in mind I'm only studying the code briefly here):

  • Fixing the Teaspoon - The disappearing help text appears to be fixed in this version, but I can't tell whether they've implemented anything to fix Mac posting.
  • eFiction sucks part 2 - I don't see any error handling for when the database is down, or when the story file is unable to be written.

Another thing I fixed a while back was the javascript on the "add story" page. There are two methods of uploading a story: write it in a textarea, or upload it as a text or html file. If you select the textarea, it disables uploading, and vice versa, but there's no way to switch, short of starting over.

At some point I will go back and reinsert my fixes... I'm sure the users will be kept busy by the many and varied new features the authors have added to the software in the meantime.

Posted at 10:05 PM | Comments (0)

October 31, 2005

eFiction sucks part 2

eFiction was inherited from the previous management of Teaspoon when it was taken over and I volunteered to act as co-techie. Unfortunately there are many places where eFiction is lacking, and one of those is error recovery.

For instance, if the SQL server is down, rather than fail gracefully, you get errors all over the site saying things like:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/whoficco/public_html/index.php on line 35

Which doesn't look very nice, and doesn't tell the user what the problem actually is. This is because there's no test to see if a database query succeeded before going ahead and using the result set.

Equally not very nice is the fact that if, when someone edits a story, eFiction can't open the file to write the changed text to, it fails silently. Yes, it discards the changes and cheerfully gives the user a "Story successfully changed!" message, despite the fact that it hasn't! As this will cause data loss, I've fixed our version to display an error message instead, so the user can at least press the back button and save their changes externally before contacting us so we can fix the problem on the server.

On a more festive note, Brad has an LJ entry going with cool pictures of Halloween pumpkins.

Posted at 6:21 PM

October 5, 2005

More hotlinking for fun

I enacted my revenge against another hotlinker, but, um, given the state of her profile, I'm not sure she's going to notice.

Strike 1: green, pink and cyan(?!)
Strike 2: crappy snow javascript raining broken images on her page. WTF?
Strike 3: strikethrough. Yes, every piece of text on that page has the strikethrough attribute applied.

Oh, and in IE it has a badly drawn pink sun cursor, and bright pink scroll bars.

WTF?! Get off my Internets!

Posted at 8:09 PM | Comments (0)

September 28, 2005

Time to get annoying (or, Why hotlinking is dangerous)

A while back, someone on hotlinked to the wee image on my Dead Can Dance page, a nice gothic picture of some arched windows. Since they were so kind as to use my bandwidth to decorate their profile page, I put in a redirection, so people see the somewhat nicer animated picture on the Spice Girls page instead, because everyone needs more Spice Girls. For some reason this person changed to hotlinking to another image on my site, so I redirected that one to the Spice Girls image too. They still have the Spice Girls picture on their profile, so they must be a fan after all.

But I grow bored. They didn't specify any width/height attributes when they hotlinked, so when the browser shows the page, it displays the graphic at full size. That means I can, say, redirect it to an image which is 5120 pixels wide and 1 pixel high, and suddenly their nice layout is alllllllll screwed up. But I wouldn't do that, would I? No, I'm a nice person... Oh, wait, I just did.


Posted at 6:38 PM | Comments (1) | TrackBack (1)

August 30, 2005

More fallout from MT 3.2 upgrade

I had to fix two more problems that the MT 3.2 upgrade caused:

1. MTBlacklist no longer seemed to be working with 3.2, so I unloaded it and loaded on the supplied copy of SpamLookup. MTBlacklist's final score was 4380 spams blocked - I'm sure this would have been in the tens of thousands had I not been blocking at the .htaccess level. Hopefully SpamLookup will be as proficient.

2. I was using something along the lines of <MTEntryTitle dirify="1"> to generate the filename for individual entries. Unfortunately with 3.2 the dirify argument (which turns the title into a filename) seems to have stopped regarding '-' as a legal character for filenames, so (for instance) my entry formerly filenamed "stargate_sg-1.html" became "stargate_sg1.html" instead. Am now using the entry_basename as the filename instead, having corrected the entry_basenames for the existing entries to match their current filenames.

*cough* All go now. :P

Posted at 10:50 PM | Comments (0)

Interesting discovery of the day

If a page has a <link rel="next"> tag, FireFox 1.0.6 will prefetch the "next" page on the assumption the user is likely to go there next. In other words, it's treated in the same way as the <link rel="prefetch">.

This is actually in the Link Prefetching FAQ, as I found while googling for more info. I already knew about the "prefetch" link tag, but not the "next" one.

That's all very interesting, since it means if we include "next" tags on chapters in stories when we revamp Teaspoon, FireFox browsers will prefetch the next chapter. On the one hand, it means the next chapter will load faster for the readers, on the other it means if they don't like chapter 1, FireFox will cache chapter 2 unnecessarily. If we switch to static pages, that might not be an issue.

Posted at 6:52 PM | Comments (0)

August 26, 2005

Fixing the Teaspoon

A while back I volunteered to help in the technical side of running A Teaspoon and an Open Mind, a Doctor Who fanfiction site. The site's currently using the eFiction CMS, though Barbarella (the other technical admin) and I will be writing a new CMS as eFiction is not great. Bugs fixed so far:

1. Disappearing Help text
Most of the text on the help page disappeared. The problem turned out to be because the text had < symbols in it, and when the help text was edited in the eFiction settings, either the browser or eFiction would cut the text off at that point. The solution was to double escape the tag to &amp;lt;

2. Broken Mac posting
A user posting from a Mac said that their paragraph breaks were being lost and their stories appearing on the site as one huge lump of text. This was likely to be because the Apple line uses a different byte to signify the end of line, so the solution was simply to convert the end-of-lines to Unix format.

The last item is less a bug than an annoyance. PHP likes appending huge session IDs to the links on the site, so you end up with a hugely long URL with a PHPSESSID thing on the end of it. This causes many problems, including messing up the site's indexing in search engines - because the spiders get a different PHPSESSID each time, they keep indexing the same page over and over. The solution to the ID problem is three lines of code which go in the .htaccess file. Excellent.

That may still not fix the site's indexing in Google because Google is apparently wary of parameters called "sid", and eFiction uses "sid=#####" to select the story to display. It also uses exactly the same title on every single page (the site's name and slogan) which I'm sure doesn't help either.

Posted at 8:16 PM | Comments (0)

August 23, 2005

Open Letter

Dear users.

My site is not your private image hosting server. Please do not remote link to my images. Thank you.

Yours in crankiness,
Alden (Do I have to put "please do not remote link" in every piece of alt text?)

Posted at 8:28 PM | Comments (2)

1 2 3 4 5

Categories Site Map