Wikipedia Blackout

Right now, the U.S. Congress is considering legislation that could fatally damage the free and open Internet. Wikipedia is protesting against SOPA and PIPA by blacking out the English Wikipedia for 24 hours, beginning at midnight January 18, Eastern Time. Learn more.

My Drupal profile birthday (two years)

Realized that it was a week ago I had two years working in web development, this can be seen on my profile at Drupal.org here.

And Drupal has given me a real life.. Thank you so much!

Fix the "Read more" link in Drupal 7

Drupal 7 has limitations that can be fairly funny, the "Read more" link always appears in the "Teaser" although the "Teaser" content is already the entire contents of the article, this problem does not exist in Drupal 6.

To fix this I simply use the template.php and make the function as follows:

function template_preprocess_node(&$variables) {

  $node = $variables['node'];
 
  // Check first the "body field" exists or not.
  $field = field_get_items('node', $node, 'body');

  // If available do execution ..  
  if($field){
    $body = $node->body['und'][0]['safe_value'];
    if ($variables['content']['body'][0]['#markup'] == $body){
      unset($variables['content']['links']['node']['#links']['node-readmore']);
    }
  }

  // And if not available ..
  else{
    // Do nothing ..
  }

}

Note: Replace the word template on template_preprocess_node with the name of your theme.

At least this solution can be used for a while and waiting for the problem is fixed in Drupal 7.

Danland development in 2012

Almost one year I was busy with my office works and my personal business so that the developments of my project at Drupal.org such as the Danland theme is very slow. And lately I deliberately took the time to add new features to Danland, the Color Module support.

With this new feature you can change the color for almost all of the theme parts, such as the body background, block color, text and link color, or any other theme parts.

Note: this feature will only available in Danland 7.x.

My first article in 2012

Yay this is my first post in 2012! and the "Blog Archive" widget on the sidebar will shrink. We all have many expectation for this year so let's make it happen starting today.

This is the first blog that I wrote and had entered its fourth year, I really love this blog.