-
Yet another calendar plugin
Hi
I'm currently developing a weekly, horizontal events calendar. It's made specifically for a WP-theme for a film festival I've been working for for the past two years (not as a developer, though I'm making a new site since I refuse to work with the current obsolete system).
It's based on a graphic schedule we've had included in our festival catalogue (printed), so the format is quite "un-web", hence the horizontal design.
You can see an early draft of the web-version here:
http://flagget.no/animationfestival/en/timeplan
I've added events as a custom post type, where the date and time is stored in a custom meta field as a unix timestamp, and the calendar function uses get_posts() to fetch events within the specified time interval. Currently the main function accepts week number, year, hour range, and day range (if you want to exclude specific days of a week as I've done in the example). A number of other meta fields are used for info such as venue, duration, age limit, short description and a few others.
One of my biggest hurdles so far is the html/css bit of it. Currently each hour is a div with nested divs for each event and a right margin for offsets when an event doesn't start on the hour. This way, if two events occur within the same hour the first will push the next down one spot. But longer events will overlap other events when they don't start on the same hour. I was hoping I'd find a html/css solution to this so I'd avoid calculating collisions in php, but alas I'm beginning to think that is unavoidable.
I'd like any feedback i can get. Positive as negative. If it's been done before, I'd be happy to hear that, but I haven't been able to find anything just like what I wanted, and I will continue making it for this particular site.
Currently it's only included in the core theme files, but I might make it into a plugin if I'm satisfied with it, and if there is some interest in it.
If i port it to a plugin I'll probably add controls to navigate weeks and days, custom options ofc., custom styling, widget support and shortcodes for displaying it, iCalendar, feed etc.
PS. I'm holding back publishing any code for now since it's still horribly messy, ungracefully entangled with other funtions in my funtions.php file, and probably only readable by me at the point.
-
For a current client site I've been building out events using custom post types as well. I went through a lot of the existing plugins, many don't use custom post types or a lacking in basic features. Haven't tested any of the paid ones though, would love to hear if there are any good ones. But needless to say, getting the calendars/events right is quite a pain. I really love the look of your calendar, if you make it into a plugin I'd definitely use it.
Two things I needed/wanted for the client site that you might want to consider:
- adopting the hcalendar microformat
- basic google maps integration (being able to select a location with the maps api & optionally displaying a map either via a link or embed)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules