I have a blog site whit several blogs. In one block I show the bloggers categories with the help of a snippet. And it works. It shows this bloggers categories and how many post there is by this author and this categorie. But if you click on the link you get ALL posts with this categorie, not only from this one blogger.

Anyone who can fix this snippet so that the link will give me only the posts from one blogger??

<?php
  if (user_access('access content')) {
    $accountid = arg(1);
    $result = db_query(db_rewrite_sql("SELECT term_data.tid, term_data.name, COUNT(*) AS count FROM {vocabulary_node_types} INNER JOIN {term_data} USING (vid) INNER JOIN {term_node} USING (tid) INNER JOIN {node} USING (nid) WHERE node.status = 1 AND vocabulary_node_types.type = 'blog' AND node.uid = '$accountid' GROUP BY term_data.tid, term_data.name ORDER BY term_data.name"));
    $items = array();
    while ($category = db_fetch_object($result)) {
      $items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid);
    }
    return theme('item_list', $items);
  }
?>

Comments

AstaC’s picture

Noone who can se what's wrong in the code?

AstaC’s picture

Please?

AstaC’s picture

Just asking one more time