CCK

largeview.module

  1. <?php
  2. // $Id$
  3.  
  4. /**
  5.  * Stole this code from image cache, goal here is to add one more
  6.  * formatter that links to node/nid/large instead of node/nid
  7.  

add 'property' cck node using drupal_execute (d6)

  1. function mymodule_import() {
  2.     // get the old data
  3.     $old_db = mysql_connect("host", "user", "pass") or die('Could not connect to mysql server.' );

Example of avoiding $content and themeing $node sectins directly

  1. <div class="node<?php print ($sticky) ? " sticky" : ""; ?> blog">
  2.   <?php if ($page == 0): ?>
  3.   <h1 class="title"><a href="<?php print $node_url ?>" title="<?php print $title

Function where I think the code should be integrated

  1. /**
  2.  *  Search and Replace routine.  Scans the body of a node and replaces every tag and its parameters with an object.
  3.  */
  4.  
  5. function _flashvideo_replace_tags(&$node, $tag) {

this is the cck type export for a fieldgroup_table that doesn't work...

  1. $content[type]  = array (
  2.   'name' => 'A Test',
  3.   'type' => 'a_test',
  4.   'description' => '',
  5.   'title_label' => 'Title',
  6.   'body_label' => 'Body',
  7.   'min_word_count' => '0',
  8.   'help' => '',

cck_validation code

  1. $exclusive = $node->field_exclusive[0]['value'];
  2. $no_isrc = $node->field_has_no_isrc[0]['value'];
  3. $isrc_code = $node->field_isrc_code[0]['value'];

Drupal Execute progrmatically

  1.  // Insert default user-defined node types into the database.
  2.   // For a complete list of available node type attributes, refer to the node
  3.   // type API documentation at:

custom node template

  1.  <div class="content">
  2.         <?php print content_format('field_buildings_img', $field_buildings_img[0]); ?>
  3.         <?php print check_markup($node->content['body']['#value']) ?>
  4.        

cck variables get printed as null in Drupal 5 view

  1. //in template.php----------------------------
  2.  
  3.  
  4. function phptemplate_views_view_list_promotion_box($view, $nodes, $type) {
  5.   /*
  6.   $fields = _views_get_fields();
  7.  

Inserting a nodereference field into a view.

  1.  // Add the nodereference field if it's not present.
  2.   $nodereference_table = content_views_tablename($nodereference_field);
Syndicate content