favicon.ico

About the favicon.ico file and how you can create one.

Ever wonder how some Web sites put their own custom icons in the address bar of the Web browser window when you visit them? Or, if you read your site’s Web logs, why there are so many requests for a file named favicon.ico that you might not have?

As you might have guessed, these two questions are related. The tiny image that appears in the address bar is displayed from the favicon.ico file that should reside in the root directory of your Web site.

There are a number of Web sites that make it easy to create this file based on an existing image, using a Web interface. The one I like is on the chami.com Web site, at http://www.chami.com/html-kit/services/favicon/. Chami is the maker of HTML-Kit, a “standards-compliant, full-featured and multi-purpose development environment for editing HTML and other Web-related file types.”

Click a browse button to find the image you want to convert to a favicon.ico file and select the file. Then click the Generate FavIcon.ico button. In moments, the image you chose is converted into the proper format and ready to download. Copy it into your Web site’s root directory and add a bit of HTML code to the HEAD section of your Web pages (or the header.php or index.php file in the active theme of a WordPress installation — whichever file has the HEAD section). The next time you load the page, the image will appear.

Cool, no?

Now if only I had some artistic abilities.

Apple Releases Software to Set iPod Volume

Apple’s response to a lawsuit.

Someone realized that if you turn up the volume on your iPod and spend a lot of time with it blasting into your ears, it’ll damage your hearing. (Duh.) So they sued Apple.

Apple responded by creating software that enables you to set a maximum volume level for newer iPod models, including the Video iPod and the iPod Nano. Read more about it here: Apple Releases Software to Set iPod Volume

Get Me a Spelling Checker!

I used to know how to spell.

Plagiarism is not spelled plagerism. How embarrassing to have spelled it incorrectly — in the title, no less — of my previous post. I just fixed it.

Spelling checkers in word processing software have made me lazy. Why know how to spell a word when my word processor will simply underline it for me to call it to my attention if I get it wrong? Or, worse yet, simply fix it for me, as Microsoft Word often does? In exchange for convenience, just a little more of my mind is being sapped away by disuse.

WordPress, which I use to maintain this site, does not have a built-in spelling checker. That’s why you’ll see so many typos and misspelled words here. There’s no red underline to flag possible problems, so I just don’t notice them. I have, however, made a special effort to look up the spelling of words I’m not sure about (such as disuse and misspelled earlier in this entry). I do that with the Dictionary widget that’s part of Mac OS X. I leave it open and press F12 whenever I need to use it. Enter what I think is the right spelling and let Dictionary tell me if it recognizes the word. If it doesn’t, I think it out, trying to come up with the right spelling. It’s a good exercise for my brain.

The Dictionary widget is also useful when I’m reading an article online and need a word defined. Rather than try to glean meaning from use, I can just fetch the darn meaning to have a firmer grasp of the word and build my vocabulary.

If I can’t figure out a word’s spelling, I use Google. I enter my best guess at a word in Google’s search box — for example, plagerism — and Google instantly responds, “Did you mean plagiarism?” Uh, yeah. That’s what I meant.

Now at this point, Miraz, if she’s reading, is asking herself why I don’t use MarsEdit, like she does, to work with my WordPress blog. I tried it, but I wasn’t very impressed. I really don’t like using a lot of different software to complete a task. It’s more to learn. It’s more to figure out when it doesn’t work right. In my case, I couldn’t get MarsEdit to handle pictures the way I needed it to and I didn’t want to invest the time to make it work. I’ll probably use MarsEdit to do my blogging during the summer months when I’m away from a handy Internet connection most of the time.

So if you find a misspelled word in these blog entries, have patience with me. It could be my flying fingers unable to hit the keys in the right order. Or it could just be that I thought I knew how to spell the word…but was wrong.

Categories Check Boxes in the Write Post Window

An easy WordPress hack to make your blogging life easier.

If you have more than a handful of categories in your WordPress blog, you may have noticed that the Categories check boxes in the Write Post window has a scroll bar. You’ll need to scroll down every time you want to check a category at or near the end of the list.

This is a pain in the butt. At least it is for me. So I did something about it. You can, too.

  1. Use your favorite text editor (I use TextWrangler on a Mac) to open the wp-admin.css file in the wp-admin folder in your WordPress directory.
  2. Locate the line that starts
    #categorydiv div div
  3. Change the value (12em) in the line that says
    height: 12em;
    to a higher value. I entered 40em (I have 27 categories).
  4. Save the wp-admin.css file back in its directory.

Now open a Write Post page. You’ll see your change immediately.

Of course, this doesn’t work with a WordPress.com blog. You need a server installation to fiddle around with admin files.

Adding “Intelligence” to WordPress

Teaching myself new WordPress tricks.

I made the big decision yesterday that I was going to combine the LangerBooks.com Web site, which is currently in a very sorry state these days, with this site and blog. But that opened up all kinds of new challenges for me.

The big challenge was making book-specific files and links available on just those pages that applied to the book in question. Although I could just put the links in a post and be done with it, I wanted a nicer solution. I wanted those links to appear in the sidebar for that book.

Keep in mind here that LangerBooks.com needs to support eight current titles as well as a catch-all title for out-of-print books. I created an individual WordPress category for each book and one for the catch-all. So I needed nine custom sidebars, as well as the sidebars that would appear on static pages, blog pages, date archive pages, etc.

There were a number of ways to do this and I chose what I thought was the most straightforward way. I used conditional statements to query WordPress about the type of page it was displaying and then generate a custom sidebar for that page on the fly.

This required me to roll up my sleeves and dig into PHP, which I don’t really know. Fortunately, I have a knack for looking at code and experimenting with it to see what it does. And although the search feature for WordPress.org’s Codex isn’t working right, Google can still find and display those documentation pages. So I did a lot of Google searching to find reference material, experimented, and came up with code that would work.

The unfortunate part was that there was no clear instruction to tell me what to do. There were some instructions that gave me bits and pieces of what I had to do. I just put things together to try them out and was very surprised when I didn’t get error messages.

The result is the custom sidebar that appears for the Book Support categories (I currently have 3 of the 9 done) as well as for single pages for a specific category. That’s where I got very fancy, using “and” and “or” codes to string PHP commands. Here’s what I mean; if you know PHP and WordPress, you’re likely to know what I did, too:


    Put stuff to appear on every page here
<?php if (is_home()) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;Put stuff to appear on the home page only here
<?php } elseif ( is_category('24') || is_single() && is_category('24') ) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;Put stuff for MAC OS VISUAL QUICKSTART GUIDE here
<?php } else { ?>
&nbsp;&nbsp;&nbsp;&nbsp;Put stuff for pages that don't meet above criteria here
<?php } ?>
&nbsp;&nbsp;&nbsp;&nbsp;Put stuff to appear on every page here

Of course, this is a highly simplified illustration of the code that works. In my example, I have lots of elseifs and more than one batch of conditional queries. This might be child’s play for some of you WordPress power users, but it’s all new to me and very rewarding when I get it right.

The trick when doing all this is to get the items you want to appear in the sidebar in the order you want them to appear on the pages they should appear. It’s a good exercise in logic and I think it really helped clear the cobwebs out of my mind.

Three down, six to go. Time to finish up.

Later…

I’m about 90% done — done enough to go live with the “sites.” I still have to find and make available a bunch of files for books, including my Excel VQS and my two out-of-print FileMaker Pro books, which still seem to have a bit of life left in them. And I’d like to create a post for each book category that lists all editions of the book — some of them have quite a few editions. And maybe dig up and display all the book covers.

But for now, I’m done. My sidebar.php file is currently 450 lines long — and I don’t use many blank lines. I think I might make my entire theme, a highly modified and plugin dependent version of Exquisite, available for download when I’m finished with the WordPress book Miraz and I are writing.