January 2009 Archives
A Better Movable Type Search Feature
Posted on January 26, 2009 | Leave a Comment | No TrackBacks
I love Movable Type and have used it for dozens of sites and blogs over the last several years. With each release the platform gets better and better but one thing that's always bugged me is that while the majority of the code is now PHP-based the search feature still relies on a Perl script.
[EDIT: As a Twitter follower pointed out... MT is NOT mostly PHP-based which is true. What I meant to say was that the front-end can be published to a mostly PHP-based site, except for certain things like the serach feature]
While this probably isn't an issue for most users, advanced users will find this somewhat limiting. Most of the templates I develop include various bits of PHP code in them. Since the search feature runs as .cgi none of my PHP code will execute. In order for my site to function I have to have a separate (often stripped-down) template just for the search feature.
Fast Search from MT-Hacks.com is the solution to this problem. It's an easy to use plug-in that will allow you to use PHP in your search template. That alone is reason enough for me to use it. It does however, provide a whole bunch of other features such as faster searches, pagination, and search term highlighting. You can use the plugin for free provided that you include a message noting that your search results are powered by Fast Search. Otherwise, non-commercial licenses are $33 and commercial licenses are $97 for up to 5 blogs... a steal for a plug-in that solves one of Movable Type's biggest issues. Find out more or download the plug-in at the MT-Hacks Fast Search page.
Movable Type veterans will note that commenting is also done via a Perl script and suffers from this annoyance as well. Ryan Taylor at Havoc Inspired has a simple but brilliant solution for this problem.
Being able to include custom PHP code into ALL of your Movable Type templates opens up some new doors for developers making Movable Type and even more robust platform.
Z-Index problem with drop down menus in Firefox 2
Posted on January 11, 2009 | 4 Comments | No TrackBacks
I spent several hours this week troubleshooting an obscure Firefox 2 issue so I'm posting it here in case anyone else has the same problem.
Like many people I use the Suckerfish method for creating dropdown menus in my web projects. I've used it on dozens of sites over the last couple of years without any problems until a few days ago. I had a new site, setup the way I normally do. The site worked fine in every browser I tested in except for Firefox 2, even IE6 worked fine. The problem in Firefox 2 was that my dropdown menus would appear underneath and obscured by all of the content below them.
My first thought was to check the position and z-index attributes on all of the elements but that did nothing to solve the problem. After several hours of Google searching and some good old trial and error I finally nailed the issue down. On the "header" div tag, which contained the dropdown nav, there was an extraneous "overflow: hidden;" attribute. I use overflow: hidden on container elements to clear floats but in this case I didn't actually need it. Removing that attribute instantly fixed the problem.
I'm not entirely sure why Firefox 2 choked on this attribute when every other browser rendered things just fine... but if you run into a similar issue check the overflow elements first. You may find the problem there.
