Index: epublish.module =================================================================== --- epublish.module (revision 2) +++ epublish.module (working copy) @@ -341,22 +341,25 @@ /** * Implementation of hook_form_alter(). */ +/* function epublish_form_alter($form_id, &$form) { - if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) - { - $form['submission']['epublish_abstract_'. $form['type']['#value']] = array( + if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { + $form['workflow']['epublish'] = array( + '#type' => 'fieldset', + '#title' => t('Abstract settings'), + '#weight' => 5, + '#collapsible' => FALSE, + '#collapsed' => FALSE, + ); + $form['workflow']['epublish']['epublish_abstract'] = array( '#type' => 'checkbox', '#title' => t('Has abstract'), '#return_value' => 1, - '#default_value' => variable_get('epublish_abstract_'. $form['type'] - ['#value'], TRUE), - '#description' => t('Users can enter a brief abstract summarizing the content of each node.'), + '#default_value' => variable_get('epublish_abstract_'. $form['#node_type']->type, FALSE), + '#description' => t('Users can enter a brief abstract summarizing the content of each node.'), ); - } - else if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) - { - if (variable_get('epublish_abstract_'. $form['type']['#value'], TRUE)) - { + } else if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (variable_get('epublish_abstract_'. $form['type']['#value'], TRUE)) { $node = $form['#node']; $form['epublish_abstract'] = array( '#type' => 'textarea', @@ -366,8 +369,8 @@ '#rows' => 4, '#description' => t('A brief summary of this item.'), ); - } - } + } + } } /** @@ -402,7 +405,7 @@ break; case 'view': // append epublish navigation to all nodes that belong to an edition - if (!$a3) { + if ($a4) { $eid = db_result(db_query('SELECT eid FROM {epublish_edition_node} een WHERE nid = %d', $node->nid)); if ($eid) { $node = theme('epublish_navigation', $node, $eid);