Events Made Easy › Forums › Bug fixed or feature request implemented › Show only current event
- This topic has 12 replies, 2 voices, and was last updated 9 years, 8 months ago by Franky.
-
AuthorPosts
-
Tue 30 Dec 2014 at 23:48 #53238AnonymousInactive
Thanks for this great plugin for wordpress!
On my site I use it (only) to show the current ‘Vet on Call’ (a lot of extra options in the plugin that I don’t use!)The ‘Vet on Call’ starts at 18.00h until the next morning 08.00h.
Outside those hours every practice that is in the group has its own opening hours.So now I want to show in the list only the current ‘Vet on Call’
For example:
at 17.00h the message is: ‘No veterinarian on call, please call your own vet’
at 18:00h the message is: ‘Vet no. 1 is on call, please call …..’
at 05.00h the same message..
at 08.00h the message is again: ‘No veterinarian on call, please call your own vet’I have all the different ‘Vets on Call’ as events, with locations and telephone numbers, but I miss the ‘scope=current’
Wed 31 Dec 2014 at 00:44 #53240FrankyKeymasterSee if this change fixes it:
http://plugins.trac.wordpress.org/changeset/1057200“scope=ongoing limit=1” is what you want then, but as said in the change: since there’s no user timezone info, it might be incorrect.
Wed 31 Dec 2014 at 01:13 #53241AnonymousInactiveThanks for your quick response, but you’re right, it doesn’t work (at 01.12am: ‘no vet on call’ instead of the ‘current vet on call’
Wed 31 Dec 2014 at 12:14 #53242FrankyKeymasterIs you wp timezone setting correct?
Wed 31 Dec 2014 at 12:37 #53243AnonymousInactiveYes, my timezone setting is correct, Amsterdam.
But I just changed the ‘Use Client Computer for Calendar’ in General Settings to ‘Yes’, and now it works!
I have my website running now with ‘Vet on Call’
http://dedierenarts.info/dienstdoend-dierenarts/
Thanks and happy new year!Wed 31 Dec 2014 at 15:49 #53244AnonymousInactiveToo soon…
End time correct when using “scope=ongoing limit=1″: When the event is finished the ‘No event’ message comes in.
Start time not correct…., the ‘No event’ message is still there…Does it have something to do with the fact that it’s a 2- day event (starting at night at 18.00 and continuing until the next morning at 08.00?)
Thu 1 Jan 2015 at 21:59 #53245AnonymousInactiveCould the error be in event_start_date instead of event_end_date?
Should it be:
$conditions[] = ” (event_start_date <=’$today’ AND event_start_time<=’$this_time’ AND event_end_date >= ‘$today’ AND event_end_time>=’$this_time’)”;
instead of
$conditions[] = ” (event_end_date <=’$today’ AND event_start_time<=’$this_time’ AND event_end_date >= ‘$today’ AND event_end_time>=’$this_time’)”;
Thu 1 Jan 2015 at 23:11 #53246FrankyKeymasterI was just going to start debugging this, but yes, that’s probably it.
Thu 1 Jan 2015 at 23:15 #53247AnonymousInactiveNo, that’s not enough. I’m not a programmer, but I think the test should be something like:
IF eme_start_date = $today THEN IF eme_start_time <= $this_time AND eme_end_date > $today Okay
IF eme_start_date = $today THEN IF eme_start_time <= $this_time AND eme_end_date = $today THEN IF eme_end_time < $this_time Okay
IF eme_start_date < $today THEN IF eme_end_date > $today Okay
IF eme_start_date < $today THEN IF eme_end_date = $today THEN IF eme_end_time < $this_time OkayThu 1 Jan 2015 at 23:38 #53248FrankyKeymasterYour statements are not correct either 🙂 E.g. the end date can be the same as the start date, and the 3rd statement makes no sense, but you got me awake and this is the condition that works here:
$conditions[] = " (CONCAT(event_start_date,' ',event_start_time)<='$today $this_time' AND CONCAT(event_end_date,' ',event_end_time)>= '$today $this_time')";
Fri 2 Jan 2015 at 07:41 #53249AnonymousInactiveThanks!
Thu 5 Mar 2015 at 21:46 #53637AnonymousInactiveHello,
Today I checked my website again, and I noticed something has changed when using the scope=ongoing switch:
When there is no current ongoing event, in the first version the standard message of ‘The message displayed when no events are available’ was shown, but in the current version nothing is displayed….
Thu 5 Mar 2015 at 23:48 #53645FrankyKeymasterWell … it’s a bug … and fixed here (will be in the next release):
http://plugins.trac.wordpress.org/changeset/1106421 -
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.