Index: /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/location.info =================================================================== --- /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/location.info (.../home/michaelfavia/workspace/openfit.org/sites/all/modules/location) (working copy) +++ /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/location.info (.../http://labs.insitesinc.com/repository/projects/openfit.org/sites/all/modules/location) (revision 10) @@ -1,3 +0,0 @@ -; $Id$ -name = Location -description = The location module allows you to associate a geographic location with content and users. Users can do proximity searches by postal code. This is useful for organizing communities that have a geographic presence. Index: /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/contrib/location_views/location_views.info =================================================================== --- /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/contrib/location_views/location_views.info (.../home/michaelfavia/workspace/openfit.org/sites/all/modules/location) (working copy) +++ /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/contrib/location_views/location_views.info (.../http://labs.insitesinc.com/repository/projects/openfit.org/sites/all/modules/location) (revision 10) @@ -1,4 +0,0 @@ -; $Id$ -name = Location Views -description = Views-enables the location fields and creates a default location view. Requires the location module and the views module. -dependencies = views Index: /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/contrib/location_views/location_views.module =================================================================== --- /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/contrib/location_views/location_views.module (.../home/michaelfavia/workspace/openfit.org/sites/all/modules/location) (working copy) +++ /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/contrib/location_views/location_views.module (.../http://labs.insitesinc.com/repository/projects/openfit.org/sites/all/modules/location) (revision 10) @@ -11,6 +11,8 @@ */ function location_views_help($section) { switch ($section) { + case 'admin/modules#description': + return t('Views-enables the location fields and creates a default location view. Requires the location module and the views module.'); case 'admin/help#location_views': return t('The Location Views module makes all the location fields available to the Views module, ' . 'and creates a default location view using all the location fields. Set up the default location view by going to '. base_path() . 'admin/views. '); Index: /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/location.module =================================================================== --- /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/location.module (.../home/michaelfavia/workspace/openfit.org/sites/all/modules/location) (working copy) +++ /home/michaelfavia/workspace/openfit.org/sites/all/modules/location/location.module (.../http://labs.insitesinc.com/repository/projects/openfit.org/sites/all/modules/location) (revision 10) @@ -15,7 +15,8 @@ include_once LOCATION_PATH.'/location.inc'; /** - * Implementation of hook_menu(). + * Implementation of hook_menu. + * */ function location_menu($may_cache = FALSE) { $items = array(); @@ -20,14 +21,15 @@ function location_menu($may_cache = FALSE) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'search/location', 'title' => t('By location'), 'callback' => 'drupal_get_form', 'callback arguments' => array('location_search_view'), 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9,); - $items[] = array('path' => 'admin/settings/location/main', 'title' => t('Main settings'), 'type' => MENU_DEFAULT_LOCAL_TASK,); - $items[] = array('path' => 'admin/settings/location/maplinking', 'title' => t('Map links'), 'callback' => 'drupal_get_form', 'callback arguments' => array('location_map_link_options_page'), 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK, 'weight' => 1,); - $items[] = array('path' => 'admin/settings/location/geocoding', 'title' => t('Geocoding options'), 'callback' => 'drupal_get_form', 'callback arguments' => array('location_geocoding_options_page'), 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK, 'weight' => 2,); - $items[] = array('path' => 'admin/settings/location', 'title' => t('Location'), 'description' => t('Settings for Location module'), 'callback' => 'drupal_get_form', 'callback arguments' => array('location_admin_settings'), 'access' => user_access('administer site configuration'), 'type' => MENU_NORMAL_ITEM, ); + //$items[] = array('path' => 'search/location', 'title' => t('by location'), 'callback' => 'location_search_form_page', 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9); + $items[] = array('path' => 'search/location', 'title' => t('by location'), 'callback' => 'location_search_view', 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9); + $items[] = array('path' => 'admin/settings/location', 'title' => t('location'), 'callback' => 'location_configure'); + $items[] = array('path' => 'admin/settings/location/main', 'title' => t('main settings'), 'type' => MENU_DEFAULT_LOCAL_TASK); + $items[] = array('path' => 'admin/settings/location/maplinking', 'title' => t('map links'), 'callback' => 'location_map_link_options_page', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK, 'weight' => 1); + $items[] = array('path' => 'admin/settings/location/geocoding', 'title' => t('geocoding options'), 'callback' => 'location_geocoding_options_page', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK, 'weight' => 2); } else { - drupal_add_css(drupal_get_path('module', 'location') .'/location.css'); + theme_add_style(drupal_get_path('module', 'location') .'/location.css'); } return $items; } @@ -52,12 +54,14 @@
'. t('For more information please read the configuration and customization handbook Location page.', array('%location' => 'http://www.drupal.org/handbook/modules/location/')) .'
'; return $output; + case 'admin/modules#description': + return t('Enables the location system and allow users to attach locative information to content.'); } } -//TODO: check/fix this: admin/content/configure/types + function location_search_get_form($edit = array()) { $location_form = location_form(array('postal_code', 'country'), $edit, array('postal_code', 'country'), variable_get('location_suppress_country', 0) ? array('country' => variable_get('location_default_country', 'us')) : array(), '', 'location', 'nearby_postalcodes_bylocation'); @@ -85,7 +89,7 @@ } $form['#theme'] = 'location_search'; - return $form; + return drupal_get_form('location_search', $form); } function theme_location_search(&$form) { @@ -90,10 +94,10 @@ function theme_location_search(&$form) { $row = array(); - $row[] = '