tid;
$names[] = $term->name;
}
if ($names) {
$title = implode(', ', $names);
drupal_set_title(check_plain($title));
$channel['link'] = url('taxonomy/term/'. $str_tids .'/'. $depth, array('absolute' => TRUE));
$channel['title'] = variable_get('site_name', 'Drupal') .' - '. $title;
// Only display the description if we have a single term, to avoid clutter and confusion.
if (count($tids) == 1) {
$term = taxonomy_get_term($tids[0]);
// HTML will be removed from feed description, so no need to filter here.
$channel['description'] = $term->description;
}
$result = taxonomy_select_nodes($tids, $terms['operator'], $depth, FALSE);
$items = array();
while ($row = db_fetch_object($result)) {
$items[] = $row->nid;
}
}
}
node_feed($items, $channel);
}
function get_account($uid) {
return db_fetch_object(db_query("SELECT * FROM users u WHERE uid = $uid"));
}
function feed_blog_user($uid) {
$account = get_account($uid);
$result = db_query_range(
db_rewrite_sql(
"SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"
), $uid, 0, variable_get('feed_default_items', 10));
$channel['title'] = $account->name."'s blog";
$channel['link'] = url('blog/'. $uid, array('absolute' => TRUE));
$items = array();
while ($row = db_fetch_object($result)) {
$items[] = $row->nid;
}
node_feed($items, $channel);
}
function feed_blog_last() {
$result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
$channel['title'] = variable_get('site_name', 'Drupal') .' blogs';
$channel['link'] = url('blog', array('absolute' => TRUE));
$items = array();
while ($row = db_fetch_object($result)) {
$items[] = $row->nid;
}
node_feed($items, $channel);
}
function feed_default() {
$account = get_account($uid);
$result = db_query_range(
db_rewrite_sql(
"SELECT n.nid, n.created FROM {node} n WHERE n.status = 1 AND n.type NOT IN ('page') ORDER BY n.created DESC"
), $uid, 0, variable_get('feed_default_items', 10));
$channel['title'] = variable_get('site_name', 'Drupal') . ': Värsket';
$channel['link'] = url(NULL, array('absolute' => TRUE));
$items = array();
while ($row = db_fetch_object($result)) {
$items[] = $row->nid;
}
node_feed($items, $channel);
}
?>