Conversation
supportHi I want to store user current location without filling location form field. Or when visiting profile edit page current location button automatically selected . Please help
Hi itsabhist, I’m not sure how this could be achieved, I’ll spend some time on it over the weekend and I’ll get back to you if I find a suitable solution.
eagerly waiting for reply Expecting custom function which update automatically user geolocation lat long when function run in xprofile field like “current location” Which further can use as add_action in different situations This reply was modified 3 years, 11 months ago by itsabhist .
Hi itsabhist, In the current implementation a user can update their current location if they: * Go to the profile edit page * Click the ‘get current location’ button * Submit the form To automate the above procedure, we should: * Build a form to edit the location profile field, copying it from the profile edit page * Hide it with CSS * With JavaScript, activate the ‘get current location’ button (i.e. call the bps_locate() function in bps-template.js) * With JavaScript, submit the form What do you think?
exactly but i think user dose not require to visit profile page . location update can be use from anywre based on add action add_action( 'template_redirect', 'update_location'); funtion update_location() { //store current lat lng to user current location field } 🙂
Yes, this makes the feature very flexible. I’d like to write and test the actual code, but I don’t have enough time at the moment. However I’m sure you or your developer can now proceed with the implementation.
Hi I am not software developer. But I am trying to make this. Also requested to spare time for same if possible .
Hi itsabhist, I’m not sure how this could be achieved, I’ll spend some time on it over the weekend and I’ll get back to you if I find a suitable solution.
eagerly waiting for reply Expecting custom function which update automatically user geolocation lat long when function run in xprofile field like “current location” Which further can use as add_action in different situations This reply was modified 3 years, 11 months ago by itsabhist .
Hi itsabhist, In the current implementation a user can update their current location if they: * Go to the profile edit page * Click the ‘get current location’ button * Submit the form To automate the above procedure, we should: * Build a form to edit the location profile field, copying it from the profile edit page * Hide it with CSS * With JavaScript, activate the ‘get current location’ button (i.e. call the bps_locate() function in bps-template.js) * With JavaScript, submit the form What do you think?
exactly but i think user dose not require to visit profile page . location update can be use from anywre based on add action add_action( 'template_redirect', 'update_location'); funtion update_location() { //store current lat lng to user current location field } 🙂
Yes, this makes the feature very flexible. I’d like to write and test the actual code, but I don’t have enough time at the moment. However I’m sure you or your developer can now proceed with the implementation.
Hi I am not software developer. But I am trying to make this. Also requested to spare time for same if possible .