Closed (fixed)
Project:
Calendar
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2008 at 15:58 UTC
Updated:
24 Feb 2009 at 21:19 UTC
The calendar currently provides yearly, monthly, weekly and daily views. We would like in addition an "upcoming" view that lists upcoming events in chronological order. Such a view is easy to create, but we would like to have it integrated into the calendar in the same way the yearly, monthly, weekly and daily views are. So we would want to extend the "Year | Month | Week | Day" links to "Year | Month | Week | Day | Upcoming".
Karen, if you think this is would be a reasonable extension of your excellent module then we would be happy to start developing it and contributing it back.
Comments
Comment #1
karens commentedThat is actually a completely different view that uses different arguments, which is why I didn't go down that path. And the view object is already quite large.
But I also know this is going to be a common request, so it makes sense to figure out the best way to incorporate it.
What I do, and what I have been recommending is to create a completely separate view for the upcoming view. There is no link between it and the calendar that way, of course, which is probably not ideal.
Anyway, I'm open to ideas and patches if we can find a way to make it work efficiently.
Comment #2
matt_p commentedHi Karen
I am creating a list view separately and am putting the Year/Month/Week/Day links in the header of this view to link back to the different calendar views. I am having to use PHP date to generate the links though - is there a way to tell the calendar view I would link to view the month without specifying the current month in the URL?
Thanks
Matthew
Comment #3
dydecker commentedsubscribing
Comment #4
stefan_seefeld commentedI want to use such a feature myself, so I have started looking around for ways to get there.
The calendar view configuration page allows to add new displays (blocks or pages). As I thought this might be exactly what is needed to get an 'upcoming event' display, I created a new 'page' display, hoping that I may then be able to generate appropriate navigational links to interconnect with this new display.
However, for some reason this results in two consecutive calendar blocks to appear in my sidebar. Is this intentional ? Am I using this wrong ?
Thanks,
Comment #5
karens commented#2 - there should be no reason why you need a different views for the year/month/day/week. This version of the calendar is specifically designed to make that easy. Each view can be given any style you like -- calendar, list, table, teasers, whatever. You can even override each view to use different fields and formats. Each of those is basically the same as a stand-alone view with all the kinds of options a stand-alone view has. The only thing that is required is that all of these use the date argument because the date argument will filter the results for the right calendar period and provide the back/next links at the top of the page.
#4 - An upcoming events views is a completely different view than what the calendar is designed to create. The calendar is designed to produce year, month, week, or day groupings of nodes. But an upcoming events list needs to cross into more than one period. The upcoming events list wouldn't use a date argument, and the date argument would not produce the right results. An upcoming events list can be created as a separate, simple, view that filters for dates >= now. As noted above, that won't produce any automatic links back to the calendar, but you can add them in the view header. The original issue is about finding a more automatic way to do a coming events view, but this is what I recommend for now.
Comment #6
mariuss commentedIf you are using repeating events, then creating an Upcoming view doesn't really work. Or maybe it is possible, but I don't know how.
With repeating events the issue is that all the repeats are shown, and it can be a long list, if you chose to show the start date and time. Also, only individual events are show in the view, the corresponding nodes I guess, and not instances of the repeats.
In most cases I think for Upcoming Events all you need is a block, so adding just a block should be good enough. Of course, a full blow view is better.
Comment #7
jeremy_a commentedThe downside to using completely seperate views for the Calendar & Upcoming is that filters don't get carried between views.
In fact it was possible to add Upcoming & Recent views to the Calendar directly, using these (admittedly rather ugly) arguments:
/@--P3Y for upcoming
/2000--@ for recent
But it looks like @ as an placeholder for "now" in arguments has been depreciated in Date.
Anyway, using the same principle, shouldn't it be possible to create an upcoming view with custom date validation & the date_now() function? Something like
Something like this would return upcoming/recent views at calendar/upcoming & calendar/recent and maintain integration between the calendar pages, the block & newly created upcoming & recent view attachments. Using the same argument.
Of course the example PHP above would need correct argument dates to be validated (I'm not sure which Date API function to call for this - help appreciated)...but in theory something like this should work, shouldn't it?
Comment #8
odecuas commentedHi, just installed drupal (1 week) and played around with calender of which i would like to display future events. I have searched and searched but there is alot of talk going backward (older version, integration) and i am getting quite confused on how to get a future event (Not necessarily using the EVENT module) to show up on my calendar. Say, Thanksgiving. I believe its on Thurs, 27 Nov 2008, for this year. could someone explain to me (if not too much trouble) or let me know what documents i should be reading? again, im newbie on drupal, but have extensive programing (just not PHP).
im running Drupal 6.x, and just loaded/updated latest Calendar, Date, CCK, etc (just now), so i have all latest updates. I do not have the EVENT module installed (should i?). I have created a content type and added it to my calendar to display events for (today)
thanks!
Comment #9
jblackhall commentedYou should create your own topic next time instead of asking a new question in a current topic. To answer your question, Just remove the "for today" part from your filters. Under "Fields" make sure you have at least "Node: Title" and "Date: your_cck_date_field", where your_cck_date is a field under the Event node type you created with CCK. For filters, you should just do something like "Node: Published" and "Node Type: Is one of: your_cck_event_node". The reason what you've got set up isn't working is because you're only showing events for "today". You shouldn't have any reference to "Date: your_cck_date" in your View Filters. That goes in your View Fields.
Comment #10
karens commentedI'm committing some changes to the default calendar that will change the default calendar to add an upcoming events block. It works by adding a regular block and overriding the date argument and adds a 'greater or equal to now' date filter instead. It adds another step to the setup because you have to change the date field in the upcoming events filter as well as changing the date field in the argument, but it should work the way most people want it to work.
If you use it, you will see that you have two available blocks for your calendar. One called 'Calendar' for the regular mini calendar, and one called 'Upcoming' for the upcoming events view.
Comment #11
jeremy_a commentedGreat news. In my opinion this will make the Calendar much more functional, especially for content which cannot strictly be divided into week/month blocks. This made my day :)
Comment #12
zilla commented@karens - wonderful news, any idea when we should look for this? also, will there be any simple documentation or notes regarding changes required to date field and filter arguments (i think that they're probably going to be obvious but you never know...)
Comment #13
odecuas commentedhi jblackhall,
i just created new thread as you suggested here; http://drupal.org/node/322706, however i am still not able to get future events to work. could you elaborate a bit more on the new thread?
thanks!
Comment #14
jeremy_a commented@ zilla, now that the handbook pages are editable, anyone can contribute a tutorial/notes regarding setups. I definitely think a detailed tutorial to help people configure the date/views/calendar/cck combo is in order, because it is rather complicated.
As a non-developer who is using these modules pretty heavily, I'm definitely willing to give something back by doing a writeup :)
@ Regarding integrating Upcoming & calendar views, my feature request would be that it open up the possibilities to configure the calendar for various periodsof time, not just upcoming, by configuring the date filter as per usual. Fingers crossed.
BTW one slight worry I have with the date filter is how unweildy & long it makes the URL. Has anyone had any success in cutting out unneeded segments? Even if I set the granularity of a CCK field to just "Year/Month/Week", and leave out the "To" value in the filter, the URL is still including those values. It makes things uncomfortably long.
date_filter[value][year]=2008&date_filter[value][hour]=18&date_filter[value][minute]=30&date_filter[value][second]=39&date_filter[value][month]=11&date_filter[value][day]=15&date_filter[default_date]=now&date_filter[default_to_date]=EDIT: I suspect this is a feature request to make the date filter respect the granularity of the CCK field. Wrong thread :)
Comment #15
zilla commented@jeremy - good point on the handbook edits! i personally think that one person shoudl go through and tag unmarked tutorials by version number!!
i'm actually going to be writing up a very detailed solution for an image management option with cck imagefield shortly, so will try to hit views after this...
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #17
jakemonO commentedAm I missing something or have these changes not been committed (yet ) ? Thanks in adv. KarenS
Comment #18
jeremy_a commentedJust a follow up on #7. It is possible to create an upcoming events view using the date argument by putting something like this in the PHP validate code:
Now the view at calendar/ will default to the upcoming two weeks of nodes rather than "this month", "today" etc according to the granularity.
Comment #19
mariuss commentedDoes #7 or #18 solve the repeating events issue?
Comment #20
jeremy_a commentedmaruiss, I think that problem was solved here. I know my problem with repeating events in 6 was fixed by upgrading to the latest date/views/calendar a week or two ago
Comment #21
mariuss commentedAny chance this feature will be back ported to Drupal 5?
Comment #22
niek_kloots commentedsubscribing to back porting to Drupal 5