By Alexandre Cayer on Thursday, 20 November 2014
Posted in Technical Issues
Replies 4
Likes 0
Views 602
Votes 0
Hi Guys,

The dating module, especially for the distance thing, is really not clear. I have messed up a little bit with the template to setup what is, to me, a little bit clearer, adding also an option for the current's user address field from its profile. No actual function has been based on this button. I have been trying to get the info about where the javascript function from the detect location is set but, hummm no guess. When we press the detect location and select and address what field (probably all hidden input) are added and with what information, so I can try to have the same for the current's user address.

Thanks
Hello,

The overall process is like this. Once you have clicked the detect location, it will go to this file: ../media/com_easysocial/scripts/site/search/map.js line 44 and then it will push the data to hidden input which you can see the process in the same file on line 114-115.

If you view source of your module once the location detected, you can see the hidden value here: http://screen.stackideas.com/2014-11-20_1606.png . Means that you need to have the same format as the hidden value. If you want to get the address from your profile, you can use this:

echo $my->getFieldData('address');


Hope this able to help you with the customization.
·
Thursday, 20 November 2014 16:26
·
0 Likes
·
0 Votes
·
0 Comments
·
In fact, this might even be 10000x clearer to the end user hehehe :P

EDIT: And if you can, from the script i don't know where to get lol,,, paste me the code i shall add to my adddeclarationscrip, even better to put all the correct current user's address from profile :DDDDDD
·
Thursday, 20 November 2014 13:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Yep yep... all down and working. I'll propose a pull request
·
Friday, 21 November 2014 08:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

Glad it works!
·
Friday, 21 November 2014 10:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post