noderefernace cck

View: New views
7 Messages — Rating Filter:   Alert me  

noderefernace cck

by Bugzilla from caleb@caleboconnell.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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@...
-- 207.319.4746
-- http://blog.caleboconnell.com


Re: noderefernace cck

by Andrew Berry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>  
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@...
> -- 207.319.4746
> -- http://blog.caleboconnell.com

Re: SPAM --- Re: noderefernace cck

by Peter Droogmans :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... [mailto:development-bounces@...] On Behalf Of Andrew Berry
Sent: donderdag 28 mei 2009 05:55
To: development@...; caleb@...
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@...>  
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@...
> -- 207.319.4746
> -- http://blog.caleboconnell.com


Re: noderefernace cck

by Bugzilla from caleb@caleboconnell.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: noderefernace cck

by mcarbone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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
>

Re: noderefernace cck

by Bugzilla from caleb@caleboconnell.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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@...
-- 207.319.4746
-- http://blog.caleboconnell.com


Re: noderefernace cck

by mcarbone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...
> -- 207.319.4746
> -- http://blog.caleboconnell.com