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…’.
Instructions
- 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 167 times. Are you using this plugin? Consider a donation.
Version history
- 1.0 – May 25, 2010
- Initial release
10 Comments
Thanks for this. You’re doing great work with BuddyPress and just wanted to let you know I appreciate it!
Thanks, Joss!
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 1.2.5.2. I altered the loader.php file to read:
$external_activity_feeds = array(
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?
Hi,
I was wondering if the variables are completely arbitrary?
array(
‘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’ )
),
array(
‘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!
One Trackback/Pingback
[...] Teleogistic I like to stop at the duty free shop Skip to content HomeAbout BooneDonateCodeWordPress/WordPress MUShared BlogrollImport from Ning: Import Ning users to WordPress and BuddyPressBuddyPressBP Include Non-Member CommentsCustom Profile Filters for BuddypressBP TinyMCEInvite AnyoneBP MPO Activity FilterEnhanced BuddyPress WidgetsBP Import Blog ActivityBP Group ManagementForum Attachments for BuddyPressGroup Forum Subscription for BuddyPressBP System ReportBuddyPress Group Email SubscriptionBP External Activity [...]
Post a Comment