--- node.module-old 2005-02-27 19:25:11.065664837 +0200 +++ node.module 2005-02-27 20:12:26.770940842 +0200 @@ -589,7 +589,8 @@ $output .= form_select(t('Number of posts on main page'), 'default_nodes_main', variable_get('default_nodes_main', 10), drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)), t('The default maximum number of posts to display per page on overview pages such as the main page.')); $output .= form_select(t('Length of trimmed posts'), 'teaser_length', variable_get('teaser_length', 600), array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'), 800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'), 1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.")); $output .= form_radios(t('Preview post'), 'node_preview', variable_get('node_preview', 0), array(t('Optional'), t('Required')), t('Must users preview posts before submitting?')); - + $output .= form_select(t('Feed dates'), 'feed_date_src', variable_get('feed_date_src', 0), array(0 => t('Last modification time'), 1 => t('Creation time')), t("Controls which date Drupal uses as 'pubDate' when listing nodes in XML feeds. Select 'Last modification time' if you want the feeds to work as update notification channels or 'Creation time' if you want to promote new content only.")); + $output .= form_select(t('Number of posts in main feed'), 'main_feed_items', variable_get('main_feed_items', 15), array(10 => '10', 15 => '15', 20 => '20', 25 => '25', 30 => '30', 50 => '50', 75 => '75', 100 => '100'), t("The maximum number of posts to list in the site's main XML feed.")); print theme('page', system_settings_form($output)); } @@ -990,7 +991,7 @@ global $base_url, $locale; if (!$nodes) { - $nodes = db_query_range('SELECT n.nid FROM {node} n '. node_access_join_sql() .' WHERE '. node_access_where_sql() . node_i18n_where_sql().' AND n.promote = 1 AND n.status = 1 ORDER BY n.created DESC', 0, 15); + $nodes = db_query_range('SELECT n.nid FROM {node} n '. node_access_join_sql() .' WHERE '. node_access_where_sql() . node_i18n_where_sql().' AND n.promote = 1 AND n.status = 1 ORDER BY n.created DESC', 0, variable_get('main_feed_items', 15)); } while ($node = db_fetch_object($nodes)) { @@ -1008,7 +1009,10 @@ // Allow modules to change $node->body before viewing. node_invoke_nodeapi($item, 'view', false, false); - $items .= format_rss_item($item->title, $link, $item->teaser, array('pubDate' => date('r', $item->changed))); + $pub_date = $item->changed; + if ( variable_get('feed_date_src', 0) == 1 ) + $pub_date = $item->created; + $items .= format_rss_item($item->title, $link, $item->teaser, array('pubDate' => date('r', $pub_date))); } $channel_defaults = array(