adzay
Forum Replies Created
-
For your interest I have pasted the link to the plugin hook ( that I mentioned in the last paragraph ) below:
Forum: Plugins
In reply to: [Flexible Map] Events manager, multiple locationsHi ,
Thanks for your reply. Unfortunately I am not that fluent with XML/Ajax and KML. I will study this.
I did do a bit of research and came across this post though.
Cane you tell me if it right for me to use this a guide in the right direction?
Hi Marcus,
Nope a location doesn’t exist in that postcode. I was hoping to use that postcode search attribute as follows:1. User visits my site, inputs their postcode
2. the postcode is then put in the location-map Short code (through PHP of course)
3. then the map centers on their postcode, showing the locations ( that i have posted on the site) around it.is that how the location maps work?
Hi, it doesn’t work.
I want the map to center on that custom postcode so that users can see the location posts around it.
I thought it was because I do not have a location post with that postcode.
What doesn’t make sense to me is that I tried it with the postcodes from my location posts and it still did not center.
Hi, Your latest update fixed the maps. They now load. However I still cannot get the maps to pinpoint a user specified location.
[locations_map width=”1250″ height=”500″ POSTCODE=”sw17 7tr” ].
I would like the map to center on the postcode specified in the map shortcode once it loads. How can I do this?
Hi both, thanks for your input.
Since you are working on the issue, do you recommend that I wait for an update before I upgrade events manager on my live server?Or Will you have time to be able to provide me with a quicker workaround if I upgrade the plugin on my live site so you can check it.
If the latter, I would like to know if the upgrade totally reversible? (As in i can just replace the Events manager 5.5 folder in the wp-plugins with the old-version if my site messes up).
Hi, Angelo.
I upgraded to 5.5 only on my development server. The live server https://www.thevibesign.com is still running the old version of events manager(unfortunatley I cant turn maintenance mode off because Im at work so only the splash page is available). Maybe you may be able to help me find google api instances that are running that may conflict.
Thanks,
hi on all my browsers all issuess point to the following line .
google.maps.event.addListenerOnce(map, 'idle', function(){ if( !em_maps_loaded ) em_maps(); });
in the events-manager.js file
Hi,
In your documents on your website you have this in the shortcode section:
[locations_map]
Inserts a map of multiple locations. Accepts any of the event, location and general search attributes, as well as these two:On the “search attribute” page one of the attributes is the following
search
Do a search for this string within event name, details and location address.My goal is to have one input box where someone can type in either a postcode, address or town. That value will be inputted into the shortcode
[locations_map search="$Search_value"]
.In regards to the 5.5 map issue. It is on my developing server.
I believe that I am having the same issue that many others are having with 5.5. The maps do not load. Im not sure if you have a fix for it yet though. Unfortunately there are multiple threads with map issues, will you be able to link me to the thread that has the correct workaround/solution?Hi, unfortunately it doesn’t work.
I put this in my template
<?php if( EM_Events::count(array('location'=>$EM_Location)) == 0 ) { ?>
I ended up getting an error in the front end with em-object.php.
Hi Angelo, thanks for the reply.
Does your answer mean that its not possible for you to check now?….or does your answer mean that i cannot submit using that plugin due to restrictions on the Event post type which cannot be changed?
If the latter can you tell me where to find the php that registers the post type so that I can do some trial an error tests on my part?
thanks.
Also I have already asked the form plugin creators, they think the way the Event custom post type is registered could be the cause.
If you are curious the link to the support feed is here
https://formidablepro.com/help-desk/posts-are-not-created-parent_item_id-is-null/Sorry for the large amount of replies, honestly i am not trying to bump this up.
On the website for the form plugin there is a action hook that runs a function after the form is made. https://formidablepro.com/knowledgebase/action-hooks/frm_after_create_entry/#kb-insert-form-data-into-second-database-table
Each item_meta represents a field in the form. If I was to use this filter to insrt the values directly into the wp_em_locations, will the latitude/longitude calculation and map generation activate?
add_action('frm_after_create_entry', 'copy_into_my_table', 20, 2); function copy_into_my_table($entry_id, $form_id){ if($form_id == 4){ //change 4 to the form id of the form to copy global $wpdb; $values = array('col_name1' => $_POST['item_meta'][25], 'col_name2' => $_POST['item_meta'][26]); //replace 25 and 26 with the field ids of the Formidable form. Change col_name to the column names in your table $wpdb->insert('table_name', $values); } }
If you cannot help me with this ( because it is another plugin) can you ignore this post in particular and help me with question above?
Thanks ??
I understand that using your built in form is the easier option, but I am using this plugin because it allows me to easily import posts from an excel/CSV file ( my file currently has 100 rows so far). It is also easier to customize.
Taking that into mind, one Caveat to that is that I have to open a post in the edit location screen, click out from the highlighted field so that the script runs, save and then move to the next.
In my case you can imagine it will be time consuming because I have 100 posts ( still increasing)
Hi,
Further investigation made me find the reason for this. In Events-manager.js there is a script at around line 540 .
if( jQuery( "#em-location-data input#location-name" ).length > 0 ){ jQuery( "#em-location-data input#location-name" ).autocomplete({ source: EM.locationajaxurl, minLength: 2, focusout: function( event, ui ){ jQuery("input#location-id" ).val( ui.item.value ); return false; }, select: function( event, ui ){ jQuery("input#location-id" ).val(ui.item.id).trigger('focusout');
As you can see from this line I changed the triggers from ‘.change’ to ‘focusout’ so that the function runs when the user clicks away from the field.
Then I combined it with this that I placed in my functions.php
function Select_location_field() { echo "<script>jQuery(document).ready(function(){ jQuery('#location-address').on( 'focus', function( event ) { console.log('debug: on change fired!'); }); jQuery('#location-address').focus(); });</script>"; } add_action( 'admin_head-post.php', 'Select_location_field' );
that function automatically highlights the text in #location-address field as soon as when the edit location admin screen is opened. When I click away the script runs and the map generates. Then of course I press save.
Im wondering is there a way to make that script run automatically when a post is created outside of the admin screen?