Ivan Zugec

Drupal Consultant

Drupal 6.x

Using the GeoIP module with Context GeoIP module, it makes it really easy to create a context which has a specific condition to only display a block if your IP location is from a particular country.

Furthermore GeoIP has a powerful API to pull out location information.

In this article I’ll show you how to setup GeoIP and Context GeoIP module.

Version: 

When you get an editor asking how they can manage content on a Drupal site, sometimes you just can't send them to admin/content/node page to manage the site. Maybe you only want certain editors to manage only certain content types. With the Views 2 module it's easy to create custom administration pages.

When I say administration pages all that's really required is a table based views page with exposed filters.

Version: 

On some Drupal sites having the taxonomy links point to the "taxonomy/term/tid" can really break the design of a site. Sometimes you want to redirect the user to a custom views page instead of the standard taxonomy page.

Using the Taxonomy Redirect module it's relatively easy to change the taxonomy URL.

Version: 

If you are looking for a way to hide specific content types from the core Drupal search result then checkout the Search config module. It's a good idea to use this module if you are using the Content profile module so you can hide the profile node from appearing in your search result.

It does offer other functionality, but I'll just show you how to hide a content type from the search result.

Version: 

Views slideshow module is a great module which allows you to create slideshows from a views results. It makes it very easy to create a block that rotates the latest blog posts for example.

Version: 

A project that I’m currently working on requires a classifieds system which is fairly straight forward to setup. I’m using the location module for users to specify a location of the classified. To make the search easy I created a simple views page with exposed filters, but I wanted to have a select field with only Australian states.

Out of the box the location module only gives you an exposed autocomplete field for the state/province.

Version: 

You'll need to create a custom module and use the hook_form_alter() function.

function example_form_alter(&$form, $form_state, $form_id) {
  $form['taxonomy'][2]['#default_value'] = array(0 => $term->tid);
}

Please note that the $form['taxonomy'][2]['#default_value'] is the vocabulary id.

Version: 

First you'll have to make use of hook_form_alter() function.

function example_form_alter(&$form, $form_state, $form_id) {
  $form['field_example_reference']['#pre_render'] = array('example_change_node_reference');
}

Now the node reference will look for a example_change_node_reference() function which will return an array of options.

function example_change_node_reference($element) {
      $element['nid']['nid']['#options'] = array($node->;nid => $node->title);
  return $element;
 
}

Make sure you pass the $element variable into the function. More info: http://drupal.org/node/339730.

Version: 

How to load a theme region within code:

print theme('blocks', 'example_node');
Version: 

Use the following code to load the comment anywhere:

   if (function_exists('comment_render') && $node->comment) {
       print comment_render($node, $node->cid);
       $node->comment = NULL;
    }
Version: 

Pages

Subscribe to RSS - Drupal 6.x