Most of us bloggers using D.I.Y. blogging software have implemented some form of a “Recent Comments” hack or plugin. If you are using WP, Nick Momrick of MtDewVirus is the man to go to for that plugin, and you can see it on almost every WP blog out there. Scriptygoddess also has her own version of Nick’s plugin.

However, sometimes we post comments on other blogs that we might think are interesting, but there’s no real way to get those comments on to our blog. It’s too much of a pain to repost the topic, and although you could make a links list of sorts, or a miniblog, or (ack!) hard code some HTML in your index.php file, neither are a real WPer’s solution. WPers don’t want to code HTML, right? We want to enjoy the flexibility of php! So, I thought, wouldn’t it be great to have a plugin that created a list of comments that I posted on other people’s blogs, in the same way that Recent Comments works. I came across unraveled blog by Joshua Kaufman, and saw that he had done exactly what I was thinking, only in MT, and using a novel solution. His plugin is called “Posted Elsewhere”.

What he does is ping himself with a trackback using a standalone trackback tool installed on his server, and then lists those trackbacks in a static page on his blog. But, in WP it would need a little more massaging for my tastes. I wanted a list that appeared on my sidebar and essentially looked like “Recent Comments” but culled only the trackbacks from one post, that would be hidden entirely from the site (I wanted to keep mods to the index.php file to a minimum).

Here’s an overview on how this works:

  1. You’ve made a comment on somebody’s blog that you want to put in your “Posted Elsewhere” list on your site.
  2. You pull up a form generated by the Standalone Trackback Tool.
  3. Fill out a form with the blog name, title of post, excerpt of the comment you’ve made, and the permalink of the post. Hit send.
  4. This pings a hidden post you’ve created on your blog.
  5. The “Posted Elsewhere” plugin then takes the trackbacks from that hidden post you’ve pinged, and gives your readers a list of the blogs you’ve commented on, the name of the post and a permalink to the actual post.

So, with absolutely indispensible help from Nick who modified his “Recent Comments” plugin to help this project out, I present for your use the “Posted Elsewhere Implementation”. It is the synthesis of Nick’s plugin, and the Standalone Trackback tool, with a little tutorial by me to explain how the whole things works. Here are the minimum requirements:

  • A webserver capable of running CGI scripts. You’ll also need Perl, and the following Perl modules:

    • File::Spec
    • Storable
    • CGI
    • CGI::Cookie
    • LWP

Check your webhost cpanel/vdeck to see if those items are installed on your server.

This tutorial is a little long, but I want to be as detailed for the Super Noobs as possible. Here goes:

FIRST THINGS FIRST:

  • Download and install Kitten’s Show Categories plugin. I’ve explained how to do that here.

CREATE AN INVISBLE POST IN WP:

  • Create a link category and a post within that link category exactly the same way as you would do it for an “About Me” page. It’s too lengthy to repeat here, but the tutorial on how to do that is very easy to follow.

  • Instead of “About Me”, call the category “Posted Elsewhere Cat”. Take note of the category ID number. You are going to hide this category from showing up in your categories list, as well as prevent any posts in this category from showing up on your main blog page. To learn how to do this, follow the directions in the tutorial above.

  • Create a blank post called “Posted Elsewhere” and assign it to the category “Posted Elsewhere Cat”. Make it a private post. This prevents it from showing up in “Recent Comments” if you already have that plugin installed as well.

  • Go to your “Edit” window of your WP control panel, and look for your new “Posted Elsewhere” post. Take note of the post ID number. You will need this for the “Posted Elsewhere” plugin to know which post to draw the hidden trackback info from.

  • Click on the title of the post, and it will take you to the post itself. Copy the trackback info which will be found right under the line “The URI to TrackBack this entry is:” You will need this later for the Standalone Trackback Tool to know the hidden post you want to ping.

INSTALLATION OF FILES:

  • Download the Standalone Trackback Tool from the MT website or from my server.

  • UnZip the trackback tool, and create a folder called “tb” in your main blog folder (like “public_html” or “www” or whatever your webhost uses) and give it “755″ permissions:

  • Configure the following items found at the beginning of the tb.cgi script to match your server information (also, a very thorough ReadMe is included with the necessary program files):

     my $DataDir = "http://www.yourblog.com/tb/tb_data";
        my $RSSDir = "http://www.yourblog.com/tb/tb_rss";
        my $Password = "PASSWORD"; //you must assign a password
    
  • Upload the following files to the cgi-bin folder on your webserver:

    • tb.cgi
    • header.txt
    • footer.txt
  • Download Nick’s Comments Posted Elsewhere plugin, upload it to your wp-content/plugins folder, and activate the plugin from your WP control panel.

  • Add this code to your index.php file:

    <li id="postedelsewhere">
            < ?php _e('Posted Elsewhere:'); ?>
                <ul>
                    < ?php get_posted_elsewhere(xxx); ?>
               < /ul>
       < /li>
    

    Where “xxx” is the post ID of you blank “Posted Elsewhere” post.

  • Modify your CSS to address the “li id” and you’re done with the installation.

IMPLEMENTATION

  • The tb.cgi trackback form you need access to ping yourself will look like the link below. Best to make a toolbar bookmark to bring this up easily.

    http://www.yourblog.com/cgi-bin/tb.cgi?__mode=send_form
    
  • The “Trackback URL” will be in the following format. You’ll need this to ping your hidden post.

    http://www.yourblog.com/wp-trackback.php/xxx
    

    Where “xxx” is the post ID of you blank “Posted Elsewhere” post,

  • So, here’s how you fill out the form:

    “Title” = title of the post you commented on,
    “Blog name” = name of the blog you made your comment on,
    “excerpt” = the excerpt of your comment, and
    “Permalink URL” = the permalink of the post you commented on. Sometimes the comments themselves have permalinks, so try that.

  • Hit “Send”, and you will ping your hidden post with the above information. These trackbacks are then culled by the Comments Posted Elsewhere plugin and put in list format on your blog.

  • If you want to change some of the parameters in the plugin, look for this line:

    function get_posted_elsewhere($comment_post_no = -1, $no_comments = 5, 
    $comment_lenth = 15, $before = '<li>', $after = '</li>')
    

    If you want more comments to be listed, change the variable$no_comments (defaut = 5). If you want more words in your comment excerpt, change the variable$comment_lenth

  • That’s it! Please report any errors you may find.