Tweaking Twitter Tools to show your URL
I love Twitter Tools. It's one of my favourite plugins for two reasons: it does a whole bunch of different things that I'd expect to need different plugins for, and it always works. But one thing's always slightly bugged me. When it creates a tweet for a new blog post, it sends Twitter the whole, long pretty permalink, and Twitter automatically shortens that to a bit.ly URL.
Frankly, I'd rather have my own URL in people's faces than bit.ly's - so I tweaked one line in the plugin to pass the shorter permalink URL http://domain.com/?p=xx to Twitter. For most domains, this should be short enough that Twitter will leave it intact.
Here's what you need to do. In Plugins > Edit, select Twitter Tools and in twitter-tools.php, find the line$url = apply_filters('tweet_blog_post_url', get_permalink($post_id));
Comment this out (put // at the beginning of the line), and below it, add$url = get_bloginfo('wpurl')."/?p=".$post_id;
This short version of the permalink will automatically redirect to the pretty version (the one with the post title) if you have that enabled.
Tags: hacking plugins, plugins, Twitter Tools








thanks!! i'll try it right away!