Index: location.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/location/location.module,v retrieving revision 1.77 diff -u -r1.77 location.module --- location.module 11 Jan 2007 11:14:52 -0000 1.77 +++ location.module 16 Jan 2007 01:17:26 -0000 @@ -50,11 +50,11 @@ $output .= '

'. t('To administer locative information for content, use the content type administration page. To support most location enabled features, you will need to install the country specific include file. To support postal code proximity searches for a particular country, you will need a database dump of postal code data for that country. As of June 2005 only U.S. postal codes are supported.') .'

'; $output .= t('

You can

'; - $output .= '

'. t('For more information please read the configuration and customization handbook Location page.', array('%location' => 'http://www.drupal.org/handbook/modules/location/')) .'

'; +
  • administer locative information at Administer >> Content management >> Content types to configure a type and see the locative information.
  • +
  • administer location at Administer >> Site configuration >> Location.
  • +
  • use a database dump for a U.S. postal codes table that can be found at zipcode database.
  • +', array('@admin-node-configure-types' => url('admin/content/types'), '@admin-settings-location' => url('admin/settings/location'), '@external-http-trac-civicspacelabs-com-cgi-bin-trac-cgi-file-trunk-database-zipcodes-mysql' => 'http://trac.civicspacelabs.com/cgi-bin/trac.cgi/file/trunk/database/zipcodes.mysql')) .''; + $output .= '

    '. t('For more information please read the configuration and customization handbook Location page.', array('@location' => 'http://www.drupal.org/handbook/modules/location/')) .'

    '; return $output; } } @@ -171,12 +171,12 @@ 'country' => $row->country, 'distance' => $postal_codes[$city_index_key]['distance'], ); - - $extra = t('Local to ') . $result_location['postal_code'] .', ' . $result_location['city'] . ', '. $result_location['province'] .', '. $country_index[$result_location['country']] .' - '. $result_location['distance'] . ' ' . $edit['distance_unit'] .' away.'; - //TODO: shouldn't this use printf style replacement like: %postal (array(%postal=>$result_location['postal_code'])) $extra = array(); - $extra['location'] = t('Local to %place', array('%place' => l($result_location['city'] . ', '. $result_location['province'] .', '. $country_index[$result_location['country']], 'search/location', array(), 'postal_code='. urlencode($result_location['postal_code']) . '&country='. urlencode($result_location['country']) .'&distance='. urlencode($edit['distance']) .'&distance_unit='. urlencode($edit['distance_unit'])))); + $extra['location'] = t('Local to @place', array( + '@place' => $result_location['city'] .', '. $result_location['province'] .', '. $country_index[$result_location['country']], + '@url' => url('search/location', array(), 'postal_code='. urlencode($result_location['postal_code']) . '&country='. urlencode($result_location['country']) .'&distance='. urlencode($edit['distance']) .'&distance_unit='. urlencode($edit['distance_unit']))) + ); if ($result_location['postal_code'] == $edit['postal_code'] && $result_location['country'] == $edit['country']) { $extra['distance'] = t('Result is also from %postal_code', array('%postal_code' => $result_location['postal_code'])); } @@ -618,7 +618,7 @@ '#title' => 'Country names', '#default_value' => variable_get('location_country_'. $type, 1), '#options' => array(1 => t('Allow country names to be submitted for content of this type.'), 2 => t('Require country names to be submitted for content of this type.')), - '#description' => t('The selection of a country can be hidden and/or forced to a default country selection by going to the %location_settings and checking the box marked "Hide country selection" and selecting a country from the drop down select labelled "Default country selection".', array('%location_settings' => l(t('location settings page'), 'admin/settings/location'))), + '#description' => t('The selection of a country can be hidden and/or forced to a default country selection by going to the location settings page and checking the box marked "Hide country selection" and selecting a country from the drop down select labelled "Default country selection".', array('@location_settings' => url('admin/settings/location'))), '#suffix' => '' );