--- adminrss.module.orig 2006-02-23 10:45:03.000000000 +0100 +++ adminrss.module 2006-02-23 16:27:24.941381115 +0100 @@ -69,7 +69,7 @@ function adminrss_handler($type=NULL,$key=NULL) { if ($type && $key && $key==ADMINRSS_KEY) { - if (in_array($type, array('node', 'comment'))) { + if (in_array($type, array('node', 'comment', 'trackback'))) { if (call_user_func('adminrss_feed_' . $type)) { return; } @@ -102,23 +102,43 @@ ORDER BY c.timestamp DESC ', 0, 15); $items = ''; while ($comment = db_fetch_object($result)) { - $link = url('comment/edit/'. $comment->cid, NULL,NULL,TRUE); // url("node/{$comment->nid}", NULL, "comment-{$comment->cid}", TRUE); + $link = url('admin/comment/edit/'. $comment->cid, NULL,NULL,TRUE); // url("node/{$comment->nid}", NULL, "comment-{$comment->cid}", TRUE); $items .= format_rss_item($comment->subject, $link, $comment->comment, array('pubDate' => date('r', $comment->timestamp))); // $comment = db_fetch_object($result)) { // $items[] = $comment->subject .' - '. format_date($comment->timestamp, 'medium') .'
['. l(t('node'), 'node/'. $comment->nid, array('title' => $comment->title)) .']|['. l(t('edit'), 'comment/edit/'. $comment->cid) .']|['. l(t('delete'), 'admin/comment/delete/'. $comment->cid) .']'; } - adminrss_format_feed($items,array('description'=>t('Unapproved Comments for Administration'))); + adminrss_format_feed($items,t('Comments'),array('description'=>t('Unapproved Comments for Administration'))); +} + + +function adminrss_feed_trackback() { + if (!module_exist('trackback')) { + drupal_access_denied(); + return; + } + + $result = db_query_range('SELECT t.created, t.subject, t.nid, t.trid, t.excerpt + FROM {trackback_received} t + INNER JOIN {node} n ON t.nid = n.nid + WHERE t.status = 0 + ORDER BY t.created DESC ', 0, 15); + $items = ''; + while ($trackback = db_fetch_object($result)) { + $link = url('admin/trackback/edit/'. $trackback->trid, NULL,NULL,TRUE); + $items .= format_rss_item($trackback->subject, $link, $trackback->excerpt, array('pubDate' => date('r', $trackback->created))); + } + adminrss_format_feed($items,t('Trackbacks'),array('description'=>t('Unapproved Trackback links for Administration'))); } //Note this function is identical to the commentrss.module's function commentrss_format_feed -function adminrss_format_feed($items, $channel = array()) { +function adminrss_format_feed($items, $title, $channel = array()) { global $base_url; $languages = (function_exists('locale') ? locale_supported_languages() : array('name' => array('en' => 'English'))); $channel_defaults = array( 'version' => '0.92', - 'title' => variable_get('site_name', 'drupal') . ' - ' . t('Comments'), + 'title' => variable_get('site_name', 'drupal') . ' - ' . $title, 'link' => $base_url, 'description' => t('Comments'), 'language' => (($key = reset(array_keys($languages['name']))) ? $key : 'en')