WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Hacking Tagboard/Recent Comment Plugins

[Resolved] Hacking Tagboard/Recent Comment Plugins

  • 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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 = '' ".

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

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

    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.

    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…

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

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

    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?

    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?

    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!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Hacking Tagboard/Recent Comment Plugins’ is closed to new replies.
Skip to toolbar