Forum Replies Created
-
AuthorPosts
-
Hi,
I’m assuming your actual parameters are [mashup show="current"] (‘display’ isn’t a valid argument).
To answer your question: the mashup uses the WP query global $wp_query. WordPress sets $wp_query to the current query for the page, based on the post/get parameters for the page. For show=’current’, MapPress reads the $wp_query object and loops through the posts. For each post it fetches the maps for that post using MapPress function get_post_map_list(). It then loops through the pois for each map and adds them to the mashup.
I think the problem is that the $wp_query global isn’t being set on your template. Using new WP_Query() won’t set it. So, MapPress is probably reading whatever was originally set for the page – which is probably empty.
If you use query_posts() instead of new WP_Query, WordPress will create the WP_Query object and then also overwrite the $wp_query global as well. The Codex has some explanation:
http://codex.wordpress.org/The_LoopSome solutions might be:
1) Use query_posts() instead of creating a WP_Query object. I think this is the easiest, if it’ll work for you.
2) Explicitly use the same query in the mashup as you’re using in the template. It might be tricky if you’re paging results, but if you’re just displaying all the posts in a category it wouldn’t matter.
I hope that helps!
I see you modified your post – do you mean you get an error when you update the categories?
Hi,
Updating the category is a good test, but it won’t catch every possible error, only syntax errors.
I assume you’ve tried switching to the twentyeleven theme AND deactivating all of your other plugins?
Have you changed the core WordPress files? If not you won’t lose any customization by reinstalling WordPress (i.e. by copying the files over your existing installation). I mention that because I’ve had several cases where people write about ajax errors, only to find they’d accidentally modified their core files.
If you like, send a login and I’ll try to troubleshoot it for you.
What checkboxes did you set to control when the map is updated?
Try adding a field for errors (you may have to save a post with that field first, so the field is created).
Now save your original post again – does the error field get populated with an error message?
If not, you can send a login if you like using the contact form and I’ll take a look for you.
Hi,
Yes you can either delete the old directory and install, or copy the files over the older ones using FTP.
The maps are stored in your database and won’t be overwritten if you change or delete the files in the plugin directory.
Here’s a link with some other installation tips:
http://mappresspro.com/installSure, send an admin login using the contact form and I’ll take a look.
It might be related to the settings for the post type. I tried that plugin myself and created a type ‘test’ (plural, singular and slug all = ‘test’) using only the default settings. Then I checked the box in the MapPress settings – after that I was able to edit maps normally in the ‘test’ custom type.
Hi, that’s strange, I haven’t heard of this problem before.
You probably already checked these already, but just in case:
– Make sure you’ve saved the otions
– Make sure the MapPress meta box isn’t hidden for your post type (in the WP editor choose the ‘screen options’ button in the upper-right to enable/disable it)If that doesn’t work, how are you creating your custom post type? Do you have the register_post_type() code you used?
Hi,
It’s funny – someone else reported this last week but it in fact had nothing to do with MapPress (it was caused by a javascript error in the theme). In that instance, addThis would appear intermittently if you kept refreshing the browser.
A quick way to find any conflicts is to switch to a standard theme like twentyeleven and deactivate ALL of your other plugins (except addThis and MapPress).
If that doesn’t help I’d be happy to look at it for you. Please describe more about what the problem is, and provide a URL for a demo page on your site, so I can trace it. On your demo URL please only leave those two plugins active and use twentyeleven.
Hi, I’m not sure I understood your question. You can create a mashup by category and enable the POI list. The default POI list format is a table that’s clickable and it should open the marker when marker title is clicked on. Would that meet your needs or are you looking for something different?
Hi,
You can try the 2.38.1 beta version available in your account. That version has a default icon setting in the MapPress settings screen. The default in this case is the icon to display when no specific icon was selected in the map editor (i.e. instead of the ‘red dot’).
Icons-by-category is on my development list but I have no date for it yet. However, if you build your maps using PHP template tags, you can set the ‘iconid’ property to whatever you like. There are some simple examples of template tags in the documentation.
Hi, sorry but no that’s not supported by the plugin.
The beta is now available if you login to your account on this site (2.38.1 beta). You need to know your map’s name (see the FAQ for how to assign a name). Assuming the name is ‘mymap’ you can use javascript to get the infoWindow handle:
mymap.getInfoWindow();With the handle you can use google’s “domready” event to detect when the window is open.
By the way, you could probably also just embed an ‘onclick’ event in the link. It’s a little uglier but it would let you avoid getting the handle, etc.
Hi, it’s not possible because the infowindow handle isn’t exposed in the current version. If you like, drop me a line and I’ll add the function to the latest development version – if you don’t mind a beta you’ll be able to get that handle.
Hi, not possible (yet) unless you want to modify the php code. If so, you can turn off the regular list and output it in mappress_api.php, in the display() function. I don’t have code to provide for this, but if you need coding help feel free to send an email with your own code and I’ll try to help.
Hi,
Is it the same behavior when you put the shortcodes in a post (rather than using do_shortcode)?
I don’t know how to see that on your site so I don’t know what you mean by it doesn’t load? You get a blank map? Or no map?
What tab plugin are you using?
I think the problem is that the tabs plugin must itself call do_shortcode() on its content, otherwise it won’t process the inside shortcodes. When I search on Google it seems a lot of people have this problem, for example:
http://wordpress.stackexchange.com/questions/18659/nested-shortcode-doesnt-work
I’m not sure it would work, but maybe you could first explode the map shortcode, then put the result in the tabs? That way they wouldn’t be nested any more:
$tab1 = do_shortcode("[mashup]");
$tab2 = do_shortcode("[mashup]");
echo do_shortcode("[tab name='tab1']$tab1[/tab1]"); -
AuthorPosts
