diff --git a/seochecklist.admin.inc b/seochecklist.admin.inc index a65a3cf..9eb53c0 100644 --- a/seochecklist.admin.inc +++ b/seochecklist.admin.inc @@ -17,13 +17,18 @@ function seochecklist_admin_settings() { $form['save_above'] = array( '#type' => 'submit', '#value' => t('Save'), - ); + ); // Fetch modules and groups from database. $query = "SELECT id, name, description FROM {seo_group} ORDER BY id"; $result = db_query($query); $group_id = 0; + // Vertical tab element. + $form['seochecklist'] = array( + '#type' => 'vertical_tabs', + ); + // Every group is a fieldset. foreach ($result as $data) { $group_id = intval($data->id); @@ -34,7 +39,7 @@ function seochecklist_admin_settings() { '#collapsible' => TRUE, '#description' => t($data->description), '#group' => 'seochecklist', - + ); $res = db_query("SELECT download, enable, configure, module, completed, id, name, uid FROM {seo_checklist} WHERE group_id = :group_id ORDER BY order_id", array(':group_id' => $group_id)); @@ -118,12 +123,12 @@ function seochecklist_admin_settings() { '#weight' => 100, ); - + $form['save_above']['#attributes']['class'][] = 'js-hide'; - - - + + + return $form; } diff --git a/seochecklist.info b/seochecklist.info index 0dbd6ad..b86f14a 100644 --- a/seochecklist.info +++ b/seochecklist.info @@ -1,4 +1,5 @@ ; $Id$ name = SEO Checklist description = A Search Engine Optimization checklist for Drupal. -core = 7.x \ No newline at end of file +core = 7.x +configure = admin/config/system/seochecklist diff --git a/seochecklist.module b/seochecklist.module index cb22b92..090f60e 100644 --- a/seochecklist.module +++ b/seochecklist.module @@ -10,21 +10,10 @@ * Implementation of hook_help(). */ function seochecklist_help($path, $arg) { - if ($path == 'admin/config/seochecklist') { + if ($path == 'admin/config/system/seochecklist') { return '

' . t('Check off each SEO-related task as you complete it. Do not forget to click the Save button!') . '

'; } } - /** - * Implementation of hook_init(). - */ -function seochecklist_init() { - if ($_GET['q'] == 'admin/config/seochecklist') { - $vtabs = variable_get('vertical_tabs_forms', array()); - // Enable vertical tabs on a form. - $vtabs['seochecklist_admin_settings'] = TRUE; - variable_set('vertical_tabs_forms', $vtabs); - } -} /** * Implementation of hook_permission(). @@ -32,7 +21,7 @@ function seochecklist_init() { function seochecklist_permission() { return array( 'access seochecklist content' => array( - 'title' => t('Access SEOchecklist Content'), + 'title' => t('Access SEOchecklist Content'), 'description' => t('Access to SEO Checklist.'), ), ); @@ -42,7 +31,7 @@ function seochecklist_permission() { * Implementation of hook_menu(). */ function seochecklist_menu() { - $items['admin/config/seochecklist'] = array( + $items['admin/config/system/seochecklist'] = array( 'title' => 'SEO Checklist', 'description' => 'Keep track of your Drupal Search Engine Optimization tasks.', 'page callback' => 'drupal_get_form', @@ -95,4 +84,4 @@ function seochecklist_get_book_references($tid) { return isset($references[$tid]) ? $references[$tid] : NULL; } -*/ \ No newline at end of file +*/