Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #53238
    Anonymous
    Inactive

    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’

    #53240
    Franky
    Keymaster

    See 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.

    #53241
    Anonymous
    Inactive

    Thanks 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’

    #53242
    Franky
    Keymaster

    Is you wp timezone setting correct?

    #53243
    Anonymous
    Inactive

    Yes, 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!

    #53244
    Anonymous
    Inactive

    Too 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?)

    #53245
    Anonymous
    Inactive

    Could 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’)”;

    #53246
    Franky
    Keymaster

    I was just going to start debugging this, but yes, that’s probably it.

    #53247
    Anonymous
    Inactive

    No, 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 Okay

    #53248
    Franky
    Keymaster

    Your 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')";

    #53249
    Anonymous
    Inactive

    Thanks!

    #53637
    Anonymous
    Inactive

    Hello,

    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….

    #53645
    Franky
    Keymaster

    Well … it’s a bug … and fixed here (will be in the next release):
    http://plugins.trac.wordpress.org/changeset/1106421

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top