Web design, programming, graphics, and pretty much anything else I care about.


Configure CCK fields on module installation

You can have a module installation automatically add and configure CCK field. First, setup the CCK fields on a development site exactly as you want them. Then, export the fields from /admin/content/types/export.

You will end up with the code for a php array that looks something like ...

Retrieving custom field formats in Drupal template files

This is part of CCK:

('field_cckfieldname', $node->field_cckfieldname[0], 'machine_name_of_custom_format')

You send it the name of the field you are referencing, the data, and the name of the format you want. If you don't include the format, it uses the default for that field. It returns fully-formatted HTML. Example,

<span class="date-display-single">Friday, October 16, 2009, at 8:00 pm</span>