동일한 문제가 있습니다. 나는 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'));
?>
희망을.