Search improvements

I spent some time last night working with the search software I have installed on djwudi.com, tweaking and improving it so that it gives much more useable results.

While MovableType does include its own search function, I’ve chosen not to use it for djwudi.com because I have a number of pages that live outside of my weblog, which MT would not be able to search. However, I’d run into a bit of a problem with the search engine I am using, and I think I’ve finally got it solved.

The issue that came up was simply that because the search software had indexed the text of every page on the site, there were certain words that were essentially useless to try to search for, because they’re repeated on so many pages. For instance, I was trying to find a page where I’d written up a short description of the MT TrackBack functionality — unfortunately, a search for ‘TrackBack’ returned hits for every single page on my weblog, because they all had the word ‘TrackBack’ on the page.

Digging through the documentation for the search software yesterday (yes, I know, actually reading the instructions is so uncool, but it really does help sometimes…), I discovered that there is a very simple way to tell the search software to ignore certain areas of a webpage. So, some tweaks to my templates to ensure that the software only pays attention to the actual content of each page, and ignores all the navigational or presentational mumbo-jumbo, and I’ve got a far more useable search feature than I did previously. Woohoo!

Catching up, part two

This time, the focus is on Macintosh goodies. All you PC-using heathens can read on in wistful fantasyland, or just find something else to do — like reinstall Windows again. ;)

  • Enough people linked to PerversionTracker that I finally had to take a look. Looks like I’ve got another regular read! Any site that the Opera webbrowser has “taken the cake, and it is filled with plague and cottage cheese,” and that it is “slower than a squashed waterbear” defintely gets my approval. (Via Brent Simmons, along with many other Mac-based weblogs)

  • I’m probably the last Mac afficionado to find out about this, but it looks like Safari is actually going to get tabs. Nifty! (Via MacSlash, MacRumors and others)

  • This could be a fun toy to play with: VoiceBox, a tiny app that will take text files and convert them to audio files using the Mac’s speech synthesis. It will even ‘read’ RSS feeds, so I could listen to websites on my iPod while going to work! Useful? Dunno yet. Cool, though. (Via Rael Dornfest)

Apple bloggers?

There’s been much discussion recently regarding Microsoft bloggers, i.e., people who work at Microsoft and blog. I read a few of them (both because they’re good blogs, and because of the whole “know your enemy” philosophy [grin]).

Got me thinking, though — what about ‘Apple bloggers’? The only one I know of off the top of my head is Dave Hyatt, who works on the rendering engine for Safari. Any others out there I should know about?

No jive talkin'

That was a test, and that was only a test. Hopefully it was at least an amusing test — I was playing with the MovableJive text formatting plugin for MovableType 2.6. I probably won’t use it very often, but it could be fun from time to time.

Unfortunately, at this point, the plugin mangles URL’s (see the comments to the previous post) so I can’t use it to post and link anywhere. With any luck that will be corrected at some later point, though…

Jive talkin'

This is a test, and this is only a test. Hopefully it will at least be an amusing test — I’m playing with the MovableJive text formatting plugin for MovableType 2.6. I probably won’t use this very often, but it could be fun from time to time. Included filters are Jive, Texas Drawl, Cockney, Swedish Chef, Valley Girl, German Accent, and Hunting Wabbits.

(Via the MT Plugin Directory via Mark Pilgrim)

Upgrades galore

Two important (in my world) software upgrades hit the ‘net today: Mac OS X was upgraded to version 10.2.4, and MovableType was upgraded to version 2.6. Both are installed, and both are working like a charm.

This is complete geek-speak, but my favorite change in MT v2.6:

MT::Util::html_text_transform (the default “convert line breaks” code) will no longer add <p> tags around paragraphs that start with certain HTML tags (pre, table, ol, ul, pre, select, form, and blockquote). (Phil Ringnalda)

Since I use <blockquote> a lot when I’m posting links to other sites, this will save me some headaches.

Cookies finally fixed!

Thanks to a comment answering a question of Jonathon’s, I’m about 95% sure that the cookies for djwudi.com are finally being set correctly, so that the comment forms will actually remember your information, instead of just teasing you with the possibility that they might remember one day if they feel like it.

Turns out it was just six characters I needed to add to the JavaScript code in the template. Sheez.

In Scott’s words from his post on Jonathon’s page (emphasis mine):

The cookie code does not pass a path, so the browser by default make the path that of the calling page.

In other words, the code really was setting the cookies — but only for one page at a time. This led to some of the confusion, where both Dyanna and I thought it was working at first, then it wasn’t working again. We’d leave a comment and the cookie would get set for that page, so when the page reloaded, our info was there, and it looked like it worked. But then, as soon as we went to another page, the info was lost again.

Luckily, the fix is easy enough:

If you want the cookies to apply to the entire site, you can adjust the code to pass the path ‘/’ as a parameter…

function rememberMe (f) {
var now = new Date();
fixDate(now);
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
setCookie('mtcmtauth', f.author.value, now, <strong>'/'</strong>, HOST, '');
setCookie('mtcmtmail', f.email.value, now, <strong>'/'</strong>, HOST, '');
setCookie('mtcmthome', f.url.value, now, <strong>'/'</strong>, HOST, '');
}

function forgetMe (f) {
deleteCookie('mtcmtmail', <strong>'/'</strong>, HOST);
deleteCookie('mtcmthome', <strong>'/'</strong>, HOST);
deleteCookie('mtcmtauth', <strong>'/'</strong>, HOST);
f.email.value = '';
f.author.value = '';
f.url.value = '';
}

The bolded bits in the above code were the only parts of my individual entry template I had to change — once those were fixed, I rebuilt my site, and things actually seem to be working now!

The reason that this problem doesn’t affect most people is that by default, MT stores all archives in a single directory. Since every archive page is pulled from the directory the cookie is set for, it works fine.

I’ve adjusted my archives to fall into directories based upon when they are posted — for instance, this entry will end up in the /archives/2003/02/10/ directory. So, when the cookies are only set for one directory at a time, it causes problems. By adding the slash to the above lines of JavaScript, the cookie is set for the entire site, and will be read for every page, no matter which directory it lives in.

Much better.

Surfin' Safari

Dave Hyatt has got to be one of the bravest people on the ‘net I’ve seen. Consider…

  1. He’s a developer for Apple, working on their Safari web browser…
  2. He keeps a weblog where he…
    1. Tracks and responds to what people are saying about Safari, good and bad…
    2. Reports on which bugs have been fixed and which are being worked on
  3. …and on top of all that, he’s actually soliciting requests from readers as for what they’d like to see in Safari!

Kudos to Dave for being crazy enough to do this, and to Apple for allowing him to do this. More companies need to realize that this is a real, effective way to encourage their users. We know that Safari is being worked on, we know that it’s being worked on by someone who genuinely cares about the project, and we know that they care about and listen to what their customers want to see in the product. I can’t think of a better way to build and keep customer loyalty than that.

MT: SimpleComments

Thanks to a clever little hack by Adam Kalsey, all comments and TrackBack pings that I receive are displayed as a single list on each entry’s page, sorted by the time they were received. Much nicer visually than having two seperate listings of responses to one of my posts.

(Via Phil R. and Phil U.)

Creative Commons

There’s been a fair amount of discussion recently in the weblog world about the Creative Commons copyright licensing system. The CC meme spread like wildfire after it was introduced — spread, in part, by the recent Eldred vs. Ashcroft court decision that extended copyright terms. Today, Shelley wondered if she and Jonathan Delacour — who have both decided to forego the CC licence in favor of the more traditional “all rights reserved” copyright — “…can be the only two people who want to have some control over how our work is used. We can’t possibly be the only two people who believe this. Can we?”

Well, other people have already chimed in, but I can too — no, you two aren’t! I took a look at the CC licences when they first appeared, and considered adopting one of them for my weblog, but in the end, also decided not to. At the bottom of every page on this site, you’ll see the standard copyright line, and that’s how I intend to keep it.

Now, I sincerely doubt that anyone would ever go to the trouble of abusing the copyright I’ve claimed. Little of what I write here would really be publishable in any form other than that of a weblog — short comments, the occasional witty-in-my-head comment that very likely falls flat when read by anyone else, and the occasional long, rambling blather about my oh-so-(un)interesting life. However, whether or not it’s something that is of a quality to “deserve” copyright protection isn’t really the point — everything here that I’ve created, I’ve created, and I have every right to determine the ultimate fate of my creations (even if that fate is nothing more than getting lost in the great bit bucket of the Internet).

So — this space, such as it is, is mine, and copyrighted as such. Quote me if you like (preferably with a link back to me — I could use the traffic!), just respect the copyright and don’t steal from me. That’s all I ask. Simple enough, isn’t it?