We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50012
    • 12 Posts
    Hi comp_nerd26,

    "&location" is a cool feature. I will integrate that option in the next version as soon as the extra appears in the Package-Manager. And thanks for the hint with url_encode... that is truly the better way.

    Jan

      • 47401
      • 295 Posts
      Quote from: quadro at Dec 01, 2015, 03:11 AM
      Hi comp_nerd26,

      "&location" is a cool feature. I will integrate that option in the next version as soon as the extra appears in the Package-Manager. And thanks for the hint with url_encode... that is truly the better way.

      Jan


      Hi Jan

      Another Thing ive spotted is: if you visit the page and either the &location or $_REQUEST isnt set, at default it shows the entire list of locations. Not too sure if it should do this? (im not too sure that $_REQUEST is a good idea, inless modx automatically adds security checks against $_GET and $_POST? wonder if there is a way to retreive this using the api)

      a couple of other features that would be good:

      1) limiting the outcome. you could have &limit therefor restricting the returned results (imagine if you had over 1000 locations).
      2) pagination.
      3) &groupby tv.name This could be used to output only those specific to that group. so for example if you wanted to retreive a list of locations/properties that had a specific criteria i.e county/property type. Shouldnt be too difficult as all it seems to be is manipulating the multidimensional array.

      Again your add-on is excellent and has been a life saver. Thank you smiley I
        • 50012
        • 12 Posts
        Hi comp_nerd26,

        i just updated GoogleStoreLocator to the version 1.1.0 and included your features:

        &location:
        i added the property &location and &locationRadius to order the stores by that address and filter it by that radius. If you don't want to filter it by radius just use 0 or do not set this property.

        &limit and &offset for pagination:
        i added &limit and &offset to use the getPage extra for pagination. I will put up some more information about that in the docs: http://www.quadro-system.de/modx-extras/googlestorelocator.html

        &groupby tv.name
        i added the property &tvFilter to filter stores by a TV.


        ...and i changed str_replace to your solution: urlencode()

        Thank you very much for your tips and ideas...
        Jan
          • 47401
          • 295 Posts
          Quote from: quadro at Dec 04, 2015, 09:32 AM
          Hi comp_nerd26,

          i just updated GoogleStoreLocator to the version 1.1.0 and included your features:

          &location:
          i added the property &location and &locationRadius to order the stores by that address and filter it by that radius. If you don't want to filter it by radius just use 0 or do not set this property.

          &limit and &offset for pagination:
          i added &limit and &offset to use the getPage extra for pagination. I will put up some more information about that in the docs: http://www.quadro-system.de/modx-extras/googlestorelocator.html

          &groupby tv.name
          i added the property &tvFilter to filter stores by a TV.


          ...and i changed str_replace to your solution: urlencode()

          Thank you very much for your tips and ideas...
          Jan

          Ok thats great, not a problem at all. Thanks Jan I will re download and give it a try smiley
            • 47401
            • 295 Posts
            HI Jan

            Can I just copy and overwrite the php code in the snippet, to overwrite my version with your version?

            also is it possible to show an example in how to use the pagination that you have created?

            Cheers [ed. note: comp_nerd26 last edited this post 10 years, 9 months ago.]
              • 47401
              • 295 Posts
              Quote from: comp_nerd26 at Dec 09, 2015, 03:25 AM
              HI Jan

              Can I just copy and overwrite the php code in the snippet, to overwrite my version with your version?

              also is it possible to show an example in how to use the pagination that you have created?

              Cheers

              oh its ok ive spotted it on your website.

              another question, is limit used with pagination? so for example, if you only wanted to show 5 stores per page, can you just set the limit to 5 but also include the pagination feature, and each page will then show a maximum limit of 5?