bm trackPing – comments, trackbacks and pingbacks separated

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.

Share This...

About The Author

Ben Gillbanks

Web Designer, Video Gamer, Blogger, and part time Entrepreneur. Read More

8 thoughts on “bm trackPing – comments, trackbacks and pingbacks separated

  • Reply ›
    Connor Wilson

    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.

    March 25, 2008

  • Reply ›
    Ben

    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.

    March 26, 2008

  • Reply ›
    Jim

    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!

    April 2, 2008

  • Reply ›
    Ben

    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.

    April 2, 2008

  • Reply ›
    igor

    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 (^^)

    April 13, 2008

  • Reply ›
    Ben

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

    rel=\"nofollow\"

    within the link area.

    April 13, 2008

  • Reply ›
    igor

    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>

    April 13, 2008

  • Reply ›
    cawlin

    Any chance you could show us how to put trackbacks in a a separate tab a la smashing and your mimbo pro theme?

    Love the plugin, thanks!

    June 11, 2008

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

My Projects

TimThumb - Image Resize Script TimThumb

Image Resize Thumbnail Script

WPVote - WordPress Social Voting WPVote.com

WordPress Social Voting Site

About me

About BenMy name is Ben Gillbanks. I'm a lover of Video Games, WordPress, Web Development and everything in between.

I have been working on the internet since 1998, and working with computers even longer. I am a hardcore Nintendo fanboy and have owned most of their consoles at one stage or another.

Read more about me on my about page.

Binary Moon

WordPress and Web Development › home of Ben Gillbanks