Main menu

drupal code

How to Submit a Drupal Patch with Git (or "How I learned to get out of the shadows")

Published by shrimphead on Tue, 10/04/2011 - 11:27 in

Its sad to say but I've been a member of Drupal.Org for nearly 3 years and only yesterday did I submit my first patch. And it was easy. Here's a step by step list to take the mystery out of it and help you start sooner.

Drupal 6 Links & Includes

Published by shrimphead on Mon, 10/03/2011 - 15:40 in

Creating Links and File Includes with Drupal is not too difficult, so long as you can remember the basics. So I wrote them down to remember them.

Creating a link with HTML attributes.

<?php
$attributes
= array(
 
'attributes' => array(
   
'class' => 'css-clss',
   
'rel' => 'lightbox',
   
'title' => 'My Title',
   
'id' => 'unique-id',
  ),
);
$link = l($title, $link, $attributes);
?>

Using Taxonomy Image with Term Queue

Published by shrimphead on Fri, 04/01/2011 - 11:07 in

This code is specific to Drupal 6 and should be placed in the ##template.php## of your theme.

<?php
function hook_preprocess_page(&$vars, $hook) {
 
$vars['term_queue_list'] = hook_term_queue('Name of queue', $taxonomy_list);
}
?>