| 12 |
define('AVATAR_BLOCKS_MY_BUDDYLIST', 3); |
define('AVATAR_BLOCKS_MY_BUDDYLIST', 3); |
| 13 |
|
|
| 14 |
function avatar_blocks_admin() { |
function avatar_blocks_admin() { |
| 15 |
$instructions = 'To configure the invididual blocks, visit the '. l( 'Blocks Page', 'admin/build/block'). '.'; |
$instructions = 'To configure the invididual blocks, visit the '. l( 'Blocks Page', 'admin/build/block') .'.'; |
| 16 |
$form['avatar_blocks_instruct'] = array( |
$form['avatar_blocks_instruct'] = array( |
| 17 |
'#value' => $instructions, |
'#value' => $instructions, |
| 18 |
); |
); |
| 432 |
if (!(array_search($imagecache_preset, $preset_options) === FALSE)) { |
if (!(array_search($imagecache_preset, $preset_options) === FALSE)) { |
| 433 |
if ($online_member->picture) { |
if ($online_member->picture) { |
| 434 |
// process the user's picture with imagecache |
// process the user's picture with imagecache |
| 435 |
$output .= l(theme("imagecache", $imagecache_preset, $online_member->picture, $online_member->name, $online_member->name), "user/".$online_member->uid, array('title' => $online_member->name), NULL, NULL, FALSE, TRUE); |
$output .= l(theme("imagecache", $imagecache_preset, $online_member->picture, $online_member->name, $online_member->name), "user/". $online_member->uid, array('title' => $online_member->name), NULL, NULL, FALSE, TRUE); |
| 436 |
} |
} |
| 437 |
else { |
else { |
| 438 |
// process the default picture with imagecache |
// process the default picture with imagecache |
| 439 |
$output .= l(theme("imagecache", $imagecache_preset, $default_picture, $online_member->name, $online_member->name), "user/".$online_member->uid, array('title' => $online_member->name), NULL, NULL, FALSE, TRUE); |
$output .= l(theme("imagecache", $imagecache_preset, $default_picture, $online_member->name, $online_member->name), "user/". $online_member->uid, array('title' => $online_member->name), NULL, NULL, FALSE, TRUE); |
| 440 |
} |
} |
| 441 |
} |
} |
| 442 |
// no such preset, just call theme_user_picture |
// no such preset, just call theme_user_picture |
| 485 |
} |
} |
| 486 |
} |
} |
| 487 |
|
|
| 488 |
$output = theme_avatar_blocks_block($online_members, $imagecache_preset); |
$output = theme('avatar_blocks_block', $online_members, $imagecache_preset); |
|
|
|
| 489 |
|
|
| 490 |
if (variable_get('avatar_blocks_ol_include_text', 0)) { |
if (variable_get('avatar_blocks_ol_include_text', 0)) { |
| 491 |
// Format the output with proper grammar. |
// Format the output with proper grammar. |
| 525 |
while ($next_member = db_fetch_object($new_member_list)) { |
while ($next_member = db_fetch_object($new_member_list)) { |
| 526 |
$new_members[] = $next_member; |
$new_members[] = $next_member; |
| 527 |
} |
} |
| 528 |
$output = theme_avatar_blocks_block($new_members, $imagecache_preset); |
$output = theme('avatar_blocks_block', $new_members, $imagecache_preset); |
| 529 |
return $output; |
return $output; |
| 530 |
} |
} |
| 531 |
|
|
| 547 |
if (module_exists('buddylist')) { |
if (module_exists('buddylist')) { |
| 548 |
$buddy_ids = array_keys(buddylist_get_buddies()); |
$buddy_ids = array_keys(buddylist_get_buddies()); |
| 549 |
if (count($buddy_ids)) { |
if (count($buddy_ids)) { |
| 550 |
$buddy_ids_str = '('. implode(',', $buddy_ids). ')'; |
$buddy_ids_str = '('. implode(',', $buddy_ids) .')'; |
| 551 |
if (variable_get('avatar_blocks_bl_display_noavatar', 1)) { |
if (variable_get('avatar_blocks_bl_display_noavatar', 1)) { |
| 552 |
$sql = 'SELECT uid,name,picture FROM {users} WHERE uid > 0 AND access > 0 AND uid IN %s ORDER BY created DESC'; |
$sql = 'SELECT uid,name,picture FROM {users} WHERE uid > 0 AND access > 0 AND uid IN %s ORDER BY created DESC'; |
| 553 |
} |
} |
| 560 |
while ($next_buddy = db_fetch_object($my_buddylist_list)) { |
while ($next_buddy = db_fetch_object($my_buddylist_list)) { |
| 561 |
$buddies[] = $next_buddy; |
$buddies[] = $next_buddy; |
| 562 |
} |
} |
| 563 |
$output = theme_avatar_blocks_block($buddies, $imagecache_preset); |
$output = theme('avatar_blocks_block', $buddies, $imagecache_preset); |
| 564 |
} |
} |
| 565 |
} |
} |
| 566 |
return $output; |
return $output; |
| 596 |
while ($next_member = db_fetch_object($role_member_list)) { |
while ($next_member = db_fetch_object($role_member_list)) { |
| 597 |
$role_members[] = $next_member; |
$role_members[] = $next_member; |
| 598 |
} |
} |
| 599 |
$output = theme_avatar_blocks_block($role_members, $imagecache_preset); |
$output = theme('avatar_blocks_block', $role_members, $imagecache_preset); |
| 600 |
} |
} |
| 601 |
else { |
else { |
| 602 |
// specificed role not found |
// specificed role not found |