diff -urp Download/automaticmenu/automaticmenu.info /var/vhosts/web_drupal_6/http/sites/all/modules/contributed/automaticmenu/automaticmenu.info --- Download/automaticmenu/automaticmenu.info 2008-06-18 14:01:08.000000000 +0200 +++ /var/vhosts/web_drupal_6/http/sites/all/modules/contributed/automaticmenu/automaticmenu.info 2009-08-28 09:55:35.000000000 +0200 @@ -1,10 +1,10 @@ ; $Id: automaticmenu.info,v 1.1 2008/06/18 00:18:09 lupusstudios Exp $ name = AutomaticMenu description = Automatically create menu items for new content. -version = VERSION package = AutomaticMenu ; Information added by drupal.org packaging script on 2008-06-18 version = "5.x-1.x-dev" project = "automaticmenu" datestamp = "1213790468" +core = 6.x diff -urp Download/automaticmenu/automaticmenu.module /var/vhosts/web_drupal_6/http/sites/all/modules/contributed/automaticmenu/automaticmenu.module --- Download/automaticmenu/automaticmenu.module 2008-06-18 02:18:09.000000000 +0200 +++ /var/vhosts/web_drupal_6/http/sites/all/modules/contributed/automaticmenu/automaticmenu.module 2009-08-28 13:59:02.000000000 +0200 @@ -13,19 +13,18 @@ /** * Implementation of hook_menu(). */ -function automaticmenu_menu($may_cache) { +function automaticmenu_menu() { $items = array(); - if ($may_cache) { - $items[] = array( - 'path' => 'admin/settings/automaticmenu', - 'title' => t('AutomaticMenu'), - 'description' => t('Configure automatic menu creation for new content.'), - 'callback' => 'drupal_get_form', - 'callback arguments' => 'automaticmenu_settings', - 'access' => user_access('administer automaticmenu'), - 'type' => MENU_NORMAL_ITEM, - ); - } + + $items['admin/build/automaticmenu'] = array( + 'title' => 'AutomaticMenu', + 'description' => 'Configure automatic menu creation for new content.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('automaticmenu_settings'), + 'access arguments' => array('administer automaticmenu'), + 'type' => MENU_NORMAL_ITEM, + ); + return $items; } @@ -39,8 +38,8 @@ function automaticmenu_perm() { /** * Implementation of hook_help(). */ -function automaticmenu_help($section = 'admin/help#automenu') { - switch ($section) { +function automaticmenu_help($path, $arg) { + switch ($path) { case 'admin/help#automaticmenu': case 'admin/settings/modules#automaticmenu': $output = t('AutomaticMenu.'); @@ -60,7 +59,7 @@ function automaticmenu_settings() { '#title' => t('AutomaticMenu Settings'), '#collapsible' => FALSE, ); - + $form['automenu']['automenu_enabled'] = array( '#type' => 'checkbox', '#title' => t('Enable AutomaticMenu'), @@ -74,13 +73,13 @@ function automaticmenu_settings() { '#default_value' => variable_get('automenu_notice', true), '#description' => t('Display on-screen messages when AutomaticMenu items are created.'), ); - + $form['automenu']['types'] = array( '#type' => 'fieldset', '#title' => t('Content Types'), '#collapsible' => FALSE, ); - + $form['automenu']['types']['intro'] = array( '#type' => 'item', '#description' => t('Use the table below to enable AutomaticMenu for individual content types and to select the parent item under which the new menu item will be created.'), @@ -91,54 +90,152 @@ function automaticmenu_settings() { '#value' => '
| '. t('Content Type') .' | '. t('Parent Menu') .' | '. t('Weight') .' | '. t('In Menu Tree') .' | '. t('In Bread Crumb') .' |
|---|---|---|---|---|
| ", - '#suffix' => " | ", - ); - - $form['automenu']['types']['automenu_type_parent_'. $key] = array( - '#type' => 'select', - '#options' => $menu_list, - '#default_value' => variable_get('automenu_type_parent_'. $key, 0), - '#prefix' => "", - '#suffix' => " | ", - ); - - $form['automenu']['types']['automenu_type_weight_'. $key] = array( - '#type' => 'weight', - '#default_value' => variable_get('automenu_type_weight_'. $key, 0), - '#prefix' => "", - '#suffix' => " | ", - ); - - $form['automenu']['types']['automenu_type_tree_'. $key] = array( - '#type' => 'checkbox', - '#default_value' => variable_get('automenu_type_tree_'. $key, true), - '#prefix' => "", - '#suffix' => " | ", - ); - - $form['automenu']['types']['automenu_type_bread_'. $key] = array( - '#type' => 'checkbox', - '#default_value' => variable_get('automenu_type_bread_'. $key, true), - '#prefix' => "", - '#suffix' => " |
| ", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_parent_'. $key .'_'. $lang_code] = array( + '#type' => 'select', + '#options' => $menu_list, + '#default_value' => variable_get('automenu_type_parent_'. $key .'_'. $lang_code, 0), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_weight_'. $key .'_'. $lang_code] = array( + '#type' => 'weight', + '#default_value' => variable_get('automenu_type_weight_'. $key .'_'. $lang_code, 0), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_tree_'. $key .'_'. $lang_code] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('automenu_type_tree_'. $key .'_'. $lang_code, true), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_bread_'. $key .'_'. $lang_code] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('automenu_type_bread_'. $key .'_'. $lang_code, true), + '#prefix' => "", + '#suffix' => " |
| ", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_parent_'. $key .'_'. $lang_code] = array( + '#type' => 'select', + '#options' => $menu_list, + '#default_value' => variable_get('automenu_type_parent_'. $key .'_'. $lang_code, 0), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_weight_'. $key .'_'. $lang_code] = array( + '#type' => 'weight', + '#default_value' => variable_get('automenu_type_weight_'. $key .'_'. $lang_code, 0), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_tree_'. $key .'_'. $lang_code] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('automenu_type_tree_'. $key .'_'. $lang_code, true), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_bread_'. $key .'_'. $lang_code] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('automenu_type_bread_'. $key .'_'. $lang_code, true), + '#prefix' => "", + '#suffix' => " |
| ", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_parent_'. $key] = array( + '#type' => 'select', + '#options' => $menu_list, + '#default_value' => variable_get('automenu_type_parent_'. $key, 0), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_weight_'. $key] = array( + '#type' => 'weight', + '#default_value' => variable_get('automenu_type_weight_'. $key, 0), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_tree_'. $key] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('automenu_type_tree_'. $key, true), + '#prefix' => "", + '#suffix' => " | ", + ); + + $form['automenu']['types']['automenu_type_bread_'. $key] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('automenu_type_bread_'. $key, true), + '#prefix' => "", + '#suffix' => " |