making bbPress (and WordPress) work better!

bbPress plugin: Ignore Member

One of my forums is not even a few months old and I already have two members that just can’t get along. But they both are decent contributors to the site so I don’t want to ban them.

So I decided it was time for bbPress to have a proper Ignore filter like the better forums have, that way they don’t even see each others posts. Here it is!

download from the bbPress plugin browser (recommended)
or https://ckon.files.wordpress.com/2007/08/ignore-member.txt
(rename .txt to .php)

It’s beta but tested working in both 0.8.2.1 and the alpha trunk.
Members will get an “Ignore” link on other’s posts (once you edit post.php) and any ignored members will show up in their edit profile so they can remove them if they change their mind.

instructions: install, activate
put <? ignore_member_link(); ?> in your post.php template where you want the “Ignore” link to be seen
optionally put in your theme stylesheet: a.ignore_member {color:blue;}
add any mods you wish to make unignorable to the array below, ie. array(“1″,”27″,”55”);

TECHICAL NOTE: if you are using rewrite=slugs and mod_rewrite (not multiviews)
there is a possibility for a user to ignore an entire topic that ends with a member they just ignored.
The one time that happens, bbpress redirects them to /topic/ (ending in blank) which the auto-generated rewrite rules don’t support.
So the member will then get get some weird result. To fix this, add something like
RewriteRule ^topic/$ /forums/ [L,QSA]
Where “forums” is the name of your bbpress root directory.
Again, the multiviews and non-slugs setups should (in theory) not be affected.

13 responses

  1. I love the work you are doing for bbpress. It has been really helpful in establishing my project’s forums and creating a professional community. Keep up the good work!

    August 13, 2007 at 3:38 pm

  2. Thanks for the feedback, it’s good to hear someone is benefiting from my work.

    Sometimes I wonder who else is out there as it’s challenging at times being an “early adopter”. However I think we’ll get many more folks onboard with 0.8.3 release.

    ps. your site looks amazing! I can’t believe that’s bbpress, looks incredible! (I see you are using my Signatures plugin too 😉 )

    Did you know you can list total views for each of those forums on your front page? You are already using the topic-views plugin so you just need the My Views plugin to add the ability and a slight edit to the template.

    August 13, 2007 at 9:32 pm

  3. “Did you know you can list total views for each of those forums on your front page? You are already using the topic-views plugin so you just need the My Views plugin to add the ability and a slight edit to the template.”

    I didn’t know that. We are in the middle of a redesign so that might be something to check out in the future.

    “Sometimes I wonder who else is out there as it’s challenging at times being an “early adopter”. However I think we’ll get many more folks onboard with 0.8.3 release.”

    Your hard work is appreciated by many I’m sure, but I thought I would take the time to express my thanks knowing that not many people would take the time to do so.

    August 14, 2007 at 8:41 am

  4. The_Spider

    Hey _ck_,
    I would love to use your plugin but it breaks my bbpress site, I thought that it might have had something to do with the version I was running, so I upgraded to the current version, and still encounter the same error.

    Users are un-able to login or logout with your ignore plugin installed and activated. I also encounter some errors when I try activate or deactivate any other plugins I have. (I checked to see if it was a combination with another plugin but I could not find any combination that did not produce an error.

    September 17, 2007 at 10:14 pm

  5. Okay it’s most likely a conflict with an existing plugin that I may be able to fix.

    Make sure you are running the newest version of ignore from the bbpress plugin site (not my local download here).

    Can you tell me what other plugins you have running?

    I don’t even touch cookies so I have no clue why members can’t login/out with it activated but I will have to investigate.

    added: oh I just thought of something else – are you using multiviews?
    That’s one feature I haven’t tested it with yet. In theory should be fine however.

    But it is working for me on both a 0.8.2 and 8.3 alpha. You can see it in use on the showcase site:
    http://bbpress.dreamhosters.com/forums/

    September 19, 2007 at 12:04 pm

  6. The_Spider

    Here are the errors outputted by php when I activate your plugin. Your plugin was the only one activated at the time the errors were produced.

    Warning: Cannot modify header information – headers already sent by (output started at /websites/****************/http/forums/my-plugins/ignore-member.php:123) in /websites/****************/http/forums/bb-includes/pluggable.php on line 37

    Warning: Cannot modify header information – headers already sent by (output started at /websites/****************/http/forums/my-plugins/ignore-member.php:123) in /websites/****************/http/forums/bb-includes/pluggable.php on line 37

    Warning: Cannot modify header information – headers already sent by (output started at /websites/****************/http/forums/my-plugins/ignore-member.php:123) in /websites/****************/http/wp-includes/pluggable.php on line 329

    When your plugin was activated I got “Plugin could not be activated; it produced a Fatal Error.” at the top of the screen and when I de-activated it php outputs the following error:

    Warning: Cannot modify header information – headers already sent by (output started at /websites/****************/http/forums/my-plugins/ignore-member.php:123) in /websites/****************/http/wp-includes/pluggable.php on line 329

    Oddly enough I haven’t run into any of these errors until I upgraded to the newest version of bbpress. So this my not be your issue.

    September 22, 2007 at 9:18 am

  7. Ah that’s an easy fix. Well known problem with WordPress + bbPress plugins.

    Somewhere at the end of one of your plugins, possibly mine, you have some “whitespace” after the very last ?>

    Open the plugin in notepad.exe or similar and if you can detect any spaces or newlines after the very end ?> delete them, save and upload again and see what happens.

    If you have been tinkering with any of the core bbPress files you may have also added some whitespace at the end somewhere too.

    September 22, 2007 at 9:21 am

  8. The_Spider

    OMG you can’t be telling me its that simple?

    I have been reading some of your posts on the bbpress forums and have been very very impressed, you sure do know your stuff! I cant believe that a simple whitespace kills the plug-in. They are going to have to work on that.

    September 23, 2007 at 4:36 pm

  9. The_Spider

    Another small bug, regarding the latest topics, if you ignore a user and they are the last person to post in that thread, that thread disappears from the latest topics, also if you manually go to that topic via a url it will return ‘Thread not found.’ I read your comments regarding mod_rewrite and am have rewrite = false; Might I have misunderstood that I should not be affected?

    September 24, 2007 at 5:48 pm

  10. Enger

    I am seeing the same issue as The_spider described above. I have yet to find a fix for this.
    Any ideas? Has anyone fixed this?

    January 7, 2008 at 9:13 pm

  11. Unfortunately there is no fix yet for disappearing threads when the ignored user is the last to reply.

    It has to do with the way the bbpress filters work and how it looks at the last reply.

    I might try to address this later this month but I can’t make any promises right now, sorry.

    Note that the “disappeared” thread is only invisible for the person who is ignoring the other user, everyone else can see it.

    January 10, 2008 at 12:16 am

  12. I’d love to see a fix for the problem seen in the last few comments here. 🙂 Any chance you have time to look at it ck? =) I could make a small donation if it helps! 😀

    December 16, 2011 at 4:05 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s