Chris

Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,121 total)
  • Author
    Posts
  • in reply to: 2.39.0 query changes #11129
    Chris
    Keymaster

      Hi Brad,

      You’re absolutely right on both issues.

      Thanks for letting me know.  Look for 2.39.1 later today with a patch.

      On the draft posts: the mashups now use AJAX to query the database.   WordPress treats front-end AJAX calls as though they came from admin screens.  Apparently in the WP query code there is a hard-coded check that adds all statuses if the query is coming from the admin – and since WP can’t tell the query is really from the front-end, it returns all posts.

      There is a 3-year-old ticket about this that seems to have been resurrected again recently:
      http://core.trac.wordpress.org/ticket/12400

      Maybe they’ll fix it this time.  Meanwhile, I’ll update the query code to default to ‘publish’.  I don’t see the is_admin() check doing anything else so that should fix the problem.

      As for the posts_per_page – I switched it to support paging the results, but since that function didn’t make it into this release, I’ll set it back to -1 by default.

      Thanks again, please let me know if you notice any other issues.

      in reply to: Setting custom default icon by editing the default png file? #11103
      Chris
      Keymaster

        Hi Andris,

        Your support period has expired, but you can renew it from your account page:

        http://mappresspro.com/account

        If you have any questions please email me directly using the contact form.

         

        in reply to: Maps not displayed under beta maps 2.38.10 #11099
        Chris
        Keymaster

          Hi Rolf,

          I think on the second site the problem is that jQuery 1.5 is being loaded.  That version is too old – the current one with WordPress is 1.8.x.  Here’s the line:

          <scripttype='text/javascript'src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js?ver=3.4.2'></script>

          Can you try disabling your other plugins / theme to find where that line is being loaded?  Or you can change it to “…/jquery/1.8.3…” for the current version.
           

          in reply to: Interger in Post Gravity Form #11065
          Chris
          Keymaster

            Hi,

            I don’t know anything about Gravity Forms, but not all forms plugins may be compatible.  I can really only answer specific questions about MapPress.

            Chris
            Keymaster

              Hi, the settings control mashup display.  They automatically display the permalink OR what was saved in the POI.

              If you want to control it, you can set it to show the POI title, then you can edit the title to be a permalink when you feel like it – but you’ll have to enter the link manually.  For example in the title enter:

              <a href='www.myblog.com/?p=123'>My page 123</a>
              Chris
              Keymaster

                Hi,

                I was referring to the normal WordPress capability of showing posts from a tag or category (a category archive page, for example).

                MapPress can also do a mashup by tag and category, and there are some examples in the help:

                http://mappresspro.com/mappress-documentation

                 

                Chris
                Keymaster

                  Hi,

                  For #1, try installing the latest version, it has options for what to display:

                  http://mappresspro.com/betas

                  I’m not sure I understand #2.  The plugin doesn’t support location-based searches right now, only search by tag/category/etc.

                  in reply to: Locations List by Alpha Order #11037
                  Chris
                  Keymaster

                    Hi, you can upgrade to the latest beta.  They provide default alpha sorting as well as a filter you can use to implement your own.

                    http://mappresspro.com/betas

                     

                    in reply to: Use of sidebar widget #11030
                    Chris
                    Keymaster

                      Hi,

                      You’ll need to enter a query for the post you want to display (rather than the map).  There’s a parameter ‘p’ for post or ‘post__in’ for posts, for example for post 123 enter this in the query input in the widget:

                      “p=123”

                       

                      in reply to: mashup map problem with 2.38.9 beta #11022
                      Chris
                      Keymaster

                        For anyone else with a similar problem: there was a bug that caused mashups to display empty in 2.38.9.  It should now be fixed in 2.38.10.

                        in reply to: Setting custom default icon by editing the default png file? #11015
                        Chris
                        Keymaster

                          Hi,

                          There was a bug in one of the beta versions that could cause that behavior, or it could be the icon is in the wrong directory.

                          Could you please do this:

                          1) Install the latest version of the plugin (2.38.10)

                          2) Copy the icon file to the directory shown on the MapPress ‘settings’ screen

                          If you still have this issue after doing the above, please send a login using the contact form and I’ll be happy to take a look.

                          in reply to: cannot drag poi marker in 2.38.8 beta #11012
                          Chris
                          Keymaster

                            Hi Jim,

                            It’s a bug, I think introduced in 2.38.9.  I’ve just fixed it.

                            Please let me know about your other problem with the mashup – if that’s a bug I’ll try to include both fixes in 2.38.10.

                            in reply to: mashup map problem with 2.38.9 beta #11011
                            Chris
                            Keymaster

                              Hi Jim

                              I take it you’re putting that shortcode into your template somehow?  Are you using do_shortcode() to call it?

                              I understand it’s working now, but I ask because $cat will only work in PHP, not in a shortcode that you insert into a post.

                              I’d be happy to take a look.  I’ll need to have 2.38.9 installed so I can see the problem.  Is it OK if I login and install it for testing?  You sent me a login a while back.

                              Chris
                              Keymaster

                                Hi Brad,

                                There’s no example of building a mashup, since if you’re using PHP you can just create a map (you don’t need a query).

                                There’s an example of creating two POIs and displaying them together on a map, so that’s what you’d need to extend:

                                1) Read the unit post and create a POI for it

                                2) Query the news posts and create POIs for each one

                                3) Combine the two sets of POIs into one array and display the map

                                Here’s an example of how to get all the POIs for an array of WordPress posts ($posts):

                                $pois = array();   
                                foreach($posts as $post) {        
                                  // Get the maps for each post    
                                  $maps = Mappress_Map::get_post_map_list($post->ID);
                                
                                  // Add the pois for each map    
                                  foreach($maps as $map) {     
                                    foreach ($map->pois as $poi) {         
                                      $poi->postid = $post->ID;      
                                      $pois[] = $poi;     
                                    }    
                                  }   
                                }
                                Chris
                                Keymaster

                                  Hi Brad,

                                  If I understood, you’re trying to limit the news releases to 10 but *always* show the unit?

                                  If so, I don’t think that’s possible because WP allows only one “posts_per_page” for the whole query.  You could set “posts_per_page=-1” and get ALL news, which may not be what you want.

                                  Or you could take a look at the WP_Query “orderby” clause.  Maybe there’s a way you could order the query so the unit always appears first?  I think the database will read and sort the results be limiting them to 10:

                                  http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

                                   

                                  Finally, you could resort to using PHP to generate the mashup.  Then you can build the POIs based on your news query and add the unit at to the beginning of the POIs array.

                                  And yes, I’m still working on proximity search – although it might have the same problem if there are > 10 news items in the vicinity.

                                Viewing 15 posts - 901 through 915 (of 1,121 total)