WordPress.org

Forums

[resolved] Hacking Tagboard/Recent Comment Plugins (11 posts)

  1. mkgago
    Member
    Posted 9 years ago #

    I recently discovered The FreePress Blog's Tagboard plugin. It looks great, and I'd love to use it. It sets up the tagboard as a static page, and then processes comments to the tagboard using the existing comment functionality in WordPress.

    The problem I'm running into is that when someone submits a comment to the tagboard, it shows up in the list of recent comments. JB, the tagboard plugin author, has edited his own Recent Comments plugin so that it doesn't conflict with the tagboard; but I use, and like very much, Krischan's Recent Comment plugin, which shows both recent comments and trackbacks.

    What I'm looking to do is make Krischan's recent comments plugin skip over the tagboard comments. Krischan has set up his plugin so that you can easily have it exclude certain categories in WP. So my first thought is that if I could associate the tagboard static page with a category, I could then exclude it from the list of recent comments.

    So: is it possible to associate a WordPress static page with a category? Or do I need to go about this in a different way?

    Thanks in advance for your help.

  2. Kafkaesqui

    Posted 9 years ago #

    I've looked at Krischan's plugin, and deep in the file (around line 545 for version 1.1) there is a $query line you can modify to try and filter out comments on the tagboard "post". In the $query find this portion:

    "WHERE (post_status = 'publish' OR post_status = 'static') AND comment_approved= '1' AND post_password = '' ".

    and change it to:

    "WHERE (post_status = 'publish' OR post_status = 'static') AND post_name <> 'tagboard-archive' AND comment_approved= '1' AND post_password = '' ".

  3. mkgago
    Member
    Posted 9 years ago #

    Kafkaesqui, I am in your debt. Thanks so much! I'll give it a shot.

  4. mkgago
    Member
    Posted 9 years ago #

    hmmm...the link still showed up in the list of recent comments, unfortunately.

  5. Kafkaesqui

    Posted 9 years ago #

    Hmm. It *should* work, unless your tagboard setup is not giving a post name of 'tagboard-archive' to the Page it manages comments off of... If you know the ID of the tagboard Page, try this:

    "WHERE (post_status = 'publish' OR post_status = 'static') AND ID <> 100 AND comment_approved= '1' AND post_password = '' ".

    Replace 100 with the ID # for the tagboard Page.

  6. mkgago
    Member
    Posted 9 years ago #

    Thanks for your help, Kafkaesqui. I tried it again, but I'm still seeing the listing there... and the page is named tagboard-archive: http://www.tatteredcoat.com/tagboard-archive/

    strange...

  7. mkgago
    Member
    Posted 9 years ago #

    what about simply making the Recent Comments plugin skip over all comments when they're on a static page?

  8. Joshua Sigar
    Member
    Posted 9 years ago #

    "WHERE (post_status = 'publish') AND comment_approved= '1' AND post_password = '' "

  9. mkgago
    Member
    Posted 9 years ago #

    Thanks, alphaoide. Unfortunately, that didn't work either.... I did add a period to the end of what you wrote...could that have made a difference?

  10. Kafkaesqui

    Posted 9 years ago #

    Ok, I've gone to the trouble of installing the tagboard and recent comments plugins (tick tick tick); using either of the additions I suggested above work for me.

    The only thing I think of that may be at issue is there are two functions in Krischan's plugin which perform a SELECT:

    get_recent_comments()
    get_recent_trackbacks()

    Are you editing this in both, or at least just the former?

  11. mkgago
    Member
    Posted 9 years ago #

    Kafkaesqui, I can't thank you enough. That did the trick.

    I wish I had realized that earlier -- I should have been clued in, at one point, when I saw a mistake I made while pasting in your code led to an error in "Recent Trackbacks," but not to "Recent Comments."

    At any rate, thanks so much for your continued help on this. YOU RULE!

Topic Closed

This topic has been closed to new replies.

About this Topic