Support » Plugin: BP Distance Search » auto store user location

  • Hi
    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    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.

    Thread Starter itsabhist

    (@itsabhist)

    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 1 month, 2 weeks ago by itsabhist.
    Plugin Author Andrea Tarantini

    (@dontdream)

    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?

    Thread Starter itsabhist

    (@itsabhist)

    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
    
    }

    🙂

    Plugin Author Andrea Tarantini

    (@dontdream)

    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.

    Thread Starter itsabhist

    (@itsabhist)

    Hi
    I am not software developer.
    But I am trying to make this.

    Also requested to spare time for same if possible .

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.