Don't Back Down

Posted by Chad Everett on February 22, 2008

Disable Template Syntax Highlighting in Movable Type 4 »

One of the more challenging pieces of the Movable Type administration interface in version 4 is the syntax highlighting when you are editing your templates. That's not to say tha the highlighting is entirely bad, because it can be nice, and brighten your day. Rather than having a plain old black and white text box, you get colors, and line numbers, and it does make things work a bit better. In 4.0, however, you had problems with cutting and pasting. Though improved in 4.1, there are still some problems - notably slow load times.

While you can disable the syntax highlighting (known as CodePress) by clicking on a button, the problem is that the script still loads and processes the data on-screen before disabling the editor, meaning that load times can still be slow. What's worse is that the preference is stored in a cookie, so if you're on another computer, or if another user logs in, the highlighting comes right back. Because of this, I've seen repeated requests on disabling the highlighting permanently. Unfortunately, you can't just remove the codepress directory or you'll get an error and be unable to edit your templates at all. Luckily, there is a solution.

Read "Disable Template Syntax Highlighting in Movable Type 4" »

Posted by Chad Everett on January 30, 2008

The Effect of Multiple JavaScript Files on Page Load Time »

One of the problems that you may encounter when you add new features to your site is that you run the risk of slowing down the page load time. Before adding anything to your site, there are a couple of things you should check out. Even if you aren't considering adding anything, you may want to take a look, just to see what's what.

First, take a look at Web Site Optimization. In the interest of disclosure, this is a client of mine for Movable Type Consulting, so I'm not a completely unbiased observer. But the site is a good one. You can use their free web site analysis tool to see how long it takes your page to load. A quick look tells you how long it takes the items on your page to load - HTML, images, scripts, styles and the like. What's even better is that you get a good look at how long it will take not just on your high-speed connection, but how long it might take on a slower connection as well, and some basic tips to speed things up. I'll talk about that more in a minute.

Read "The Effect of Multiple JavaScript Files on Page Load Time" »

Posted by Chad Everett on November 27, 2007

Using Yahoo! Pipes to Extract Data You Want »

Let's say that you've read all the hubbub about aXXo - one of the most popular seeders of movies, whether you like him or don't - and how he suddenly removed all of his torrents from The Pirate Bay. And you want to be sure that you're getting only true aXXo releases, because you know all sorts of junk gets put out with variations on "axxo" in the title, just so everyone will download it. Hey, it happens.

You could go to a number of other places that allow you to pull an RSS feed by user. But that would be the easy way out. So you decide to stick it out at The Pirate Bay and hope that aXXo comes back. Maybe he will, maybe he won't. Or maybe you just want to learn something. Then read on.

Read "Using Yahoo! Pipes to Extract Data You Want" »

Posted by Chad Everett on October 12, 2007

Making Your Movable Type Menus Snappy Again »

When Six Apart released the latest version of Movable Type, the software underwent a massive rewrite. The interface changed considerably from what it had been, and by most accounts it is a good change. There are, however, a few things that just don't work quite right.

One of the things that is perhaps most frustrating is the editing box. There is little that can be done with this for now, especially if you want to maintain the WYSIWYG editor. Similarly, the syntax highlighting function of the template editor causes problems too, especially on lesser-used editors like Opera and Safari. So we have to focus elsewhere, perhaps on the menus.

Though the drop-down menus are certainly cool, they tend to get stuck open, and that is terribly annoying. There is almost nothing worse than trying to work, only to find yourself sitting there looking at a menu that appears to be looking back.

Read "Making Your Movable Type Menus Snappy Again" »

Posted by Chad Everett on February 9, 2006

Database Backup with Transact-SQL »

I've recently installed the Microsoft Small Business Accounting package. I have to say I'm enjoying it and think I'll keep using it. Unfortunately, I didn't like the Business Contact Manager for Outlook, as though the two would supposedly talk to one another, I didn't think it integrated particularly well on either side.

In any case, the application makes use of MSDE for database storage. This is all fine and dandy but it doesn't really help with backing up data or anything of the like. So I had to go digging through pages to find some decent Transact-SQL references. This one is to back up a database from the command line.

Read "Database Backup with Transact-SQL" »

Posted by Chad Everett on January 16, 2006

File Uploads Through HTML Forms »

Make sure your form is set to use the "POST" method. Make sure that the "enctype" is "multipart/form-data". Add a field of type "file". That's it for your HTML. The rest of the work is done on the host side. And that isn't really that hard either, but different browsers make it more challenging.

Read "File Uploads Through HTML Forms" »

Posted by Chad Everett on January 12, 2006

Preventing Directory Listings »

It is a good idea, for security reasons, to prevent visitors to your site from seeing the files in any given directory. While this will not prevent users from accessing the files, it will keep them from knowing what files are there, which does help to some degree. It's easy to implement such a feature using the .htaccess file.

Read "Preventing Directory Listings" »

Posted by Chad Everett on December 3, 2005

Changing the Default Windows Wallpaper »

I use remote desktop (terminal services) quite a bit. I also regularly use other remote access methods such as PCAnywhere or VNC. As such, I'm almost always greeted by the default wallpaper when logging onto a PC. Much of this is courtesy of Dell, but others do it too. Yet I couldn't figure out how to get rid of it.

Read "Changing the Default Windows Wallpaper" »

Posted by Chad Everett on December 1, 2005

HTML Titles with Quotes »

As I was working on a project, I noticed that the page was no longer rendering in IE (6.0, XP). Strangely, the title had turned into just the URL, as if there was none, and the styles were gone.

On a whim, I moved the title attribute above some meta tags, and it jumped right up on the page, indicating an apparent problem within those meta tags. Sure enough, after looking for just a moment, I found a set of double quotes contained within the tag. Oops.

Apparently IE (6.0, XP) doesn't like this. Interestingly enough, IE on a Mac (5.2, I think I was told) and Firefox, on either Mac or PC, interpreted the string correctly.

Posted by Chad Everett on October 28, 2005

PHP Image Rotation »

While trying to hastily assemble a Javascript image rotation script, it occured to me that you could probably do the same thing with PHP - and it would not only be easier, but more reliable, since PHP happens on the server-side, independent of the browser someone is using. Sure enough, a short search resulted in an easy-to-use image rotation script written in PHP.

Posted by Chad Everett on October 20, 2005

MySQL Search and Replace »

I really, really wanted to do a search and replace in MySQL, but I just couldn't find it. Then I did.

      update tablename set field = replace(field,'search','replace');

Read "MySQL Search and Replace" »

Posted by Chad Everett on September 15, 2005

Date Displays with PHP »

Just a few minutes ago, a friend asked about displaying a future date on his web site. In this particular example, he wanted the name of the next month. In other words, he'd like the word "October" displayed, since it is currently September. Next month it should change to "November", and so on.

Read "Date Displays with PHP" »

Statistics and Navigation

"Don't Back Down" contains 3 pages in the "Code Talking" archive. To browse all of them, use the navigation below.

1 | 2 | 3 | Next »