User login

CCK

Fields, Bundles, and Entities in Drupal 7

Karoly Negyesi (chx) mentioned in IRC "one thing people (like rszrama) is using entities is basically multigroup functionality." "Say, you have something like a line item in an invoice, needs a lot of fields, that becomes an entity. And it's not a node because a node has stuff like promote and sticky which does not apply."

Fields

borrowing from Barry Jaspan, http://www.archive.org/details/DrupalconDC2009-FieldAPIDrupal7

Maintaining referential integrity with Drupal CCK nodereference

Problem: Drupal does not check to make sure a node isn't being used as a nodereference on another node before it is deleted.

Solution: Agaric's own Stefan Freudenberg has created a module to protect from this.

Notes:

Both of these are about the opposite direction:

DrupalConDC Field API at Drupal 7

Field storage is pluggable - take a look at a 4 GB blob about to go in, and send that to some other storage rather than a MySQL database, and let Drupal know you've taken care of it.

Fields - base types.

Bundles: Mostly equals content types, but the same concept (article has these fields, blog has these fields) but it can be applied to other objects.

Field types - a field attached to a particular bundle.

Core:
Allowed values functionality removed and replaced with list.

Not seeing CCK fieldsets when you form_alter your form?

In #drupal channel on IRC, mikey_p reminds that the CCK fieldgroup module has a weight of 9, so your module implementing hook_form_alter has to have a heavier weight (higher number) if you want to see that.

Resolution

Sidebar graphics with links ("promotional badges") the Agaric Drupal way

A note of warning about the length of notes to follow: This is site configuration at the point where it verges on developer documentation, such is the power of Drupal, and there's some outright theming in here too. This article is a reaction to doing sidebar graphics the painfully non-Drupal way.

Use just the body field in the view of a CCK node

This requires theming the view. Views does not know about or provide just the raw body, so you have to theme the view, load the node, and grab the body field.

In your view-....tpl.php:

<?php
 
$fullnode = node_load($node->nid);
print check_markup($fullnode->body, $fullnode->format, FALSE);
?>

THIS HAS SIGNIFICANT PERFORMANCE IMPLICATION FOR MANY NODES WITH MANY FIELDS

Custom nodes module AND CCK: Bdragon serves you cake and lets you have it, too

stompeers___: I have just a few tables: masters (which are the CDs and DVDs), sales orders (which consist of orders from clients) and work orders (each work order is for a single master, and there may be many work orders for a single sales order).
[9:26pm] pnm_ joined the chat room.
[9:26pm] designerbrent left the chat room. (Read error: 110 (Connection timed out))
[9:26pm] purserj joined the chat room.

Theming google map popups to use imagecache with Views and GMap module in Drupal

So you can pass in the imagecache presets namespace directly into your GMap view for use in pop-ups.

I had (apparently) figured this out a while ago but had Dan going through the code print_r'ing views variables to try to figure out where we could intercept the file ID and change the path to imagecache... and the path was already imagecache.

Any imagecache type you create can be chosen for CCK image

Moral of the story, when you're dealing with Views, assume it can be done through the user interface. There is full and amazing Imagecache support of Views.

Syndicate content