WPML not installed and activated.

3 Must-Know BuddyPress Plugin Workarounds

By Uma Gokhale on May 27, 2012 in Everything Web
10
1

Here are 3 common BuddyPress conflict issues that my clients approach me with. Though they all seem complex issues, there are simple workarounds even if you don’t know anything about PHP or Javascript. Still, when faced with these issues you WILL have a tough time finding these solutions put as simply as possible anywhere else, believe me I’ve looked!

In this post, we’re going to see the workarounds connected with the following awesome Buddypress plugins that you would want to work with even if they require tweaking.

1. BuddyPress Registration Options

This is your only hope (that’s also free) of protecting your BuddyPress site against spam account creation. When a new user account is created, this plugin can restrict the new user’s access to BuddyPress pages and activity steams unless & until the administrator approves the account. The administrator can alternately Deny access to a particular user or even ban him/her.

I was testing this plugin on a test site using Buddypress 1.5. When I installed this plugin, it gave me an error/warning on activation and messed up my site’s front end. This was too bad because I just had to make this one work, being the best spam stopper!

So I found a hack to fix this issue. There a code change that needs to be done in the bp-registration-options.php file of your plugin. Here it is:

Open “bp-registration-options.php”.

On line 6:
replace
if ( !is_site_admin() )

by

if ( !is_super_admin() )

On line 675 and 1592:
replace
$is_bp_dir = $bp->root_components;

by

$is_bp_dir = array_keys($bp->active_components);

 

This should do the trick! Please make this change before activating the plugin.

2. BuddyPress Facebook like Live Notification from BuddyDev

BuddyPress Live notification is a plugin any Buddypress fan would just fall in love with. It’s a Facebook like live notification system that shows an unread notification in your buddybar and also a fade in notification pop bubble just like Facebook. Here’s a screenshot.

budydpress-facebook-like-live-notification-plugin-issue

 

Though this plugin is a must-have with one of its kind excellent features, it’s refreshing mechanism many times conflicts with your site files making your activity reply fields disappear every time it runs a check, which by default is every 10 seconds. This is obviously unacceptable as your users will very soon get irritated with the short 10 seconds window to reply. Also on my test site, the plugin refused to show the fade in bubble-like notification due to a jquery conflict.

There are a few articles online that suggest updating the bpln.js file of this plugin to include jquery nonconflict mode or changing the name of the variable called. Unfortunately there’s pretty much no support documentation for this plugin from BuddyDev. So Here’s how I made this plugin still work for me.

I opened the file named bp-live-notification/bpln.js
This file includes the default refresh interval which is 10 seconds. I simply changed this to 90 seconds so that the interval would be longer giving the user enough time to finish typing his/her reply and post it. To fix the jquery conflict, I changed this line at the top of the bpln.js

this.interval=setInterval("BPLN_Helper.check_update()",90000);//90 seconds

Also where ever I could find jq on the rest of the page, I changed it to the new name uma.

uma is my name which can be replaced by any other word :)

This resolved the conflict so that the bubble notifications started to work and also made living with the in-progress-user-replies disappearing a lot easier.

The good thing is even if the reply fields disappear after our new interval which is 90 seconds, the reply content remains in the field. So if the user clicks on the reply link again, what he’s typed so far is still there.

3. RS BuddyPress Refresh Activity

This is another plugin you don’t want to ignore even though it’s not perfect. At the moment there’s no other Buddypress plugin that does this. RS Buddypress refresh activity adds new updates to your activity stream as and when they happen without a need to refresh the page. The updates appear on top of the steam and can be assigned a highlighting color. This is a plugin to keep because with today’s instant updating networks and apps, your visitors will expect to see the site updates LIVE. It can significantly add to your visitors’ engagement and time spent on your site. To stay updated with what’s happening with the network, all they have to do is keep their activity page open and updates will just keep coming in!

buddypress-rs-activity-refresh-fix-reply-issue-workaround

 

With these great features however there is one disadvantage. Just like the live notifications plugin, this one too while refreshing the activity stream closes any reply fields that are open. This means it’s possible that your site user starts writing a reply to an activity, and after typing halfway, the reply field disappears. The creator of this plugin has not yet released a version that prevents this. Here’s a link to a thread about this issue. It seems the creator is working on something to fix this but as of now we have to work with the version we have.

As a workaround, I changed the interval for this one too from the default 10 seconds (recommended by the plugin creator is 60 seconds) to 90 seconds giving the user enough time to post his/her reply.

I hope these pointers help you make your BuddyPress network successful!

Do you have any tips to add here? Please do so using comments below!

About the Author

Uma GokhaleView all posts by Uma Gokhale
Web designer, food & travel lover. Join Uma on Facebook | Twitter | Pinterest | Google

Subscribe NOW! to get


- E-Book on how to use Google + for business
- E-book on how to train your company to use social media effectively
- Professional business card design for social marketers

  • http://www.ohtstore.com/ ohtstore.com

    It’s a shame you don’t have a donate button! I’d definitely donate to this excellent blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to fresh updates and will share this site with my Facebook group. Talk soon!

    • umagokhale

      Thanks Ohtstore for visiting & for leaving a nice comment!

  • http://www.facebook.com/sonia.sood.925 Sonia Sood

    substitute to Salutation

    • umagokhale

      Hi Sonia! Thanks for visiting and for leaving a comment. There are several good Buddypress themes out there that are better than Salutation. A Google search will fetch you many options. Let me know if you need any help!

  • anfeloga

    Hi Uma, I can’t see which line You say to change the word for avoiding the conflict in BuddyPress Facebook like Live Notification from BuddyDev

    By the way, Great Blog!

    • umagokhale

      Hi Anfeloga! Thanks for dropping by and for your kind comment :) Are you able to open your bp-live-notification/bpln.js?

      • anfeloga

        Hi Uma and thanks for the reply, yes I’m able to open bp-live-notification/bpln.js and I already changed the refresh interval but I can’t see in your post the line You say to avoid js conflict or is just changing the refresh interval?

        • umagokhale

          In addition to changing the interval I did this: Where ever I could find the word ‘jq’ on the rest of the page, I replaced it with a different word.

          • anfeloga

            Thanks Uma, now everything is fine. Great work!

          • umagokhale

            You’re welcome Anfeloga! I’m happy to help.