A field for storing and geocoding address with Symphony CMS.
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
data
fields
LICENCE.txt
README.markdown
extension.driver.php

README.markdown

Address Field Extension

  • Version: 0.12 Beta
  • Author: Jeremy Boles (jeremy@jeremyboles.com)
  • Build Date: 9th Sep 2010
  • Requirements: Symphony 2.0.8 (might work with earlier versions, I'm not sure)

Installation

  1. Upload the contents of the zip file to a folder named 'address_field' inside your Symphony 'extensions' folder.
  2. Enable it by selecting the Field: Address extension, choose Enable from the with-selected menu, and then click Apply.
  3. Go to System > Preferences and enter your Google Map API key.
  4. Now add the Address field to your sections.

TODO

  • Add/figure out how to add validation to the field as a whole and/or individual inputs
  • Add some connivence Javascript to disable the country field if "Hide the country field" is checked
  • Add the ability to group, sort by Address field's sup-fields Not sure if Symphony will even support this.

Data Source Filtering

Address Fields's filtering syntax hopefully compliments Symphony's built-in syntax. There are two types of queries: 1) Queries on sub-fields and 2) radius queries.

Sub-field queries:

in SUBFIELD of VALUE
  • SUBFIELD corresponds to the label of the sub-field on the field. For instance, if you changed the Postal Code to 'Zip code' this would be zip-code.
  • VALUE is the value you are matching.

Examples:

in city of springfield
in postal-code of {$postal}
in state of {$state}

Radius queries:

within DISTANCE UNIT of ORIGIN
  • DISTANCE is an number
  • UNIT is the distance unit: km, mile or miles
  • ORIGIN is the longitude and latitude, separated by a semi-colon ';'

Examples:

within 5 miles of -93.2971954;37.2083092
within 100 km of {$coords}
within {$distance} of {$longitude};{$latitude}

Data Source XML Result

<address longitude="-93.2971954" latitude="37.2083092">
	<street handle="600-w-college">600 W College</street>
	<city handle="springfield">Springfield</city>
	<state handle="missouri">Missouri</state>
	<zip-code handle="65806">65806</zip-code>
	<country handle="united-states-of-america">United States of America</country>
</address>

Screenshots

Shot 1 Shot 2 Shot 3 Shot 4

Thanks