The Minutiae Motherload

Posted April 3rd, 2008 by Mike Cherim

It’s time to get a couple of nasty old Post-It notes off my desk. They’re dusty and faded, they no longer stick to anything, and their edges are curled. A sad and all too typical sight no doubt. On them I see what may be little nuggets of one man’s wisdom, and maybe a question or two (hard to read). Some of it is crap, some of it is gold, that is up to you. Since none is really worthy of an article of its own, I locked them away in a Post-It note safe so to speak. I am now opening that safe — and the contents are spilling out. If something looks good to you, feel free to grab it.

Keyboard Shortcut Blessings

This may sound dumb to most, but if you don’t use keyboard shortcuts you’re missing out. A couple I use at least several times daily, the ones most valuable to me (shown for Windows, Mac users would use Cmd instead of Ctrl I think), include Ctrl+C to Copy whatever’s selected, Ctrl+A to Copy All in area of focus, Ctrl+V to Paste it in the area of focus, Ctrl+Z to undo after saying whoops, and Ctrl+Y to change my mind again.

Adding Gray to your WebDev Tool Bar

If you use GrayBit to test the grayscaled visual/perceivable contrast of your sites, you can add it to Chris Pederick’s awesome Web Developer’s Toolbar for Firefox quite easily. To do it, do this:

  1. Click on the little wrench icon.
  2. Click on Edit Tools.
  3. Click Add.
  4. Enter GrayBit into the description.
  5. Choose URL as the tool type.
  6. Then add to the URL.
  7. Save and it’s ready for instant use.

The Online Trader — Yeehaa

I see lots of commercials on television pitching services aimed at amateur stock market investors. Lots of commercials. I haven’t gone this route myself, but I do have to wonder. Is the online stock market a new and improved [better disguised] Las Vegas?

A Better Post Preview (WordPress)

Not sure about the new WordPress 2.5, but the Post Preview in older versions makes me frown. To preview my post I have to scroll down to an iframe at the bottom of the page, then scroll up to make changes, dealing with two scroll bars all the while. Not a friendly system. What I do instead is scroll down to the preview once, then I right-click (or scroll click) on the post’s linked heading and open it in a new tab. Once I do this I find it’s much easier to switch tabs to view those pages without all that annoying nested scrolling. If you don’t have a linked heading (or other link to click on), you can always add one nobody else will see — just for this purpose. See next…

Authors and Editors are Special (WordPress)

I didn’t write the condition. I found it on the WordPress forums. I don’t remember who wrote it so I cannot credit that person, but if you know, or if it’s you, speak up. The following PHP will allow you to place content — preview link, validation links, and more — for authors, editors, and admins only. In this example, a preview link will be posted for properly ranked users.

    global $user_level;
if($user_level > 6) { // Adjust user level as needed
    echo '<a href="'.get_permalink().'">Preview</a>';
    // Output whatever else you want: validation links, etc.

Cool, Tab Dancing

If you have multiple open browser tabs, using your mouse, click and hold a browser tab and drag it to change the ordering. With lots of open tabs, for better multitasking, I find it’s valuable to group my tabs by project. That’s me, and this may be very common knowledge, but not something you’re born with. This seems to work on all “tabbed browsers” that I know of. I wish this worked on my Windows “Taskbar.”

Your Text is Alive

Did you know you can resize your text on quality web sites? On most browsers you can enlarge your text by going to View > Text Resize or Text Size > Choose setting. On some browsers, you can also use your keyboard to enlarge or decrease the page’s text. Try Ctrl++ on a Windows (Win) or Cmd++ on Macintosh (Mac) to enlarge text. Use Ctrl+- on Win. or Cmd+- on a Mac to reduce the text. Ctrl+0/Cmd+0 on many browsers will reset to the default size. Finally, on some browsers you can also use your scroll wheel equipped mouse. Hold your Ctrl or Cmd key and start scrolling. In Internet Explorer 7 and 8, and Opera, the scroll wheel will zoom the page instead of resizing the text.

Flip the Middle Button

If your mouse has a center scroll wheel, it may be more useful than you realize. Did you know that not only can you scroll with this wheel, but you can click it too. All its uses are perhaps yet to be discovered, but one thing it does can be useful: Click it on a link and it’ll open that link in a new Window or Tab — depending on your browser’s capabilities and configuration.

Where’s My New Favicon?

Since I will often build new sites on existing themes, making a new *ico file for the site is a natural step in the process. But whenever I load a new favicon, seeing it is not instant gratification. I noted it can take days to see the new icon on the site. Why this happens, technically, is something I’m not sure about, but I suspect a deeper or more widespread caching of that file (as clearing the cache won’t do it). To see it right away, though, this seems to make it happen:

  1. Navigate to a root-level page (index).
  2. Copy the URL of the icon itself and paste it in your address bar.
  3. See the garbage code or icon.
  4. Go to another site and repeat step 3 then close your browser.
  5. Reopen your browser and go to your site. The icon should show up.
  6. Rinse and repeat if it doesn’t work. Or just be patient.

Who Needs a Domain Name?

If you’ve ever tried to access a site that shares its IP address but hasn’t yet set its Domain NamerServer (DNS), then you know you’ll end up on another site, not the one you want. You can force the issue locally, though, which can be really handy. On Windows, go to Explorer > My Computer > Local Disk C: > Windows > System32 > Drivers > Etc > Hosts. Open the “hosts” file with a text editor like NotePad. On a new line add the IP address and domain name:, then save the file. You will now have access to the site via its domain name.

Adding the Title to Links (WordPress)

If you use QuickTags JavaScript like that created by Alex King for WordPress (or like my extended version of it) then you know that adding a link to your content is as easy as highlighting (selecting) the word, clicking on the anchor/link button, adding the web address and clicking OK. Then if you want to add the title attribute, you add it in later. You can, however, do it in one easier motion. Before clicking OK, add a closing quote mark, a space, then add title="Your title text with no closing quote. Then click OK.

Straighten Up Your Contact Form Output (WordPress)

If you’re using any version of my contact form plugin that is older than the current build, here’s a bit of code (two nested functions) you can easily add to the script to neaten up the success message output. This code will create paragraphs and it will convert all of the characters just for the success message page output. Here’s what you need to do:

  1. Open the gbcf_form.php file with a text editor like Notepad.
  2. Scroll down to line 1235 (approximately, depending on specific build).
  3. You’ll see this on the line: '<p>'.$message.'</p>';
  4. Replace it with this: '.wptexturize(wpautop($message)).'
  5. Save the file and upload it.

Hunters: Show How Many ‘Bots You’ve Bagged (WordPress)

Speaking of contact form, if you are using my WordPress version mentioned above, you can display the robots-blocked stats if you want. All you have to do is add this code to your theme.

if(function_exists('gbcf_show')) {  // Make sure this can be done
  echo get_option('spamCount'); // Outputs number only
} ?>

You can also add it to the content of a Page or Post, but you will need to use the RunPHP plugin so the scripting can be processed within the $content. Like this: My WordPress demo form has blocked 2050 bogus attempts so far.

Making Room for More (WordPress)

When setting the page order of your Pages in WordPress (assuming your theme supports this), I find it’s very helpful, and smart, to number the pages by fives or tens. That way, if I decide to add a page in the future, I won’t have to edit the ordering of all my pages so I can slip the new page between a couple of existing ones. If your blog theme doesn’t support page ordering, then add this argument, sort_column=menu_order to your wp_list_pages() function call.

Attention Mac Users: If I got any Mac-specific stuff wrong in this post, please offer correction.

24 Responses to: “The Minutiae Motherload”

  1. JackP responds:
    Posted: April 3rd, 2008 at 2:06 am

    Re: WP Post preview — from a slightly earlier version (2.3?) the post is previewed in a new window or tab. Which I find easier …

    RE: mouse middle button … and a single click on the title of an open tab when browsing will normally close that tab (certainly works in IE, Firefox and I think Opera)

    Re: post its … most of my ideas for blog posts are derived from things like “must write about THIS - [sitename]” that I scribble on post it notes during my working day. I then take the post-its home and am inspired to produce fantastic writing. But then I re-edit it in order to come out with the usual level of dross :-)

  2. Joe Dolson responds:
    Posted: April 3rd, 2008 at 10:57 am

    Also re: WP Post preview — from 2.5, as well, the post is previewed in a new window. However, “categories” have been moved down below the post instead of in the compose sidebar, which I find rather irritating…so you still get the opportunity to do plenty of scrolling.

    In regards to the instructions for modifying the web developer tool bar, it should be noted that if you have the toolbar icons disabled, as I do, those instructions aren’t going to help you find anything, unless you happen to know that the little wrench icon represents the “Tools” menu in the toolbar.


  3. Dan Conley responds:
    Posted: April 3rd, 2008 at 1:24 pm

    I knew about a lot of these, but not the middle mouse opening new windows (in my mind it closes tabs, so it was a destructive rather than creative button). I usually hold down control, so I’ll have to see if I like this way better. Thanks :)

  4. Joe Dolson responds:
    Posted: April 3rd, 2008 at 4:35 pm

    I’m not aware of a way to move tabs from keyboard only. There’s nothing mentioned in the Firefox keyboard shortcuts guide, which is otherwise very thorough…so it’s probably just not an option.

  5. John Faulds responds:
    Posted: April 3rd, 2008 at 6:43 pm

    With regards the favicon issue I usually find that once you’ve got to step 3 that just force refreshing your browser (Ctrl + F5) sorts it out.

  6. Paula responds:
    Posted: April 5th, 2008 at 8:42 pm

    While I knew a number of these I did learn a few new things. Thanks for posting.

  7. Joe Dolson responds:
    Posted: April 8th, 2008 at 5:26 pm

    Whoops - sorry, Mike. This is the URL I wanted:

    A bit more official than the page!

  8. Janice responds:
    Posted: April 9th, 2008 at 5:15 pm

    I need help. I am new at blogging–upgraded to wp2.5 I want to know how to write the HTML for jumping from one part of a page to another part of the same page.
    I appreciate any help you can provide.

  9. James Dimick responds:
    Posted: April 9th, 2008 at 10:42 pm

    Hey Mike,
    Not sure if you remember me, but I’ve been a fan of your work for a long time now. We’ve talked online before. It was quite some time ago now though. I use to go by James Kahlin. It was a fake last name I was using. My real last name is Dimick. I’ve been using my real last name for the past couple years now.

    Anyway, I wanted to say that these are all great tips. One little problem I’m noticing with the Web Developer Toolbar tip though. It doesn’t work for me and I think I know why. It seems that the Web Developer Toolbar seems to reformat the way HTML entities are output for the URLs. This is the URL it takes you to:

    It seems to be adding 25’s to all the entities and it seems as though the GrayBit site won’t allow that. But, if I change the URL in the address bar to this it works just fine:

    Now, I’m not sure if this is just a problem on my end or what, but it is a problem I’m currently experiencing. I’d love to get your insights on this issue. :)

  10. James Dimick responds:
    Posted: April 10th, 2008 at 1:17 am

    Well, I just tried posting the problem in the forum there and got banned by Akismet in the process. *sigh*
    So, if they let me back in I’ll try to post over there… I’ll keep you posted. ;)

  11. James Dimick responds:
    Posted: April 10th, 2008 at 4:26 pm

    Hey again,
    Sorry for all the comments, but I just wanted to update you. It looks like I just had the URL wrong (even though I’m not sure why what I had shouldn’t work). You can read about it here.

    Anyway, thanks for your time. Keep up the great work you do here. I’m lovin’ it! ;)

  12. James Dimick responds:
    Posted: April 10th, 2008 at 7:59 pm

    Yeah, sorry I didn’t include it before. I wasn’t aware at the time that it made a difference. But now I do. I’ll be sure to remember that from now on. Thanks. :)

  13. phreakaholic responds:
    Posted: April 17th, 2008 at 10:06 am

    nice tips. even i’m still newbie but i always try to understand it :)

  14. Gill responds:
    Posted: April 18th, 2008 at 9:14 am

    Cool. I figured I’d do the same so I could clear a load of desk space but unless anyone is interested in my Mother’s phone number, her neighbour’s phone number, her telephone provider’s fault line, an unattributed email address, a couple of DOS commands I often forget due to lack of use, the cost of a packet of Doxycycline at the local chemist and a note reminding me to feed the hedgehog, I reckon I’m not going to keep people entertained.

  15. Gill responds:
    Posted: April 18th, 2008 at 10:57 am

    Are you saying I’m old Cherim? Huh? Huh? ;-)

Sorry. Comments are closed.

Note: This is the end of the usable page. The image(s) below are preloaded for performance only.