BP External Activity allows admins to import data from an arbitrary RSS feed into their BuddyPress sitewide activity stream. For example, you might use the plugin to add activity items for edits on a MediaWiki installation.
The plugin imports RSS feeds every hour. You may find that you need to decrease your Simplepie cache time to make it work:
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 600;') );
reduces the RSS cache to ten minutes, for example. Put that in your bp-custom.php file if you are having problems with the plugin.
At the moment, the plugin uses the Author field from the RSS feed to look for a matching author in your WP database. If it doesn’t find one, it uses the unlinked text ‘A user’, as in ‘A user edited the wiki page…’.
- Upload the bp-external-activity directory to your WP plugins folder and activate
- Open loader.php and replace the sample feed data with your own. Read the inline documentation carefully.
Future versions of the plugin will have a real admin interface (no PHP knowledge necessary), more sophisticated matching of feed authors with BP members, and the ability to attach feeds to groups.
Thanks to Andy Peatling, whose External Group Blogs served as the inspiration for a good part of the code.
BP External Activity has been downloaded [downloadstat url=”http://wordpress.org/extend/plugins/bp-external-activity/stats/” get=”total” autop=”false”] times. Are you using this plugin? Consider a donation.
- 1.0 – May 25, 2010
- Initial release
Thanks for this. You’re doing great work with BuddyPress and just wanted to let you know I appreciate it!
Pingback: Teleogistic / New BuddyPress plugin: BP External Activity
Will this also work with WP 3.0?
I am trying to load the RSS feed to a twitter search. When I change the PHP file and activate the plugin the activity feed is populated with the tweets and everything looks good, but at the bottom of the page this is displayed:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘_bp_external_activity_refetch’ was given in /home1/rogersen/public_html/reformsymposium/wp-includes/plugin.php on line 395
I am using WP 3.0, set up for multi-user with BP 126.96.36.199. I altered the loader.php file to read:
$external_activity_feeds = array(
‘feed_url’ => ‘http://search.twitter.com/search.atom?q=%23rscon10’,
‘feed_action’ => ‘Tweeted’,
‘component’ => ‘Tweets’,
‘type’ => ‘tweet’,
‘show_text’ => __( ‘Show Tweets’, ‘bp-external-activity’ )
This would really enhance my site so I surely will donate. Thanks in advance.
Hi Christopher – Try commenting out lines 120 and 121 of bp-external-activity.php. That will almost certainly stop the error. (You should also comment out line 114 alert( “hi” ); – that was for testing and I meant to remove it, oops) The only trick is to make sure that the feeds are still refreshing regularly. Monitor your site over the course of a few hours after making these changes and see if it’s still working properly.
Renee – I don’t see any reason why the plugin wouldn’t work with WP 3.0. Give it a go.
Has the groups feature been created? Is there a way to manage the activity feed of certain groups using RSS?
I was wondering if the variables are completely arbitrary?
‘feed_url’ => ‘http://news.search.yahoo.com/news/rss?p=Porsche&ei=UTF-8&fl=0&x=wrt’,
‘feed_action’ => ‘%s edited the wiki page %s’,
‘component’ => ‘wiki’,
‘type’ => ‘wiki_edit’,
‘show_text’ => __( ‘Show Wiki Edits’, ‘bp-external-activity’ )
‘feed_url’ => ‘http://api.bing.com/rss.aspx?Source=News&Market=en-US&Version=2.0&Query=porsche’,
‘feed_action’ => ‘%s posted the link %s on Delicious’,
‘component’ => ‘delicious’,
‘type’ => ‘new_delicious_link’,
‘show_text’ => __( ‘Show Delicious Links’, ‘bp-external-activity’ )
What do you mean by “completely arbitrary”? If you leave them as they are, then activity items will show up that say “A user edited the wiki page X”, where X is the item from the RSS feed.
Ah, gotcha – gotcha! cool! Thank You soo much.. got it working! Im also trying to muck with it a bit so that it will pull news excerpt and post it. Thanks again!
I’m having the same ish as Christoper.
Lines 120 and 121 are
A blank line and then the close parens.
I even went and pulled a fresh copy from http://plugins.svn.wordpress.org/bp-external-activity/trunk/bp-external-activity.php to make sure.
Meanwhile lines 111 and 112 are commented out. I feel like I’m missing something here…
Hey boone — I’m back into Buddypress after going away for a while for a new project. Thanks for this plugin!
I’m not using Groups on this project, but I see (or rather saw, when the error popped up and I looked at the code 😉 ) that there are dependencies on group stuff.
Is that essential for some reason (if I understand, this is for the global activity stream, yeah), or can I strip it out in some clever way?
I had a bash at it myself — rather than writing the last update time to groupmeta, I’m using
update_site_option(bp_external_activity_lastupdate, gmdate( “Y-m-d H:i:s” ));
and get_site_option to grab it.
All seems well — I think all we’d need to do is just use the BP check for whether groups are enabled to generalize it (assuming the site_meta table is a good place to keep the timestamp)….
Im having the same problem as Ipstenu and Christopher, lines 120 and 121 do not seem the correct lines to edit out. Which lines should we be taking out to avoit the error message.
I’m pretty sure (but wait for Boone to confirm) that those of you with the _bp_external_activity_refetch problem just need to get rid of the leading underscore — I think it’s a typo!
Thats done the job swtc. Thanks a lot.
swtc’s fix gets that error done, but now I have an interesting error in my error_log..
Call to undefined method WP_Error::get_item_quantity()
BTW Boone, I’ve now got the plugin working on my groups-disabled site. There’s an occasional bit of wonkiness, but if you’d like me to send you the code for you to laugh at and possibly use for a future, groups-optional version, just let me know.
(I would share it here, but I am still a seat-of-the-pants PHP coder, and wouldn’t want people to use it unreviewed in case it’s doing something terrible or dumb that I haven’t noticed yet).
swtc – I’ve love to see what you’ve done. Can you drop me an email? boonebgorges at [gmail] .com
Has there been any head-way regarding the plugin. Ive had a look at YD BuddyPress Feed Syndication (http://wordpress.org/extend/plugins/yd-buddypress-feed-syndication/) and not enjoying working with the plugin though it does whats on the box. Dont want to work with a plugin containing encryted code.. removable but stil..
I alse had a look at the External Blogs Plugin (http://bp-tricks.com/featured/allow-users-to-add-their-rss-feed-to-their-profile-with-the-external-blogs-plugin/) which seems to only import the 1st feed then stops working on the dev seems to have stopped.
Let me know? and thanks for the hard work.
Your plugin is outdatad please update it according to latest buddypress and wordpress version…
PLEASE TELL ME WILL YOU UPDATE IT OR NOT.
“I’m pretty sure (but wait for Boone to confirm) that those of you with the _bp_external_activity_refetch problem just need to get rid of the leading underscore — I think it’s a typo!”
Just wanted to say, this fix resolved the issue for me.
The plugin is exactly what I wanted and it works perfectly (for me). I thank you very much for making this plugin.
It works for wordpress & buddypress at the time of me making this post.
I am not using the bbpress forums, I am using simple:press forums and it pulls activity from it just fine.
If you are using this plugin and you edit the RSS feed as per the instructions, be sure to change the ‘wiki_feed’ and everything else (as per the instructions) or you WILL pull in feeds from elsewhere.
It is weird I know but if you do end up with feeds from somewhere else, simply use wordpress admin to delete them. Trying to delete them via buddypress (on your website, not the wordpress back end admin) will not work. It will seem to deletthe postit but it will still be there.
Unrelated: Kapil, please be respectful and not post in all caps. The plugin works fine and doesn’t need updating with the exception of a really simple bug fix. It still works for the latest BP & WP and you can see it in action on my website, which allows anonymous posting, so you don’t even need to register to try it. talkchan.org
Your comment may not appear straight away in the activity feed, but that is to do with cron and how it functions. Keep in mind, with the exception of a few donations, the author is not paid or compensated for making a plugin unless they are selling it. It can be stressful and unrewarding to maintain a plugin, please try to refrain from being so aggressive in the future.
Thanks, Talkchan. @kapil – what Talkchan said.
Installed this on BuddyPress 1.7.2, but when I go to the Activity page I get the following error:
Fatal error: Call to undefined function groups_get_groupmeta() in /public_html/##CENSOR###/wp-content/plugins/bp-external-activity/bp-external-activity.php on line 106
Seems odd. The BuddyPress Codex doesn’t mention anything about groups_get_groupmeta() being deprecated. Any ideas?