Posts

Showing posts from June, 2015

Multilingual in Drupal7

Locale => To translate strings in t(), provides language switcher blocks, import/export strings, edit strings, manage languages Translate => Provides way to translate nodes. for every node a language copy is created. Entity translation: Added in D8 core. Only one node is maintained for all languages. Fields can be translated into different languages. Reference: https://www.lullabot.com/articles/localized-and-multilingual-content-in-drupal-7#/

Find out which modules call cron

echo theme('item_list', module_implements('cron')); (or) in module.inc put this  foreach (module_implements($hook) as $module) {     $function = $module .'_'. $hook;     if ($hook=='cron'){         echo "$module  <br />";      }

Drupal security reference

1. Always use check_plain(), check_markup(), filter_xss() while you process input data. 2. For Drupal set message use placeholders (or) sanitize using one of check_plain(), check_markup & filter_xss() placeholder example: $output = 'coming from somewhere'; drupal_set_message(t('this is @output', array('@output' => $output))); sanitize example: $output = 'coming from somewhere'; drupal_set_message(check_plain(t('this is '. $output));

SimpleTest reference

While running Simpletest, it only creates core tables and the tables created by modules which you enable in setup method.