New Plugin: BT-Active Discussions


Over the weekend, I just created my first WordPress plugin, called BT Active Discussions. It is a recent comments plugin that displays customizable number of blog posts with recently updated comment. The output is very similar to phpBB’s View Active Topics and vBulletin’s Today’s Posts functions.

Recent Discussions

You can see a demo at Moolanomy Personal Finance Blog.

I’d appreciate any feedback you can provide below.

37 comments:

  1. Mrs. Micah, 5. May 2008, 14:10
    gravatar

    It’s on my to-do list. :) I’m pretty excited about that…hoping it’ll foster even more discussion.

     
  2. Shanti @ Antishay, 6. May 2008, 1:21
    gravatar

    This is AWESOME! Is there a way for it to display the most involved (i.e. most commented-on) posts at the top? Is there a variable I can change to have it do that? I’d love to have the most popular discussions at the top instead of the most recent.

    Perhaps that will be the next plugin you’ll design? ;)

    Thanks for this. I love it! Check it out: http://www.antishay.com/?page_id=162

     
  3. Mitchell Allen, 6. May 2008, 11:44
    gravatar

    Wow, Pinyo! This is good work!
    I like Shanti’s idea, but the READER should be able to sort the output, unless that’s asking too much?

    If I had more than 12 readers on my blog, I would definitely use this :)

    Cheers,

    Mitch

     
  4. Pinyo, 6. May 2008, 12:01
    gravatar

    Mrs. Micah - Thank you. That’s my hope as well.

    @Shanti - Thank you! I’ll see if I can create something — either as a feature of this plugin, or a separate plugin.

    By the way, that’s an awesome recent discussion page. Very slick.

    @Michell - Thank you. Your blog will grow big one day. My blog was at 12 readers at one point too.

     
  5. Lucian, 6. May 2008, 19:16
    gravatar

    Hey Pinyo,

    Nice looking plugin. I have a question though. Where exactly do you put the %%bt-active-discussion%% . I have tried it in the post and had no luck. Does it need to be in a template page?

    Lucian

     
  6. Pinyo, 6. May 2008, 20:45
    gravatar

    @Lucian - You have to set it on a “page” — not “post”. It doesn’t have to be in a template.

     
  7. Lucian, 6. May 2008, 21:47
    gravatar

    Pinyo,

    Thanks for the hint… and thanks for the great plugin. Works great now.

    Lucian

     
  8. Alistair, 8. May 2008, 15:40
    gravatar

    Hi there, looks like a great plugin although I just cannot get it to work. It seems simple enough - I create a page and using the html editor just paste the code - is that correct or am I missing out something fundamental ?

    All I get is a page with the code on it - what am I doing wrong?

    (I am prepared for something simple) :-)

     
  9. Pinyo, 8. May 2008, 16:23
    gravatar

    @Lucian - No problem

    @Alistair - Wow, that’s a mean looking mosquito! Make sure you:
    1. activate the plugin,
    2. create a page (Write –> Page),
    3. enter the code %%bt-active-discussion%%

    That should work. If not, send me the page you’re testing it on so I can see. It might be a good idea to disable caching plugin while you are setting up also (just to be sure).

     
  10. Alistair, 8. May 2008, 16:37
    gravatar

    Hey thanks for replying Pinyo,

    Yup, that is exactly what I did……here is the page

    http://urbanflyfisher.com/discussion/

    The fly does not bite thankfully - its sole purpose in life is to have sex :-)

     
  11. Pinyo, 8. May 2008, 18:22
    gravatar

    @Alistair - I am sorry, I am not sure why it’s not working. :-(

     
  12. Alistair, 9. May 2008, 1:31
    gravatar

    Hiya, these things happen - I have done some more investigations - I thought it might be my theme that is not letting it work so downloaded another couple - one of them def works with the plugin however the same problem occured. Very strange…

    Right, so lets get this totally straight…..I create a new page, open the HTML editor NOT the visual and without putting in any other tags whatsoever jut paste the code?

     
  13. Alistair, 9. May 2008, 14:00
    gravatar

    Right, I have now installed wordpress on a sub domain and found it still does not work…

    http://test.urbanflyfisher.com/?page_id=4

    weird?

     
  14. Lee Potts, 9. May 2008, 18:27
    gravatar

    It’s not working for me either.

    http://www.breakingmurphyslaw.com/18/

     
  15. Pinyo, 9. May 2008, 19:30
    gravatar

    @Alistair - I found the problem.

    %%bt-active-discussions%%

    NOT

    %%bt-active-discussion%%

    You forgot the “s” :-)

     
  16. Alistair, 10. May 2008, 1:15
    gravatar

    Pinyo - you forgot the “s” first ;-)

    I copied and pasted the code from the read me file…

    1. Add %%bt-active-discussion%% to any page you’d like to show the discussion table

    I just KNEW it was something simple :-)

    ps. Lee - you are doing exactly the same as me the correct code is

    %%bt-active-discussions%%

     
  17. Pinyo, 10. May 2008, 8:16
    gravatar

    Oops. I will update the read me file. :-)

    Wow, looks like you have an active community on your blog.

     
  18. Lee Potts, 10. May 2008, 15:08
    gravatar

    Thanks, that did it. It’s working fine now.

     
  19. Alistair, 10. May 2008, 16:36
    gravatar

    Yea, it has turned into a bit of a local resource :-)

     
  20. Bill, 10. May 2008, 17:57
    gravatar

    Working like a champ for me, I woudl like to tweak the output a bit (maybe alternating lines highlighted and such, and it looks like the included CSS file is being ignored on my template, but this plugin really serves a need and I want to thank you for it!

     
  21. Jeff Voegtlin, 15. May 2008, 7:41
    gravatar

    I don’t think mine is working correctly. I can’t see the comment icon, and no comments are showing up there. Do I need to deactivate some other recent comment plugins? Also, when I activate the plugin, I get a “cannot display the webpage” problem. Then when I refresh my plugins page it is acitve, but doesn’t seem to work right.

    Here’s the address: http://jackhammr.org/recent-discussions/

     
  22. Jane, 16. May 2008, 23:30
    gravatar

    Would love some guide as to how to customize the css!

     
  23. Pinyo, 17. May 2008, 0:30
    gravatar

    @Jane - I noticed some file path problem after looking at your install. There should be a version 1.1.2 out to fix this.

    Regarding the CSS file, these are the two you may want to adjust:

    #recenttable thead th {background-color:#888;color:#FFF;}
    #recenttable .row-1 {background-color:#E0E0E0;}

    The first one basically contain table heading background (888 = dark gray) and text color (FFF = white)

    The second one is the alternating line color which is currently set to light gray.

    Nice site, btw.

     
  24. Mike Haynes, 17. May 2008, 11:59
    gravatar

    Any way that this could be inserted into a template? I’m looking to add it to my homepage but I can’t quite get the code right.

     
  25. Mike Haynes, 28. May 2008, 11:09
    gravatar

    Yes? No?

     
  26. Pinyo, 28. May 2008, 11:19
    gravatar

    @Mike — Yes, it could be done. Sorry for the delayed answer. You should be able to modify the plugin and copy the code directly into your wordpress theme index.php and wrap it around an IF statement.

     
  27. Mike Haynes, 28. May 2008, 21:50
    gravatar

    Any idea what that code might look like? I’m not very good with code and I’ve only tried a couple simple php lines that didn’t work.

     
  28. Dani, 4. June 2008, 11:49
    gravatar

    Thx for this plugin pinyo.

    I have a problem, maybe you can help me. I’m from Spain, and i have in worpdress blog’s time UTC+2.

    I’ve writen a commentary at 14:16, but you plugin shows 12:16.

    How can i do to show the correct time?

    Thx again :)

     
  29. Pinyo, 4. June 2008, 12:00
    gravatar

    Hmm… I didn’t even realize there’s time issue. Did you check the comment time (on the comment form) against the one show on my plug-in? They should be the same (in theory).

    I will have to take a look at it. Thanks for the heads up.

     
  30. Dani, 4. June 2008, 14:31
    gravatar

    In the comments:
    Mariajo dice:
    Junio 4th, 2008 at 16:41 e

    In your plugin:
    by Mariajo
    on 2008-06-04 14:41:45

    In the database comment’s table:
    comment_date: 2008-06-04 16:41:45
    comment_date_gmt: 2008-06-04 14:41:45

    thx again. If you need any other data tell me pls.

     
  31. Dani, 4. June 2008, 14:33
    gravatar

    ummm… after write my comment i’ve though :D

    maybe it’s so easy to fix it, just take the comment_date_gmt to show in your plugin :p

     
  32. Pinyo, 4. June 2008, 14:48
    gravatar

    @Dani - Based on your comment, I made the change. I think it should be fixed now. You should see the new version 1.1.3 on the repository shortly.

    Thank you!

     
  33. Dani, 4. June 2008, 14:51
    gravatar

    ummm…. it’s me again…

    i’m check the code and you’re taking the right field. I’m going to fix my issue changing my sql code to take the comment_date field.

     
  34. Dani, 4. June 2008, 14:56
    gravatar

    Thxxx Pinyo :) now it’s working fine!!

     
  35. Isaac, 15. July 2008, 11:47
    gravatar

    Hi, Pinyo. I love the plugin, it works great. I have a quick question, though.

    I’m setting up my blog to work essentially like a discussion forum, and not just have comments to be another feature. To achieve this, I’d really like the Active Discussions box be able to display all posts, even ones that don’t have comments on them, so that people will see them and get discussions started. How can I do this?

    Thanks!

     
  36. Pinyo, 15. July 2008, 20:49
    gravatar

    @Isaac — Thank you. There’s no easy way to do it, I’m afraid. I’d have to play around with the query and see what I can come up with.

     

Please share your comment:

Please read our comment policy and guidelines.

1 Trackback(s)

If your trackback does not show in 24 hours, please resend to this trackback URI.

  1. May 10, 2008: New Discussion Page | The Urban Fly Fisher