From 1dc53d9761fbf256f59e1d9cd07741a2f8e9d27e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 18 Sep 2005 10:37:57 +0000 Subject: - Patch #3986 by James (and Boris :)):consolidated all feed-related settings in one place. * adds a "feed settings" section to admin/settings where 2 new settings are introduced: * number of items per feed * default length of feed descriptions (title only, teaser, full) * patches all of core to obey the above - including the new aggregator (out) feeds * adds support for adding namespaces in _nodeapi('rss item') - which means things like iTunes RSS and yahoo's media rss can be implemented by the appropriate modules (i.e. audio.module) * includes some additional info in the default node feed - specifically the element (links directly to comments) - and dc:creator - to show node author information. --- modules/blog/blog.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/blog/blog.module') diff --git a/modules/blog/blog.module b/modules/blog/blog.module index bed0e311c..a773a566e 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -77,7 +77,7 @@ function blog_feed_user($uid = 0) { $account = $user; } - $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $uid, 0, 15); + $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.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", NULL, NULL, TRUE); $channel['description'] = $term->description; @@ -88,7 +88,7 @@ function blog_feed_user($uid = 0) { * Displays an RSS feed containing recent blog entries of all users. */ function blog_feed_last() { - $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, 15); + $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid 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', NULL, NULL, TRUE); $channel['description'] = $term->description; -- cgit v1.2.3