Drupal 6

Fix for Function to add taxonomy and content_taxonomy to a node object

  1. // Sample usage:
  2. $node = new StdClass();
  3. $node->type= "story";
  4. $node->title = "Hello world";
  5. $tags = array('red', 'white', 'blue');
  6. my_nodeobject_add_content_taxonomy(&$node, 1, $tags,  'create',

Function to add taxonomy and content_taxonomy to a node object

  1. /**
  2.  * Modifies a node object adding taxonomy terms and, optionally, modifying a
  3.  * content_taxonomy type field.
  4.  *
  5.  * @param <type> $node
  6.  *   A node object.
  7.  * @param <type> $vid
  8.  *   The voc

Get an unaliased views row object for views for views_view_field preprocess functions

  1. /**
  2.  * Returns a view row object in which the property names are unaliased.
  3.  *
  4.  * This facilitates accessing properties from theme hooks when the
  5.  * field_alias is arbitrary unknown, or just non-t

Fix for Example of pager_query

  1. $result = pager_query(
  2.       db_rewrite_sql(
  3.         "SELECT n.nid, n.title, n.changed, n.status
  4.         FROM {node} n
  5.           WHERE n.uid = %d
  6.         AND n.type = '%s'
  7.         ORDER BY n

Fix for Example of using 'title callback' and 'title arguments' in Drupal 6

  1. /**
  2.  * Implementation of hook_menu().
  3.  */
  4. function cck_gallery_menu() {
  5.   $items['cck-galleries/%user'] = array(
  6.     //define the function that generates the page title
  7.     'title callback' => '

Fixed AHAH Wysiwyg integration

  1. // $Id$
  2.  
  3. /*
  4.  This version works when the #ahah element is a button.
  5.  Drupal passes the button name and value to .ajaxSubmit
  6.  but when we re-serialize the form that data is lost so we
  7.  need to ad

Fix for AJAX/AHAH event handlers for Wysiwyg integration in D6

  1. // $Id$
  2.  
  3. /*
  4.   drupal_add_js(this_file) on the form for which this is needed.
  5.   Customize the CHANGE ME parts to deal with the relevant fields.
  6. */
  7.  
  8. /*
  9.  * Attach AJAX/AHAH event handlers for Wys

AJAX/AHAH event handlers for Wysiwyg integration in D6

  1. // $Id$
  2.  
  3. /*
  4.   drupal_add_js(this_file) on the form for which this is needed.
  5.   Customize the CHANGE ME parts to deal with the relevant fields.
  6. */
  7.  
  8. /*
  9.  * Attach AJAX/AHAH event handlers for Wys

Example of using 'title callback' and 'title arguments' in Drupal 6

  1. /**
  2.  * Implementation of hook_menu().
  3.  */
  4. function cck_gallery_menu() {
  5.   $items['cck-galleries/%user'] = array(
  6.     //define the function that generates the page title

Loading views in hook_menu()

  1. /**
  2.  * Implementation of hook_menu().
  3.  */
  4. function cck_gallery_menu() {
  5.   $items['cck-gallery'] = array(
  6.     'title' => 'My galleries',
Syndicate content