random

"Press This" bug

The Press This bookmarklet sends you to a page using white text on a white background in Safari. It may seem like it isn’t there, but by selecting the textbox the text in the editor reveals it is functioning properly, whiteness of text aside.

One option is saving as a draft and then going into the admin page and editing it allows you to see the text that wordpress accidentally hides.

A better temporary fix for me is to edit the press-this.php file located in the wp-admin folder. I changed this line:
wp_enqueue_script('editor');

to this:
// wp_enqueue_script('editor');

That means no rich text editor, but I don’t really use that anyway. Besides, it is much more useful to see the text.

see more: WordPress › Support » Press This bug

Standard
technology, tips, wordpress

The Perils of Using a Free WordPress Theme

Take a look at what happened to this blog’s hit counts after switching (briefly) to a new and free WordPress theme downloaded from the official WordPress website.

Before I used my own variation of the freely available sandbox theme. I switched after updating the template andlosing some of my work on it. Now I’ve gone back with though I haven’t put any real effort into making the site look “good.”

Since replacing the theme, my site’s stats have returned to normal. I won’t name the theme that killed my blog’s stats for about a week, because that’s mean, but it should serve as a warning. By itself the sandbox theme is fairly SEO friendly, but with with a little tinkering you can get something that knocks the mittens off kittens. Sandbox is the exception though, not the rule. Many of the themes available out there a garbage. It is better to make your own or pay someone with brains to do it for you.

Remember, free is sometimes good, but not always.

Standard
design, wordpress

A Temporary Fix to Keep WordPress XHTML Friendly

Today I discovered two bugs in wordpress that keep it from being valid xhtml. They don’t happen in all occasion, but I was lucky enough to hit both with a project I was working on.

The first bug happens when you are using the links widget and have more than one category of links. What you get is multiple items marked with the same id. That is a no-no. Fortunately a kind person offered a fix right in the comments of the bug report.

Here’s a stupid simple fix. Add this right before the call to wp_list_bookmarks() in [widgets.php]:
$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);

The second bug is when the Archives widget is used and the “Display as a drop down” option is checked. The problem is that it uses “onChange” when it should use “onchange.” To fix this just do a search & replace in the widgets.php file.

I love WordPress, and I am glad that these fixes were easy, I hope that they (along with some of the other xhtml issues) get sorted out in the next release. If they don’t you’ll have to reapply these changes every update until they do.

Standard
code, technology, wordpress

Update to Picased the WordPress Picasa Widget

Picasaed has been updated to version 0.4

picasa web iconPicasaed works pretty much the same as the Flickr Widget, but doesn’t use tables, because no one likes tables. It is all sorts of XHTML friendly, if that’s what gets your motor running. It doesn’t do anything fancy, it just displays X number of photos from a specific album. If it doesn’t work tell me and I’ll try to fix it.

Version 0.4

  • Picasaed now uses the thumbnail image (faster loading!)
  • photo titles are used when present
  • photos now link to album
  • images have proper alt tag now
  • optimized code

Download PicasaedMore Info

Standard
technology

Google's Emotionless Blogspot Robots Kill Google's Blog

A friend of mine recently told me about some troubles he had when Blogspot’s spam detection system decided that his blog was a sblog (spam blog). The process of verifying that he was a person and not a spam robot was a little annoying, but the real problem is that he could have lost everything he’d done on the blog if he hadn’t acted in time.

Everyone who knows my friend thinks it is pretty obvious that he isn’t a computer program designed to create spam, and to folks that read his blog it is also pretty obvious that he isn’t spamming the web. But even then, when I heard about Blogspot making that mistake I thought it was a weird random crappy occurrence.

As it turns out that might not be the case. It seems the system Blogspot is using to find sblogs might need some fine tunning. Why? Well, Google’s own blogspot blog was temporarily erased and their account was deactivated. During that time someone else grabbed the blog url and started playing with it. Google fixed their mistake pretty quickly, but if that happened to someone else I doubt the process would have been so quick and painless.

This should serve as a reminder of the risks in allowing someone else to control your content (whether it is a blog or a DVD you bought). It is a fragile relationship. What makes things worse is that folks can’t easily backup a blogspot blog, though they do offer a complicated ten step procedure to save your blog. Why make what should be a one click process a ten step process, most likely to make it difficult for people to take their blog somewhere else. Blogspot benefits from hosting content.

WordPress.com allows folks a way to export their blog as XML in one click, which is great. Even then you don’t get the same control as hosting your own blog, but you do get much more safety than blogspot. Many folks learn the hard way that you should backup your computer files often unless you don’t mind losing all your stuff, the same goes for blogs. And if your blog host doesn’t let you do that then you should look elsewhere.

Standard
code, technology, wordpress

XAlign, A TinyMCE Fix for WordPress

It’s bothered me that TinyMCE, WordPress’ default rich text editor, uses the align attribute. For example if you want to center some text and use TinyMCE you’ll get code that looks like this:

<p align=”center”>My centered text</p>

Why is that a problem? Here’s the list

  1. It is not valid strict xhtml
  2. It is deprecated transitional xhtml
  3. It does not function as expected across browsers in all cases

Anyone writing new code should aim to have valid strict xhtml. Why? Because strict code will offer a better experience for everyone across browsers, it will be easier to update, and it is more future-proof (though nothing is 100% future proof). Hopefully WordPress will come up with a built-in solution soon and render this plugin pointless, but until then this works.

Download

Standard
mac, technology

reCAPTCHA: Captcha with point

We’ve all been to sites which require a user to type in a word to prove that she isn’t a evil spam robot, well that verification system is called CAPTCHA. I don’t know how I feel about CAPTCHA… actually, I lied, I know exactly how I feel. I don’t like it. But I also know that it is sometimes needed, or at least it is sometimes felt that it is needed.

To be honest, WordPress does a pretty good job of keeping spam out, between the Bad Behavior plugin and the Askimet plugin no one I know has had a burdensome spam problem. I don’t need an extra annoying step for my users. I also know that I’ve decided not to participate in discussions on some websites after seeing the hoops the site owners wanted me to jump through.

Regardless of your feelings for CAPTCHA there is a new type of CAPTCHA and it is being called reCAPTCHA. On the surface it works exactly the same, asking the user to type in the word shown. The difference is that the words being typed in help digitize books. What difference could a few words make? Well, the reCAPTCHA people estimate that “150,000 hours of labor per day” is spent on solving CAPTCHA’s.

So if you are a Site Owner who’s determined to force users to use verification systems like this you can at least make that wasted time useful to the rest of the internet.

There is even a WordPress plugin and an automated email protection system, called mailhide. Oh, and it’s all free.

Standard
technology

Picasaed, the WordPress Picasa Widget has Been Updated

Picasaed has been updated to version 0.3

picasa web iconPicasaed works pretty much the same as the Flickr Widget, but doesn’t use tables, because no one likes tables. It is all sorts of XHTML friendly, if that’s what gets your motor running. It doesn’t do anything fancy, it just displays X number of photos from a specific album. If it doesn’t tell me and I might try to fix it. But no promises since I’ve wasted too much time on this thing already.

The changes aren’t drastic, but I like them. Picasaed now includes a random image function. The images also link directly to the image in on Picasa Web now.

It still needs a proper alt tag in the <img>, but it’s got something there for now so it will validate as XHTML.

Download PicasaedMore Info

Standard
technology

A Picasa Widget that Works

So I wrote my first widget for WordPress. I was hoping to never do that, I figured I would let others do the work for me. As far as I can tell there are only two Picasa widgets, and as far as I can tell neither of them work. So I had no choice but to build my own.

I’m calling my widget Picasaed, which isn’t a particularly good name, but at least it is a name. Picasaed works pretty much the same as the Flickr Widget, but doesn’t use tables, because no one likes tables. It is all sorts of XHTML friendly, if that’s what gets your motor running. It doesn’t do anything fancy, it just displays X number of photos from a specific album. I don’t even know for sure that it will work for everyone, but it works for me. If it works for you that is awesome. If it doesn’t tell me and I might try to fix it. But no promises since I’ve wasted too much time on this thing already.

The important thing to know is that there are no styles attached to the output, that’s up to you. You can use #picasaed for the main widget and .picasaed_image for the specific images i your CSS.

It does need a proper alt tag in the <img>, but it’s got something there for now so it will validate as XHTML.

Download Picasaed

Standard