nightsun73
Forum Replies Created
-
Forum: Plugins
In reply to: [Events Made Easy] Dedicated image folderThanks Franky
Forum: Plugins
In reply to: [Events Made Easy] Event import templateOK,
Adding the following to eme_events.php at line 4428 gets the long/lat for the zip (you need to add your own google key). Althougb it adds the co-ordinates it produces an error saying co-ords are not set, but when editing the lecation the co-ords are there and re-saving the record removes the error. Is there a flag that needs setting that I’m missing?
if (!$location_ID && isset($line[‘location_zip’]))
$mapsApiKey = ‘GOOGLE KEY’;
$query = “https://maps.google.co.uk/maps/geo?q=”.urlencode($line[‘location_zip’]).”&output=json&key=”.$mapsApiKey;
$data = file_get_contents($query);
// if data returned
if($data){
$data = json_decode($data);
$line[‘location_longitude’] = $data->Placemark[0]->Point->coordinates[0];
$line[‘location_latitude’] = $data->Placemark[0]->Point->coordinates[1];
}Forum: Plugins
In reply to: [Events Made Easy] Event import templateCheers Franky, I’ll have a play and see what I can work out.
L
Forum: Plugins
In reply to: [Events Made Easy] Event import templatesorry one more question. If a location already exists can we match location_name and location_zip in the csv so rather than creating a new location it uses the matched location?
Forum: Plugins
In reply to: [Events Made Easy] Event import templateone more, any way to import directly from an ICS file?
Forum: Plugins
In reply to: [Events Made Easy] Event import templateThat worked a treat thank you. A couple of thoughts/ideas. Is it possible to add a category by name rather than ID no? Also is there anyway to pull the co-ordinates from a postcode? If not I may have play myself and let you have the code if I get it working.
edit: found this code for pulling lat/long, which file would it best to intergrate this into to pull the location lat/long from the postcode?
function getLatLong($code){
$mapsApiKey = ‘your-google-maps-api-key’;
$query = “https://maps.google.co.uk/maps/geo?q=”.urlencode($code).”&output=json&key=”.$mapsApiKey;
$data = file_get_contents($query);
// if data returned
if($data){
// convert into readable format
$data = json_decode($data);
$long = $data->Placemark[0]->Point->coordinates[0];
$lat = $data->Placemark[0]->Point->coordinates[1];
return array(‘Latitude’=>$lat,’Longitude’=>$long);
}else{
return false;
}
}- This reply was modified 4 years, 3 months ago by nightsun73.
- This reply was modified 4 years, 3 months ago by nightsun73.
Forum: Plugins
In reply to: [Events Made Easy] Event import templatethis is what I am using at the moment:
“event_name”,”event_status”,”event_start_date”,”event_start_time”, “location_id”
test,1,2020-09-26,10:00,1Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Email errorsAdd on price needs to default to 0.00 to avoid the error.
Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Email errorsWith further testing I have narrowed this error down to when an addon has a price of 0
Forum: Plugins
In reply to: [EME Sync Events] Event Creation DateNo,
If you mark an event as going or interested then EME will sync the event successfully. For my usage this is not 100% ideal but it works for me.
Take a look at keepcolchestercool.co.uk.
My method:
Add page to EME
Add page on facebook so I’m alerted of new events
Mark new events ‘interested’Forum: Plugins
In reply to: [EME Sync Events] Event Creation DateThat would be a shame as with the right configuration its working a dream on my site. Depends on your use case I suppose.
Forum: Plugins
In reply to: [EME Sync Events] FB Sync working?Seems to be working again
Forum: Plugins
In reply to: [Events Made Easy] editing event categoriesHi Franky,
Liking the new update, although (unless I’m doing something daft) bulk update of categories does not seem to be working. I select some events, select ‘Add selected events to category’, select category (in this case music) and click on Apply. The button changes to ‘please wait’ for a couple of seconds and then reverts. On checking any of the events, they have not changed.
Thanks
LeeForum: Plugins
In reply to: [Events Made Easy] Custom ScopeHad a think around the problem and found the easiest way to solve it was to write my own shortcode that built your shortcode. I’ll leave it here as it may help others.
function weekend_func() {
if (date(‘Y-m-d’, strtotime(‘today’)) == date(‘Y-m-d’, strtotime(‘Friday’))){
$friday= date(‘Y-m-d’, strtotime(‘today’));
} else {
$friday= date(‘Y-m-d’, strtotime(‘Friday’));
}$friday= date(‘Y-m-d’, strtotime(‘today’));
$sunday= date(‘Y-m-d’, strtotime(‘next Sunday’));
return “[eme_events scope=” . $friday .”–” . $sunday . ” limit=0 showperiod=daily show_ongoing=0 ]”;
}
add_shortcode( ‘this_weekend’, ‘weekend_func’ );Forum: Plugins
In reply to: [Events Made Easy] Conditional check for todayIt should be enough, sorry I keep coming up with these ideas ??
L