I am looking to get info about the cck module in drupal. I've been trying to write a cck module that will basically do the exact same as nodereference but with two free entry text fields to go along with it. Basically, one field to be the noderef lookup and two to add prices to associate to the referred field. I wasn't sure who I could get in touch with in the cck development who is familiar with this so I can ask some questions about where to put the code I want in place to make the custom module I was looking for. Thanks again in advance. -- -- Caleb Dylan O'Connell -- caleb@caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com
Take a look at filefield and imagefield. You should be able to extend nodereference in the same way. On 27-May-09, at 11:28 PM, "Caleb O'Connell" <caleb@caleboconnell.com> wrote:
I am looking to get info about the cck module in drupal. I've been trying to write a cck module that will basically do the exact same as nodereference but with two free entry text fields to go along with it. Basically, one field to be the noderef lookup and two to add prices to associate to the referred field. I wasn't sure who I could get in touch with in the cck development who is familiar with this so I can ask some questions about where to put the code I want in place to make the custom module I was looking for. Thanks again in advance.
-- -- Caleb Dylan O'Connell -- caleb@caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com
You can also have a look at the combo field, see http://drupal.org/node/119102 and http://groups.drupal.org/node/14009 I tried the patch last week but you may run into problems if files get removed, see the comments at the end of the thread. Cheers, Peter Droogmans 32 497 44 44 77 -----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Andrew Berry Sent: donderdag 28 mei 2009 05:55 To: development@drupal.org; caleb@caleboconnell.com Subject: SPAM --- Re: [development] noderefernace cck Take a look at filefield and imagefield. You should be able to extend nodereference in the same way. On 27-May-09, at 11:28 PM, "Caleb O'Connell" <caleb@caleboconnell.com> wrote:
I am looking to get info about the cck module in drupal. I've been trying to write a cck module that will basically do the exact same as nodereference but with two free entry text fields to go along with it. Basically, one field to be the noderef lookup and two to add prices to associate to the referred field. I wasn't sure who I could get in touch with in the cck development who is familiar with this so I can ask some questions about where to put the code I want in place to make the custom module I was looking for. Thanks again in advance.
-- -- Caleb Dylan O'Connell -- caleb@caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com
The following is from the noderefernce widget function which looks to be the best place to put in my code for adding two free entry text fields. I changed the name to beerlist throughout for my module purposes. The other place would be under nodereference_element, but I am not sure which would be best, and if a simple for each would work to create my fields. switch ($field['widget']['type']) { case 'beerlist_select': $element = array( '#type' => 'beerlist_select', '#default_value' => $items, ); break; case 'beerlist_buttons': $element = array( '#type' => 'beerlist_buttons', '#default_value' => $items, ); break; case 'beerlist_autocomplete': $element = array( '#type' => 'beerlist_autocomplete', '#default_value' => isset($items[$delta]) ? $items[$delta] : NULL, '#value_callback' => 'beerlist_autocomplete_value', ); break; } return $element; } Caleb O'Connell wrote:
I am looking to get info about the cck module in drupal. I've been trying to write a cck module that will basically do the exact same as nodereference but with two free entry text fields to go along with it. Basically, one field to be the noderef lookup and two to add prices to associate to the referred field. I wasn't sure who I could get in touch with in the cck development who is familiar with this so I can ask some questions about where to put the code I want in place to make the custom module I was looking for. Thanks again in advance.
-- -- Caleb O'Connell -- Portlandtaps.com
Try the experimental content_multigroup module that comes with the latest CCK release on Drupal 6. Since it's experimental, you'll have to add a .info file to enable it. I have it working right now with a noderef + checkbox and it is mostly functional. (There are a few annoyances that still need to be worked out, such as the inability to remove empty instances when you allow multiple fields.) More here: http://drupal.org/node/119102 -marco On Thu, May 28, 2009 at 8:12 AM, Caleb O'Connell <caleb@caleboconnell.com> wrote:
The following is from the noderefernce widget function which looks to be the best place to put in my code for adding two free entry text fields. I changed the name to beerlist throughout for my module purposes. The other place would be under nodereference_element, but I am not sure which would be best, and if a simple for each would work to create my fields.
switch ($field['widget']['type']) { case 'beerlist_select': $element = array( '#type' => 'beerlist_select', '#default_value' => $items, ); break;
case 'beerlist_buttons': $element = array( '#type' => 'beerlist_buttons', '#default_value' => $items, ); break;
case 'beerlist_autocomplete': $element = array( '#type' => 'beerlist_autocomplete', '#default_value' => isset($items[$delta]) ? $items[$delta] : NULL, '#value_callback' => 'beerlist_autocomplete_value', ); break; } return $element; }
Caleb O'Connell wrote:
I am looking to get info about the cck module in drupal. I've been trying to write a cck module that will basically do the exact same as nodereference but with two free entry text fields to go along with it. Basically, one field to be the noderef lookup and two to add prices to associate to the referred field. I wasn't sure who I could get in touch with in the cck development who is familiar with this so I can ask some questions about where to put the code I want in place to make the custom module I was looking for. Thanks again in advance.
-- -- Caleb O'Connell -- Portlandtaps.com
Using content multigroup, does it allow me to get that data back out of the database? do you have a sample .install file, just so I can see what requirements you're using. I have been doing a lot to work on this and if I can get this to work initially, I'd love to start working more on this. -- -- Caleb Dylan O'Connell -- caleb@caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com
Just create content_multigroup.info and put it into cck/module/content_multigroup with these contents: name = Content Multigroup description = Combine multiple CCK fields into repeating field collections that work in unison. This module is experimental and not ready for production. dependencies[] = content dependencies[] = fieldgroup package = CCK core = 6.x This is explained in the README.txt that comes with the module. "does it allow me to get that data back out of the database" I'm not sure what you mean here -- yes, the data gets added to the database and can be retrieved as normal. In general, content multigroup just bundles up multiple fields and then it acts like a normal CCK field. On Thu, May 28, 2009 at 8:50 AM, Caleb O'Connell <caleb@caleboconnell.com> wrote:
Using content multigroup, does it allow me to get that data back out of the database? do you have a sample .install file, just so I can see what requirements you're using. I have been doing a lot to work on this and if I can get this to work initially, I'd love to start working more on this. -- -- Caleb Dylan O'Connell -- caleb@caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com
participants (4)
-
Andrew Berry -
Caleb O'Connell -
Marco Carbone -
Peter Droogmans