By Anonymous (not verified) on
Hi
I'm toying with a little gallery module. I'd like to use the capabilities of CCK and imagefield. When installing the module it automatically adds a gallery content type. My problem is, that I can't seem to figure out how i tell CCK to automatically create an image field, and attach it to the content-type with a bunch of predefined settings (name of the field, multiple values etc.).
If anyone could guide me in the right direction it would be great.
Thanks
/ronnil
Comments
Which module are you using,
Which module are you using, the image module? I know that it will create a gallery for you.
If you want to use CCK and imagefield to create galleries, you can certainly do so, but those will have nothing to do with the image module per se.
You will need to create a custom content type, put an image field in it, allow multiple values (more than one image), then create a View that gives you the gallery you need.
Or are you talking about something completely different?
----------------------------------------------------------------------
http://classicvinyl.biz
http://music.bwv810.com
http://davidhertzberg.com
http://association.drupal.org/user/1207
I am a writer, researcher and solo drupal freelancer
I don't use a module, I'm
I don't use a module, I'm creating one :)
I already made the content-type (done automatically). Right now i use the "file-attachments" to give me the image files. But I'd like for my module to automatically create the cck-field, so I don't have to do it via the administration each time I install the module.
Sorry, I don't think I can
Sorry, I don't think I can help with that. My (perhaps rudimentary) understanding is that a CCK field is assigned to a content type and that each time you create the content type, and CCK field is made available. In the absence of any other details, it sounds to me like you may be trying to reinvent the proverbial wheel. Good luck.
----------------------------------------------------------------------
http://classicvinyl.biz
http://music.bwv810.com
http://davidhertzberg.com
http://association.drupal.org/user/1207
I am a writer, researcher and solo drupal freelancer
Please Suggest Some Points
hello
I have seen your sites and it looks very attractive. and i also want to develop this type of site so could you tell me In your site "classicvinyl.biz" which modules are used and for which drupal version. and how create a combo box that will show all taxonomy terms.
Thanks in advance
I would also like to know
I would also like to know how to add an imageField to the content type in my module
My solution
I've been working on a module that (also) creates a content type, and adds a field to that content type. With some adjustments this should also work for your use case:
[Full source at http://users.conquer-space.net/~sara/dictionary-6.x.tgz]
Requirements: content (CCK), number, optionswidgets
The requirements will vary depending on the field you add.