Events Made Easy › Forums › Bug fixed or feature request implemented › Events List Scope by Time
- This topic has 11 replies, 2 voices, and was last updated 13 years, 7 months ago by Franky.
-
AuthorPosts
-
Sun 5 Jun 2011 at 07:45 #42954AnonymousInactive
I’m using this for nightclub listings which 99% of the time span into the early hours of the following morning.
When viewing the latest (future) listings on for example 10am on Saturday morning, all of the events from Friday night are still there.
It would be great if the Scope could be extended to specify the time also so I could say scope = YYYY-MM-DD-HH-MM and dynamically set the values using the time from PHP date.
Or am I missing something and there’s already a way to do it?
(I’ve played with long_events but it doesn’t really apply here – I also want to keep the end time to show on the actual event page info)
Thanks,
Tom
Sun 5 Jun 2011 at 08:50 #47870FrankyKeymasterIf the events start on Saturday, they’ll show up on Saturday. But if they start on Friday and span midnight, they’ll only show up on Saturday if you use the “long_events” option for the event listing.
Sun 5 Jun 2011 at 13:55 #47871AnonymousInactiveHmm – I did know that but it’s not what I’m getting.
For example:
Following short code:
[events_list showperiod=daily long_events=0]
Gives me:
June 4, 2011 [Date created by WordPress I assume]
Jun
4
[Date from EME]
[Event Name]
(Event which started yesterday)
Any other ideas?
TIA
Tom
PS – Just double-checked the server date which is correct
Sun 5 Jun 2011 at 14:30 #47872FrankyKeymasterHmm … I see, I think I found the problem: “future” show events *ending* in the future, not starting in the future.
I’ll add an option so you can deactivate the end date being taken into account for relevant scopes, but for now: change line 1358 in eme_events.php from:
$conditions [] = " (event_start_date >= '$today' OR (event_end_date >= '$today' AND event_end_date != '0000-00-00' AND event_end_date IS NOT NULL))";
to:
$conditions [] = " event_start_date > '$today'";
Sun 5 Jun 2011 at 14:31 #47873AnonymousInactiveGreat stuff!
Thanks
Sun 5 Jun 2011 at 17:01 #47874FrankyKeymasterThe latest trunk version includes a new option to [events_list]: “use_end_date”
to indicate you want the scopes to include end dates upon evaluation (like e.g. future events include events starting in the past, but ending in the future), or just the start date (value:0).
Default: 1 (include end date)
Tue 7 Jun 2011 at 13:16 #47875FrankyKeymaster@tomchubb: I renamed “use_end_date” to “show_ongoing”, which more precisely covers what’s being done: if 1 (the default), ongoing events matching the scope are shown, if 0 only events which startdate match the scope are shown.
Wed 8 Jun 2011 at 08:14 #47876AnonymousInactiveOk thanks for letting me know
Sat 9 Jul 2011 at 07:48 #47877AnonymousInactiveFranky,
Just wanted to update you on an issue I found with this:
I’ve been experiencing some problems this weekend for my events.
Today, the events aren’t showing for tonight.
When using the All Events filter in the admin section they are appearing in white (below the pink events which have expired).
But they don’t appear when using the Future/Past events filter so I’m guessing that is the problem?
Strange as it used to work ok but I was previously having problems with long events spanning midnight showing on the following day.
I downloaded the latest trunk and installed that last week.
I also made a small change as per your instructions in my previous post: http://www.e-dynamics.be/bbpress/topic.php?id=952
Hmm … I see, I think I found the problem: “future” show events *ending* in the future, not starting in the future.
I’ll add an option so you can deactivate the end date being taken into account for relevant scopes, but for now: change line 1358 in eme_events.php from:
$conditions [] = ” (event_start_date >= ‘$today’ OR (event_end_date >= ‘$today’ AND event_end_date != ‘0000-00-00’ AND event_end_date IS NOT NULL))”;
to:
$conditions [] = ” event_start_date > ‘$today'”;
I changed the original back and then changed the OR to an AND and it’s working.
Just thought I’d give you the feedback
Sat 9 Jul 2011 at 16:12 #47878FrankyKeymasterThere were some issues with 3.3.5, fixed in trunk. Try that one (for the filtering issue).
For the evnets ending in the future, the trunk version also has something for that:
* Feature: added option “show_ongoing” to [events_list], to indicate you want the scopes to include end dates (ongoing events) upon evaluation (like e.g. future events include events starting in the past, but ending in the future), or just the start date. Default: 1
http://downloads.wordpress.org/plugin/events-manager-extended.zip
Sun 10 Jul 2011 at 11:12 #47879AnonymousInactiveOk thanks.
Has the trunk been changed again then.
BTW – just to check, I’m simply downloading the zip and uploading using the WP Plugin Manager which I’m assuming overwrites it. I’m not deactivating or anything.
Is this correct?
Tom
Sun 10 Jul 2011 at 12:37 #47880FrankyKeymasterBest is deactivation/activation, but for the rest: yes. And in one month, many things change, also trunk 🙂
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.