Forum: Feature Requests

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Feature Requests premium extension please open a new premium support ticket.

[Resolved]Change Map & Sidebar Widget

Home Forums Feature Requests Change Map & Sidebar Widget

This topic contains 5 replies, has 2 voices, and was last updated by  Eyal Fitoussi 3 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #53170

    sanis
    Participant

    Hello Eyal,

    I have to tell you that I love your plugin, You have done very good job!!

    1)Is there way that I could display different widget in the sidebar(slider,image,text,etc) depending on the visitor’s location?

    2) How could I change the initial map at buddypress locator ? When a member first time enters the locator sees a map of New York and I would like to change that.

    Thank you!!

    #53213

    Eyal Fitoussi
    Keymaster

    Hello Sanis and thank you for the feedback 🙂

    1)

    )Is there way that I could display different widget in the sidebar(slider,image,text,etc) depending on the visitor’s location?

    Unfortunately, I don’t see a simple way to get this done. You might be able to do that ( not sure ) if you know PHP, but it won’t be super simple. The visitor’s location, after found via the auto-locator or the current location widget/shortcode, is being saved via cookies. And using PHP you can retrieve the location information via from the cookies. Now, if you can access the template files and display the specific widgets or sidebars using PHP, you will be able to also do that based on the location data that you can pull from the cookies.

    2)

    How could I change the initial map at buddypress locator ? When a member first time enters the locator sees a map of New York and I would like to change that.

    At the moment it might only be possible by editing a core file. If you are comfortable editing the file and would like to give it a try, let me know and I will tell you which file and where.

    #53220

    sanis
    Participant

    Hello Eyal,

    I would appreciate it, if you could tell me where the file is and if is there a way not to loose the changes at next update. Maybe by storing changes in mu-plugin folder or a file in my child theme if this is possible. Thank you a lot!!

    #53235

    Eyal Fitoussi
    Keymaster

    Hello Sanis,
    At the moment there is no way to make this change an update proof as You will need to modify a core file directly. However, in the next major update of the plugin, version 3.0, it will be possible.

    To make the change please follow the steps below:

    1) open the file geo-my-wp/plugins/friends/assets/js/fl.js

    2) go to line 27 which should be:

    and change the latitude and longitude in ( google.maps.LatLng( ‘40.7827096’, ‘-73.9653099’ ); ) to the coords of the location that you would like to display by default.

    3) Save the file then select and copy the entire content of the file.

    4) open the file geo-my-wp/plugins/friends/assets/js/fl.min.js and replace its content with the content you copied from the previous file.

    5) Save the file and test the location tab.

    It is not guaranteed as I haven’t tested it, but Please let me know if that works for you.

    #53270

    sanis
    Participant

    Hello Eyal,

    what You suggested worked like a charm, thank You so much!!! Do You mind inform me how I can save the changes in my child theme after the update to 3.0 so I do not bother You all the time?

    Thank You again,
    Sanis

    #53276

    Eyal Fitoussi
    Keymaster

    You are welcome Sanis, I am glad it worked out for you.

    The plan with version 3.0 is to either be able to set the default coords via settings or via filter. Regardless, once version 3.0 released, if you still don’t know how to set it just contact me again.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.