Leer Drupal kennen. Introductietraining voor web masters, beheerders, programmeurs. Deze slides gebruik ik voor een 1-daagse training. Gebaseerd op Drupal 6. Meer info op http://www.tauros.eu
52. Technology stack Server (afhankelijk van web server en PHP) Web server (Apache, IIS) PHP 5.2.x (5.3 vanaf Drupal 6.14) Drupal Core (3..5MB) MySQL 5.0+ of PostgreSQL 7.4+ Drupal modules
53. systeembestanden (php) core modules installatieprofielen command line scripts standaard themes systeembestanden (css,js,png) zelfgekozen modules live site development site site-specifieke bestanden (owner = webserver user) site-specifieke themes
132. Taalkeuze anoniem aangemeld voorbeeld geen prefix prefix + fallback domein Standaardtaal (eerste taal bij installatie) Altijd standaardtaal Voorkeurtaal Anders standaard Taalcode in pad <domein>/contact <domain>/en/contact Taalcode Anders standaardtaal Taalcode Anders standaardtaal Taalcode in pad <domein>/contact <domain>/en/contact Taalcode Anders browser-taal Anders standaardtaal Taalcode Anders voorkeurtaal Anders browser-taal Anders standaardtaal Taaldomain en.domein.nl www.domein.nl Taaldomein Anders standaardtaal Taaldomein Anders standaardtaal methode
281. Registreer menuitems function unity_check_tool _menu() { // hook_menu return array( 'unity_check_tool' => array( // Job import and list pages 'title' => 'Unity Check Tool', 'page callback' => 'drupal_get_form', 'page arguments' => array( 'unity_check_tool_user_form' ), 'access arguments' => array( 'use unity check tool' ), 'description' => 'Use Unity Check Tool to perform unity checks on your finite element analysis output data, using normative methods.', 'file' => 'unity_check_tool_main.inc.php' ), 'unity_check_tool/import' => array( // Main user entry point 'title' => 'Import', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -2 ), 'unity_check_tool/jobs' => array( // Main user entry point to list current jobs 'title' => 'Jobs', 'page callback' => 'unity_check_tool_jobs', 'access arguments' => array( 'use unity check tool' ), 'description' => 'Select an existing job from the list.', 'type' => MENU_LOCAL_TASK, 'file' => 'unity_check_tool_main.inc.php', 'weight' => -1 ) ) }
282. Maak formulier function unity_check_tool _user_form() { return array( 'information' => array( '#type' => 'markup', '#value' => t('<div>Upload a file from your finite element analysis application. After importing your file, a job is created and you will be able to add properties to all elements in the file.</div>') ), 'unity_check_tool_input_file' => array( '#type' => 'file', '#title' => t('Calculation result file'), '#description' => t('This is an output file from your finite element analysis application'), '#size' => 80, ) ); }
283. Validate/submit function unity_check_tool _user_form_validate( $form, &$form_state ) { // Length must be greater than or equal to zero if ( $form_state['values']['unity_check_tool_l'] < 0 ) { form_set_error( 'unity_check_tool_l', t('Initial length must be a value greater than or equal to zero') ); } } function unity_check_tool_user_form_submit( $form, $form_state ) { // Get the file $file = file_save_upload( 'unity_check_tool_input_file' ); // Gather the default values $defaults = array( 'l' => $form_state['values']['unity_check_tool_l'], 'material' => $form_state['values']['unity_check_tool_material'], 'tensile' => $form_state['values']['unity_check_tool_tensile'], 'elementtype' => $form_state['values']['unity_check_tool_elementtype'] ); // Now that the file is in the temporary directory, creae the calculation scheduler and let is process the file $scheduler = new uctScheduler(); $scheduler->processInputFile( $file, $defaults ); }