CCK

How to add Zoopy video to your Drupal site using CCK and the Embedded Media Field module

Submitted by charles on

I recently created a provider plugin for Drupal's CCK emfield module which allows you allows you to embed a Zoopy video by pasting the url into a cck field:

zoopy page url pasted into cck field

This is a lot easier than having to copy the embed code provided by Zoopy and paste this into a textarea.

The provider plugin then extracts the video code and displays the video on your Drupal site:

Drupal CCK email field errors: "doesn't have a default value query"

Submitted by charles on

Ran into this error a couple of times before when adding content to a CCK email field in MySQL 5.0.27: user warning: Field 'field_email_email' doesn't have a default value query: It seems the email field is initially set up to not allow null values. To fix this check out this patch or just update the field in phpMyAdmin: ALTER TABLE `table_name` CHANGE `field_email_email` `field_email_email` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL

How Drupal's CCK already provides a safely formatted cck field for display

Submitted by charles on

Came across an interesting post when investigating some "n/a" text appearing in a CCK node field when not logged in. I was using the code echo content_format('field_description', $field_description[0]); to safely format and output the description field. Not sure exactly why it happens but it turns out that there's no need to actually do it that way as CCK already provides a safe string of that field for outputting to the browser that is already formatted accordingly.