Lesson Plan for How to Code a custom CCK field module

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

Bumped. This lesson is on-tap for the coming Sunday! --joshk

So, CCK, is the future and all, but how do we make fields do what we want them to? I mean, its no good to have an input field without validation and formatting options, is it? How does this stuff 'magically' show up in views?

Never fear, its all there, and we can go through it all step by step.

It all started in IRC:

<dmitrig01> hey.  Lesson idea here.  How about a lesson on coding CCK fields?
<samtresler> you mean new CCK modules
<samtresler> Did that one at drupalcampnyc2
<samtresler> Could again if people want it.
<dmitrig01> Please do.

The current lesson plan is:

  • Walkthrough of a CCK field module
  • Build a CCK money field module (for various currencies). Maybe even a form that shows when the user is viewing the node, and let's the user choose a currency. *We can keep this or do another one, its up to you guys*
  • Add Google Video fuctionality to YouTube CCK field to show extensibility.
  • Youtube_cck has been replaced by http://drupal.org/project/video_cck , and google plus some has already been added, however its an excellent example of a walkthough, and we can add a few more videotypes.

Thats a lot for two hours. So if we're keen on all that; plan on sticking around longer, if not lets pare it down some, or split it into 2 lessons.

Ideas, suggestions, comments??

It's happening today!

Pre-lesson Resource List

Please have a localhost, with CCK, Video_cck, Views, and a few other filed modules to play around with; in order to get the most from this lesson.

Comments:

Sounds like a wonderful idea for a lesson! +1
-mpare

Comments

Lesson that builds on this one

dmitrig01's picture

In another lesson, we could make our own form element that has a text field, and then a select box for currency of the input (see the fivestar module for an out-of-core way to do this), and then make the currency module use it.

Think we should do some workshopping

gusaus's picture

There's so many topics for learning when it comes to things like cck and views. I'm thinking that doing some workshopping on top of the formal lessons would have a lot of value. Being that you can import/export any content type or view we create, there's ample room for learning by doing some project oriented workshopping. Possibly we can compile a list of things we're trying/wanting to do with cck/views/other modules, and collaborate on solutions (in conjunction with some other working groups). Weekly live lessons can be augmented with screencasts, howtos, site recipes, podcasts, and any other clever thing we can think of. All our contributions would not only be well documented but openly available to the community.

Here's a partial list of related resources:
* CCK project page
* Complete list of CCK-related modules
* CCK feature requests
* CCK working group
* A post about creating a 'public shared content type repository'
* Views project page
* Views bonus pack
* Views feature requests
* Views Developers working group

Gus Austin
Director of Chaos and Confusion
PepperAlley Productions
What am I trying to do with Drupal?

Gus Austin

In Wiki

Tresler's picture

Gusaus, Would you mind putting that resource list -in Wiki-

We've fallen off the 'Pre-lesson resource gathering, that I outlined http://groups.drupal.org/node/2300. and I'd like to bring it back around this time as there are several HowTo Articles it would help people to read in advance.

I will create a resource section shortly, I' do it myself but I'd have to track down all those URL's and I'm hoping you can just cut and paste.


Tresler Designs

good idea: cck lesson

lapur's picture

I'm all for it