alex sysoef
expert wordpress

Fixing Brians Threaded Comments Plugin

Brians Threaded Comments Plugin is perhaps the most popular among the WordPress blog users due to functionality it provides and a huge enhancement to standard comments system that comes with WordPress. Problem is – the plugin is Not Well Supported and has quite a few bugs.

In fact if you simply decide to use what is provided you will run into quite a few issues and since the plugin is hard to customize if you are not a programmer it might be more problems then one can handle. Well fear not – I have spent a few hours of researching, fixing and testing and want to present you with resulting file. Now you too can have Brians Threaded Comments on your blog, minus all the issues…

As always I want to make a disclaimer here. What is presented below is currently used on my blog and fully tested but I can’t guarantee for 100% it will work on yours. Before doing ANYTHING – make sure to backup current comments.php file that comes with your blog theme.

This post assumes that you are working with latest officially available version of the Brians Threaded Comments Plugin – 1.5.12. I have not tested previous version and have no clue if this tutorial will work for you or not. Before doing anything else – install that version…

Everything below provided AS IS. Take it or leave it at your own risk and please don’t ask for support.

Brians Threaded Comments Problem List

In this section I want to outline the issues I have fixed following multiple guidelines I have found on the net and provide a link to original authors, where available to give them credit for addressing it.

1. Fixing Brians Threaded Comments “Cancel” Issue – was provided on John Chow blog and while John provided a nice explanation I wanted to add a simple graphic details to it to simplify the work for you – not all of us technically savvy. Click on image below to open full view in new window and see fix details below image:
brians-threaded-comments.jpg

  1. Step 1: Open Admin->Plugins->Plugin Editor and click on Brians Threaded Comments to open for editing (some hosts might require that you chmod the file to 666 or 777 prior to be able to do so).
  2. Step 2: Locate reRoot() function and replace content with content-main as shown in image. Hint: pay attention to position of sliding bar on image above to locate the function you need.

2. Separate Trackbacks From Comments in Brians Threaded Comments was provided by Tim Nash (who by the way has a great blog that I frequently read).

3. A few fixes borrowed from NSpeaks, even though author no longer uses plugin himself his fixes work nicely and here is list of what I have addressed using his guide:

  • Admin Is Now Recognized by plugin
  • Double Subscribe To Comments Option Removed
  • Comments Moderation text Added

Enhancements To Brians Threaded Comments

To make the commenting system more interactive and protected I have added some enhancements that will require installation of couple plugins. But if you decide Not To Use Them – I provide 2 versions of the file you can use: with and without enhancements:

  • MyBlogLog avatars integrated into comments system. This enhancement requires that you have installed MyAvatars plugin. I feel that this one is a very nice option I simply didn’t want to go without and it adds avatar at the bottom right corner of the comment. You can see it in image below or comment to see how it works – please be aware – all test comments will not be allowed brians-threaded-comment.jpg
  • Math Comment Spam Protection integrated into Brians Threaded Comments. This one is a rather nice companion for Akismet and its integration requires that you have the Math Comment Spam Protection installed. One added it will save you a lot of administrative grief by removing bot SPAM submission.

Fixed Brians Threaded Comments Download

As I have mentioned I will provide below 2 files with all afore mentioned integrated: 1 with enhancements and one without. But the installation is same for both:

Files below proved as Text Files. Simply download one that you need to your computer, rename it as comments.php (comments-enhanced.txt to comments.php) and then upload and replace your current theme comments.php file. Make sure to back up your current comments.php file in case you decide you don’t like what you get and want to go back to your original system!

  • Download Fixed Brians Threaded Comments – no enhancements
  • Download Fixed AND Enhanced Brians Threaded Comments

Please be advised I don’t try to claim ANY credit and simply provide the files for convenience of other people. All credit belongs to its author and many thanks go out to guys who provided the multitude of fixes I have integrated and present above. Enjoy.

UPDATE:

I have reworked the fix based on comments I have received and providing a new file download, it has all the enhancements but they are using “optional statements”, meaning if function doesn’t exist because you simply don’t have the plugin – it will be ignored.

Also make sure to watch the video that outlines entire process below:

Tags: , , , , , , ,

About The Blog Author

Alex Sysoef is an IT Consultant, Internet Marketer and ProBlogger who shares his passion and knowledge of WordPress, SEO, Social Media and traffic strategies on his blog WordPress Howto Spotter. Connect on Twitter or Facebook

60 Responses to “Fixing Brians Threaded Comments Plugin”

  1. TheSpot-er says:

    IMPORTANT: Brian have implemented and addressed all the fixes discussed in this article into the latest version of his plugin:

    http://code.google.com/p/briansthreadedcomments/

    Please be sure to get the original plugin. All you need plus the functionality that will be available with WordPress 2.5 (Gravatars and MyAvatars) are built into new plugin.

    Alex

  2. Barbara Ling
    Twitter:
    says:

    Morning!

    Does anyone know how to hack BTC so that the Recaptcha shows up ABOVE the ‘Add Comment’ button?

    Thanks in advance,

    Barbara

    Barbara Lings last blog post..Man Flies Lawn Chair – Recapturing your childhood dreams

  3. Hi Alex,

    I’m using WP 2.5.1, and when I tried your comments.php, I got:

    Parse error: syntax error, unexpected ‘.’, expecting ‘)’ in /…/theme/comments.php on line 166

    Line 166 is:

    Logged in as <a href=”/wp-admin/profile.php”>. <a href=”/wp-login.php?action=logout” title=”Log out of this account”>Logout

    Any ideas?

    Thanks! Barbara

    Barbara Ling, Virtual Coachs last blog post..Know that number 1 SECRET communication tip? Here it is!

  4. TheSpot-er says:

    Barbara,

    Try downloading Brian’s Latest code. He actually updated his own plugin to address multiple issues discussed here. So I would recommend you go to his plugin and if still errors – I’ll help ya!

    You know how to contact me – please do so!

    Alex

  5. william says:

    Hi, Does anyone know how to modify the plugin to show admin/author comments as a different background colour?

    I tried various methods I found online but none seem to work.

    thanks!

  6. Suzie Cheel says:

    Awesome, Thank you so much. I did have it working and when I changed themes no work:)
    I have stumbled this for you and others to find

    Suzie Cheels last blog post..A Time Consuming Lesson in Blog Maintenance!

  7. Threaded Comments User says:

    hello,

    i’ve tried both your fixed version, as well as the newest version from brian’s google project page (1.5.20), but i have been having the same problem with both.

    the threaded comments seem visually to display properly (showing comments that already existed before installing the program). but if you click “add comment”, it simply sends you to the blog root page. i don’t really understand this, heh.

    i really want to get this plugin to work :)

    have any ideas?

    if you can give me something that leads to a solution, i’ll paypal you $10… seriously!

  8. Mobi says:

    To: heSpot-er:

    Parse error: syntax error, unexpected T_ELSE in C:\wamp\www\theme\wp-content\themes\VN-News\comments.php on line 246

    Mobis last blog post..Thời của Mobile 2.0

    • TheSpot-er says:

      You are on windows server – I have no clue what it might make wrong. Sorry, I don’t deal with Windows.

      I recommend you get latest version of plugin from Brian, he implemented all the fixes.

  9. Thank you for showing me how to properly use this plugin of which I have been wanted to use but fail to do so. Little did I realize that I need to made changes to my comments.php.

    So I found yours and everything works as what I have expected. However, there is this little issue when I click “Click here to cancel “reply” the whole comment form jump to my footer and I have failed to find the solution.

    Can you help?

    Yan

    • TheSpot-er says:

      Yan,

      In about a month WordPress 2.7 will come out and will have threaded comments as part of the core. I recommend not to waste time and do blogging :-) Sorry, I don’t know what the issue is but I know Brian supposedly fixed it with last version. try his plugin if still want to spend time on it.

      • Thanks for the heads up… and do you have any idea if upon submission the page doesn’t reload to the original article? If I couldn’t fixed this I would have dumped all together…

        Yan

  10. Kanishka says:

    Hey i have been using this for a while.

    This didn't seem to be good for me . :(

  11. Germz says:

    It sort of kind of worked.
    Using the normal comments.php would not show any comments at all.

    But your file does allow me to show comments, the only problem is that I can’t use it. When I press reply it simply takes me to the top of the page and adds a # to it.
    .-= Germz´s last blog ..The Evolution of Commercials and Advertisements. =-.

Trackbacks/Pingbacks

Leave a Reply

Comment Guidelines: All your links are DoFollow links. No Keywords In Name. No inappropriate or offensive comments. No links to inappropriate or offensive sites. Comments must contribute to the discussion. ALL SPAM DELETED!

Comments Manually Approved prior to appearing!

CommentLuv badge

Notify me of followup comments via e-mail. You can also subscribe without commenting.