Events Made Easy Forums Bug fixed or feature request implemented scopedays & scopemonths Feature Request

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #42869
    Anonymous
    Inactive

    Over in the http://www.e-dynamics.be/bbpress/topic.php?id=857 thread I suggested:

    It would be more useful to be able to specify something like “one_year_future” and “one_year_past” instead of “this_year”, so future time windows won’t shrink from 12 to 0 months and past time windows won’t grow from 0 to 12 months throughout calendar years.

    However, after more thought it is obvious that an even more useful capability to accomplish that would be:

    scopedays=x

    where x is a signed integer that specifies any desired number of past or future days

    Which could used as in these examples:

    [events_list scopedays=365]

    [events_list scopedays=-30]

    [locations_map eventful=true scopedays=90]

    etc.

    Furthermore, because various months have differing numbers of days, the following additional capability also would be useful:

    scopemonths=x

    where x is a signed integer that specifies any desired number of past or future months

    Which could used as in these examples:

    [events_list scopemonths=6]

    [events_list scopemonths=-3]

    [locations_map eventful=true scopemonths=3]

    etc.

    #47800
    Franky
    Keymaster

    Good suggestion! I’ll try to add that this week.

    #47801
    Franky
    Keymaster

    I’ve added the following in trunk: scope=+Xd, scope=-Xd, scope=+Xm, scope=-Xm, with “X” being a number,

    so you can now go X days/months in the past/future. The months scope shows the X last months or the X next months, not the current month

    Of course other possibilities are now possible: scope=-Xm–+Yd or so, but not done yet (easy enough to code, but I’m lazy 🙂 )

    #47802
    Anonymous
    Inactive

    Thanks. I will give it a try.

    #47803
    Anonymous
    Inactive

    It’s great, works for me. Thanks

    #47804
    Franky
    Keymaster

    @Jude: so you mean you tested the latest trunk?

    #47805
    Anonymous
    Inactive

    Test results:

    +Xd

    Where X is smaller than the number of days to the first future event, no events are listed, which is correct.

    Where X is equal to or larger than the number of future events, all future event are listed, which obviously is not correct.

    I don’t know whether the current day is included, because I didn’t have a current day event in the database, but if not, the current day should be included in the scope.

    -Xd

    Any negative X value causes all past events display and the system defaults to events on the most distant day. That obviously is not correct.

    +Xm

    This Works, but does not include the current month and defaults to the first future month. The current month should be included in the scope and the system should default initially to the current month.

    -Xm

    This works, but does not include events in the current month and defaults initially to the most distant past month. It should default initially to the current month, but allow stepping back X number of past months.

    Documentation Suggestion:

    I used the variable ‘X’ in my feature request. However, ‘X’ is most often an unknown value in mathematics. It would be better to change ‘X’ to ‘N’ in the user documentation.

    #47806
    Franky
    Keymaster

    the days should be ok now, forgot something.

    The months: I’m not including the current month because it can get confusing. Suppose you want to show the events of the last 3 months: showing the current month might show future events, and that for the last 3 months? The same logic applies for future months to be shown.

    If you want the current month, I would suggest to use either “this_month” or wait until I implemented extra scopes, so you can use eg. “0m–3m”

    For the events shown: use ASC and DESC as usual for the sorting.

    #47807
    Franky
    Keymaster

    In trunk now:

    Feature: scope=Nm–Mm, to get the events from month N in the past/future till month M in the past future (eg. scope=-3m–2m , scope=0m–3m)

    #47808
    Anonymous
    Inactive

    Ok, I will try the latest.

    #47809
    Anonymous
    Inactive

    I tried

    scope=+7d showperiod=daily

    and it works perfectly. What I get is today and six more days ahead.

    Edit: actually I get bit more than that, but it’s close enough for rock’n’roll.

    #47810
    Anonymous
    Inactive

    All the new scope options function as described using the latest trunk version (through Changeset 390951).

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