Good moorning, i´m newbie developing on drupal, so please beard with me. I need to know if this is possible to do and where should i read more documentation... the question is that i need to associate different dates to each node created. The working should be similar to a reservation system in a hotel. The administrator must be able to insert new houses or bedrooms and the annonymous users must be able to associate dates in nodes, having in mind that the same node cannot have the same date associated... Do i need to develop a module or is it possible to make it easier in any other way? Thanks in advance for your suggestions, best regards.
The short answer is that you want to create special content types (reservation), and then, using the content construction kit module (cck: http://drupal.org/project/cck) add the appropriate fields, including the date field, supported by the date field module ( http://drupal.org/project/date). Read as much of the documentation as you can to get started, this opens up a whole new world, and is what sets drupal apart as a CMS. It's a jungle out there. saludos, Victor Kane http://awebfactory.com.ar On 7/9/07, Alex Moreno <al3xmor3no@gmail.com> wrote:
Good moorning,
i´m newbie developing on drupal, so please beard with me.
I need to know if this is possible to do and where should i read more documentation... the question is that i need to associate different dates to each node created. The working should be similar to a reservation system in a hotel. The administrator must be able to insert new houses or bedrooms and the annonymous users must be able to associate dates in nodes, having in mind that the same node cannot have the same date associated... Do i need to develop a module or is it possible to make it easier in any other way?
Thanks in advance for your suggestions, best regards.
even after you create your 'rooms' content type and 'reservation' content type you will need custom code to validate that no reservations conflict and probably some custom Views for displaying listings of available rooms, today's reservations, and so on. Victor Kane wrote:
The short answer is that you want to create special content types (reservation), and then, using the content construction kit module (cck: http://drupal.org/project/cck) add the appropriate fields, including the date field, supported by the date field module ( http://drupal.org/project/date).
Read as much of the documentation as you can to get started, this opens up a whole new world, and is what sets drupal apart as a CMS.
Op maandag 09 juli 2007, schreef Victor Kane:
The short answer is that you want to create special content types (reservation), and then, using the content construction kit module (cck: http://drupal.org/project/cck) add the appropriate fields, including the date field, supported by the date field module ( http://drupal.org/project/date).
This won't work. A "room" will need an arbitrary amount of dates. So you will need either nodereference, wich won't scale, or some other relational module (wich won't scale either). I'd suggest a custom module that stores its own metadata in its own database tables. You'll need to know your DBA and PHP though. But if you do so, this is by far the quickest route to take. CCK can do some referential stuff, but its interface and its architecture don't allow large amount of references. If all you need is two, three dates attached to a 'room' then CCK will do. If you need complex amounts and scheduling it won't. Bèr -- Drupal, Ruby on Rails and Joomla! development: webschuur.com | Drupal hosting: www.sympal.nl
On 7/9/07, Bèr Kessels <ber@webschuur.com> wrote:
Op maandag 09 juli 2007, schreef Victor Kane:
The short answer is that you want to create special content types (reservation), and then, using the content construction kit module (cck: http://drupal.org/project/cck) add the appropriate fields, including the date field, supported by the date field module ( http://drupal.org/project/date).
This won't work. A "room" will need an arbitrary amount of dates. So you will need either nodereference, wich won't scale, or some other relational module (wich won't scale either).
It will work. You can use the date field as a multiple field, which can certainly give an arbitrary number of dates, or any other fields necessary for reservations. To go to the trouble of a custom module seems really overkill. Of course, there is more than one way to do it.
Yes, but when you assign a date to the multiple date field, it should be validated to avoid the same room to be reserved twice. I suppose that this is too complex for the cck module. I´m wrong? This is why i was thinking in a custom module. On 7/9/07, Victor Kane <victorkane@gmail.com> wrote:
On 7/9/07, Bèr Kessels <ber@webschuur.com> wrote:
Op maandag 09 juli 2007, schreef Victor Kane:
The short answer is that you want to create special content types (reservation), and then, using the content construction kit module (cck: http://drupal.org/project/cck) add the appropriate fields, including the date field, supported by the date field module ( http://drupal.org/project/date).
This won't work. A "room" will need an arbitrary amount of dates. So you will need either nodereference, wich won't scale, or some other relational module (wich won't scale either).
It will work. You can use the date field as a multiple field, which can certainly give an arbitrary number of dates, or any other fields necessary for reservations. To go to the trouble of a custom module seems really overkill. Of course, there is more than one way to do it.
-- Alejandro Moreno <a href="http://www.tdo.es">Consultoría de Publicidad y Marketing Online</a>
Bèr Kessels wrote:
Op maandag 09 juli 2007, schreef Victor Kane:
The short answer is that you want to create special content types (reservation), and then, using the content construction kit module (cck: http://drupal.org/project/cck) add the appropriate fields, including the date field, supported by the date field module ( http://drupal.org/project/date).
This won't work. A "room" will need an arbitrary amount of dates. So you will need either nodereference, wich won't scale, or some other relational module (wich won't scale either).
Until you provide some evidence for these claims, they are pure FUD. A room can only be booked 365 times a year. Thats hardly a problem for the lifetime of a hotel (not to mention the lifetime of a web app).
Op maandag 09 juli 2007, schreef Moshe Weitzman:
A room can only be booked 365 times a year. Thats hardly a problem for the lifetime of a hotel (not to mention the lifetime of a web app).
Anyone who has tried to scale the noderef UI beyond merely 'clipping some test data together' will have seen that selectlists with 10.000+ nodes don't go well together. autofills hardly wotk for such models either, since they depend on unique titles. Indeed, if you think only one year ahead, that is what you will get: 365 reservations. That might scale, depending on the types of lists and so on. However, a conference room might be reservated several times a day, resulting in possibly 1.000+ dates. I don't know if noderef improved its #load mechanism, but last time I looked it would load all its data in (teaser) views et al. And loading 1000 nodes for each node-view, in RSS feeds (with 20 nodes), or teaser lists, will mean you do a 20*1000 = 20.000 node loads for a simple RSS feed! That is what I mean with not scaling. Disclaimer: I have recently thought out a date/event calender for films (which have a similar model of one film/with multiple playtimes). and I looked at the options with pure CCK fields. Its a few weeks ago; and I did not develop anything yet. However, we chose not to use CCK because of above scethces problems. Bèr -- Drupal, Ruby on Rails and Joomla! development: webschuur.com | Drupal hosting: www.sympal.nl
It sounds to me like most of what you want can be handled with CCK. However, your validation requirements are probably not going to be met out of the box by any existing module. I would suggest setting up two content types: 1. Room/House 2. Reservation Use CCK's node reference field to join reservations to rooms. Add a date field to your reservation type. In a custom module add a form validation function (read up on the Forms API and on hook_form_alter) that checks to make sure that a given date is not already taken for the target room node. The deep, dark secret of Drupal development these days is that most custom work can be accomplished with CCK, views, and a small custom module to implement hook_form_alter and few others. Good luck! -M On 7/9/07, Alex Moreno <al3xmor3no@gmail.com> wrote:
Good moorning,
i´m newbie developing on drupal, so please beard with me.
I need to know if this is possible to do and where should i read more documentation... the question is that i need to associate different dates to each node created. The working should be similar to a reservation system in a hotel. The administrator must be able to insert new houses or bedrooms and the annonymous users must be able to associate dates in nodes, having in mind that the same node cannot have the same date associated... Do i need to develop a module or is it possible to make it easier in any other way?
Thanks in advance for your suggestions, best regards.
That is how I would suggest approaching this problem as well. I did a non-Drupal reservation system not too long ago, and you should definitely treat a "reservation" as a separate entity that references the "room" being reserved. That will scale far better, as well as flow better logically. One caveat, though. "most custom work can be accomplished with CCK, views, and a small custom module to implement hook_form_alter and few others." That's true, but sometimes those form_alters get... messy. :-) (I just launched a beta for a site where I'm doing 90% of the work with OG, Views, and CCK, and the form_alter code and menu hook I need to make that into what I actually want is scary.) --Larry Garfield On Mon, 9 Jul 2007 11:32:31 -0500, "Mark Fredrickson" <mark.m.fredrickson@gmail.com> wrote:
It sounds to me like most of what you want can be handled with CCK.
However, your validation requirements are probably not going to be met out of the box by any existing module.
I would suggest setting up two content types:
1. Room/House 2. Reservation
Use CCK's node reference field to join reservations to rooms. Add a date field to your reservation type.
In a custom module add a form validation function (read up on the Forms API and on hook_form_alter) that checks to make sure that a given date is not already taken for the target room node.
The deep, dark secret of Drupal development these days is that most custom work can be accomplished with CCK, views, and a small custom module to implement hook_form_alter and few others.
Good luck!
-M
On 7/9/07, Alex Moreno <al3xmor3no@gmail.com> wrote:
Good moorning,
i´m newbie developing on drupal, so please beard with me.
I need to know if this is possible to do and where should i read more documentation... the question is that i need to associate different dates to each node created. The working should be similar to a reservation system in a hotel. The administrator must be able to insert new houses or bedrooms and the annonymous users must be able to associate dates in nodes, having in mind that the same node cannot have the same date associated... Do i need to develop a module or is it possible to make it easier in any other way?
Thanks in advance for your suggestions, best regards.
participants (6)
-
Alex Moreno -
Bèr Kessels -
Larry Garfield -
Mark Fredrickson -
Moshe Weitzman -
Victor Kane