Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Thanks for this neat module!
I just wish I could decide for myself which fields should be included in the output, instead of having a default node display.
Is including fields support on the road map?
Comment | File | Size | Author |
---|---|---|---|
#17 | fullcalendar.png | 60.65 KB | geerlingguy |
#16 | fullcalendar-926344-16.patch | 10.87 KB | tim.plunkett |
#14 | fullcalendar-926344-14.patch | 12.59 KB | tim.plunkett |
#13 | fullcalendar-926344-13.patch | 12.8 KB | tim.plunkett |
#10 | fullcalendar-926344-10.patch | 3.8 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettAnother reason for this would be the ability to use semanticviews's row style.
Comment #2
tim.plunkettComment #3
tim.plunkettThis is definitely going to come after #992812: Date field discovery code fails on edge cases, but then it is the top priority.
Discussion:
Should there be a 6.x-1.0 release before this gets resolved?
On one hand, a stable release might attract more attention to the issue queue.
On the other, the module might get written off for not supporting fields as a row style.
Comment #4
Itangalo CreditAttribution: Itangalo commentedMy vote goes for adding the functionality rather than making a 1.0 release – support for row style would make me use this module (while a 1.0 or a dev doesn't matter much right now).
But then I'm not the one doing the coding – which makes my vote pretty weak.
Regardless – thanks for your efforts!
Comment #5
tim.plunkettSo, how would this work exactly? I have the code "working", but I really don't know how this would function.
For one, it would require a direct hack against the fullcalendar.js, which goes against the intent of #980886: Require Libraries API.
And even when you add extra fields, the visible part of an event is dictated by its length. In calendar.module, events stretch vertically to fit their contents, but that would defeat the purpose of fullcalendar.
If anyone has ideas or mockups or anything, I'd appreciate it.
Comment #6
geerlingguy CreditAttribution: geerlingguy commentedI'm not sure if I would want to allow row styles yet—I think getting out a 1.0 release should be a higher priority for now. Rows are a hairy beast, and might end up holding back a release for some time.
I haven't needed this feature yet... and I haven't needed it on any of my sites where I use calendar.module (yet) either. It would be an amazing feature to have, to be sure, but I don't think it's essential. Not many online calendaring solutions support more than a title field in the graphical calendar listing, anyways.
Comment #7
tim.plunkettAfter playing with this more and more, I just don't see this happening before a 1.0 release, especially because it would require changes to fullcalendar.js.
I would still appreciate descriptions of use cases though, that would help me code it.
Comment #8
tim.plunkettIn the short term, geerlingguy suggested mimicking the auto-discovery of the date field, by allowing a specific field to be used in place of the title. I really dislike the UX of this, because it really is awkward to use the machine name, but I think its a good temporary solution.
In the long run, I envision the fields row setting to allow one field to be marked Title, one to be marked Date, and have the rest only show up on the fallback display. The limitations of the jQuery prevent any other fields from being added. However, this would allow use of either views_customfield or computed_field, which at leasts provides the possibility of adding your own info.
Comment #9
geerlingguy CreditAttribution: geerlingguy commentedI like your long-run plan - being able to use a simple field as the Title would be enough to satisfy pretty much any case, because the user could then put whatever data he wants into the computed or custom field... of course, if you have more than 5-10 words in an event title, you're going to need a huge display to prevent a really tall calendar!
Comment #10
tim.plunkettSomething like this?
If a the chosen field is empty on a particular node, the title is used instead.
Comment #11
geerlingguy CreditAttribution: geerlingguy commentedExactly. Don't have time to test right now, but it looks like that should be adequate for almost any use case. UI could be more intelligent - would be nice if you could simply have a popup selection field with all fields listed, and the user could choose one. (Same could be said for the URL field).
Comment #12
tim.plunkettIf this was going to be a longer-term solution I would do a select list. But I think it'd be better to just get this in and then focus on the fields row style.
If you could give this a quick run through and an RTBC, that'd be awesome.
Comment #13
tim.plunkettI started to work on #910470: Empty text, but it was conflicting with #999158: Improve fallback display, which also conflicted with this.
Sooooo, here's all three at once. They are very tightly intertwined, I really couldn't break it up more. Sorry!
I'll post a step-by-step account of what went on later.
Comment #14
tim.plunkettHm, there was some cruft in that last patch. Try this one!
Comment #15
tim.plunkettThese should probably be comments in the code. Here they are now as an explanation.
Register the new theme function.
Set the empty text if the display says there are no events.
Adding these to $node instead of $vars means they can be easily accessed later in the code.
No longer needed, see below.
No longer call url() right away, so it can be passed through l().
If a valid field has been selected, replace the node title with its value.
Calling return now is unnecessary special-casing. Emptying $display_field allows it to skip the later foreach().
No need to return, break is fine. In case other code needs to be added to the end of the function.
Use this function to only set up the values needed by fullcalendar.js, the date values can be computed later.
Moving this into a theme function allows overriding of the fallback display, or last minute hacks into the attribute of an event.
Our new display plugin inherits from the generic page display.
This is a default view, which shows that you should use the display, style, and row plugins, as well as setting the empty text.
Don't print empty divs (nodes that meet the views filters but don't have date fields).
Move the .fullcalendar_event div here to wrap around repeating events
If there are no events, say so.
For each event, display the title, which may have been overridden.
Print each repeating date wrapped in a div.
If the view has no result, create a dummy node to force the calendar to display anyway.
Powered by Dreditor.
Comment #16
tim.plunkettRerolled after #1001688: Move jQuery out of template file.
I removed the default view. It can come later.
Also, I named the new plugin according to the proper convention (fullcalendar_plugin_display_page.inc instead of views_plugin_display_fullcalendar.inc). See #1003602: Rename views plugins and reorganize files for renaming the existing files.
This is the last real issue before a release, please review!
Comment #17
geerlingguy CreditAttribution: geerlingguy commentedPatch applied correctly, field setting works correctly. No problems whatsoever.
Only a minor suggestion: in the row style settings, add an example to the title field, just like you have for the URL Field:
For example "field_event_title"
Setting to needs work, but in reality, it's RTBC once you make that UX change.See attached for visual example.
Comment #18
tim.plunketthttp://drupal.org/cvs?commit=467390
Setting back to active for future possible field row style implementation.
Comment #19
tim.plunkettActually I'm marking this fixed. If someone has some ideas and mockups of how a fields row style would work, please open another issue.
Comment #21
dafederI think this should be marked as won't fix for now, as current status gives the impression that field row style is supported.
For me the problem is that you can't tweak the title like you could with a field style. I'd like to be able to rewrite the title to add tokens or something, or add a taxonomy term to the calendar item somehow. I guess I'll look into overriding the title in the theme layer or with nodeapi.
Comment #22
tim.plunkettPlease don't adjust issue statuses after closed (fixed).
Also, in the 7.x-2.x branch, we've fully switched to field styles.
Comment #23
dafederApologies - since it was set automatically, I thought I was correcting an oversight.
Thank you for your hard work.