Archive for the ‘PuterStuff’ Category

A tip for images in WordPress

One of the great features of WordPress 2.x is the ability to upload an image *while* you are composing a post, instead of the old method which was FTP’ing an image and then manually writing a link to the image within the post or using the built-in upload feature that was contained in another section of the admin panel. With this new feature, you now have two options: display the original image or display a thumbnail which links to the original. The second option is useful if the dimensions of the original image are so large that inclusion “breaks” your layout; sometimes, that original image needs a separate display so that the details are legible.

But, what if you would just rather resize the image so that it can be included within the post? Fortunately, the content areas of most WordPress themes have a fixed width. All you need to do now is find out what that width is. One way of doing that is to first take a look at the source code of your page. Scroll down the source code until you find the beginning of an entry (you wrote it, you should know what you’re looking for, right?)

Source Code

Now identify the div tags just above the entry. In my case (theme), I see tags called “content”, “narrowcolumn”, “post”, “entry”, etc. Somewhere within one of those tags are instructions on how wide the browser should display the content area. To find those instructions, you will need to look at the stylesheet for that theme, so just login to your WordPress admin, go to “Presentation” and then “Theme Editor”. Now click on “Stylesheet” on the right. Scroll down and look at the specs for these tags until you find one for width:

Stylesheet

There it is! According to “narrowcolumn”, my content area is 500 pixels wide. So that’s how wide my images can be, right? In most cases – Wrong. Look at your site again. You will see that there is some padding between the text of your posts and the borders. That padding will have to be subtracted from the maximum image width. Jeeze, now I need to go back and find the tag that contains those padding instructions. Hmmm, it’s not there. Nope it’s not here either. You know what? To heck with this! Since I use FireFox, I’m just going to use a nifty little extension called MeasureIt. After it’s been installed, you’ll see a little icon down in the bottom-left corner of Firefox. Click on it and measure your absolute text area.

MeasureIt
(click to enlarge)

So, according to MeasureIt, my max width can be 501 pixels. Just to be on the safe side, I’m going to back off a little and make it 495. That should be easy to remember. That was the number of the F-15 I was assigned to in the Air Force. Or was that 492? You know what, I think I’ll just put a little post-it note on the side of the monitor.

The only thing left to do now is resize my image. Don’t have a program to resize images? Just download a freeware program such as FastStone Image Viewer.

Now I have one more issue to address. The third image above is a thumbnail, but personally I think it sucks that WordPress made it so small, so one of these days I’m going to open wp-admin/inline-uploading.php, scroll down to line ninety-something and change:

$thumb = wp_create_thumbnail($file, 128);
elseif ( $imagedata['height'] > 96 )
$thumb = wp_create_thumbnail($file, 96);

to:

$thumb = wp_create_thumbnail($file, 256);
elseif ( $imagedata['height'] > 192 )
$thumb = wp_create_thumbnail($file, 192);

That’ll double the thumbnail size.

Hopefully, in an upcoming WordPress release, they’ll give us a preference on thumbnail sizes.

What’s wrong with this picture?

I have both the Yahoo toolbar and the Google toolbar installed on my work computer’s Internet Explorer:

Google toolbar on
(Google toolbar on, Yahoo off)

Yahoo toolbar on
(Yahoo toolbar on, Google off)

It would appear that Internet Explorer is having a bit of an identity crisis.

Thunderbird v1.5 Released

Of course there are some grumbles and upgrades woes going on in the Mozilla forums, but I made the move this evening and everything is gravy. The upgrade instructions (from the Mozilla site) call for deleting everything in the Thunderbird program folder, but I just uninstalled v1.07 first and did a clean install.

Make sure to switch to the default theme before installing. It also doesn’t hurt to disable extensions either. When TB first launches it will search for upgrades to all installed themes and extensions anyway.

I like the new function for detecting “email scams”. It will be interesting to see how (or how well) that works.

HB to Me

Did Mozilla know it was my birthday today? They released Firefox 1.5 just for me? Actually, I think I’ll hold off upgrading for a few days to give the extension updates a chance to get caught up.

Another important event happened today. This is the last day of hurricane season. After the season we’ve been through, I think this day should be made a new holiday – National Snoopy Dance Day.

Snoopy Dance

Beat THAT Microsoft

Akin to installing new themes for Firefox, you can also select your own background for the toolbars.

My current Firefox toolbar background

The article doesn’t mention which folder to place the background file. The chrome folder (in the profile directory) worked for me.

Updated:

Another background mod

Go get it

Firefox and Thunderbird have both upgraded to v1.0.6. Didn’t they just release 1.0.5 last week? Yep, apparently its just a patch to the patch. No complaints here. At least they release patches ASAP.

Google Toolbar for Firefox? No thanks

I’d rather save that real estate for my browser window. Besides, Fx has an extension for most of the toolbar features. Let’s take a look:

  • Google Search

Fx already has a search box. Why add another? Plus, the standard search box can be configured to operate with an armload of search engines other than Google.

  • Autolink

Most features already present on a current Google search.

  • WordTranslator

That may be useful for some people, but not enough for me to take up space on my browser window. Besides, I have enough trouble with the English language as it is.

  • AutoFill

Do you really want an extension that saves your credit card info, while transmitting other info back to Google?

  • SpellCheck

This is the only feature worth having the extension on my browser. OTOH, its good brain exercise to actually crack open a dictionary once in a while.

  • PageRank Display

I already have an extension that puts PR and Alexa in my status bar, again, saving browser real estate.

  • Highlight Search Terms and Word Find Buttons

Hint: just press Alt/F.

Just another tool for the Google assimilation of the world, but what do I know?

Want a gmail invite?

I’ve got plenty, but you can also get one here. They’ve got over a million, so you won’t have to beg them as much as you would me :)

Update: The Google Godz have deemed this service unworthy of their greatness. Looks like a million plus invites down the cyber crapper. Who’s loss? Not ours.

That was quick

Less than a week has gone by and Firefox 1.0.4 has already been released, with fixes for security flaws I previously mentioned in a post below.

Firefox Update

Firefox is now at 1.0.3

Page 2 of 3123
Return top