For those who wish to discuss CCK development.
Snippets to import data into two related CCK nodes from CSV data
The following Snippet, written up and executed as a stand-alone php file (can also be executed in the run-php dev module box), imports into two related CCK nodes, selected fields from a CSV (actually tab delimited, but that is parameterized in the excellent drupal function) data file (in this case, exported from ACT).
I have tested the snippet on various platforms (php 4/5, mysql 4.1/5), always with Drupal 5.0 rc1.
I asked KarenS if it would be useful, and she suggested I post it here, in the hopes of there emerging a discussion to make an import/export module (or enhancing the existing SoC import/export module which hasn't been updated for Drupal 5 yet).
Read moreCCK Import/Export
I've put together a module for CCK 5.x to import/export content type, group, and field definitions. You can import a complete package of a content type with its group and field definitions into a new installation, or export selected field and/or group definitions from one content type and import them into another. Similar to the Views import/export function, you select the type, fields, and groups you want to export and it creates text you can copy and paste into an import text box as an import. It's built using the new drupal_execute() function which just chugs along and submits all the necessary forms, creating a macro in the export and playing it back in the import.
Read moreRelationships-categorization system wanted features
"Relationship" I understood as relationships between fields (nodes are many relationships, which are subject of more advanced process).
Wanted features:
- Powerful and without limitation thanks to the most abstract (see: "everything is a field", compare this to: Global CCK fields, A controversial(?) point: store translations as nodes).
- Build-in categorization features.
- Build-in views features (listing fields, not necessary nodes).
- Build-in menu features.
- Support for Semantic Web/Microformats/similar.
Observations about current situation:
Read moreEverything is a field
The most abstract concept in my opinion: "everything is a field" (fully atomic value) instead of "everything is a node". CCK is ardent proof that this idea could work. If that's the case, we can share the same field (as regards value), node is just a set of fields tie together by new relationships system, whereas content type is a predefined set of relationships between fields.
Read moreCCK Handbook
Webchick has been helping me launch a new top-level CCK handbook at http://drupal.org/node/101723. So far all that has been done is to re-organize existing pages, but I'm going to try to gradually get more information added (and update or weed out outdated or inaccurate info). Anyway, if anyone has anything to contribute, suggestions, ideas, etc. etc. please jump in and add pages or comments or whatever to the handbook. Even if you don't know enough to create a page, if you think of a topic that needs to be addressed just create a stub page that someone else can build on.
For starters, I set up 'CCK for Administrators', 'CCK for Developers', 'Installing and Updating CCK', 'Related Modules', and 'FAQs'. The last one is an old page that was already there and may not really make any sense any more since the whole thing is sort of a FAQ, but I left it for now.
Read moreViewfield development timeline
Hello,
I've posted a timeline of viewfield development, if anyone is interested:
Cheers,
-Mark
Update: I've attached a screen shot of viewsfield working with filters. Also pictured: ajaxviews - loading a teaser on top of a views table. Way cool.
Read moreA personal/community workspace, or another look at social networking
I've been thinking about some of the specifics of creating a personal workspace within Drupal -- although my main area of interest is education, these thoughts have applications outside education -- these are some rough notes, and I'm curious to see/hear reactions about what I'm missing/overlooking. These notes are not intended to be comprehensive, but a starting point in a conversation about some specific functionality
Some basic functionality--
<
ol>
To accomplish this, I was thinking about some integration between BuddyList (http://drupal.org/project/buddylist) and the ACL (http://drupal.org/project/acl) or NodeAccess (http://drupal.org/project/nodeaccess)module -- members of a user’s Buddylist can be used to form an access control list on a node by node basis-- I’m leaning toward the ACL module as I think a generalized API that can be used by other modules provides some advantages long term. However, was the ACL module designed to work primarily with roles, or with individual users?
Read moreCCK and tables
I'd like CCK to do tables :-)
One existing solution is the Matrix Field module: it provides a new field type where you can set up a matrix of textfields. The data type is string, and seems to be independent from the other CCK field types.
This doesn't meet my needs because I'd like to mix different CCK fields, for example a column of nodereference fields with a column of number fields.
Read moreExecuting custom code.
I created a new node type (the old-fashioned way). Now I'm playing with CCK, seeing what it takes to re-create this node.
Now, say that I have a piece of custom code, and I want it to run in one of the hooks/handlers, eg. an extra bit of validation, or some form_alter on the node_form. What would be considered "best practice" to implement this piece of code? In reality, do I need to hard-code this logic into a simple node module, and then use CCK to extend the fields as I require?
I imagined another tab in the CCK creation, where I could select a handler, and then submit php code that would be executed at that point. I had a little look in the issues queue regarding this, I don't think there was anything there, or maybe my search terms are wrong...
Read moreMigrating from event_basic node to CCK
Karen's great work on calendar views and date.module make it quite feasible now to use cck+views solutions instead of event.module. The proof is in the live site pudding, but it all sounds promising.
One gotcha is all our existing event_basic nodes out there. Do you guys have a best practice for how to migrate those into CCK date fields so we can easily do Views and calendars?
Read moreViews Calendar
I have a mostly-working Views Calendar module available at http://www.drupal.org/project/calendar. It's still a little buggy and the css needs tweaking but it is generally working. Create a view and select the Calendar display (instead of table or teaser). Add any date field to the view (CCK dates, event dates, node updated dates, whatever). Add three arguments, Calendar: Year, Calendar: Month, and Calendar: Day.
Navigate to the view where you will see a year of mini calendars. Click on a month name to see the month or a day name to see the day. Back and next navigation is provided for month and day views (not yet added to the year view). It comes with a default calendar that displays all nodes in a calendar by their last updated dates. If you like, select the Calendar view for the block, too to get a mini calendar in a block.
Read moreEvil Trifecta: Views + CCK + Viewfield
I believe the evil credentials of views and CCK are well established. I wanted to unveil a new module that combines the two into an unbelievably devilish system: viewfield.
Viewfield allows content type administrators to add view reference fields into CCK content types. When a user creates one of these nodes, he/she can select from a list of views to embed into the node. When the node is viewed, the view runs and is output as one of the node fields. (Of course this can be themed).
Read moreCCK for Drupal 5.0
The good news is that we have an initial version of CCK for Drupal 5.0. The patch to make this happen was the work of several people, dopry, drewish, yched, edrex, maybe others. Drupal 5.0 introduces several changes, most notably moving the handling of content types into core.
I wanted to start a place here where we can discuss development of CCK 5.0 to take advantage of new Drupal 5.0 functionality.
Here are some of the changes/opportunities/challenges I see so far:
1) You can now add CCK fields to any content type (at least any content type you create and manage using the core content types administration screen). I predict there will be a big wave of interest in CCK when people see they can do that (and a lot of new people who may need support).
Read moreClearing out the CCK issue queue
Update: Things are much improved now with several new committers and lots of people providing patches and reviews and other support. Thanks to all of you!!
The CCK issue queue is almost becoming unusable because it's so large. The same problems keep getting reported over and over again because it's getting so hard to tell if the problem has already been reported. Plus there's a long list of feature requests that bulk up the list. I know that JonBob is probably overwhelmed by the work that needs to be done (I'm not criticising him, he's done an incredible amount of work getting CCK this far), but CCK is critically important to me and I do want to try to help move things forward. I don't want to get into a discussion of what JonBob ought to do. Instead, I wanted to get some discussion about what the rest of us can do.
Read moreReferential Integrity
CCK is making great strides towards enabling application design within Drupal. One feature that seems essential is the (optional) ability to enforce referential integrity for nodereference and userreference.
Taking up Robert's example: another real knockout criterium that prevents this from working is that there is no way to ensure that once we record that Beethoven! wrote the moonlight sonata that it stays that way. At the present, is seems that Beethoven could get deleted and leave the sonata orphaned?
If a content node A refers to node B (or user B) then Drupal could guarantee that node A does not get orphaned.
Read moreI must be missing something
How do you make required fields in CCK really required? For example, if I put together a pulldown menu with a few choices, one of them is automatically chosen. Therefore the user does not have to change anything, even if that choice is incorrect, and the information is submitted as error free. Is there any way to have a blank space as the default choice and if it is not changed from that blank space it will return an error when the form is submitted?
Read moreVoting API Field for CCK
What?
A few days ago, I compiled a list of all the node review modules I could find at the time, and wrote up an article comparing them: http://www.lullabot.com/articles/a_review_of_node_review_modules. The amount of overlap in these modules is, quite frankly, stunning. Yet they all do slightly different things. Node Review handles multiple axes. Simple Vote merely stores the aggregate score for a node. User Review allows you to place a comment with your vote. Vote Up/Down handles a simple "yes/no" style of voting.
It occurred to me that if we took a step back, we might be able to develop "one voting module to rule them all." Rather than having to keep implementing these new voting modules because others "almost" do what we want but not quite.
I've looked briefly at customvote.module, which looks as though it endeavors to be that tool. But I'm thinking something slightly different: a voting API field for CCK.
Read moreOrdinality on reference fields
CCK is becoming quite useful and living up to its promise. The node and user reference fields are not terribly useful yet, though. The Add and Reference and Form Restore modules by Artem Timofeev are great additions to the interface aspect.
By far, however, the largest issue that limits the real use of the node and user reference fields is their lack of ordinality. It is impossible to say that the relation is 1:1, 1:n or n:m (if we were really daring we'd implement an inheritence reference as well). For example, I'd like to use CCK to have a database of composers and the pieces they've written. Assuming I could work out all the interface and workflow issues that make it rather clunky to catalog the complete works of Mozart and Telemann using these tools, the real knockout criterium that prevents this from working is that there is no way to say that a piece can only be referenced by one composer (1:n). What good would the database be if it were possible to say that both Beethoven and Stravinski wrote the moonlight sonata?
Read moreRemoving content types from content.module
Drupal core has had configurable content types for awhile now. What is the plan for removing those from CCK and having the field system added via nodeapi or formapi? This really should work well on the next release of Drupal and would provide something better to look at and evaluate for moving fields towards core.
Read moreFlexisearch type module for CCK
I am looking for a module that is comperable to flexisearch for CCK. Does anyone know if there is something in the works like this? I'm sure there are many people who would love to see something like this. Any information would be appreciated.
Thanks! =P
Read more






