Blog

Posted by: 
Dominique De Cooman

This post will summarize the experience of introducing drupal into an enterprise. How we achieved a level of quality in drupal development needed for an enterprise application.

It will cover:

  • Setup : The drupal 6 site and the integration with the other apps in the enterprise.
  • Level of quality
Posted by: 
Dominique De Cooman

After some long reading in several issues on drupal.org. Here is the solution:

Install http://drupal.org/project/jquery_update (install the 6.x-2.0-alpha1)
Patch it with this patch http://drupal.org/node/685060#comment-3560788

Now you need a core patch otherwise some the views ajax and some other jquery will stop working. The core patch is here:

Posted by: 
Dominique De Cooman

As discussed in previous blog post, drush cron can be run from crontab too. While seeming pretty straightforward, trying it out caused some troubles.

The thing you would do to make drush run from crontab is:

$ crontab -e
* * * * * drush -r /path/to/drupal

Also tried to give full path to drush install

$ crontab -e

Posted by: 
Dominique De Cooman

Running cron from cli in drupal will result in.

PHP Warning:  include_once(): Failed opening './includes/bootstrap.inc'

Running cron from cli is useful when your behind external authentication and crontab is not available over http. Because normaly you would put something like:

0 * * * * wget --spider <a href="http://yoursite/cron.php
">http://yoursite/cron.php [/geshifilter-codes]

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(?>

Pages

Subscribe to Blog