PHP help

kulfi - August 7, 2008 - 16:47

Before I dive into the details, here's an overview of what I'm trying to accomplish. I need to allow users to add 'groups' of fields within a content type, for example a user can create a bio node, and add n number of publications to their profile:

- content type = Bio
- group 1 = Publications
-- subfield 1 = Type {Book, Chapter, etc}
-- subfield 2 = Title
-- subfield 3 = Publication year
etc

I have looked at http://drupal.org/project/related_subform without success. And http://drupal.org/project/fieldgroup_table, also without success. I don't have a PHP-clue, but decided to try and use the CCK link module to create a new CCK widget.

I've gotten as far as http://drupal.org/files/issues/cck_publication.zip. Any help on how to get save full text value (not just the first character) and how to add field labels for fields displayed when the 'more' button is clicked?

In addition to the related

bwv - August 7, 2008 - 17:31

In addition to the related subform module, you need to upload and activate the Node relativity module and the Subform element module, as well as the Dependent module. Once activated, you use Node relativity to create relationships between various content types (including content types you create with CCK). You can, in the process, embed one content type into the body of another. You will also be able to attach (as well as unattach, or "unparent") content types to one another from published content that has been configured in the node relativity settings. Its really quite remarkable and should, with a little tweaking, be perfect for what you want to do. (Embedded content types are also collapsible within the parent node.)

----------------------------------------------------------------------
http://www.bwv810.com
http://davidhertzberg.com

I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français. / Я могу общаться на русском языке.

another way to go might be

WorldFallz - August 7, 2008 - 17:33

another way to go might be with nodereference (core cck field), http://drupal.org/project/nodereferrer, and http://drupal.org/project/nodereferrer_create.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Personally I take a simpler

nevets - August 7, 2008 - 17:55

Personally I take a simpler approach and in this case would make a content type of publications that users can add. I would then in this case theme the bio node to to include a listing of all publication created by the user (owner of the bio node).

I like the sound of this

kulfi - August 8, 2008 - 00:21

I like the sound of this approach, I'll give it a whirl.

 
 

Drupal is a registered trademark of Dries Buytaert.