Blog

Posted by: 
Dominique De Cooman

Sometimes there is a need to make drupal redirect using drupal_goto. We had to do it in an SSO scenario. We had to make drupal goto a configurable admin page (node page) when no roles where assigned to you by the external authentication (shibboleth). So we would put a check in hook_init() to redirect drupal when our criteria where met.

Posted by: 
Dominique De Cooman

I've ran into this one quit a few times. We have live production environment, a staging environment, an integration environment and a local development environment. This classic software development chain goes upstream from production to dev and downstream from dev to production.

Upstream

Posted by: 
Dominique De Cooman

Since I m currently based in France Bordeaux for a six month mission and the entreprise I m working for (MBS Orange/France Télécom) is a french speaking one it was time to learn some french vocabulary. The french in particular have their own word for practicaly each word in the computer/drupa/web/... vocab.

Posted by: 
Dominique De Cooman

We ll do this with an example as usual.

We have a table with book entries forming a top 100 which gets and update every week. Each entry has a current position, a last week position, a corresponding node id and a week.
We ll create a file in called book_top100.views.inc, in that file we ll implement hook_views_data() and a hook_views_handlers().

Posted by: 
Dominique De Cooman

Our example: we try to set the default value for a filter on a certain week.

I tried to set the default value of your exposed filter in:

<?php
$form
['week']['#default_value'];
?>

Didnt work.
In get forms you need to set the $form_state['input']['week']. Also you need to make sure the value isnt submitted yet so check on $_GET['week'] to get the actual value.

Posted by: 
Dominique De Cooman

Here is an example on how to obscure email addresse (or other tekst) using http://drupal.org/project/signwriter in a formatter. You can use it on the cck field overview as a formatter (or in display suite).

<?php
//cck formatters
/**
 * Implementation of hook_field_formatter_info(),.
 */
function your_module_field_formatter_info() {
  return array(
    
'text_as_image' => array(?>

Posted by: 
Dominique De Cooman

By big imports I mean creating millions of nodes and indexing them fo apache solr search. We needed to import 1 million records from file, 3 nodes for each record, one in each of our 3 languages. These nodes also had 3 taxonomy vocabularies, around 30 cck fields and we also needed to join another table containing a spatial coordinates for our geo field.

Posted by: 
Dominique De Cooman

This post presents the drupal multilingual variables list so far:

Only core and core module module multilingual variables are included.

<?php
$conf
['i18n_variables'] = array(   
  
'site_name',
  
'site_footer',
  
'site_slogan',
  
'site_mission',
  
'anonymous',
  
'theme_settings',
  
'theme_garland_settings',
  
'site_frontpage',
  
'menu_primary_links_source',?>

Posted by: 
Dominique De Cooman

How to update translations with drupal? The core only imports translations when you enable the language. It does not support updating languages.

We all know how to import language translations in the first place. We go to http://drupal.org/project/Translations and pick our translation and we copy the files onto our drupal core.

Posted by: 
Dominique De Cooman
It is now possible to configure your taxonomy autocomplete widgets to match anything in search strings or to match them from the beginning. http://dominiquedecooman.com/contribtion/taxonomy-autocomplete-settings.

Pages

Subscribe to Blog