=== added file 'atom.info' --- atom.info 1970-01-01 00:00:00 +0000 +++ atom.info 2007-01-08 06:29:54 +0000 @@ -0,0 +1,3 @@ +; $Id$ +name = Atom +description = Provides an Atom 1.0 feed === modified file 'atom.module' --- atom.module 2007-01-07 15:35:32 +0000 +++ atom.module 2007-01-08 06:29:54 +0000 @@ -56,6 +56,16 @@ drupal_set_html_head(''); } if ($may_cache) { + $items[] = array( + 'path' => 'admin/settings/atom', + 'title' => t('Atom'), + 'description' => t('Administer atom.'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('atom_admin_settings'), + 'access' => user_access('administer atom'), + 'type' => MENU_NORMAL_ITEM, + ); + $items[] = array('path' => 'atom/feed', 'title' => t('atom feed'), 'callback' => 'atom_feed', 'access' => user_access('access content'), @@ -138,14 +148,18 @@ $link = url("node/$node->nid", NULL, NULL, true); if (node_hook($item, 'view')) { - node_invoke($item, 'view', TRUE, FALSE); + $item = node_invoke($item, 'view', TRUE, FALSE); + $item = node_invoke($item, 'view', FALSE, FALSE); } else { $item = node_prepare($item, TRUE); + $item = node_prepare($item, FALSE); } // Allow modules to change $node->teaser before viewing. node_invoke_nodeapi($item, 'view', true, false); + // Allow modules to change $node->body before viewing. + node_invoke_nodeapi($item, 'view', false, false); $output .= " \n"; $output .= ' '. check_plain(strip_tags($item->title)) ."\n"; @@ -162,7 +176,7 @@ $output .= ' '. variable_get('anonymous', 'Anonymous') ."\n"; } $output .= " \n"; - if (module_exist('taxonomy')) { + if (module_exists('taxonomy')) { $terms = taxonomy_node_get_terms($item->nid); foreach ($terms as $term) { $output .= ' '. "\n"; @@ -209,10 +223,7 @@ * * @return array of settings form options or deny access */ -function atom_settings() { - if (!user_access('administer atom')) { - die(drupal_access_denied()); - } +function atom_admin_settings() { $form = array(); for($i=1, $options=array(); $i < 31; $options[$i] = $i, $i+=1); $form['atom_feed_entries'] = array( @@ -237,7 +248,7 @@ '#cols' => 40, '#rows' => 10, '#description' => t('Ad unit code to insert in atom feed content.') ); - return $form; + return system_settings_form($form); } ?>