Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Username list for each voice


_ck_
Participant

@_ck_

If you add this code into a file called functions.php and put it into your theme folder, it will show the active names in the topic (if there is more than one person) It uses one extra query but it will also will work on 0.9

add_action('topicmeta','voices_named');
function voices_named() {
global $bbdb, $topic;
$names=$bbdb->get_col("SELECT DISTINCT user_login FROM $bbdb->posts LEFT JOIN $bbdb->users ON poster_id=ID WHERE topic_id=$topic->topic_id AND post_status=0");
$count=count($names);
if ($count>1) {echo "<li>$count members active on this topic: ".implode(", ",$names)."</li>";}
}

Skip to toolbar