Hi,
I created a patch that provides litecal/google like theming of multi-day events. This will have events "span" multiple columns if it starts/end over a multi day period. Specifically, this patch provides:
- Multi-day layout for month and week view
- A new option in the Views style options for month & week views to enable/disable multi-day support
- Restyled layout of month & week calendar to give the calendar a lighter look - it's looks more like google or litecal
- Support for striping and limits on items/day
Additionally, I've tested against as many use cases as possible - I've gone through all the options for the week and month view options - and verified that the patch supports/doesn't break them. I've run it through the coder module - and I haven't added any complaints. Additionally, tested on ie6/ie7/ie8/ff/safari/chrome/opera.
This patch introduces two new tpl files - so if applying, you may need to clear the cache (not totally sure about this - if someone can provide clarity regarding template caching, that would be great).
- x
Screenshots :
http://www.okeel.com/sites/okeel.com/files/multi-day.png
http://www.okeel.com/sites/okeel.com/files/multi-day-week.png
Comment | File | Size | Author |
---|---|---|---|
#79 | cal_date_argument.JPG | 206.03 KB | developer-x |
#79 | cal_date_from.jpg | 262.97 KB | developer-x |
#78 | Untitled.png | 60.79 KB | IsaacJT |
#75 | Untitled.png | 21.26 KB | IsaacJT |
#72 | Untitled.png | 21.26 KB | IsaacJT |
Comments
Comment #1
developer-x CreditAttribution: developer-x commentedI've fixed a couple of bugs:
Also, there is now a live demo of this patch at http://www.okeel.com/demo/calendar
Comment #2
Fogg CreditAttribution: Fogg commented+1
i will run a test of this soon, looks very interessting.
Comment #3
retsamedoc CreditAttribution: retsamedoc commentedDoesn't work for me. I get a bunch of <'s on my calendar page (month view is broken; day & year view looks fine). This is using calendar-2.2 w/ the patch in 1.
Comment #4
developer-x CreditAttribution: developer-x commentedJust to double check - did you flush the caches after applying? There are a couple of new templates that need to be read into the template cache. If that doesn't work, can paste some of the html source around the "<" you are seeing. The actual output will help pinpoint what's happening.
Comment #5
retsamedoc CreditAttribution: retsamedoc commentedFlushed the caches and I still see the same issue. I am not using APC or memcached, just vanilla Apache/PHP.
Comment #6
developer-x CreditAttribution: developer-x commentedDo me a favor, zip up your calendar module directory and include it here. I'll download it and debug it.
- x
Comment #7
retsamedoc CreditAttribution: retsamedoc commentedOkay, here it is. This version is what I want to run since it includes your multi-day patch and the iCal export fix.
Comment #8
developer-x CreditAttribution: developer-x commentedI applied it - worked just fine.
I noticed in your output, you have
<table width=100%>
. That isn't part of the tpl files as part of the calendar package. Do you have a tweaked calendar? With my patch, the themes have changed - so if you have a custom tpl file, you need to rework it to conform to the changed template files.Comment #9
mariomc CreditAttribution: mariomc commented+1
Thank you kind sir.
Subscribing.
Comment #10
retsamedoc CreditAttribution: retsamedoc commentedHm. It works great using the Garland theme but not using Zen or derivatives. I'll investigate further. Thanks for the help!
Comment #11
developer-x CreditAttribution: developer-x commentedI just tried it in zen - seemed ok. You may have some custom styling that is conflicting. If you want, include a screenshot - that might help me pinpoint some of the styles in question.
Comment #12
mariomc CreditAttribution: mariomc commentedI tried with a fusion sub-theme and no problem was found as well.
Comment #13
lelizondo CreditAttribution: lelizondo commentedPatch works great with a custom theme.
Comment #14
developer-x CreditAttribution: developer-x commentedHere is a new version of the patch. It adds the following functionality:
1. Overlapping view of weekly and daily events - items in the weekly and daily views now "span" over the timeslots and events which are concurrent appear to overlap
2. New options in the view for week and day to enable the ovelapping views
3. css layout fixes for ie and ff
4. javascript enable weekly and daily view to allow resizing and positioning of the views. This is not dependent functionality - everything should work ok without javascript.
This patch replaces the previous patches. If you have applied a previous patch, you will need to revert then apply this patch.
This patch introduces two new templates - so you will need to flush your template cache
For a demo of the new functionality, goto http://www.okeel.com/demo/calendar/2010-W42
Comment #15
tim.plunkettAbsolutely what I needed. Other than breaking my custom CSS (which was to be expected), this worked 100% out of the box.
I'll take some time to look through the code in-depth tomorrow.
Comment #16
developer-x CreditAttribution: developer-x commentedCool - I'm glad it worked. I plan on having an update to this patch to better layout in ie (it doesn't handle tables as well as the other browsers ff/safari/chrome/opera... *sigh*) and I want to provide data oriented attributes to the html elements to make the calendar jquery inspectable so that it can be decorated with interesting ajax/javascript functionality. This will be last planned feature update. I'll update with bug fixes as they're discovered.
Comment #17
tim.plunkettI'm encountering a problem with multi-day events near the end of the month, in month view.
An all-day event from Oct 5 (Tuesday) to Oct 11 (Sunday) displays fine.
However, an all-day event from Oct 26 (Tuesday) to Oct 31 (Sunday), doesn't display Saturday.
I think this is due to the "remaining days of week/month" code, and I think this is the fix.
$diff = ($view->date_info->granularity == 'month') ? date_difference($last_day, $curday_obj, 'days') + 1 : date_difference($last_day, $curday_obj, 'days') - 1;
Note the added " + 1" in the TRUE half of the ternary. This displays the event properly.
Comment #18
tim.plunkettNope, that breaks events at the end of the month, and displays them one day past the end of the month (if they extend that far).
The lack of differentiation between "end of month" and "end of week" is breaking this. I might get back to this later, but perhaps you, knowing your code better, can figure it out.
Comment #19
developer-x CreditAttribution: developer-x commentedTim,
What is the exact start and stop time of the 10/26-10/31? Let me try to reproduce this
Comment #20
tim.plunkett10/26/2010 12:00AM (All Day)
10/31/2010 12:00AM (All Day)
Comment #21
tim.plunkettRemoving the following line fixes the problem:
$remaining_days = ($view->date_info->granularity == 'month') ? $remaining_days - $wday : $remaining_days;
I'm not sure the intention of that line, but the
min(6, $diff)
would take care of truncating the remaining days.Comment #22
developer-x CreditAttribution: developer-x commentedTim,
Thanks for reporting this, the fix is as follows:
What the first line does is figure out how many days remain for the event based off the date being rendered. The second line makes sure we don't exceed past the current week. You have to subtract the $wday because if you are on Thursday, you want the colspan to be only 2 - not 6.
I'll get an updated patch with this fix hopefully soon.
Comment #23
tim.plunkettThe last line should end with
: $diff;
, because $remaining_days doesn't exist yet otherwise.But, I find this much easier to read, and it doesn't repeat the same if() twice:
Now that this has been resolved, is there a plan for finalized code, and not just a patch?
For this to be useful in the long term, it needs to live as optional code or a submodule, not a functionality-altering patch.
Comment #24
developer-x CreditAttribution: developer-x commentedDOH (hand-slapping-forehead) - this what I get for trying to doing several things at once! But, I like this fix - let's hear it for collaboration!
Regarding finalizing code - that isn't up to me - I'm not a maintainer of this module. Unfortunately, there isn't really a way to make this a submodule - it needs to be incorporated into the calendar module codebase directly.
My thinking was if this got adoption and was thoroughly QAed - then we can make a good case for incorporating it.
Comment #25
tim.plunkettThere are dozens of code changes made that aren't directly related to the new functionality. Most importantly, keeping the existing APIs intact and functioning. For example, it looks like you renamed
calendar_build_month()
tocalendar_build_mini_month()
, and used the namecalendar_build_month()
for something entirely different. Also, changes likeshouldn't be made directly, they could be in an alternate CSS file loaded only for the alternate functionality.
Basically, we need to take this wonderfully functioning code, and make it work without hacking the module.
Also, take #956282: Coding standards into consideration, your patch introduces quite a few tabs, trailing spaces, and coding style "bugs".
Comment #26
arlinsandbulte CreditAttribution: arlinsandbulte commentedSubscribe.
This looks REALLY promising! (although I have not tested anything yet)
Karen made me co-maintainer, so I might be able to help out, although this kind of big change might be something Karen needs to be involved with.
If we can Tim's issues in #25, I might take a closer look at committing this (might mean a 6.x-3.x release).
I also agree with Tim in #23 that it would be best if this new functionality was an optional feature. Is that doable?
Also, and this might be a separate issue, has anyone looked at how easily this might port to the D7 version of calendar?
Comment #27
mixedfeelings CreditAttribution: mixedfeelings commentedFirst off, I am REALLY excited about this patch! Thanks for working on it!
Secondly, I am basically a drupal newbie, so I apologize if there is something obvious I missed in the following scenario:
I implemented Tim.Plunkett's changes in #23, and tried to patch it locally (I don't have shell access to my host). but came up with the following area when I implemented the patch:
Am I patching the wrong version of Calendar?
Thanks in advance!
Comment #28
developer-x CreditAttribution: developer-x commentedDid you apply tim's fix, then appy the patch? If so, that won't work (it will confuse the patching process).
You need to first apply the patch from #14, then go in and hand code Tim's change from #23.
I will have an update soon that will have the fix from #23 (also, I'll have a cogent response to #26, #27 soon as well).
Comment #29
developer-x CreditAttribution: developer-x commentedHere is a patch with the fix from #23. Also, if you are having problems getting the overlap display to work for the week and day view - you may need to goto your view and set/save the display options to overlap. Screenshots enclosed:
Comment #30
KarenS CreditAttribution: KarenS commentedI think this looks interesting but I have a lot of questions about things like adding/altering core functions like calendar_build_week(). What is the purpose of the new 'mini' versions of each of them? What happens on the week, year, and day view? Also as mentioned above there are lots of things coming through as changes that aren't changes because of whitespace or whatever which makes a big patch even harder to read. It would help if the patch could be cleaned up to only include actual changes.
I had just been looking at the litecalendar code that Development Seed has come up with which gives this kind of month view and that code is considerably simpler. I was trying to see if we can merge the approaches to simplify the code and unfortunately this patch complicates the code rather than simplifying it.
But it looks very interesting.
Comment #31
KarenS CreditAttribution: KarenS commentedOh, another question is about all the css items like '.calendar-calendar div.single-day .d_38 .view-item .calendar'. Do all those item numbers handle every possible iteration or is it possible that someone with a ton of items would end up with too many items that the css would not catch? I'm trying to understand where that is set and how it is used.
Is there any way to simplify all that css? It appears fragile -- very specific to a certain theme or number of items. I usually avoid setting height and width values in pixels because you don't know how much screen space is available. What happens in a theme that has a very narrow center column? Will the calendar still fit?
Comment #32
tim.plunkettWow, litecal is really slick. It uses DIVs instead of TABLEs, and it does everything either on the theme layer or as a views plugin, so it doesn't require hacking the calendar module.
I spent some time today and forked it on github to add rudimentary week support (it only came with support for a month view). It basically treats all events like multiday events, that is, it doesn't include any sort of hourly grid on week view.
At this point I'm not really sure which approach to continue working on. I guess that will depend on how Development Seed wants things to proceed with litecal. I submitted a pull request, so hopefully I'll hear back from them soon.
Comment #33
developer-x CreditAttribution: developer-x commentedKaren, Tim, et al.
I want to respond to all your questions. This is a major refactoring, so I'll do my best to address issues and explain my thinking (my method to my madness, so-to-speak).
Background
When I started looking into how to improve the calendar, I spent quite a bit time researching how litecal, fullcalendar, and google implemented their calendars. I decided that there were some real problems with all of their approaches. A non-comprehensive list:
Giving this all a lot thinking, I put together the following list of requirements/goals/constraints (in no particular order):
In order to implement items 2-3, I would need to keep using a table (unlike litecal). That way the content as delivered would govern heights and widths and the rendering would be done by the browser. But I would have to calculate colspan/rowspan.
My first stab at implementation, I tried an add-on module approach. But it came clear to me early that I would have to refactor the month/week/view processing to for all of this to work. The reason for this is that calendar "themes-as-is-goes". Instead, I need to collect the data, calculate rowspans/colspans/continuations/offsets/indents/ and a lot of other stuff. Only then, can I start theming. Calendar doesn't providing any sort of hooks to do this. So, I had to either create a competing calendar module or refactor the code. Since I didn't want to replicated/duplicate code unnecessarily, I chose to refactor via patch.
The general approach I chose was to create a bucketing systems. There are two buckets : multi-day buckets and single-day buckets. By creating a set of buckets, I was able to efficiently layout multi-day events - I can "compact" and I can properly calculate rowspan/colspan. Additionally, I deconstructed the table themeing - there are now separate themes for columns and rows. So, it's much easier to properly extend this module going forward.
Questions/Comments
$view->date_info->mini
. I had no desire/need to change anything about this display - so the old code is 'preserved' - porting it to the new rendering techniques was really out of the scope of this effort. So, the function was renamed to calendar_build_mini_month to be clear as to the purpose of this function - it was only for the 'mini' displaysAdditionally, once you try to tackle week/day with overlaps/idents/ etc, simple doesn't cut it. It's a complex problem and the code needs to handle it. The trick is to be clear and well documented. I tried very hard to add lots of comments and have rational variable names.
Unfortunately, because of the nature of overlap/indent/offsets in the day/view - I have to go with an absolute layout. That necessitates the need for fixed heights.
In particular, the general approach that calendar was taking (theme-as-you-go) is not the correct approach. Data should be completely collected, then rendered. This patch refactors the calendar to use that approach. Additionally, with this patch, there are now more theming templates - giving more granular control over customization of the output.
So I'd rather characterize this patch not as a "hack" but a "refactor"
One thing I'd like to point out - this patch preserves the old layouts. So it can be applied and for those that want to still use the old layout can do so. Unfortunately, because of the required changes, the DOM structure is changed. Folks with custom templating and css will have to rework it. But I believe the benefits this patch brings outweighs the cost of redoing any tweaking.
Conclusion
I think for the calendar module to be a legitimate alternative to google/fullcalendar, we need to provide more sophisticated functionality. I believe litecal fills a niche - it's simple, and for a relatively small dataset, renders nicely. But it doesn't have the "meat" to build a more google like calendar. For that, we need to build off the calendar module.
Given the size of the patch, we might be better served to conduct a code-review of the resulting code rather than inspecting the patch. I'd be happy to try to organize something.
BTW, Karen - thank you so much for building the calendar module - it is crucial. I hope this patch actually helps progress the module.
Comment #34
developer-x CreditAttribution: developer-x commentedTim,
I'm interested in where you end up with this. But I've had trouble getting litecal to work correctly. To see what I'm talking about, take a look at these two links:
http://www.okeel.com/litecal
http://www.okeel.com/demo/calendar
Take a look at 11/1 on the litecal output - it's missing "Pondelni florbal". Instead, it's displaying it on Tuesday. This is just one error - if you look closely, there a lot of errors. It strikes me that litecal's layout algorithms break down as the data gets complex. Seems like litecal is still in a pretty dev state.
I don't have any particular feeling one way or another - I admired litecal's simplicity. But it just doesn't seem up to the task of handling big datasets. My two cents....
Comment #35
tim.plunkettPondelni florbal is on 11/2 (and every Tuesday). Perhaps a timezone issue? Or maybe it is mishandling repeating events? Or both? Also, a side note about litecal. You need to turn off field-specific links within each event. It wraps events with a link, and while Firefox is okay with that, Webkit browsers choke on nested links.
After further work with your patch, litecal, and now fullcalendar, I'm not sure which to focus on. None of them do everything.
Lastly, if it seems that I am criticizing design decisions made either in the writing of this patch, or in development of the calendar module itself, please don't take it negatively! If I am making a critique, it is not to disparage but to improve.
Comment #36
developer-x CreditAttribution: developer-x commentedThis patch addresses undefined variable warnings. This patch supersedes previous patches.
Point of clarification : this patch does stretch events vertically according to duration. To see this, check out the following links:
http://www.okeel.com/demo/calendar/2010-W42
http://www.okeel.com/demo/calendar/2010-10-20
If you apply this and have trouble getting the overlapping views of the week and days, you will need go into the views, and modify the style options. See screen shots in comment #29.
Comment #37
DaPooch CreditAttribution: DaPooch commentedThis is a straight up bitchin patch... really needs to get into the dev stream as an essential new feature. Now if only this were combined with AJAX updateability and a little more flexibility on the default and block page styling (I don't use the views page since I need it to conform to node heirarchy so I embed a default view.) If it were navigable via ajax it would be sheer perfection.
Thanks so much for your contribution.
Comment #38
developer-x CreditAttribution: developer-x commentedGlad you like it! Regarding ajax capability - no promises - but stay tuned.....
Comment #39
Shadlington CreditAttribution: Shadlington commentedWow. This is awesome.
+1
Comment #40
albert855 CreditAttribution: albert855 commentedHi developer-x,
I have applied your patch in comment #36 and everything works just fine. However on the day view, events that are supposed to appear in the "All Day" row are appearing on the "Before 01:00" row. It works fine on the week and month view though. Here are the links:
Day:
http://demo.bypenguins.com/agape/calendar/2010-11-26
Week:
http://demo.bypenguins.com/agape/calendar/2010-W48
Month:
http://demo.bypenguins.com/agape/calendar/2010-11
I have also zipped and attached my calendar module for your reference. Your help is much appreciated!
Comment #41
developer-x CreditAttribution: developer-x commentedHi,
Did you try going into your views and re-saving the week and day view? Reference #29 for an example. If you haven't, try it and see if that fixes the problem.
-x
Comment #42
albert855 CreditAttribution: albert855 commentedHi! That was quick.. I have already tried re-saving the week and day view as per comment #29, however the issue still persists. I have noticed this problem in your demo too?
When I created an all day meeting event, and I did not check the "All Day" checkbox, the event will not display under the "All Day" row (despite the to and from hours being 00:00 for both fields), much like the problem I am having now.
Is the "All Day" check box in your demo a custom field? The eventsbooking and booking API don't seem to provide such an option, though eventsbooking does but only under the configuration pages rather than on the "create node" page.
:)
Comment #43
developer-x CreditAttribution: developer-x commentedHi! Thanks for pointing this out. I'll provide another patch with this fix soon (I have some other changes which aren't ready). In the meantime, if you goto calendar.inc and on line 591, replace:
with
That will fix the problem. I've added and verified this fix on the demo site.
BTW, the all-day checkbox is include via this patch : http://drupal.org/node/370092#comment-2125366
Comment #44
albert855 CreditAttribution: albert855 commentedHi x! Thanks for your help and the excellent patch! Have a good day!
Comment #45
KarenS CreditAttribution: KarenS commentedI've tried and tried to find a way to apply this patch without errors and can't get it working. It definitely won't apply to the current dev code, and I've tried going back through a number of earlier versions to find some place where the patch will apply but can't find one.
Can someone who has this working please bring the patch up to date on the latest -dev version of Calendar so I can patch and test this?
Comment #46
KarenS CreditAttribution: KarenS commentedI finally figured out that the patch is against the last official release instead of the development snapshot, so I rolled back to that and applied the patch, and then updated to the latest code.
So I've gotten it working with the latest code. I like a lot of things in this patch, my biggest reservation is the theme changes that are probably going to be a problem on production sites that have adjusted to the previous theme.
I have to think about how to handle this -- suddenly making massive theme changes on production sites is not going to be acceptable, and this is in use on some very large production sites. This may have to go in as a new version unless there is some sort of backwards compatibility for the theme.
Comment #47
KarenS CreditAttribution: KarenS commentedI'm playing with something that looks like it may work -- moving all this new functionality into a separate module -- calendar_multiday -- such that the current code and themes all stay in place unless that module is enabled. I'm adding a number of if (module_exists()) tests to determine which theme files and css to load. I have to rename the core functions back to the original names and provide the multiday alternatives in the multiday module then add a switch to use the appropriate function based on whether multiday is enabled.
This is a little harder to get working, but provides the backward compatibility layer we need. I don't actually have it working yet, still trying this idea out.
Comment #48
KarenS CreditAttribution: KarenS commentedOK, I have this code pulled out into a separate module, calendar_multiday. If that module is disabled, things should work like they always have. If it is enabled, the regular calendar module lets it add its own theme and css. There are still some problems, but committing this much lets people work on this without breaking existing functionality for everyone else.
The new module has its own tpl, theme, and css files. Part of calendar.inc is the same for both displays and that code has been moved into the calendar.module. The part that is different goes into two different calendar.inc files and the right one is included depending on which display you want.
When you enable/disable the new module you get an error like this:
Fatal error: Cannot redeclare template_preprocess_calendar_main() (previously declared in .../calendar/theme/theme.inc:6) in .../calendar/calendar_multiday/theme/theme.inc on line 70
That's because we have a flash of time when both the original calendar and the new module are trying to handle the theme. The error will appear once and go away when you refresh the page. I need to try to come up with a workaround for that.
I got the old display looking the same and the new month display looks right, but something didn't quite make the transition in the day and week overlap view. I must have lost some code somewhere. Maybe someone can figure out a patch to get that working again.
Comment #49
KarenS CreditAttribution: KarenS commentedFound the problem with the day and week view and committed that. I think this is ready for review. Enable the calendar_multiday module and edit the view style settings for the day, month, and week view.
Comment #50
arlinsandbulte CreditAttribution: arlinsandbulte commentedHave not tested this, but I hope to.
YOU ROCK, KAREN!
Comment #51
developer-x CreditAttribution: developer-x commentedKaren,
Wow! That is amazing work - I've download the dev branch and will play with it. Thanks so much for taking in this patch - I think the add-on module approach provides a good approach to backward compatibility.
I do want to simplify the css the and add in more data attributes to the markup. Should I start submitting patches against the multi-day module?
Comment #52
developer-x CreditAttribution: developer-x commentedKaren,
I have it all working - thanks for making this happen!
Comment #53
KarenS CreditAttribution: KarenS commentedYes, additional functionality and cleanup can be submitted as patches. In additional to cleaning up the multiday code, we should see if there is more that can be made the same for both themes -- for instance, can we get the remaining code in calendar.inc to work the same in both themes so that the only difference is the theme and css files? There is probably more work that could be done to make the theme more easily pluggable -- set it up so you have a choice of the current theme, the multiday theme, and potentially some other theme that someone dreams up in the future. I don't have time to worry about that right now, but it would be a nice goal.
Comment #54
pfx CreditAttribution: pfx commentedthe calpopup is it supposed to work ? In my tests on my calpopup remains empty.
Comment #55
pfx CreditAttribution: pfx commentedIn the week view and day view, my events do not appear. An exploration with Firebug shows a still hidden DIV for these views:
<div id="single-day-container" style="visibility: hidden;">
By replacing hidden by visible from Firebug then my events appear correctly.
What should I change in my setup.
Comment #56
KarenS CreditAttribution: KarenS commentedThere is nothing about cal popup in this patch. Please follow the instructions:
1) Enable the calendar_multiday module
2) Edit your calendar view. Select each of the following displays and edit and save the style for each: month, week, day.
3) Save the view.
4) Clear your caches and make sure the view is not still using a cached version (go to the Views 'Tools' tab and be sure the views cache is emptied or not being used).
Comment #57
pfx CreditAttribution: pfx commentedThank you, I redid the procedure and emptying the cache view has solved my problem # 55 but the problem #54 persist. It must come from my configuration.
Thank you very much.
Comment #58
bwynants CreditAttribution: bwynants commentedpopup does not work because the multiday view uses the id for the references to the nodes while the normal view the class uses
versus
so javascript parsing fails to obtain node id
Comment #59
bwynants CreditAttribution: bwynants commentedfix for popup's not working
Comment #60
pfx CreditAttribution: pfx commentedI just tried the patch and the popup works fine now. thank you very much.
Comment #61
bwynants CreditAttribution: bwynants commentedand a typo in the theme files
Comment #62
arlinsandbulte CreditAttribution: arlinsandbulte commentedNow that Karen added this to the calendar module, it is no longer a feature request.
Also, I added a MultiDay option to the issue component select list to make this easier to track.
I hope that is OK.
I am tempted to mark this issue as 'fixed' and let further multiday bugs be submitted by in separate issues, but I will let someone else make that call (perhaps after committing #59 & #61 above).
Comment #63
pfx CreditAttribution: pfx commentedtitles "All day" have not line wrapping.
Is this by design.
Comment #64
developer-x CreditAttribution: developer-x commentedYes the all day is not wrapping. This is by design. However, it is all defined in the css - so if you want something different, you can define your own styles.
Comment #65
DaPooch CreditAttribution: DaPooch commentedAwesome... once this can merge with the AJAXification going on here it would be sheer perfection.
http://drupal.org/node/339279
Comment #66
IsaacJT CreditAttribution: IsaacJT commentedTrying to use this with CiviEvents.
Got Start date & time and End date & time, but they are showing up as separate items (with identical details) on Calendar.
Is there something I'm missing?
Would be really awesome to get this working.
Comment #67
developer-x CreditAttribution: developer-x commentedI'm not entirely sure what the error is here - can you include a screenshot? Also, does it work correctly without the patch, then break when the patch is applied?
Comment #68
Shadlington CreditAttribution: Shadlington commentedHmmm... A little thing I just noticed when trying this out (the latest dev rather than the patch) was that the recent fix to only have day number link to the day view if there is actually an item for that day stops working when I enabled the multiday module.
Also, the 'Time' column that I see in week view is broken in day view - screenshot attached.
Other than that this is a great enhancement!
Comment #69
IsaacJT CreditAttribution: IsaacJT commentedThe theme change applies, but practically speaking there is no change in what's displayed beyond the graphical change when enabling or disabling the module.
It may be my misunderstanding/user error.
I've attached a png. In this example the entry on the 20th is the beginning date of something that lasts until the 29th, where you can see the second entry in calendar. Similarly for the entries on the 12th.
Probably I've got the data formatted wrong (not that I can change CiviCRM's output) or am handling it wrong in Calendar.
All I have from CiviCRM is two dates - a start time and an end time. I use both fields in the default settings for the view, but the two separate dates generate separate entries, rather than connected entries. How do I tell Calendar they are the start & end times for the same event?
Comment #70
izmeez CreditAttribution: izmeez commentedsubscribing
Comment #71
IsaacJT CreditAttribution: IsaacJT commentedAttachment appears to have failed - retrying. (see above message)
Comment #72
IsaacJT CreditAttribution: IsaacJT commentedComment #73
IsaacJT CreditAttribution: IsaacJT commentedComment #74
IsaacJT CreditAttribution: IsaacJT commentedHaving trouble attaching.
EDIT: Sorry for multiple posts, my bad. (I think Drupal was undergoing maintenance, but really, I should have just waited) - I don't seem to be able to delete them.
Comment #75
IsaacJT CreditAttribution: IsaacJT commentedComment #76
developer-x CreditAttribution: developer-x commentedHuh - I'm perplexed. If you have an event with a start and end date that span more than one date - it will generate a stripe across those dates. From what I see, it seems that the end date is not being recorded. Can you include a screenshot of your event edit screen? I don't know anything about CiviCRM - but I assume they are using nodes with the date api CCK field? BTW, what is the date type (date, datetime, datestamp) and widget type for your event field?
Comment #77
IsaacJT CreditAttribution: IsaacJT commentedSorry, you'll need to tell me how to find out the date type/widget type for my event field.
I've included a screenshot of my event edit screen. If I separate out the arguments into separate entries, I end up with just the start date showing on the calendar.
I'm having trouble finding out about CCK. There appears to be work from both the drupal side and from the CiviCRM side to get this to work. But it is unclear whether they have done so for CiviEvents yet or not.
http://drupal.org/node/194628, implies that in 2007 the drupal end had done most things, but not CiviEvents. There are a couple of things attached as offerings of solutions. But nobody seems to have replied recently to that topic however, even though a number of organisations offered small amounts of money.
From the CiviCRM side, the most recent references in the drupal section of their site to cck are dated early 2010 - if those references aren't out of date (they reference .txt files included in the distribution that are their initial attempts), then I'm guessing the answer is no for their end of things.
It's difficult for me to tell though - the fact that lots of people where interested enough in this 2007-2009 to offer money, but nobodies posting more recently suggests that it may have become a non-issue.
Comment #78
IsaacJT CreditAttribution: IsaacJT commentedReattached screenshot.
Comment #79
developer-x CreditAttribution: developer-x commentedI think I see the problem. Instead of having a separate "from" and "to" field in your view - you need to have a single "from" date and the format of the output needs to be set to : "Display from and to dates". Also, make sure your date argument matches. Notice in my two screen shots how I have the argument and the "from" field set. Try this and see if it works.
Also, I think we need to close this issue. The patch is now in the dev branch of calendar and issues found in that branch should be a new and separate item. This issue should be for historical purposes at this point. Karen is that correct?
Comment #80
arlinsandbulte CreditAttribution: arlinsandbulte commentedI agree with #79. The initial 'issue' is now in -dev, so this should be fixed.
The main problem IsaacJT is running into is the way Civicrm handles dates and date creations.
I have no experience with Civicrm, so I can't be of much help.
In any case, IsaacJT's issue needs to be either as separate date issue (as per #79) or maybe even an issue for Civicrm.
Comment #81
IsaacJT CreditAttribution: IsaacJT commentedThankyou for your help. I will open a separate issue as suggested - though Arlinsandbulte may be right that it could be a CiviCRM issue.
Comment #82
Shadlington CreditAttribution: Shadlington commentedI brought up my two issues separately:
#998824: Multiday - Day view 'Time' column is broken in chrome
#998826: Multiday - Only link to days that have events on month/year views
Comment #84
DaPooch CreditAttribution: DaPooch commentedGetting the multiday to work is a bit perplexing. I can get it to work on the default display as long as I don't attach one of the month, week, day or year displays to it. On the "Calendar page" display though I can't get it to show up right. I attach a the "month view" display to it so I can get something to show up and when I do that my multiday event shows up as individual boxes on each day instead of a span across all the days. In just previewing the "month view" I get the same result, individual boxes. Am I missing the method for applying the multi-day style to individual attachment views? I'm using the latest dev version of calendar with the separate calendar_multiday module enabled.
EDIT: Nevermind, I missed the correct styling options on the "Month View" display. Changed my calendar style settings multi-day style and it works like a charm now.
Comment #85
DaPooch CreditAttribution: DaPooch commentedComment #86
arlinsandbulte CreditAttribution: arlinsandbulte commentedThis issue as all about getting the first workings of multiday into calendar, which is now complete.
If you are having issues with multiday, do not re-open this issue.
Rather, start a new issue where your problem can be better focused on.
Comment #87
developer-x CreditAttribution: developer-x commentedPlease refer to #29 - make sure the style settings are set correctly. If you are still having problems, as mentioned in #86, please open a new issue and assign to the MultiDay component.
Comment #88
corvela CreditAttribution: corvela commentedHi, any chance of providing me with a fully patched module?
Comment #89
arlinsandbulte CreditAttribution: arlinsandbulte commentedcorvela:
Please file a new issue and explain what problems you are having there.
Comment #90
corvela CreditAttribution: corvela commentedSorry, new to this. How do I file an issue?
Comment #91
developer-x CreditAttribution: developer-x commentedNo worries - we were all new at some point. If you just want to use the multiday functionality and you aren't having a problem - don't create an issue, just download the latest version of the calendar module - it's now a submodule.
Comment #92
arlinsandbulte CreditAttribution: arlinsandbulte commentedcorvela:
No problem. Like dev-x said, just use the latest version of calendar module and enable the multiday submodule.
If you have problems, first do a search in the issue queue to see if your problem has already been reported or fixed.
If you can't find a duplicate or a solution, go ahead and create a new issue by clicking "Create a new issue" (or you can go here: http://drupal.org/node/add/project-issue/calendar)
Comment #93
developer-x CreditAttribution: developer-x commentedComment #94
flock CreditAttribution: flock commentedHi, great calendar patch!
Is there any way you can direct me to a step-by-step application of this?, I am new and although this seems very exciting I got lost in the actual steps to take.
Thank you.
Comment #95
developer-x CreditAttribution: developer-x commentedThis patch is now a sub-module of the calendar module. Simply download the latest calendar or do it from cvs so that you have all the latest changes:
Then enable the multiday submodule. That's it.
Comment #96
binaryflo CreditAttribution: binaryflo commentedI'll be implementing this in the next couple of days. Thank you for your hard work.
Comment #97
Steel Rat CreditAttribution: Steel Rat commentedDeveloper-X,
The work you've done on your demo calendar is fantastic!
However, I'm not sure how to get there with what I have. I'm using the latest as of right now release version of Calendar, and enabled the Multiday option. But I don't get the spanned events based on the to and from times. I did copy the tpl files to my theme (Acquia Prosper), even though there were no instructions to do so, but I still don't see the overlapping time spans in the calendar as shown in your demo. It looks pretty much like the vanilla calendar.
I did flush the theme registry after copying the tpl files. Is there someting else I need to do? There were no instructions in the module...
Thanks!