Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Username list for each voice


_ck_
Participant

@_ck_

This will show avatars

add_action('topicmeta','voices_named');
function voices_named() {
global $bbdb, $topic;
$results=$bbdb->get_results("SELECT ID,user_login FROM $bbdb->posts LEFT JOIN $bbdb->users ON poster_id=ID WHERE topic_id=$topic->topic_id AND post_status=0 GROUP BY poster_id");
$count=count($results);
if ($count>1) {
foreach ($results as $result) {$ids[$result->ID]=$result->ID;}
bb_cache_users($ids);
$list="";
foreach ($results as $result) {$list.=bb_get_avatar($result->ID, 16).$result->user_login.", ";}
$list=trim($list,", ");
echo "<li>$count members active on this topic: $list</li>";
}
}

Skip to toolbar