Coding

Will Norris On How NOT To Build A WordPress Plugin

Do you write WordPress plugins? If so, you should watch this video from WordCamp Portland a few weeks ago:

You don't appear to have Flash installed or are using an out of date version. A recent version of Flash is required to view this video.

Breaking “Click-In That Captcha”

I ran across a tutorial about how to make a fairly clever CAPTCHA where solving it relies on clicking on a particular part of the image rather than filling in a field. While the concept itself is clever, the implementation given in the tutorial is not (requiring the user to click on a particular color). The problem with that is that computers are very good at knowing the colors of things too.

So just for fun (and to see if I could do it), I wrote a script that beats the CAPTCHA each and every time and in the process submits fake spam to the form it’s attempting to prevent (I know, I’m an evil dirty spammer ;) ). If you’re interested, read their tutorial first and then check out the rest of this post for how to beat it.

Keep reading »

Adding New Default Gravatars To WordPress 2.6

Gravatar support was added into the WordPress core in 2.5. You could toggle them and chose what rating level (G/PG/PG13/R/X) you wanted to allow, but you couldn’t easily change the default avatar for users without a custom Gravatar. That is, until recently.

Earlier this month, Ryan committed a modified version of a patch I wrote. It adds a list of default avatars to the bottom of the discussion options page and has already been added to WordPress.com.

What does this mean for theme developers? Well, this new feature also allows you to define custom default avatars that better match your theme. Here is some example code that you would add to your theme’s functions.php:

<?php

add_filter( 'avatar_defaults', 'mytheme_addgravatar' );

function mytheme_addgravatar( $avatar_defaults ) {
	$myavatar = get_bloginfo('stylesheet_directory') . '/images/avatar.png';
	$avatar_defaults[$myavatar] = 'My Theme';
	return $avatar_defaults;
}

?>

That will add a new default avatar option to the bottom of the user’s settings page.

Exploits of a Mom

Exploits of a Mom

Page generated with 26 queries in 0.23624 seconds ( 95.96% PHP, 4.04% MySQL )