I have been looking for a module that does exactly what this one does but this seems to have a lot of shortcomings. I would like to alter it to strip out all of the variables except the ingredients section - Do you think this would be possible?
Let me explain why: It seems to me that all of the aspects of this module except one can be achieved using existing CCK fields. The most valuable aspect of this module seems to be the ingredients section where there are multiple values associated with a single entity (qty, units, description, etc.) although I personally would want to have the "preparation" of the ingredient also included. For example the ingredient would be garlic and the preparation would be "diced, sliced, crushed, etc"
Don't get me wrong, I am not hashing on this module I just wonder if the development time should be spent on the Multi Value Field and not the other aspects. I have linked this to a project currently going on to create a "Combo" field (http://drupal.org/node/119102) and I hope that it will either speed the growth of that project.
Comments
Comment #1
marble commentedWe'd also noticed that CCK is becoming more capable, and the long term plan is to reduce the recipe module to something that just installs a set of CCK fields for recipes, which could then be customised. We do have a few things left that CCK can't do yet, but feel free to help get CCK improved! In the mean time, this is still useful as-is.
Comment #2
scottprive commentedsubscribe
>the long term plan is to reduce the recipe module to something that just installs a set of CCK fields for recipes... We do have a few things left that CCK can't do yet
Curious.. what would be "lost" if this were re-done in CCK2 & D6? Will D7 & CCK3 (Fields?) offer what's needed?
Comment #3
marble commentedAs far as I'm aware (not being a CCK expert, and this being from the last time I looked, so may be out of date):
1. Yield - computed from user input & contents of fields (ie. display yield * number of eggs etc)
2. RecipeML export
(Actually last time I looked, that combo field wasn't available either; that's awesome, and a big step towards being able to CCKify recipe.)
Comment #4
scottprive commentedGood to know, thanks.
Comment #5
jvandervort commentedAs a long time drupal module developer(DMD:), I'd stay away from CCK at least until it become the norm
for crontrib (which it is not). There are lots of issues with data pre-loading at install time, data migration,
and dependency. I just don't think it is the right tool for every job. It is beautiful for non-programmers who
run sites and want custom functionality which would otherwise be unachievable, but as a developer leveraging
its functionality doesn't give you much. It also ties your normalized db schema in knots(variable schema), and requires a
heavily function oriented API to get data in and out.
Comment #6
jvandervort commentedComment #7
colemanw commentedI understand that the ingredients list is a pretty tricky bit of code and may or may not work best with CCK. However I can't think of any reasons not to use CCK for the custom text fields (description, instructions, notes, and source). They are just text fields, nothing special about them, except that for now they are hard-coded into the module and therefore very difficult to configure or customise.
I can think of at least 5 reasons to use CCK for these fields:
Comment #8
jvandervort commented@colemanw:
Yes, CCK is great. Really like your numbers 1 and 3.
When CCK is perfect there will be no need at all for the recipe module. You could just add all of the fields that the recipe module
manages, save some kind of CCK install profile and share it on drupal.org.
What currently bugs me about CCK is how some things are implemented (not saying they are impossible):
And the biggest gotcha of them all:
I'm not a fan of any hard dependencies. And yes, I know there were -alphas, -betas, and -rcs in there as well.
But where we can add optional dependencies to boost functionality, that's great.
Comment #9
scottprive commentedI think there is a way to programmatically add CCK fields, but I don't know it. Under Drupal 6, this would create a hard dependency on CCK (and I don't like that either) but as far as dependencies go, CCK is pretty common. I'd suspect that the only sites not using ImageField on Recipes (and therefore using CCK) are the sites who don't know CCK integration is possible.
In Drupal v7, the parts needed of CCK are now part of core. So this would be a valid change for D7. If there are not bad side effects to Recipe, under D7 we can look at making some of the text fields as CCK fields.
What would hold this change back is the fact that it's a fair amount of work, especially data migration (previous installs). If more people want this change (which comes at the expense of other development) and speak up, then it is more likely to happen. Now if someone steps up with a comprehensive patch to do this, it would be MOST generous (but I doubt anyone would want to do so and target D6). I haven't looked at what amount of work this entails, so it's currently a low priority.
John - The way this was suggested, Views wouldn't be a hard dependency at all (not under D6 or D7).
CCK displays CCK fields just fine... Views not required unless you want to customize the data presentation.
colemanw - Views integration exists now in the -dev release, and it works on the fields you mention. Try it. The part that is difficult to handle in views is the 1:N relationships of ingredient details (think 1:N duplicated fields in a SQL outer join). My work on this area has stalled recently, unfortunately.
FYI - There's a Recipe 1.2 release coming soon. I don't know what comes next as I have not been contributing for the last month or so. But sometime soon, a Drupal 7 branch occurs. After that gets out there, these things are a little easier to develop against Drupal 7 (some of the dependency issues do go away).
Comment #11
dcam commentedClosing old issues. Any future work on this topic would concern D7 fields.
Comment #12
dcam commentedClosing old issues. Any future work on this topic would concern D7 fields.