私は同じ問題があります。私はnode.type = 'blog'でフィルタリングし、私が興味を持っていたプロフィールフィールドのフィールドを設定した場合、リストや著者を得ることができますが、重複があることがわかりました。 「Distinct」をYesに設定すると、別個のノードではなく別個のノードが選択されたため、役に立たなかった。
だから私はこのようないくつかのコードでこの情報を表示するためにカスタムブロックを作成することになった:
<?php
$block['subject'] = t('Bloggers');
// Get a list of blog authors
$result = db_query('SELECT DISTINCT u.uid, u.name FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = \'blog\'');
$links = array();
while ($blogger = db_fetch_object($result)) {
$link = array();
if (module_exists('profile')) {
profile_load_profile($blogger);
}
if (!empty($blogger->profile_first_name) || !empty($blogger->profile_last_name)) {
$link['title'] = $blogger->profile_first_name . (empty($blogger->profile_first_name) ? '' : ' ') . $blogger->profile_last_name;
}
else {
$link['title'] = $blogger->name;
}
$link['href'] = 'blog/' . $blogger->uid;
$links[] = $link;
}
$block['content'] = theme('links', $links, array('class' => 'flat-links'));
?>
お役に立てば幸いです。