Blog

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.
Posted by: 
Dominique De Cooman

The rules module is a very powerful module that allows you to make things react in your site when certain events happen (like a comment has been made) under certain conditions (for example when the user has role x).

A lot of events, conditions and actions are allready out of the box or provided by some contrib modules who have rules integration.

Posted by: 
Dominique De Cooman

How to submit some hidden values along with a drupal webform? Our example. We have job node (nid 1) and we want to go to a webform to apply for the job. So we build a link on our node pointing to the webform node (nid 2).
In the node template type quickly a url: node , nid webform, nid job node

<?php
print l('Apply for this job''node/2/1');
?>

Pages

Subscribe to Blog