Categories
General

Linking to a commenter’s author page

Normally, when a logged-in user leaves a comment, a link pointing to the URL in their profile is added to the comment. This is fine, but what if you’ve set up an author template to serve up fancy author pages? Wouldn’t it be better to link there instead? If your theme already has a replacement wp_list_comments function, it’s pretty easy.

Add something like this to the top of your comment callback function in your theme’s functions.php:

$comment_author = get_comment_author();
$comment_author_link = get_comment_author_link();
if (!empty($comment->user_id)){
  if ($author_url = get_author_posts_url($comment->user_id)) {
    $comment_author_link = '<a href="' . $author_url . '">' . $comment_author . '</a>';
  }
}

Now you can echo out $comment_author_linkĀ  wherever you had the standard author link. If the commenter is a logged-in user, the link will point to their fancy author page – otherwise it’ll just point to the commenter’s URL as usual.

Categories
General

Playing with c2g in Gimp

I learned about the very cryptically named c2g GEGL operation in Gimp from this post at the Linux Photography blog. I like to convert soft wide-open photos to black and white, but I’m not always happy with the results – when I increase the contrast to get the black parts like I want the transitions between black and white often get weird and eroded. c2g doesn’t always work well, but I especially like it when I blend a c2g’d layer back into the original image – the results remind me of colorized Civil War era photos. Here’s a before-after, the first with just a levels adjust and the latter c2g’d and blended back in.

Monument & ChannelChannel & Monument

I certainly wouldn’t recommend doing this to every photo, but I’ll probably at least give it a try now and then.

Categories
General

Grilled beef short ribs

Grilled short ribs

I love braised beef short ribs, but in the middle of summer I hate using the oven. It’s not as if it makes the house a lot warmer, but it sure feels like it. So, I grilled these lovely specimens after rubbing them down with some creole seasoning. They did end up a little tough, but that was easily overcome by slicing them thinly.

Categories
General

Photopress 1.7

This version adds a few new features:

  • Switched to thickbox for the popup, like flickpress.
  • Added paging for the main album page, helpful if you have a lot of categories.
  • Added a jquery show/hide form for logged-in users to edit image info right in the album.
  • Fixes localization based on Renato’s comment.

The album paging feature is a little flaky – when permalinks are on it only works for month- or day-based setups. You’ll also probably need to refresh your permalink setup to get it going.

I still have a problem on my family blog now and then where a few categories mysteriously get changed to default. It never happens during testing, so I’m not sure how to figure out what’s going on.

I haven’t updated the options to break pre-2.8 compatibility, but I expect to do that for the next version since it’s supposed to improve security.

Update: Fixed a little bug in the album paging thing – replaced 1.7 with 1.7.1.

Download: photopress_1.7.1.zip

Categories
General

flickpress 0.9

This update adds a bunch of error checks and notices to make sure that you enter a working Flickr API key and a working capability in the settings. I set “edit_posts” as the default capability to use the plugin since choosing that was a little nebulous. I also fixed a bug where only the first page of search results was showing up (which I noticed while adding some jquery show/hide stuff for the license lists). Finally, I added an option to turn off captions by default. They’re still turned on to start with, but I figure that if you’re just using this plugin with your own photos you might not want captions.

There’s now a nice changelog in the WordPress Plugins Directory that you can check out to see if I missed anything.

Get flickpress 0.9 from the WordPress Plugins Directory.

…or right here: flickpress_0.9.zip