This forum is for churches and ministries using Web-Empowered Church tools or packages. If you are a WEC customer, please submit a ticket. If you are reporting a bug with one of our plugins, please email us. If you are a business entity and want help that you cannot find here, please look at our services.

Notice: we are using new forum software and most messages from last 2 years were transferred. If you had an account before, please login to post a message on the forum.

Topic with no new replies

Using Table Map with other tables


Author Message
Written on: 02/24/2010
Sandy Matheson
Topic creator
registered since: 10/04/2005
Posts: 79
Is it possible to use the Table Map with tables other than tt_address, feusers and cal? It would be incredibly helpful to be able to map the churches in our diocese and we have all the addresses and lat/long within our bespoke database extension?

This may be along the same lines, but the docs talk about extensions that are "WEC Map enabled" - are there any documents about how to enable our own extensions?

Many thanks for any help,

Sandy
Written on: 02/26/2010
Christoph Koehler
registered since: 10/24/2005
Posts: 383
Sandy,

Sure! Just add this to your extension's ext_tables.php:
[code]
$TCA['fe_users']['ctrl']['EXT']['tablenamehere'] = array (
'isMappable' => 1,
'addressFields' => array (
'street' => 'field name of street info',
'city' => 'field name of city info',
'state' => 'etc',
'zip' => 'etc',
'country' => 'etc',
),
);
[/code]

That should make the new table show up in WEC Table Map.

Christoph
Written on: 02/27/2010
Sandy Matheson
Topic creator
registered since: 10/04/2005
Posts: 79
Christoph,

Many thanks for this. I have asked Simon to include this in a forthcoming update to our database extension and will then work on that instead of re-entering all the addresses manually.

One further quesion on this, if we have the latitude and longitude in our database can this be used to accuratly position the markers using a Table Map? My experience of markers based on address is that they are often inaccurate and I would prefer not to have to manually correct 150+ markers by adjusting the Geocode Admin under the WEC Map Admin!

Many thanks for your support,

Sandy
Written on: 03/01/2010
Christoph Koehler
registered since: 10/24/2005
Posts: 383
Sandy,

No, you can't, unfortunately. I've had good experience with accurate geocoding in the UK in the few examples I've seen, though. Make sure you set the default country in the extension config in the Extension Manager section for WEC Map, that should help a lot.

Christoph
Written on: 05/21/2010
Sandy Matheson
Topic creator
registered since: 10/04/2005
Posts: 79
Hi,

Simon has now included the following in ext_tables.php but the only tables appearing in the WEC Map Table plugin are still fe_users and tt_address - so the table for pd_diocesedatabase is not there. Any idea why this might be?

[code]$TCA['fe_users']['ctrl']['EXT']['tx_pddiocesedatabase_address'] = array (
'isMappable' => 1,
'addressFields' => array (
'street' => 'address1',
'city' => 'address2',
'state' => 'address3',
'country' => 'address4',
'zip' => 'postcode',
'name' => 'churchname',
'email' => 'officeemail',
'telephone' => 'officetelephone',
),
);[/code]

Many thanks,

Sandy
Written on: 07/27/2010
Christoph Koehler
registered since: 10/24/2005
Posts: 383
Sandy,

Sorry for the long wait. The problem is the wrong TCA definition. It should be:

$TCA['tx_pddiocesedatabase_address']['ctrl']['EXT']['wec_map'] = array (
// snip
}

Christoph