reli
11/27/2013 - 10:08 AM

general, hide view tab in node, hide translation tab, access callback , node date created changed, admin path, temp directory, tmp dir timeo

general, hide view tab in node, hide translation tab, access callback , node date created changed, admin path, temp directory, tmp dir timeout

hide drupal messages.


default_socket_timeout = 120
in your php.ini file.
string ini_set ( string $varname , string $newvalue )


file_directory_temp() 


 path_is_admin(current_path())
 
 $types = node_type_get_types();
 
 
 if( drupal_is_front_page()) {
		unset($page['content']['system_main']['default_message']);
 	}
 
 
 
 t('Description', array(), array('langcode' => $lang->language))
 
 
 
 hide view tab in node
 function MYMODULE_menu_alter(&$items) { 
  $items['node/%node/view']['access callback'] = 'MYMODULE_disable_node_view';
  $items['node/%node/view']['access arguments'] = array(1); 
} 

function MYMODULE_disable_node_view($node){
        return false;
}


hide translation tab (?)
function CUSTOM_MODULE_NAME_form_alter(&$form, &form_state) {
  if (isset($form_state['entity_translation']['is_translation']) && !$form_state['entity_translation']['is_translation']) {
    $form['translation']['#access'] = FALSE;
  }
}


// This is the correct form
'access callback' => 'user_is_logged_in',



// node date created changed
dpm(format_date($node->created, "Y-m-d H:i:s"));
dpm(format_date($node->changed, "Y-m-d H:i:s"));