function activity_block in Activity 5
Same name and namespace in other branches
- 5.4 activity.module \activity_block()
- 5.2 activity.module \activity_block()
- 5.3 activity.module \activity_block()
- 6 activity.module \activity_block()
create a block for display
@returns block HTML
Parameters
op:
delta:
File
- ./
activity.module, line 266 - Activity module: Allow users to see their friends' activity on the site.
Code
function activity_block($op = 'list', $delta = 0) {
#dsm($op, view);
global $user;
if ($op == 'list') {
$block[0]['info'] = t('Friend Activity');
return $block;
}
elseif ($op == 'view') {
$buddy_activity = activity_buddy_activity($user->uid);
$block['content'] = theme('activity_page', $buddy_activity);
return $block;
}
}