6.x

Ignition proof-of-concept

  1. /*
  2.  * TODO:
  3.  *
  4.  * Review this section - this is a proof-of-concept JSON managed config
  5.  * exporter.

LT initial functionality test

  1. <?php
  2. // $Id$
  3.  
  4. class LoginTobogganMiscTest extends DrupalWebTestCase {
  5.   /**
  6.    * Implementation of getInfo().
  7.    */
  8.   public static function getInfo() {
  9.     return array(
  10.       'name' => t('

Broken Panels hook

  1. function ignition_default_page_manager_pages() {
  2.   $pages = array();
  3.   dpm('here');
  4.   watchdog('debug', t('In page manager hook'));
  5.   // Check the include directory.
  6.   $path = drupal_get_path('mo

Ctools hook

  1. /**
  2.  * Implementation of hook_ctools_plugin_api().
  3.  *
  4.  * If you do this, CTools will pick up default panels pages in
  5.  * <modulename>.pages_default.inc
  6.  */
  7. function ignition_ctools_plugin_api($mo

Batch API on installation

  1. // IN THE .install FILE:
  2.  
  3. /**
  4.  * Implementation of hook_install().
  5.  */
  6. function node_to_word_stats_install() {
  7.   // Create tables.
  8.   drupal_install_schema('node_to_word_stats');
  9.   // Populate

Fix for Allow HTML in node titles for Drupal 6.x

  1. <?php
  2. /*
  3.  * Created 20 Apr 2009 12:07:47 by Greg Harvey
  4.  * http://www.drupaler.co.uk
  5.  */
  6. function html_titles_preprocess_page(&$vars) {
  7.   if (arg(0) == 'node' && is_numeric(arg(1))) {
  8.     $node

Fix for XML RPC example for Drupal 6.x Services

  1. <?php
  2.  
  3. /**
  4.  * Function for generating a random string, used for
  5.  * generating a token for the XML-RPC session
  6.  */
  7. function getUniqueCode($length = "") {
  8.   $code = md5(uniqid(rand(), true));
  9.  

Node To Word Stats module, dev snapshot

  1. <?php
  2. // $Id$
  3.  
  4. /*
  5.  * Created by Greg Harvey on 26 Jul 2010
  6.  *
  7.  * http://www.drupaler.co.uk
  8.  */
  9.  
  10. /**
  11.  * Helper function for returning node ID for given document
  12.  * download path.
  13.  *
  14.  * @p

Fix for Allow HTML in <i> node titles</i> for Drupal 6.x

  1. <?php
  2. /*
  3.  * Created 20 Apr 2009 12:07:47 by Greg Harvey
  4.  * http://www.drupaler.co.uk
  5.  */
  6. function html_titles_preprocess_page(&$vars) {
  7.   if (arg(0) == 'node' && is_numeric(arg(1))) {
  8.     $node

QuickTabs live example from newteachers.tes.co.uk/qanda

  1. /**
  2.  * Function for building the Q&A page tabbed views.
  3.  */
  4. function nqt_features_build_qanda_quicktabs() {
  5.   $quicktabs = array();
  6.   // General settings.
  7.   $quicktabs['ajax'] = TRUE;
  8.   $quickt
Syndicate content