Lately I’ve been linkblogging via Twitter, and using Alex King’s Twitter Tools to build a weekly digest in WordPress. The problem is that since I’m pulling the posts from Twitter, I’m stuck with Twitter’s limitations: Short descriptions, cryptic URLs, and unreadable links.

So I wrote a plugin to process the links. When Twitter Tools builds a digest, the plugin calls out to the remote site, follows redirects, retrieves the final URL and (if possible) extracts the page title. Then it replaces the cryptic-looking link with a human-readable link, transforming this:

Check out this site: http://bit.ly/9MhKVv

into this:

Check out this site: Flash: Those Who Ride the Lightning

If it can’t retrieve a title, it uses the final hostname. If it can’t connect at all, it leaves the link unchanged.

The download is here, and that’s where I’ll put future versions:
» Plugin: Twitter Tools – Nice Links.

Future

One thing I’d like to add at some point is cleaning up the title a bit. They can get really long, even without people trying to stuff keywords and descriptions in for SEO purposes. All it takes is a page title plus a site title, like this one. That’s a much more complicated problem, though, since there isn’t any sort of standard for which part of a title is the most important. I suppose I could just clip it to the first few words.

I’d also like to clean up duplicate text. Often the link title and tweet content are going to be the same, or at least overlap, especially if it’s generated by a sharing button or extension. That should be easier to check.

Weblog Tools Collection recently spotlighted a WordPress plugin to automatically tweet old posts. It seems like a good way to bring attention to a site’s archives, as long as it’s used sparingly. The frequency can be as high as once an hour, which IMO is a good way to lose all your followers, but one post every few days seems like it might be reasonable and even interesting.

I’ve already got a setup in place to show a “flashback” post on the front page, but most of the blog’s traffic seems to come from searches these days. Every once in a while I’ll happen to look at the front myself and say, “Oh, yeah, that was a good one!” and post a link on Twitter or Facebook.

This new plugin posts automatically, and picks an article at random. That’s helpful, because it can find old posts that I’ve forgotten. On the downside, because it’s random, there’s no quality control. It could just as easily pull out something completely inane that was funny for about a week five years ago as it could dredge up a forgotten gem. And there’s always the risk of promoting “Happy New Year!” in August — which is exactly what happened when I tested it on Speed Force.

You can filter out categories, but I think it might be more useful to filter on tags. Sure, it can take a while to go through the archives tagging posts that you feel are worth a second look, but it would certainly improve the signal/noise ratio with this scheme. Even better, there’s a lot more you can do once you’ve tagged your “classics.” Highlight them on archive pages, list some of them in the sidebar, build an index, etc.

Hmm, this might be an interesting project at some point.

Update (August 23): Well, I’ve disabled this for now — on both blogs — because of the lack of control. I’d rather forget to post “Hey, remember this?” than have it clutter up people’s accounts with old linkblogging digests or something similarly pointless. When I have time, I should work on that classics project, both tagging posts and hacking on the plugin.

I’ve been using Alex King’s Twitter Tools for about a year now to both publish my WordPress posts on Twitter and build a daily (or, on another site, weekly) digest out of my tweets to post on my blog. I’ve recently started using Selective Tweets on Facebook to transfer my Twitter posts to Facebook.

The reason it’s called Selective Tweets is that it lets you choose which items to transfer, instead of just blindly dumping everything from Twitter to Facebook. You do this by adding the #fb hashtag to the end of each tweet that you want to also appear on Facebook.

On the downside: after the message is copied, that extra hashtag is just clutter. You can’t do anything about removing it from Twitter itself, but you can filter it out of your digests on your WordPress blog!

All you have to do is install and activate this plugin (after installing and activating Twitter Tools), and it will use the Twitter Tools API to filter out the #fb hashtag instead of linking it.

Download it: ktv-twitter-tools-skipfb-1.0.zip

I had intended to also filter it out of the sidebar, but the Twitter Tools API doesn’t seem to provide a way to do that.

If I ever do future versions, I’ll track them here: Twitter Tools Skip FB Plugin.

Since the normal Twitter/Facebook link stopped working, I’ve switched to Selective Twitter Status. Instead of importing all your Twitter status updates to Facebook, it only pulls in the ones that end with the hashtag #fb. I’ve thrown together a plugin that hooks into Twitter Tools and filters out that tag when building a daily or weekly digest. (It was complicated by the fact that the README didn’t provide any real detail for the relevant API hook.) I tested the function outside of WordPress, then set it up to run on Thursday evening.

Good: It worked! Every instance of the #fb tag was removed, and everything else stayed.
Bad: Twitter Tools posted four copies of the digest.

Well, Twitter Tools does that sometimes. I’ll frequently see it post 2 or even 3 copies, and while I’ve determined it’s not related to WP Super-Cache, I haven’t gotten around to seriously debugging it. So I don’t know if it has anything to do with my plugin. Actually, it probably doesn’t, since it runs within the digest-building code.

For what it’s worth, Friday posted only two copies of the digest. I only found one item worth saving, though. (Well, two, but I expanded the other one into this post.)

I guess it still needs some testing. When I’m sure it’s working properly, I’ll post the code.

Update: Check out Version 1.0.

I’ve been using Alex King’s WordPress Mobile Edition for a while to provide a mobile-friendly version of this blog, but haven’t really paid much attention to it since my last few phones were extremely limited in web browsing ability. Since I got the G1, I’ve been paying more attention to mobile access, including setting up WPTouch for a high-functioning iPhone– & Android–friendly version of the site. Last week I finally got around to testing the two plugins in combination, and determined that they do seem to work together with the right priorities.

I also ran the main page through the mobile-readiness evaluator at ready.mobi, and noticed that most of the issues it cited with the mobile edition of the site were really simple changes. Some were basics like fixing unbalanced HTML, and others were recommended practices like including a DOCTYPE and making sure that headings were nested properly. So I whipped together a patch for WordPress Mobile Edition 2.1a. (It’s labeled as 2.1.1 in the readme, but it shows up as 2.1a in the list of plugins.)

Changes:

  • Add XHTML Mobile 1.2 Doctype.
  • Fix unbalanced <small> tag.
  • Fix mising <ul> tags around list of recent posts.
  • Avoid empty class attribute on comments.
  • Add type attribute to style element.
  • Change non-standard value attribute on <meta> tag to content attribute.
  • Reassign headings so that h1, h2, h3 appear in order.

Download:

wp-mobile-validation.patch [removed, see below]

The patch should be applied to the wp-mobile folder that you place in your themes folder.

Update: This has been completely superseded by more recent versions of the plug-in, which use Carrington Mobile instead.