drupal

Fix for Multipage User Registration

  1. <?php
  2. /**
  3. * Implementation of hook_menu()
  4. */
  5. function multipage_register_menu(){
  6.         $items['add/user'] = array(
  7.                 'title' => 'Add a user',
  8.                 'page callback' => 'multipage_register_wizard',
  9.                 'ac

Multipage User Registration

  1. <?php
  2. /**
  3. *       The purpose of this module is to take the user-registration form and make it
  4. *       multipage, where the pages change depending on the options selected during
  5. *       the last step.

Fix for Fix for 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 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 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 Fix for QueryPath for removing an XML item

  1. function mymodule_update_languages_xml($form, &$form_state) {
  2.     /*
  3.     ...
  4.     */
  5.     $qp = qp($file);
  6.     if ($form_state['values']['op'] == 'Delete') {
  7.       // Find only items that have id=

Fix for QueryPath for removing an XML item

  1. function mymodule_update_languages_xml($form, &$form_state) {
  2.     /*
  3.     ...
  4.     */
  5.     $qp = qp($file);
  6.     if ($form_state['values']['op'] == 'Delete') {
  7.       $qp->find('languageList')->find(

QueryPath for removing an XML item

  1. function mymodule_add_language_xml($form, &$form_state) {
  2.     /*
  3.     ...
  4.     */
  5.     $qp = qp($file);
  6.     if ($form_state['values']['op'] == 'Delete') {
  7.       $qp->find('languageList')->find('ite

Module for setting a separate permission for theme management

  1. <?php
  2. // $Id$
  3.  
  4. /*
  5.  * Created by Greg Harvey on 20 Oct 2009
  6.  *
  7.  * http://www.drupaler.co.uk
  8.  */
  9.  
  10. /**
  11.  * Implementation of hook_perm().
  12.  *
  13.  * Provide a new permission for theme admin acces

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.  
Syndicate content