Content Construction Kit (CCK)
For those who wish to discuss CCK development.
CCK field modules maintainers - D6 upgrade path must read!!!
To all CCK field modules maintainers :
please read http://drupal.org/node/304813
(also posted on the development ML)
Need information on how to extend CCK widget
I created a module which adds multi-column display option to checkboxes/radios form element: http://drupal.org/project/multicolumncheckboxesradios
Someone asked to have this integrated with CCK. Is it possible to do?
It would need to have multi-column options settings for any field that uses the checkboxes/radios widget.
I think I need to somehow extend the 'optionwidgets_buttons' in optionwidgets.module.
Any pointer to how to do this is greatly appreciated!
Repeated Fieldgroups with alternating fields
Hello,
I have recently switched to Drupal from Joomla, and my question may be basic:
I'd like to create a content type for adding testimonial quotes to any page. I'd like to have a quote field and a credit field designated so I can designate styles automatically.
I figured out how to make a fieldgroup with my two fields.
Is there a good way to repeat this fieldgroup three times in a page or story, and have it be easily editable so that you can have different quotes on each page?
How to render taxonomy checkboxes in CCK form as columns?
Hello. I have a CCK content type with several fields that are long checkbox lists of taxonomy terms. I would like to be able to render the checkboxes in columns so that filling out the node form will not require so much scrolling (and to just make it look a little nicer). I'll attach a screengrab of what I'm after. I've been searching around for a couple of days but haven't found a good way of doing this. Any ideas on how to accomplish this much appreciated.
UI-oriented summary of D7 Field API
This Wiki page summarizes the UI needs for the D7 Field API, to get the ball rolling on design discussions.
Discussion currently takes place in the comments here - or is there any other place more in line with D7UX habits ?
Introduction
A good UI for D7 Field API remains to be invented - esp. when considering a couple new features compared to CCK D6.
nodereference in many languages
Hello, I need to create a node that can have multiple translations in one language. Drupal can not do this natively so I thought to do with CCK and nodereference. I happen several ways:
1 - create a nodereference field for each language. Problem: When adding a new language need to manually modify the content type and add a new field for the language nodereference added.
2 - create a field type nodelangreference.
Any idea how to do option 2? Any other idea how to model this?
I attach a picture of how I want you to see the creation form.
cck node reference and views
I am looking for a way to display count of nodes that reference to node being displayed in views table, for example, there are 6 nodes B that has node reference field pointing to node A, i want view to display list of nodes A with count of nodes B. Any tips, suggestions? Thanks.
Limit users to creating only one piece of content with cck
I have a node type called "suggestion" which is created using CCK. Only one type of user has permission to create this content. However, I would like to further limit this by allowing those users to create only one "suggestion". They can edit it after they create it, but they should not be able to create multiple suggestions. Any ideas on how to approach this?
Adding Parameters to Node Reference field
Is it possible to add a single parameter to a multiple-selection Node Reference field? Optionally, is there a way to create 1..n Node References, where Nodes can repeat?
Scenario: I have defined a Content Type, Products. While most Products define single real-world items, such as sticks and stones, some products may define groups of existing products, i.e. stick and stone. This is easy enough to set up using a Node Reference that implements either a multi-select box or check boxes, enabling me to link to the "Stick" node and to the "Stone" node.
Best practice to re-assign the content of a cck imagefiled, while changing the content_type of a node
In a project, I have 2 content_types (A & B), each one having a CCk imagefield defined (not shared).
I need trigger a rule that I will change the content type of a given node (from A to B).
During that operation,
I need to gather the data stored in the the CCK imagefield defined for Content_Type A (ok, this is done before content_type "upgrade").
Then, I'm wondering what is the best practice to store those data in the CCK imagefield defined for Content_Type B.
To keep in simple, I plan to have 2 imagefields setup with the same parameters, but the name.
Dynamic customization of views, but also need support for views ajax
Hi,
This is about a problem I have found when trying to write a feature for a module that needs to provide back reference views to nodes based on CCK node reference fields.
What I would like this to work is that the module provides a base default view that is used to provide all back refence views. This view can be modified to add more fields, change the style, add and/or expose filters, and so on. The user can also clone this view and assign the customized clone to any particular back reference relation.
Porting Biblio to CCK
Project information
(Original) Project page on drupal.org: http://drupal.org/project/biblio
Student: Kornel Lugosi (Coornail on d.o, Coornail on g.d.o)
Mentor: Kristof Van Tomme (kvantomme)
Co-mentor(s):
* Ron Jerome (rjerome@drupal.org)
* Robert Douglass (robertDouglass)
* Benjamin Melançon ( http://drupal.org/user/64383 ; http://agaric.com/contact )
Current status: Planning.
Description
Biblio is a Drupal module that allows users to manage and display lists of scholarly publications. It is currently used on approximately a 1000 installations (and raising). Its use in projects like The Science Collaboration Framework, however is bound to increase its use even more.
Currently the module is still using custom nodes with its own database tables instead of CCK nodes/fields. Because of this it has to implement and maintain it's own widgets, integration with CCK reduce redundancy in the Drupal contrib codebase. Lately several features from Biblio have been reimplemented in the CCK framework. Also several glue-modules emerged that seek to incorporate functionality that already works for CCK
User Image upload, management and workflow
Hi guys,
Been trying to find a solution for this for weeks now and seriously could need some help pointing me in the right direction or at least tell me if this is possible or not.
List CCK Fields for a node revision
Hi all!
I would like to know if it is possible to list cck fields for each node revision, in order to see evolution of the cck fields in the node revision for instance.
It is already possible but with a node view type.
I would like to have this for node revision view type.
It could be great to implement the relationship in the cck's views integration.
Does somebody know if it is already available?
Thanks you
Seeking best practices or examples for writing tests for modules that require CCK set-up
The module I'm working on is a widget module, so its effects can only be seen and tested when at least one content type has been configured with its field.
All this configuration has to be done in this test? In this case, adding a field to a content type and selecting the widget. Any examples, advice, or alternatives for this?
Separate but related: Testing starts each time with a blank slate, but is it possible instead to have the tests run with a copy of a current database? That seems like a good way to help catch bugs that can arise out of different configurations.
cck_n_fields - good module name?
I've wrote a small utility module called cck_n_fields, which I'd like to add to d.o. site.
The module allows a user determine the number of multiple fields that should appear in a node add/edit form via URL.
for example: example.com/node/add/story?cck_n_fields[NAME-OF-FIELD]=5 will result with the attached image.
my user case in this module, is that I have a desktop utility that uploads files using CURL.
Do you think the name cck_n_fields is ok? Is it worth a project in d.o. ?
ImageCache resize output to a View problem
Hello. I've a problem getting an image attached to a node to appear in it's resized form on my site's front page via a view.
Current best practice on default values
I'm trying to figure out a problem in the location_cck module, which is having problems with default values (#416230: Location CCK field does not set default location). Part of the difficulty in fixing this: the lack of consistent documentation on how defaults should be handled.
It looks like the current handbook may be wrong, since some modules have recently changed their implementations. Details below.
Using CCK to populate possible values for an if statment in
I have these huge chunks of html that I need to be able to select in the node settings witch one to use (if any).
I am thinking a cck float point value, and an (if || switch) statement in the contemplate. the question is the best way to store the static html chunks. As a (block || include file || some other way)
any ideas?
Need advice on creating CCK-based nodes from external application
I'm developing a site where much of the content will be provided by an external application, rather than manually entered via forms on the site. Basically what I need is a kind of automated bulk import, i.e. no user intervention. Is there some kind of API for this kind of thing? Do I need to figure out how to write directly to the database tables?
FAPI vs CCK (or are they really good friends?)
I have been going though posts to try get some direction on data collection via forms in D6.
The story so far:
I could use cck to create a content type and then collect data, but, working with this has been a bit frustrating. The form insists on title, menu, and other elements that I don't want or need.
OR I could investigate FAPI and learn to code in the form in this medium.
From what I understand, and I'm obviously requiring direction, is I could:
- Create a content type in CCK
- Use the FAPI to create a form to use the content type to collect data
persistent forms?
I need to create several different content types that users will be able to have always present on a personal page. For example one form may simply have a field for miles driven today. Another may have a scale for rating mood from one to five. There will be five or more of these.
The users should be able to go to a personal page and see the forms they have chosen to appear on this page (perhaps displayed in blocks with the formblock module) and enter the information. Only the content types they have chosen should appear on this page.
CCK values from an external datasource
In our project we need to have a select box which lets the user choose among a list of items coming from an external data source (XML based webservice). It would be interesting to be able to retrieve the values of a CCK field from an external data source instead to "hardcode" the full list of values. A way to do it could be to specify, in the field setting, the XML end point and an xPath expression to map the values contained in the XML as values of the CCK field.
Any feedback on this?
Updating CCK fields in code
are there methods for updating fields on content from with code? something similar to drupal_write_record but with cck support.
about creating private and public radio button option with cck
I am new in drupal.
I have stories in which I have to put the option of radio button with private and public options.
Can I achieve this using CCK
If it is possible then please suggest its solution.Thanks in advance.
Controlling a (custom content type) gallery page with a CCK block of thumbnails
Hi
I posted this on the drupal.org forum but I'm not getting much love so hope someone will take interest in this group :)
I am using CCK to upload and display my images: CCK, ImageAPI, ImageField, ImageCache and also CCK Blocks and CCK Block reference to display a block of thumbnails on the left hand side of the page generated from the images in the main content area.
I have set up a new content type: Gallery Page where I have used imagefield to create an upload for that page, ImageCache handles the resizing to thumbnails and cck block displays the thumbnails.
Node Reference with autocomplete
Hi.
Does there exist a tutorial about the CCK Node Reference fields?
I've created two content types, Father and Son. A Father can have many Sons.
I've added a new Node (Father) Reference field to Son.
I've also added an "Add new Son" link (node/add/son?field_father=123) when the user is on a Father-node page.
Now, I don't know how to autocomplete that Node Reference field with the nid of the Father node.
Could anyone help me?
I'll write a tutorial if it doesn't exist and I succeed to make this work.
Thanks anyway, Giovanni
CCK option field with dynamic option
I would like to create a cck field with dynamic options based on user's tag's input on the same form, can anybody help/showing me how to do this ? many thx
Help shape a Content Types and Views book
I am currently in the very beginning stages of writing a book on Drupal Content Types that will focus on Core, CCK, and Views. I have a first draft of the outline that I am working on. I would love to get community feedback to help shape the book at this very early stage.
http://alanio.net/blog/2009/02/first-draft-drupal-book-outline-content-t...
Thank you,
Alan
Advanced Drupal Views with Victor Kane & Chris Charlton
Victor Kane & Chris Charlton teach Advanced Drupal Views in Venice, CA.
LA Drupal resident members get a special $50 off (email for bulk ticket pricing).
Learn all the new concepts in the Views 2 module for Drupal, inside and out, even some object oriented design details to take back to work.
Learn about the new architecture in Views 2, learn Relationships, the new user interface, and become a master of the new multiple Display configurations.
TICKETS ON SALE NOW. Hurry, tickets will go fast! http://drupal-la-training-2009-march-15.eventbrite.com/
This workshop shows how you'll get the most out of display options like blocks and pages, plus how to theme your views with PHP templates. Take away masterful tips like how to embed views (meaning views within views), and some magical views that only a developer can love.
Node Reference selection widget
I have just published a new module which might be of interest to some of you:
http://drupal.org/project/nodereference_views_select
From the project page:
Provides a widget for Node Reference which displays the node teasers instead of a select box, and allows choosing the referenced nodes
from a Modal panel. The list is optionally sortable, depending on JQuery UI Sortables. The modal supports pagination, exposed filters
and exposed sorting, all using AJAX.
Can I add a node reference from "wrong side"?
I posted this earlier in the d.o forum, but I'm realizing this is probably a better place for my question.
I've been reading and reading about node referrer, node relativity, node reference, etc. and I'm stuck.
What I want to be able to do is allow users to add a node reference from either side of the relationship. Unless somebody can convince me it is a good idea, I would rather not have the reference recorded in two places (ie both nodes referencing each other).
Here is an example.
- I create a 'person' content type and an 'event' content type
Cloning a content type
Hello:
Is there a feature to clone an existing content type on the same drupal installation. Here's what i'm trying to achieve.
content type - job_posting_1 with certain groups and fields within them. This represents an application for a job posting and students can apply for the posting
now i want to create a new job posting for my company with a similar structure (but it may have minor changes to some fields). so is it possible to
clone job_posting_1 to job_posting_2.
Implementing hook_field outside cck field modules
I would like to implement extra functionality on specific CCK fields operations. For example, I have a link CCK field in some content type. When a value, eg a website link, is entered in that field, I automatically want to set up a feed using that link. To do this, I am now altering the entire node form using hook_nodeapi(), filtering out the correct content type and then reading the field value. I thought it would be nicer to hook up my custom action (creating the feed from the link) directly to the CCK field.
Context specific fields
I am working on porting a minimal version of the Bibliography module to CCK. I am doing this as the Biblio module doesn't serve my exact needs. On of the UI elements that the Biblio module does that I would like to mimic is a context specific fields for data entry depending on the selected publication type.
Action needed for the "After/before deleting a post" trigger
I have a node type A (parent) and a node type B (child). B-nodes have a mandatory CCK nodereference field that points to a parent A-node.
A1
|-B1
|-B2
|-B3
Currently it is possible to delete the parent A-node and all child B-nodes immediately become inconsistent (a mandatory nodereference field points to an non-existing parent). CCK does not address this flaw and I need a workaround. Reading through the documentation I found out that it might be possible to create a custom action (in D6) that will delete all child nodes when (before) the parent is deleted.
Add more CCK text fields without save / re-edit in Drupal 5
Drupal 6 has this natively -- an "Add more" button that adds additional fields. In Drupal 5, you have to save the node, then edit it, and only then do you have three more text fields to input.
I'm looking for a module or a form_alter snippet or whatever that can do something similar in Drupal 5. Anyone got pointers?
Fetching CCK nodes spanning multiple Content Types
CCK: 6.x-2.1
Drupal: 6.8
I am working on a module that needs to fetch sets of nodes based on various criteria (I don't think the criteria isn overly important for this discussion). The content nodes may span all content types installed on the site. I need to fetch a list of all the nodes matching my requirements and all of their fields/content.
I need this basic functionality:
$result = db_query('SELECT * FROM {node} WHERE #my conditions are met#');
while($row = db_fetch_object($result)){
$node = node_load($row->nid);
... do stuff ...
}UID access from CCK userreference.module to CCK compute example
I've been searching for an example of getting the UID out of the CCK user reference module and used in the CCK compute module with no luck. Either I'm searching for the wrong stuff, in the wrong places, or an example of this is not out there. Can anyone help me out?
A generic example is fine, but my specific need is to take the 2 users selected from the cck user reference module and on the same node compute a field that takes the first and last names from a custom profile and concatenates them.
field_setValue()...
I've been trying to figure out a generic way to set the value of CCK defined fields from my custom module code. Is there any form of a hook_field_setValue($item) or the like?
My module exposes an API to create content defined by CCK. I want to be able to take the inputs to the api function and "convert" them to well-formed CCK arrays. My hope would be this function would invoke the appropriate validate functions, etc... Is there such an animal?
CCK with Views does not show certain fields unless logged in as admin
I have been searching the forums/groups/blogs for the last 2 days but cant seem to find anything to help, maybe Ive just overlooked something obvious.
URI Widget for cck
Hi,
I'm wondering if somebody has developed a URI widget for CCK? I think it would be an extension of the link module. Another option is to just have a text field with a URI filter rather than a URL filter. Does anybody have any pointers? I'm working on a project that will hopefully integrate with the semantic web and we'd like to be able to link to external content using the extended URI protocols rather than URLs. IANA maintains a list of URI protocols.
thanks
Kehan
Hybrid CCK/Module Development - I've thoroughly confused myself...
Hi group,
I'm new to this group and forum. This may been a well-worn out conversation, but after reading through everything I could find, I've managed to make myself more confused. Specifically on the topic of developing hybrid-cck/custom modules.
Help testing the CCK Multigroup module
Hi all,
I've been working on a patch to the CCK multigroup module that I feel it's almost there. It needs as much testing as possible however. If you think you may need this feature, then please help testing, so maybe it can be included in the next release of CCK2, which I don't know because it depends on the CCK maintainers, but getting this tested, will help.
Programmatic importing of CCK Fields (d6.x)
I want to have a section on all content types that allows the user to upload a teaser image (imagefield), specify alternate teaser body and title fields, and a few checkboxes for promoting to various views. I could use nodeapi to do something like this, but I'd have to reinvent the wheel with all the data storage involved there (especially filefield/imagefield).
Feedapi + views
Looking to see how people handle output of views blocks (or otherwise) generated by feedAPI that have HTML markup in the feed.
I have a blocks that display a feed title and the teaser. However, the feed has HTML that the teaserfield isn't parsing. Things like breaks 'br' font-sizes etc are displaying as pure text in the field. Has anyone managed to avoid this? Possibly by mapping a teaser field to a specific CCK field of sorts?
Feedback welcome.
Cascade delete nodes that reference a deleted node?
I am trying to build a simple hierarchy of two node types. A-type is the parent and B-type is the child. I am also trying to strictly enforce that hierarchy, i.e.:
1) a B-node cannot be created without specifying a parent A-node
2) when an A-node is deleted, all child B-nodes MUST be deleted (with an appropriate warning of course)
CCK Performance
Hello,
I am planning on doing some benchmarking to assess two models of CCK used in Drupal 5.
Auto populate a nodereference field using the URL?
I have a node type A and node type B. B-nodes have a nodereference field that point to an A-node so that one A-node has many child B-nodes.
I need a link placed somewhere in the A-node (could be on a block as well) that says "Create a child B-node". This link should open the form to create a new B-node with the nodereference field:
1) hidden
2) pre-populated with the nid of the calling A-node
What is the best way to do that in Drupal 6?
D6 installation profile for testing CCK date fields now available
I just released an install profile for D6 core that sets up a test site for trying out all the combinations of CCK date field configurations: CCK Date Testsite. I've discovered various bugs in Signup's handling of CCK date fields (and have been fleshing out bugs and limitations in DateAPI itself with KarenS's help). I was spending a lot of time just configuring a reasonable test site to try different combinations of CCK date field types (Date, Datestamp, vs. Datetime) and timezone handling (there are 5 different ways date fields can handle timezones). So, I quickly decided the time spent automating the test site would easily save me time in the long run. And, I hope this profile will be useful to other folks working with DateAPI and CCK date fields.


















