Skip to content


New BuddyPress plugin: BP Include Non-Member Comments

By default, BuddyPress does not include comments from non-members (or non-logged-in users more generally) in the sitewide activity stream. For some communities, this default behavior is probably just fine. But in a community like the CUNY Academic Commons, which aims to attract readership and conversation from all sorts of folks, whether or not they’re signed in, the sitewide activity stream will be much more meaningful if it includes comments from everyone.

My new plugin, BP Include Non-Member Comments, was built with this purpose in mind. The plugin is activated here on the CUNY Academic Commons, so that all comments on your blog – whether from logged-in users or not – will show up on the news feed.

BP Include Non-Member Comments

The plugin has been tested on version 1.1.3 of BP, as well as the 1.2 release candidate. If you want to use the plugin for 1.1.3 or lower, you will need to uncomment the first few add_action and add_filter lines in the plugin file.

Technical caveat: Non-logged-in commenters have BP user_id 0. When BP creates the activity stream, it decides whether or not to show the Delete button by checking to see whether the user_id for the currently logged in user is the same as the user_id of the person to whom the comment belongs. Presumably, though, you don’t want non-logged-in viewers of the activity stream to be able to delete items from the activity stream at all. BP’s core code is not currently set up to make it easy to remove these buttons, so I employed an ugly fix. If you have changed your theme significantly from the default, you might have to adjust the filter bp_nonmember_comment_content (near the end of the plugin) to remove the button properly.

Download the plugin here.

Posted in Uncategorized.

Tagged with , , , , , .

3 Tweets


6 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. laurent says

    Hi,

    I’m trying to use invite-anyone on my WP single 2.9 + BP 1.2
    is it possible anyway ?
    The installation went fine but I get several issue : when cliking the invite button, no members are shown in the select window and the link to the members directory is not showing
    maybe it’s a styling or CSS issue because I’m using a non-BP native template

    any information would be welcome
    thanks in advance
    cheers

  2. Profile photo of Boone Gorges Boone Gorges says

    Hi Laurent,

    Invite Anyone was written for the 1.1.3 bp-default template. I know for certain that it breaks when inserted into the 1.2 default template, so I wouldn’t be surprised if it breaks in your custom template as well. It sounds to me as if your custom template does not include the necessary javascript. You might consider copying the javascript files from bp-default into your custom template and then making sure that they’re called on the invite-anyone page. No guarantees that it will work right away even then – I really haven’t checked to see what differences there are in the JS between 1.1.3 and 1.2. It’s on my list of things to do in the next week or so. So if you can’t get it to work, please look out for further updates.

  3. water-retention-lady says

    This is the first site I’ve seen with comments coming from Twitter. Presumably a Buddypress thing? I’m not a Buddypress user, but this is cool!



Some HTML is OK

or, reply to this post via trackback.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image

Additional comments powered by BackType



css.php