You are hereActivity Stream / sreiser's Activity Stream / Adding an ActivityStream block in Drupal
Adding an ActivityStream block in Drupal
As regular readers of my blog know I'm using Drupal's ActivityStream module to power the Life Stream page on my site. I've wanted to add an activity stream block and remove the twitter / lastfm blocks for a while now, but haven't gotten around to it until tonight. It's a short function but I figure I'll post it in case someone else is looking for it.
Just add the following function to activitystream.module
function activitystream_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$blocks[0]['info'] = t('Activity Stream');
return $blocks;
}
else if ($op == 'view') {
$block['subject'] = t('Activity Stream');
$items = _activitystream_get_activity(null,false,15);
$block['content'] = theme('activitystream',$items) .'<a href="/stream">more...</a>';
return $block;
}
}
See original: Adding an ActivityStream block in Drupal