tid;
}
$term_nodes = implode(',', $tnds);
$sql = "SELECT epublish_abstract.epublish_abstract, node.* FROM
node
LEFT JOIN epublish_abstract ON node.nid = epublish_abstract.nid
INNER JOIN term_node ON node.nid = term_node.nid
INNER JOIN term_node tn ON node.nid = tn.nid
WHERE (term_node.tid = $tid) AND (tn.tid IN ($term_nodes)) and (node.status=1)";
$result = db_query($sql);
$node_data = db_fetch_object($result);

echo $node_data->body;

}

function editor_summary_node($tid) {

// Get all regional editors
$sql = "SELECT tid from term_data where vid=41";
$result = db_query($sql);
while($node_data = db_fetch_object($result)) {
$tnds[] = $node_data->tid;
}
$term_nodes = implode(',', $tnds);
$sql = "SELECT epublish_abstract.epublish_abstract, node.* FROM
node
LEFT JOIN epublish_abstract ON node.nid = epublish_abstract.nid
INNER JOIN term_node ON node.nid = term_node.nid
INNER JOIN term_node tn ON node.nid = tn.nid
WHERE (term_node.tid = $tid) AND (tn.tid IN ($term_nodes)) and (node.status=1)";
$result = db_query($sql);
$node_data = db_fetch_object($result);

return $node_data->nid;

}
$output ="

Select Columnist:

';
print $output;

$taxo_tag = 'Opinion';

$sql = "select tid from term_data where name='$taxo_tag'";
$result = db_query($sql);
$tag = db_fetch_object($result);
$taxo_id = $tag->tid;
if ($c > 0) $taxo_id = $c;
$result = taxonomy_select_nodes(array($taxo_id));

function my_taxonomy_render_nodes($result, $c, $sumid=-1) {

if (db_num_rows($result) > 0) {
while ($node = db_fetch_object($result)) {

if ($node->nid != $sumid) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
}
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
$output = str_replace("?from", "?c=$c&from", $output);
}
else {
$output .= t('There are currently no posts in this category.');
}
return $output;
}

function my_taxonomy_term_page($str_tids = '', $tagid, $c, $sumid) {

$depth = 0;
$op = 'page';
$operator = 'and';
$tids = explode(',', $str_tids);

if ($tids) {
// Build title:
$result = db_query('SELECT name FROM {term_data} WHERE tid IN (%s)', implode(',', $tids));
$names = array();
while ($term = db_fetch_object($result)) {
$names[] = $term->name;
}

if ($names) {

$output = my_taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE), $c, $sumid);

echo $output;
echo "

";

}
}
else {
drupal_not_found();
}
}
if ($c > -1) {
editor_summary($c);
echo "

";
$sumid = editor_summary_node($c);

my_taxonomy_term_page($taxo_id, $tagid, $c, $sumid);
}
?>