This is my set of probable drupal interview questions asked by interviewers
Monday, December 19, 2011
Kumaresan Drupal Programmer at Chennai: Get block content in drupal 6 , display block in d...
Kumaresan Drupal Programmer at Chennai: Get block content in drupal 6 , display block in d...: In drupal 6 it was $block = module_invoke ( 'views', 'block', 'view', 'map-block_1' ); print $block [ 'content' ]; arg 1 : module name...
Tuesday, December 6, 2011
Kumaresan Drupal Programmer at Chennai: Get row count in Drupal 6
Kumaresan Drupal Programmer at Chennai: Get row count in Drupal 6: This function has to be written after the execution of query db_affected_rows() function will return the number of rows the query return;
Friday, December 31, 2010
Name some of the global variables in drupal?
$custom_theme;
Change active default themes
$base_path;
Tell the cuurent base path
$base_url;
Tell the site url
$db_type;
Tells active Database type
$theme_path;
Tells the current theme path
$language;
Tells the active language
$user;
List has obj of user details
These are most often used global variable in drupal.
Change active default themes
$base_path;
Tell the cuurent base path
$base_url;
Tell the site url
$db_type;
Tells active Database type
$theme_path;
Tells the current theme path
$language;
Tells the active language
$user;
List has obj of user details
These are most often used global variable in drupal.
Tuesday, December 14, 2010
How to alter an form?
hook_form_alter(&$form, &$form_state, $form_id)
put an if condition for form id & based on that write the code.
hook_form_FORM_ID_alter(&$form, &$form_state)
put an if condition for form id & based on that write the code.
hook_form_FORM_ID_alter(&$form, &$form_state)
How to do operation on form submit,delete,update?
In any custom module file you have write an hook_nodeapi to do this "hook" is your module name
function hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'presave':
break;
case 'insert':
case 'update':
case 'view':
case 'delete':
}
}
function hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'presave':
break;
case 'insert':
case 'update':
case 'view':
case 'delete':
}
}
What is the default storage engine for database in drupal 6 & 7?
In drupal 6 default storage engine is MyISAM
In drupal 7 default storage engine is INNODB
In drupal 7 default storage engine is INNODB
Subscribe to:
Posts (Atom)