Closed (won't fix)
Project:
Block Refresh
Version:
6.x-1.0-alpha1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2009 at 22:02 UTC
Updated:
14 Jun 2011 at 11:15 UTC
Hi there,
Thanks for this excellent module. I'm trying to get this to work with a block that I've created for the activity module which shows the (displayed) user's recent activity. The block refresh appears to work with every block supplied by the module ("logged in user's" and "everyone's" recent activity). But for some reason I get a blank slate when the (displayed) user's activity block tries to refresh.
The code for the block has been inserted into the module. Here is the code for the "all activity" block that does refresh:
case 'all':
if (user_access('view public activity')) {
$activity = activity_get_activity(ACTIVITY_ALL, NULL, variable_get('activity_block_'. $delta, 5) + 1);
if ($count = count($activity)) {
drupal_add_css(drupal_get_path('module', 'activity') .'/activity.css');
if ($count > variable_get('activity_block_'. $delta, 5)) {
$more_link = theme('activity_more_link', 'activity');
array_pop($activity);
}
$activities = array();
foreach ($activity as $item) {
$activities[] = theme('activity', activity_token_replace($item), $item) . activity_delete_link($item);
}
return array(
'subject' => t('Recent activity'),
'content' => theme('activity_block', $activities)
);
}
}
break;And here is the code for the user block that does not refresh:
case 'user':
if (user_access('view public activity') && arg(0) == "user" && is_numeric(arg(1))) {
$uid = arg(1);
$author = activity_user_load($uid);
$activity = activity_get_activity($uid, NULL, variable_get('activity_block_'. $delta, 5) + 1);
if ($count = count($activity)) {
drupal_add_css(drupal_get_path('module', 'activity') .'/activity.css');
if ($count > variable_get('activity_block_'. $delta, 5)) {
$more_link = theme('activity_more_link', 'activity');
array_pop($activity);
}
$activities = array();
foreach ($activity as $item) {
$item['delete-link'] = activity_delete_link($item);
$activities[] = theme('activity', activity_token_replace($item), $item);
}
return array(
'subject' => t("@username's activity", array('@username' => $author->name)),
'content' => theme('activity_block', $activities)
);
}
}
break;Any help is uber-appreciated.
Comments
Comment #1
pribeh commentedK,
I realized that offering you a chance to look at the site might help. Go to http://lc3.figureandground.net/user/2 and look for "thomas cermak's activity" block toward the bottom left. Manual refresh is on.
Comment #2
bocaj commentedMarking as "won't fix" since there has been no activity on this forum in quite some time.
Comment #3
Dublin Drupaller commentedhaving a similar problem. did you find a fix for this?
Comment #4
Dublin Drupaller commentedam using 6.x aplha 1
Comment #5
Dublin Drupaller commentedoops. posted this in the wrong place..more likely something to do with activity.module.