CCK Video

CCK Video used to display filefield as:

  • Video: you can define which file extension will be displayed as Video
  • Image: you can define which file extension will be displayed as Video
  • File: if file extension not meet both Video and Image extension then will displayed as file link

CCK Video supports these players:

  1. JW Player
  2. Flowplayer
  3. SWFObject 1 & 2

Signing up for events with CCK Signup (Drupal 7)

This Drupal 7 tutorial describes how to set up a calendar of upcoming events with the option of signing up for events.

Selective linking of list entries to nodes with Views 3, CCK (Content) and Token

A common way to use Views is building lists of entities of a certain type (products, projects, blog articles etc.), where each entity is stored in a node and represented by its title. By means of the default Views handler "Link this field to its node", the node titles can be linked easily to their corresponding nodes. But unfortunately the said handler cannot be applied in a selective way - once it is chosen, all titles will be linked without exception. What if you want a complete list of entities with only a restricted scope of links?

Consider the following use case. Suppose you employ Views to build a summary of all your projects. They are filtered by node type and represented by node title as the only field in use. Now you want some, but not all entries to be linked to their nodes - just because some projects are important enough to be showcased, others not. In our scenario, all node titles have to be rendered as "plain text" initially, and in a second step only certain selected titles are to be wrapped in a link.

Peekaboo; Ajax field formatter

The Peekaboo module is designed to allow a field's full formatted value to not be calculated and output during a page load of the node, but to be pulled in through a separate request.

Bulk Enable Revisions for all Node Types

This is a utility function which cleans up the variable table, removing entries for node types which no longer exist, and then goes on to set all node types to have revisioning enabled. This code also has a line which disables the default of new nodes to be not Promoted to Front Page , although it is currently commented out. It displays information about what it has done. The first line, a comment, can be used in phpMyAdmin to show what the current settings are for each content type. It is my hope that someday this code might be used as a start for building a full blown module that shows and allows easy editing, and bulk modifications of all settings for all CCK/node types on a site.


function bulk_enable_cck_revisions() {

// select * from variable WHERE name LIKE 'node_options%' # sql to show status of all cck types, use this in phpMyAdmin or similar tool

// first, clean up any old data in the variable table that's not needed any longer.
$result = db_query("select name from variable WHERE name LIKE 'node_options%'"); # quick sql to show status of all cck types
while($name = db_result($result)){
$type = substr($name,13);
$count = db_result(db_query("SELECT COUNT(*) FROM node_type WHERE type = '%s'", $type));
if($count == 0){
drupal_set_message("$type no longer exists. Deleting node_option_$type from variable table");

Drop down to link to CCK custom field using Views.

These are instructions on how to create a drop down which links to already created custom CCK fields.
In our example we have two content types 'Association' which describes an organization with many other fields like their address, etc. And 'Data' which describes information gathered about many Associations. The drop down we need will be in 'Data' type. It will be used to select an association name which is pulled from a number of already created entries of 'Association' type.

1. You need to have Option Widgets module enabled in your CCK. Administrer->Site Building->Modules->Option Widgets under CCK

2. In your Content Type (the one where you are going to have the drop down - e.g. 'Association' content type) just add new field (e.g. field_association_name) and select text, then select-list field. Administer->Content Management->Content Type->Manage Fields

3. Create a Node View which lists whatever you want in the drop down (e.g. field_association_name content) from the content type you want to list ('Association' content type). To do this in Views select Fields and add (+ plus sign) Content: Name (field_association_name) Text - Appears in: Association.
In Filters select Node Type ('Association'). This should list all instances of 'Association' type.

Pages

Subscribe with RSS Subscribe to RSS - CCK