Hi there!

I need to create cinema shedule, where you're choosing cinema, then movie, then date of show and then time of show, ever day can have several times of show. So here is the big question, how it can be achieved? How do I add linked fields, for example, I choose date (10/07/2008) and then choose time of the show (15.20, 17.10 and 18.30)... the I choose another date and again...how do I do this in Drupal? Any hints...please.

Comments

zilla’s picture

in order to provide these filters, you can either use the event module which generates all sorts of stuff for you (in which case cinemas and stuff like that are from a defined vocabulary) OR you may wish to explore and read up on using date cck with cck (core cck module) along with views, calendars (for views) and assorted queries to display all of this information...

but are you talking about all of the movies out there? like a fandango scale thing? or are you talking about a small set of regional/local places with an easily managed list of movies (current,upcoming etc)? that would help offer a better or revised answer...

for example, there is another whole approach using faceted search module that could query by any variable including time ranges in cck date fields without even conjuring up a calendar at all - and it may be more intuitive for your users...

........................................................................
i love to waste time: http://twitter.com/passingnotes

timonweb’s picture

Hello Zilla!

Thanks for quick answer. I'm talking about local cinema shedule. We have three cinema theatres in our city, so I'd like to make a web shedule for them. I looked through event module, it can be expanded by date module, which is ok, but as I understood, only dates can be picked there, but what about show time? How to specify several show times within one day? Just can't get the idea.

zilla’s picture

with views, cck and so on...

(if that makes sense - if not, let me know)

did something similar with events on my own site - so imagine a new content type called "movies" or actually, let me back up since i'm feeling long-winded ;)

you have 3 theaters, so create a new taxonomy called theatres and add the three as 'terms'
create a content type called 'movies' and use cck date to add date fields and make them 'unlimited' (and configure accordingly, eg show minutes or get granular with seconds and so on)
when editing content type be sure to group and handle the display of fields as desired (eg. create a group for showtimes to call up in separate area/tab if desired)
create additional cck fields as desired (eg. you'll probably want a stand out field for sorting like 'Rating: R/PG/NC-17 etc)
use gimmicks like fivestar and comments on the nodes to let people rate the movies or write comments on them if desired (or not, that's your choice", or fieldgroup tabs to make nifty tabs that people click between (including 'showtimes')
add a cck select field that requires selection from the taxonomy 'theaters' and forces submission to assign movie to one (or more than one) theater
perhaps require rating as well and force from a similar drop down in a new taxonomy called ratings (and associate with movies for dynamic relationships exploration, but that's for another day...)

now create a content type movie - perhaps embed a trailer from youtube (be sure to allow img tag in input filters for this, or allow admin creating this listing to input anything desired, the default if php input filter module in core is enabled)

pick the rating
pick the theater
describe the movie (etc)

now in 'showtimes' (name of the group in content type in which dates field unlimited appears) add the first show time
*does it repeat? if so, fill out repeat variables (e.g. every monday from 5 to 7 for the next 6 weeks)
add second showtime by clicking to 'add another item'
repeat first step but with second showtime (.eg every monday from 9 to 11 for next 5 weeks)
repeat for all variations on showtimes (days of weeks, times, repeating elements included)

keep on clicking unlimited to add new times and so on

using 'calendar' for views you could create a nifty calendar page that shows all of this (you'll need to modify default date:date filter as it will show date that you created the listing by default, not the actual dates of the movies!!)

using a module like simple views you could now create a view for each theater's movies and all sorts of other stuff (like custom blocks that list movies by ratings and so on...views is very powerful stuff)

hopefully this will get you started in the right direction...but again, here are the main steps/things:

d6 (no reason you can't do this with d6, absolutely no reason ;)

contrib modules needed for this:
cck (to add fields to the content type movies)
cck date (for date fields via cck - and when adding this field to content type 'movies' be sure to pick 'unlimited' to add multiple showtimes for same flick!! this is critical for what you're trying to do)
views (if you want these calendars i describe above, or simple blocks, or simple 'newest movies' pages and so on etc)
calendar for views (if using views and you want a calendar including a calendar block)
fieldgroup tabs (if you want to do something nifty like show a page where there's a tab for stuff like 'reviews' and 'showtimes' - but in order to do this, don't forget to create a 'group' in the 'manage fields' section of the content type 'movies' into which things like showtimes fall)
imagefield cck (if you want to attach pictures, or use "image module," either will suffice)
fivestar and related api (both on project page) - if you want user ratings of movies

core modules/things:
taxonomy (create one for theatres, another for rating, perhaps another for genre and so on, you get the drift)
custom content type (just add a new one to the core, or modify a core one like story and add the new fields for date and so on)
*set workflow for this content type: eg does it go to home page? can users comment? who can create such a listing/node?

there's quite a bit more, but this should hopefully get you going - let me know which parts of it don't make sense because i'm definitely rambling!

btw, a nice side effect: using views with calendar views (instead of the simple event module) you can create a super cool calendar page where a user sees 'titles of movies' all over a calendar by week/month color coded by theater and when he/she clicks on the title, instead of loading a new page immediately you can have it also pop up a cool lightbox style box with critical data (e.g shows rating and showtimes with link to node for full movie description, ratings, reviews, etc) - that's why i suggest the views approach to doing a calendar and handling times/dates cck input - event module just is not this flexible...

btw, just came back to edit: odds are you're going to be sitting down on 'some regular schedule' to do all of this data entry for upcoming movies - but you will NOT want them to publish immediately in all cases (e.g. some may not be in theaters for two months or whatever), in which case you should use this module which replicates a popular wordpress blogging feature: http://drupal.org/project/scheduler

........................................................................
i love to waste time: http://twitter.com/passingnotes

timonweb’s picture

wow, zilla! Thanks for such a full guide! I'll sit tomorrow and will try to make everything as you described. Thank you very much for these tips!

p.s. added you to my twitter ;-)

zilla’s picture

let me know if it doesn't make sense - this just came up in another thread and i pointed the guy here, but i think this would be more well served to a cookbook entry for the drupal documentation...

........................................................................
i love to waste time: http://twitter.com/passingnotes

farsout68’s picture

Thanks very much for the detailed information! I think I'm in the right direction, but I have a few questions for you.

Before I ask the questions I want to give you and understanding of what I'm trying to accomplish as this may help you understand where I'm coming from.

I'm building a site for a public access T.V. station. I've tried using the PEG module, but it's a bit too complicated for me and doesn't do exactly what I want. I've created a "Show" content type that includes a taxonomy group (type of programming... government, public, etc.), video clip, and the show time.

I'm a bit confused on the date/time thing.

You mentioned two content types. One is "movie" the other is "movies" is this correct or were they both supposed to be "movie". I'm unsure on how to set up the show times. I've set it up using "unlimited" but only see 4 places to add show times. If I choose "unlimited" I don't see the "repeat" options anywhere.

I'm thinking that I would like to have all of the variables (type of programming, video clip, show times, etc.) contained within one content type. Is that what you are doing?

If possible could you detail the show times portion of your set up a bit more?

Any help is greatly appreciated!!!

Thank you in advance.

Terry

zilla’s picture

are you not seeing this link?

i've done what i describe above, but when i set the cck field for date to unlimited, what i see is a little box thing to put a start and end date/time and then below that, a button to 'add another item' which pulls up another two fieldsets for start/end and so on...i've made the 'start date' required (don't want an accidental empty entry!)

as for the content type, the movies and movie are unique - what i mean is 'movies' is the content type that holds the description of the 'movie' itself (as in, the title of the movie is the title of the node, like content type > movie > title: star wars)

........................................................................
i love to waste time: http://twitter.com/passingnotes

farsout68’s picture

I don't know if this matters, but I'm running version 5.xx of Drupal.

I don't see the "add another item" option when setting up the date field for my content type. I do have the following option(s):

required - which is selected
multiple - I have "unlimited" selected
To date - I have "optional" selected

When creating new content for this content type I see 4 sections to add the start and end times and that's all.

Okay, for the content type you are pulling the information from the "movie" content type into the "movies" content type?

zilla’s picture

can't help you with that button issue because i'm on d6 - no idea what it looks like in d5, but i thought that unlimited presented an 'add another item' button by default

you may want to quickly test this by making some other field unlimited and see if you see the button

as for movies into movies, no,let me clarify - there is only one content type - 'movies' and when you write about a 'movie' you are just creating a node of content type 'movies'

i think it's confusing because you're using the same word (i did) in the example - so instead imagine a content type called "movie review" ( a node with subject, body, some cck fields maybe) and a user creates a new "movie review" and writes about a movie, that's what i meant!
........................................................................
i love to waste time: http://twitter.com/passingnotes

farsout68’s picture

I see the button (yeah), but I have another issue. I am able to create "unlimited" showtimes and I do have the "repeating" options below, but I can't seem to get it so that I set up the repeating criteria for each show. It appears as though i can only repeat one showtime and not multiple showtimes.

any ideas?

zilla’s picture

i've disabled that whole thing because i'm letting users create content with dates (events) - and if they have, for example, a local program in which everything is identical except it runs on different dates, the cck unlimited handles this - but "also presenting options to have the event " is just way too confusing!

in your case, if you are the only person creating the nodes, then you could possibly do this BUT it's a feature request or support request for the date module folks - i'm not sure that unlimited date field will continue to present repeat options for each new date set (it should, just not sure if it does)
........................................................................
i love to waste time: http://twitter.com/passingnotes