WTF, CNN‽

April 28, 2010

WTF CNN

Today, Alexis Ohanian and I released a new project: WTF CNN. We created the site to make it easy to compare CNN’s US front page with news sources from other countries. If you like what you see, pass it on, and check back the next time a big story emerges!

For the nerds: the site uses jQuery for the animations. It also uses a lot of modern CSS3 styling with Modernizr styles to ensure that things play nice in IE. This was my first time playing with Modernizr, and I’m super impressed by its simple approach to feature detection.

Comments (4)

Four supplemental social media icons

September 24, 2009

I use the Lifestream Wordpress plugin to generate the sidebar of this blog, using icons from the Social Network Icon Pack by Komodo Media. Alas, I was missing a couple of icons for my favorite sites. I have created them in a similar style:

Like the original icon set, these icons are licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. Feel free to use them on your site!

Creative Commons License

Comments (1)

Hack: Wordpress cancel reply button

February 28, 2009

I’m a huge fan of the commenting improvements introduced in Wordpress 2.7. It’s been a tremendous boon to have first-class threaded commenting features right out of the box.

However, one thing I’ve never understood is the decision to use an anchor element to cancel an open reply box. I’m far more accustomed to the reddit style of placing a cancel button next to the submit button, like this:

A comment reply form from reddit

The problem with the anchor element generated by Wordpress is that it looks really out of place when arranged next to the “submit comment” button. I had hoped there would be a parameter to change the anchor element into a button, but was disappointed to find that this particular HTML is hardcoded into the get_cancel_comment_reply_link() function.

However, the function does provide a filter hook, which I’ve used to make the change I desired. I simply intercept the HTML and return my own version with a button. It’s not very elegant, but it works.

If you’d like to use this hack, just add the following code to your theme’s functions.php file:

/**
 * Use an HTML button element for the cancel comment reply link.
 */
function cancel_comment_reply_button($html, $link, $text) {
    $style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
    $button = '<button id="cancel-comment-reply-link"' . $style . '>';
    return $button . $text . '</button>';
}
 
add_action('cancel_comment_reply_link',
           'cancel_comment_reply_button', 10, 3);
Comments (9)

My Alien Visitor

February 13, 2009

Reddit Bobblehead

He claims to be from San Francisco. Affinity for bacon. Arrived with a document depicting various lifeforms from his home planet:

Reddit Evolution

I will post further information as it becomes available.

Comments (2)

Socialite on AMO

February 1, 2009

As of approximately 7:08 am, Socialite is now publicly available on AMO (addons.mozilla.org).  It’s been a long time coming, and I’m excited to see how it’s received by the new users there.

Socialite in the Firefox add-ons manager

Comments (0)
Older Posts »