jump to navigation

Try Firefox - it's faster, and more secure than internet explorer. It even has a cute little mascot.

Journal

bm trackPing - comments, trackbacks and pingbacks separated

March 25, 2008 | Web Design

A year and a bit ago I wrote a tutorial on splitting the comments, trackbacks and pingbacks up on your wordpress blogs. Then a few months ago Daniel from DailyBlogtips wrote a post on the same subject (a couple people even mentioned my post in the comments :) ). I decided then a plugin was needed to do this.

The basics were easy but I was having issues calling the splitter function without user intervention, I like to make things as simple as possible and it just wasn’t working for me. Then, a couple of weeks ago, this post on weblogtoolscollection talked about a similar topic and I noticed the comments_array plugin hook, a hook I hadn’t seen before.

Once I knew what to do it only took me 5 minutes to put it all together (it’s easy when you know how) and I now have a finished working plugin. BM-trackPing.

The plugin is very easy to use, simply upload the plugin file, and activate it. Done.

What it does is grab all the trackbacks and pingbacks and add them to an unordered list in a brand new comment, removing the old comments along the way. This all happens at display time and modifies nothing in the database, meaning the site will work as normal if you disable the plugin.

The plugin also sets the comment type to bm-trackback which means that if you use the BM-comment-highlight plugin, you can target the comment class to style it differently as well. I use a variant of bm-trackPing over on Pro Theme Design and it seems to work a treat.

Comments »

  1. 1. Connor Wilson
    March 25, 2008

    I’ve been using this method for ages and I kind of enjoy having it in the functions file. I’ll check out the plugin because this is something I use for every site I make. Just a better way of showing the information the user wants to see, IMO.

    Me and a client were formulating having them in tabs (with other stuff) after seeing it on Smashing Magazine, but the idea is going to get far less original now! That’s a good thing I guess.

  2. 2. Ben
    March 26, 2008

    We do them in tabs on Mimbo Pro as well :)

    I prefer the functions.php option as well, but it’s not suitable for everyone.

  3. 3. Jim
    April 2, 2008

    Love the plugin! It’s working great here.

    I cannot, however, get it to play nice with the Paged Comments plugin running here. Any suggestions?

    Thanks!

  4. 4. Ben
    April 2, 2008

    Jim - thanks. Glad you like it.

    I very much doubt it will work with the paged comments plugin since that hacks around with the comment display an awful lot.

  5. 5. igor
    April 13, 2008

    Hello Ben,
    Thank you for this great plugin, it really cleans up the comments.
    May I ask how to edit the line so the link in the trackback is marked with a rel=”nofollow” tag?
    I always mess up with parsing errors (^^)

  6. 6. Ben
    April 13, 2008

    Hey Igor - you should be able to add nofollow quite easily. Just go to line 23 and add

    rel=\”nofollow\”

    within the link area.

  7. 7. igor
    April 13, 2008

    Brilliant, works like a charm, thanks Ben!
    So, if anyone needs it, the line looks like this:
    $trackPingContent .= “<a href=\”" . comment_author_url . “\” rel=\”nofollow\”>” . $comment->comment_author ….</a>

Leave a message tell me what you're thinking

Please feel free to comment - I like receiving them - however I would appreciate you using your real name. I am not here to improve your search engine ranking. Abusive/ Inappropriate posts and advertisements will be deleted.

Binary Moon