Drupal 6

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',

Post Problem

  1. <?php
  2.  
  3. function xmd5form_form() {
  4.   $form['xmd5'] = array(
  5.     '#type' => 'textfield',
  6.     '#title' => t('Convert text to md5'),
  7.     '#default_value' => $object['xmd5'],
  8.     '#size' => 60,

post problem

  1. <?php
  2.  
  3.         function xmd5form_form() {
  4.         $form['xmd5'] = array(
  5.   '#type' => 'textfield',
  6.   '#title' => t('Convert text to md5'),
  7.   '#default_value' => $object['xmd5'],
  8.   '#size' => 60,

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'

A custom node type for vehicles using taxonomy to manage make / model details

  1. <?php
  2. // $Id: vehicle.module,v 1.26 2008/10/9 13:40:00 michaelphipps Exp $
  3.  
  4. /**
  5.  * @node_vehicle
  6.  * This module defines a custom node type with a custom make / model form element
Syndicate content