After some success with the rotating banner images, I decided to take Jeb up on his offer of doing rotating descriptions. I’ve had Gandalf’s quote about tempermental wizards for a while now. I don’t really have much else to say, but I picked up some movie quotes from Holy Grail, Raising Arizona, and Princess Bride. I like some of the quotes, but others have to go. If there are any you don’t like, let me know and I’ll get rid of them.
Jeb sent me some instructions and code about how to make this work. First, even though you might see /ted/files/mt/ in the URL of your browser you are actually viewing /ted/files/mt/index.html The internet always defaults to index.html if it can find a file of that name. Otherwise you see a list of all of the files in that location. But you can’t do this random stuff with simple html code, you need php code. That means I had to get rid of index.html and write a file called index.php. On this site, the internet looks for index.html first but then tries index.php. So you will still just see /ted/files/mt/ but you will be viewing /ted/files/mt/index.php.
But Movable Type doesn’t seem to allow you to delete files. Even though I renamed index.html to index.php, it still left a copy of index.html in place. So I had to FTP to the site to delete (actually rename) index.html. I had tried to FTP this weekend without success, but somehow I was able to log in last night without a problem even though I wasn’t even logging in to the correct folder. I logged on to mac.fiveforks.com but somehow it knew to stick me in the users/fiveforks/sites/ted folder.
The different quotes are included in a file called blogquotes.inc. Jeb said I could create this as new template, but when I did that, I didn’t actually see the file anywhere and neither did the code in index.php. So I wrote a text file by that name with all my quotes and uploaded it to the site. Once I did that it worked out fine. That was the first php file I have written.
All pages except the main page will keep the Gandalf quote because I would have to change all of those file names to .php and also make sure all the links are pointing to .php files. That seems kind of overly complicated for what I’m doing. Eric gets around this by including his description in the banner graphic. The other advantage of that is the description always goes with the picture showing.