here is a patch that enables location.module to collect data through CIviCRM instead by providing its own form.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | location.civicrm_1.patch | 6.81 KB | ankur |
| #4 | location.civicrm_0.patch | 6.84 KB | ankur |
| #1 | location.civicrm.patch | 7.32 KB | ankur |
| location_3.patch | 5.08 KB | gerhard killesreiter |
Comments
Comment #1
ankur commentedThanks Killes. I played around with the patch a little and am putting this one up for consideration as well.
I combined the radio options for CiviCRM and the radio options for location module's own location collection mechanism into a single group of 3 radios.
The 3 options for the radios are (not worded literally like this):
(1) Don't collect any user locations for location module features
(2) Use location module to collect user locations for location module features
(3) Only use CiviCRM to collect user location for location module features
The problem with option 3 is that it won't work unless a "CiviCRM profile" has been enabled to collect the relevant fields. Now, for the CivicSpace distribution, we can package an out-of-the-box profile, but this has a couple of problems to think about:
(A) This needs to be obvious to CiviCRM users not using CivicSpace
(B) In the CivicSpace distribution, it is possible, if the user selects option (2), from above, that option (3) will still work. This means that the user will go to "my account" and see a location module form for an address and also see a CiviCRM-generated subtab labelled "address" (the name of the out-of-the-box CiviCRM profile) that also produces an address form! So, in short, there needs to be a simple way to turn on and off the 'designated' profile. Right now, we can turn off the location module's "my account" form when the last option is chosen, but we can't turn the CiviCRM profile off when option (2) is chosen.
Ya dig?
-Ankur
Comment #2
killes@www.drop.org commentedFor users who don't use CS we shoudl document this in the README. Then we can LART them if they don't read it.
Also I think you should not display the CiviCRM option if no CiviCRM is installed. But I am not an UI expert. :p
Comment #3
ankur commentedWell, what would you guys think about the following modification to the patch:
We offer no options if CiviCRM is enabled. In the CS distiribution, we just have the 'address' profile enabled out-of-the-box and the location module translates user submitted addresses into locations for the location module's tables. This allows admins of the site and so on to be able to use location features for users (of which -- for users at least -- there are none implemented at the moment).
If there is no CiviCRM, then we ask the admin if s/he wishes to enable the location module's address forms in the "my account" section.
This way there is only one form, the CiviCRM form, in the case where both the CiviCRM module and the location module are enabled. If the CiviCRM module is not enabled, then the settings for the location module will offer the admin the option of collecting user locations. One possible drawback here is that with CiviCRM, the site admin does not get the option, at least in the location settings, to turn off the location form. However, I'm going to argue that the percentage of CiviCRM users that are not interested in where their site members live is small. And for that small percentage, they can learn how to disable the address profile in the CiviCRM administration.
With this scheme, however, we do have the problem of Drupal users that have manually installed CiviCRM and manually installed location. In this case, we can include some notes in the documentation for the location module about how the user will need to set up a CiviCRM profile to collect user addresses.
Comment #4
ankur commentedComment #5
ankur commentedI've committed the attached patch to HEAD, DRUPAL-4-6.
-Ankur
Comment #6
ankur commentedComment #7
(not verified) commented