Here are my notes on how to setup Apache Solr for a Drupal site on Linode hosting.
Continue reading “Apache Solr on Ubuntu 10.04 running on Jetty”
Drupal Consultant
Here are my notes on how to setup Apache Solr for a Drupal site on Linode hosting.
Continue reading “Apache Solr on Ubuntu 10.04 running on Jetty”
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. To install this module just go to the Search config project page and download the module. Unzip the module into sites/all/modules directory. Then login with your administration account and enable the module.
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.
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.
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.
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.
The Search Lucene API module is an alternative search module which can be used on your Drupal site. It’s powered by a stripped down version of the Zend Lucene Search which is a PHP port of Apache Lucene. Because it’s all PHP do don’t have to worry about running the search on a separate server or setup other applications to run the search. To install Search Lucene API go tohttp://drupal.org/project/luceneapi and download the module. Unzip the module into “sites/all/modules”.
The module also requires a stripped down version of the Zend Lucene Search which you’ll have to download separately.
Continue reading “Add alternative search with the Lucene API module”
The diff module let’s you view the difference between node revisions. It adds a tab on every node page where you can see a list of revisions which you can control via permissions.
Before we get started go to http://drupal.org/project/diff and download the module and place it in sites/all/modules.
The demonstration site module is a great tool if you want to create a publicDrupal demo site. You can set it up to import a fresh database each hour. Let me explain how I use it.
To get started just go to http://drupal.org/project/demo and download the module, then place it in sites/all/modules.
How to load a theme region within code:
print theme('blocks', 'example_node');