I combined the ideas suggested here and here and implemented a "Blogs in queue" block that displays only to those roles ("editor", in my case) that have moderation permissions set. (See code below.)
It works great (although I'm not sure that it is the best solution -- it seems to rely on Drupal's tendency to not display blocks if they are empty, so the block itself is still universal, it's just that it fails to display as a function of the user role condition).
My only active problem with this method involves the "unrecognized username or password" page: something happens with that specific error result on that node (user/login), and the php in the block skips around the "$user->roles" conditional somehow. Of course, the db queries fail without an appropriate uid to return from the node and the mySQL error that is returned provides the content that then forces display of the (now especially ugly) block.
Is this due to Drupal treating the "failed login" page as an authenticated user node somehow? What can I do to either prevent this node from giving a false-positive result or else code the php to discount results from that particular node?
My php is in baby steps, so verbose replies are helpful.
Thanks! (Block code follows.)
global $user;
if (in_array('editor',$user->roles)) {
if ($user->uid) {
// get the links
$queryResult = db_query_range("SELECT n.* FROM {node} n WHERE n.moderate = 1", 0, 10);
while ($node = db_fetch_object($queryResult)) {
if ($user->uid == $node->uid || field_get($node->users, $user->uid)) {
// it's our own node or we've already voted
$rows[] = l($node->title, "queue/$node->nid") . " (" . queue_score($node->nid) . ")";
}
else {
// it's someone else's node
$rows[] = l($node->title, "queue/$node->nid");
}
}
return theme("item_list", $rows)
. "<div class=\"more-link\">"
. l(t("more"), "queue", array("title" => t("List all queue entries.")))
. "</div>";
}
}