Closed (outdated)
Project:
Event
Version:
5.x-2.x-dev
Component:
Event All Day
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 May 2007 at 17:54 UTC
Updated:
13 Apr 2018 at 20:57 UTC
Jump to comment: Most recent
Comments
Comment #1
HorsePunchKid commentedThis is actually pretty easy to theme by overriding
theme_event_nodeapiin your theme'stemplate.php. That said, I agree that the default behavior should probably be more natural. I will probably theme my install to produce something like this, modulo the date/time locale settings:If this would be something others would use, perhaps it would be a valuable feature, and I'd gladly roll a patch.
Comment #2
HorsePunchKid commentedComment #3
HorsePunchKid commentedThis is what I've come up with, which is working well, except that there's no good way to get just the date in the user-specified format, and that there seem to be some problems in event-5.x-2.x-dev that probably aren't in 5.x-1.x.
Any thoughts?
(*sigh* It's so ugly using PHP to generate HTML, ironically.)
Comment #4
HorsePunchKid commentedDig out the dynamite, because those dates need to be exploded! Try this instead:
Comment #5
spazfoxThanks for all your work on this, HorsePunchKid! I figured there was a pretty straightforward theming fix, but I'm such a noob I had no idea how to begin.
When I add your theming function to my template.php file, I get a "Call to undefined function: event_format_date()" error. Any ideas?
Comment #6
HorsePunchKid commentedI'm sorry, but it looks like
event_format_date()only came about in the latest development version of the module, 5.x-2.x-dev. This won't be perfect by a long shot, but you can try replacing those calls to that function with$node->start_formator$node->end_format. So for example:event_format_date($node->event['start_exploded'], 'custom', "Y-m-d")...would become simply:
$node->start_formatHope that helps!
Comment #7
georgelitos commentedquick fix for events that have no time, so it doesnt display in node view
remember to uncheck the box [Event has time] for this fix:
edit event.module around line:2154
version 5.x-2.x-dev
Comment #8
HorsePunchKid commentedI can't see how this got set back to bug/minor, but however it happened, I think it was unintentional. Still a feature request, since I think it would be much easier to theme these things if the markup were improved. I'm not sure this still applies to the current dev version.
Comment #9
idsky commentedWhat is a reliable way to check for all-day in an event? I didn't see it in the $node object (passed to event_nodeapi). Checking for midnight isn't good practise and the system puts in the current hour by default (spazfox's original complaint was that is was showing as 11am for an all-day - we haven't fixed that yet).
I dislike the formatting options - there is no time format option, and drupals date formats sadly give limited choice, so I hardcoded my own. Here's how I format my event dates...
Start: Wed, 20 Feb 2008 at 10am End: 4:30pm
I put both start and end divs into one event-nodeapi div and make them inline in style.css:
And in template.php:
Comment #10
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.