SlideShare uma empresa Scribd logo
1 de 103
 
Agenda ,[object Object]
Filosofie en architectuur
Beheer
Huisstijl omzetten
Uitbreidingen
Ontwikkelen
Hosting
Tauros Marketing ICT ,[object Object]
Filosofie
Filosofie ,[object Object]
Architectuur
Taxonomie en classificatie
Zoekmachineoptimalisatie
Meertalige sites
Terminologie nodes modules blokken, menu's en regions gebruikers, rollen, toegangsrechten templates presentation logic data
Node ,[object Object]
Revisies
Voorbeelden ,[object Object]
Discussie-topics in fora
Blog pagina's
Nieuwsartikelen
Eigen typen
Modules ,[object Object]
Soorten ,[object Object]
Optionele core
Contribs
Blokken en menu's ,[object Object]
Kunnen afzonderlijk gestyled worden
Plaatsen in regions ,[object Object],[object Object]
Refereren aan nodes of stukken code
Kunnen afzonderlijk gestyled worden
Plaatsen in regions
Regions ,[object Object]
Bevatten ,[object Object]
Blokken
Menu's
region: koptekst region:inhoud region: laatste_versie region: rechts blok: primaire links blok: zoeken region: subkop blok: secundaire links blok: quicklinks blok: login
Gebruikers ,[object Object]
Rollen root user anoniem web master financieel medewerker designer arie  belle  chris  diana  edo  fanny  ger
Toegang ('RBAC') ,[object Object]
Geef  één persoon desnoods meer rollen ,[object Object]
Designer ,[object Object]
Modules bepalen zelf de toegangsrechten
Templates ,[object Object]
Elk miniem onderdeel kan een template hebben
Templates zijn onderdeel van een theme
Themes bevatten: ,[object Object]
CSS
JavaScript
Architectuur
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
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
URL's ,[object Object]
http://domein.nl/leesbare-naam mod_rewrite bestanden index.php menusysteem path alias modules
Meerdere sites (multisite) mod_rewrite bestanden sites/domeindirectory sites/default sites/all menusysteem path alias modules index.php
Cache en throttle/afknijpen ,[object Object]
Compressie
CSS en JavaScript optimalisatie ,[object Object],[object Object]
Moet in de module ondersteund worden
Standaard inhoudstypen ,[object Object]
Node revision
Gebruiker
Locale source
Bestand
Reactie
Taxonomie term
Etc...
Node ,[object Object]
Workflow/werkschema ,[object Object]
Vertalingen
Eigen meta-tags (keywords, description) ,[object Object]
Afgeleide inhoudstypen ,[object Object]
Verhaal
Boek
Forum en forumonderwerp ,[object Object],[object Object]
Pagina inhoudstype ,[object Object]
Menu
Taal
Berichttekst
Invoerformaat
Revisies
Reactieinstellingen
Auteur
Publicatieopties
Filosofie ,[object Object]
Architectuur
Taxonomie en classificatie
Zoekmachineoptimalisatie
Meertalige sites
Begrippen ,[object Object]
Termen
Synoniemen
Hierarchisch
Vast of vrij
Gelinkt aan inhoudstypen
Voorbeeld woordenschat ,[object Object]
Provincie
Gemeente ,[object Object],[object Object]
Onderzoeksinstelling
Onderwijinstelling
School ,[object Object],Synomien ,[object Object]
Informatie ,[object Object]

Mais conteúdo relacionado

Destaque

Mikelresolutions(1)
Mikelresolutions(1)Mikelresolutions(1)
Mikelresolutions(1)MIKOT
 
參 考 方 Prof. Hai Fong Wu Presentation
參 考 方 Prof. Hai Fong Wu Presentation參 考 方 Prof. Hai Fong Wu Presentation
參 考 方 Prof. Hai Fong Wu PresentationCMAAC
 
Jan von holloben perspective
Jan von holloben perspectiveJan von holloben perspective
Jan von holloben perspectivelettingtonm
 
Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study
Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study
Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study alvarran
 
Glue con2011 future_of_net_systems
Glue con2011 future_of_net_systemsGlue con2011 future_of_net_systems
Glue con2011 future_of_net_systemsJames Urquhart
 
Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...
Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...
Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...Ingria. Technopark St. Petersburg
 
How Do You Have the Conversation?
How Do You Have the Conversation?How Do You Have the Conversation?
How Do You Have the Conversation?Kevin Cook
 
Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010
Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010
Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010Osie Gaines, III
 
Akademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleri
Akademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleriAkademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleri
Akademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleriaokutur
 
Lauren’s lovely long lasting summer
Lauren’s lovely long lasting summerLauren’s lovely long lasting summer
Lauren’s lovely long lasting summerThe Lower School
 
Defining Terms Of The Lymphatic & Immune System
Defining Terms Of The Lymphatic & Immune SystemDefining Terms Of The Lymphatic & Immune System
Defining Terms Of The Lymphatic & Immune Systemguestff1b67
 
Housing first%2c coordinated access%2c and prioritizing presentation at ho...
Housing first%2c coordinated access%2c and prioritizing    presentation at ho...Housing first%2c coordinated access%2c and prioritizing    presentation at ho...
Housing first%2c coordinated access%2c and prioritizing presentation at ho...Geraldine McCafferty
 
Информационный вестник Август 2012
Информационный вестник Август 2012Информационный вестник Август 2012
Информационный вестник Август 2012Ingria. Technopark St. Petersburg
 

Destaque (20)

Mikelresolutions(1)
Mikelresolutions(1)Mikelresolutions(1)
Mikelresolutions(1)
 
Camp Manitou
Camp ManitouCamp Manitou
Camp Manitou
 
參 考 方 Prof. Hai Fong Wu Presentation
參 考 方 Prof. Hai Fong Wu Presentation參 考 方 Prof. Hai Fong Wu Presentation
參 考 方 Prof. Hai Fong Wu Presentation
 
Jan von holloben perspective
Jan von holloben perspectiveJan von holloben perspective
Jan von holloben perspective
 
Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study
Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study
Understanding Direct Mail with Neuroscience:Millward Brown 2009 Case Study
 
Com100 project infocycle
Com100 project infocycleCom100 project infocycle
Com100 project infocycle
 
Glue con2011 future_of_net_systems
Glue con2011 future_of_net_systemsGlue con2011 future_of_net_systems
Glue con2011 future_of_net_systems
 
Reason and logic
Reason and logicReason and logic
Reason and logic
 
Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...
Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...
Подготовка кадров: опыт взаимодействия с системой дошкольного, среднего и выс...
 
yaM /yet another Meeting/ [Web Ready 2010]
yaM /yet another Meeting/ [Web Ready 2010]yaM /yet another Meeting/ [Web Ready 2010]
yaM /yet another Meeting/ [Web Ready 2010]
 
How Do You Have the Conversation?
How Do You Have the Conversation?How Do You Have the Conversation?
How Do You Have the Conversation?
 
Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010
Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010
Cmed Technology Timaeus5 Hot Spot Press Release- Oct18, 2010
 
Akademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleri
Akademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleriAkademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleri
Akademi Klasik Türk Müziği Korosu 2016 Ocak 18 Konseri resimleri
 
Lauren’s lovely long lasting summer
Lauren’s lovely long lasting summerLauren’s lovely long lasting summer
Lauren’s lovely long lasting summer
 
The Norwegian Gem
The Norwegian GemThe Norwegian Gem
The Norwegian Gem
 
Defining Terms Of The Lymphatic & Immune System
Defining Terms Of The Lymphatic & Immune SystemDefining Terms Of The Lymphatic & Immune System
Defining Terms Of The Lymphatic & Immune System
 
Web Ready: Информационное письмо №1
Web Ready: Информационное письмо №1Web Ready: Информационное письмо №1
Web Ready: Информационное письмо №1
 
Housing first%2c coordinated access%2c and prioritizing presentation at ho...
Housing first%2c coordinated access%2c and prioritizing    presentation at ho...Housing first%2c coordinated access%2c and prioritizing    presentation at ho...
Housing first%2c coordinated access%2c and prioritizing presentation at ho...
 
Mining for gold 2.0
Mining for gold 2.0Mining for gold 2.0
Mining for gold 2.0
 
Информационный вестник Август 2012
Информационный вестник Август 2012Информационный вестник Август 2012
Информационный вестник Август 2012
 

Mais de Tauros Marketing

Leervoorkeuren - Social Friday Seats 2 Meet Happiness@Work
Leervoorkeuren - Social Friday Seats 2 Meet Happiness@WorkLeervoorkeuren - Social Friday Seats 2 Meet Happiness@Work
Leervoorkeuren - Social Friday Seats 2 Meet Happiness@WorkTauros Marketing
 
Social media voor bedrijfsmatig gebruik 3 van 3
Social media voor bedrijfsmatig gebruik 3 van 3Social media voor bedrijfsmatig gebruik 3 van 3
Social media voor bedrijfsmatig gebruik 3 van 3Tauros Marketing
 
Social media voor bedrijfsmatig gebruik 2 van 3
Social media voor bedrijfsmatig gebruik 2 van 3Social media voor bedrijfsmatig gebruik 2 van 3
Social media voor bedrijfsmatig gebruik 2 van 3Tauros Marketing
 
Social media voor bedrijfsmatig gebruik 1 van 3
Social media voor bedrijfsmatig gebruik 1 van 3Social media voor bedrijfsmatig gebruik 1 van 3
Social media voor bedrijfsmatig gebruik 1 van 3Tauros Marketing
 

Mais de Tauros Marketing (6)

Leervoorkeuren - Social Friday Seats 2 Meet Happiness@Work
Leervoorkeuren - Social Friday Seats 2 Meet Happiness@WorkLeervoorkeuren - Social Friday Seats 2 Meet Happiness@Work
Leervoorkeuren - Social Friday Seats 2 Meet Happiness@Work
 
Volwassenheid
Volwassenheid Volwassenheid
Volwassenheid
 
Social media voor bedrijfsmatig gebruik 3 van 3
Social media voor bedrijfsmatig gebruik 3 van 3Social media voor bedrijfsmatig gebruik 3 van 3
Social media voor bedrijfsmatig gebruik 3 van 3
 
Social media voor bedrijfsmatig gebruik 2 van 3
Social media voor bedrijfsmatig gebruik 2 van 3Social media voor bedrijfsmatig gebruik 2 van 3
Social media voor bedrijfsmatig gebruik 2 van 3
 
Social media voor bedrijfsmatig gebruik 1 van 3
Social media voor bedrijfsmatig gebruik 1 van 3Social media voor bedrijfsmatig gebruik 1 van 3
Social media voor bedrijfsmatig gebruik 1 van 3
 
Beleveniseconomie
BeleveniseconomieBeleveniseconomie
Beleveniseconomie
 

Drupal Training - Introductie

  • 1.  
  • 2.
  • 9.
  • 11.
  • 16. Terminologie nodes modules blokken, menu's en regions gebruikers, rollen, toegangsrechten templates presentation logic data
  • 17.
  • 19.
  • 24.
  • 25.
  • 28.
  • 30.
  • 31. Refereren aan nodes of stukken code
  • 34.
  • 35.
  • 38. region: koptekst region:inhoud region: laatste_versie region: rechts blok: primaire links blok: zoeken region: subkop blok: secundaire links blok: quicklinks blok: login
  • 39.
  • 40. Rollen root user anoniem web master financieel medewerker designer arie belle chris diana edo fanny ger
  • 41.
  • 42.
  • 43.
  • 44. Modules bepalen zelf de toegangsrechten
  • 45.
  • 46. Elk miniem onderdeel kan een template hebben
  • 47. Templates zijn onderdeel van een theme
  • 48.
  • 49. CSS
  • 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
  • 54.
  • 55. http://domein.nl/leesbare-naam mod_rewrite bestanden index.php menusysteem path alias modules
  • 56. Meerdere sites (multisite) mod_rewrite bestanden sites/domeindirectory sites/default sites/all menusysteem path alias modules index.php
  • 57.
  • 59.
  • 60. Moet in de module ondersteund worden
  • 61.
  • 69.
  • 70.
  • 72.
  • 73.
  • 75. Boek
  • 76.
  • 77.
  • 78. Menu
  • 79. Taal
  • 86.
  • 91.
  • 97.
  • 99.
  • 102.
  • 103.
  • 108.
  • 109. Beleid
  • 113.
  • 114.
  • 119.
  • 120.
  • 121.
  • 126.
  • 128.
  • 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
  • 133. Beheer
  • 134.
  • 138.
  • 143. Rapportage + Google Analytics
  • 144.
  • 145.
  • 148.
  • 149.
  • 151.
  • 152.
  • 153. Testen
  • 155.
  • 156. Symlink naar de juiste versie
  • 158.
  • 161.
  • 162.
  • 164.
  • 165.
  • 166.
  • 167.
  • 174. fluid.info name = Tauros v4 fluid description = Tauros Marketing ICT version 4 core = 6.x engine = phptemplate stylesheets[all][] = layout.css stylesheets[all][] = markup.css stylesheets[all][] = block.css regions[left] = Left sidebar $left regions[before_content] = Before content $before_content regions[content] = Content $content regions[header] = Header $header regions[footer] = Footer $footer regions[bodyend] = End of body $bodyend version = &quot;6.x-1.0&quot; $head $head_title $styles $scripts $logo page.tpl.php
  • 175. page.tpl.php <head> ... <head> <title><?=$head_title ?></title> <?php print $head ?> <?php print $styles ?> <?php print $scripts ?> <!--[if IE 6]> <link rel=&quot;stylesheet&quot; href=&quot;/sites/www.tauros.eu/themes/fluid/ie.css&quot; type=&quot;text/css&quot;/> <![endif]--> </head> ...
  • 176. page.tpl.php <body> <div class=&quot;main-content&quot;> <?php if ($breadcrumb && !$is_front){ ?> <?=$breadcrumb ?> <?php } ?> <?php if ($messages != &quot;&quot;){ ?> <div id=&quot;message&quot;><?php print $messages ?></div> <?php } ?> <?php if ($help != &quot;&quot;){ ?> <p id=&quot;help&quot;><?php print $help ?></p> <?php } ?> <?php if ($tabs != &quot;&quot;){ ?> <?php print $tabs ?> <?php } ?> <?php if ($title != &quot;&quot;){ ?> <h1 id=&quot;title&quot;><?php print $title ?></h1> <?php } ?> <?php print $before_content ?> <?php print $content ?> </div>
  • 177. block.tpl.php <div class=&quot;block block-<? print $block->module?>&quot; id=&quot;block- <?php print $block->module . &quot;-&quot; . $block->delta ?>&quot;> <div class=&quot;block-tl&quot;></div> <div class=&quot;block-tr&quot;></div> <?php if ( $block->subject ){ ?> <h2><?=$block->subject?></h2> <?php } ?> <div class=&quot;block-left&quot;> <div class=&quot;block-right&quot;> <div class=&quot;block-content&quot;> <?=$block->content?> </div> </div> </div> <div class=&quot;block-bl&quot;></div> <div class=&quot;block-br&quot;></div> </div>
  • 178.
  • 179.
  • 180.
  • 185. Voorbeeld: block-locale.tpl.php <div class=&quot;block block-<? print $block->module?>&quot; id=&quot;block-<?php print $block->module . &quot;-&quot; . $block->delta ?>&quot;> <div class=&quot;block-tl&quot;></div> <div class=&quot;block-tr&quot;></div> <?php if ( $block->subject ){ ?> <h2><?=$block->subject?></h2> <?php } ?> <div class=&quot;block-left&quot;> <div class=&quot;block-right&quot;> <div class=&quot;block-content&quot;> <p>Kies een taal</p> <?=$block->content?> </div> </div> </div> <div class=&quot;block-bl&quot;></div> <div class=&quot;block-br&quot;></div> </div>
  • 186.
  • 187. Zie ook api.drupal.org (via Devel)
  • 188. Hooks
  • 189. Voorbeeld hooks voor een block in fluid theme, geo module 1. fluid_preprocess_block( &$variables ) 2. fluid_preprocess( &$variables ) 3. phptemplate_preprocess_block( &$variables ) 4. phptemplate_preprocess( &$variables ) 5. geo_preprocess_block( &$variables ) 6. geo_preprocess_block( &$variables ) 7. template_preprocess( &$variables ) 8. template_preprocess( &$variables ) &$variables -> http://drupal.org/node/226776
  • 191. Voorbeeld: template.php <?php // Add off-page icon to external links function fluid_menu_item_link ( &$link ) { if (empty($link['localized_options'])) { $link['localized_options'] = array(); } if ( strpos( $link['href'], 'http' ) === 0 ) { return l($link['title'], $link['href'], $link['localized_options']). '&nbsp;<img src=&quot;/sites/www.tauros.eu/themes/fluid/img/link.png&quot;/>'; } else { return l($link['title'], $link['href'], $link['localized_options']); } }
  • 192.
  • 193.
  • 197.
  • 198.
  • 199.
  • 200.
  • 201. Bekijk usage statistics
  • 202. Recente activiteit in pending patches
  • 203.
  • 204. Uitpakken in juiste .../modules directory
  • 205.
  • 206.
  • 211.
  • 212.
  • 213.
  • 216. Search
  • 218. Devel
  • 219.
  • 223. SELECT zooi FROM hopen ORDER BY dinges GROUP BY koppie LIMIT niet-te-veel
  • 224. Nu opmaken voor uitvoer
  • 225.
  • 234. type uitvoer uitvoerdetails gerelateerde tabellen url params velden sorteren filteren SELECT WHERE ORDER BY JOIN FROM LIMIT
  • 235.
  • 236.
  • 237. Pagina
  • 238. Feed
  • 239.
  • 240. Let op: schakelt soms om naar default
  • 241.  
  • 242.
  • 243.
  • 244.  
  • 246.
  • 247.
  • 248.
  • 249.
  • 250.
  • 251.
  • 254.
  • 256. Jouw hook functie: unity_check_tool_cron()
  • 257.
  • 259.
  • 260. db_xxxx() functies (db_query, db_query_range)
  • 261.
  • 263. Handige functies t( 'Er zijn %u gebruikers ingelogd', array( '%u' => $cnt ) ) l( 'contact opnemen', 'contact' ) drupal_get_path( 'module', 'unity_check_tool' ) variable_set(), variable_get(), variable_del() $r = db_query( “SELECT name FROM {users} WHERE id=%d”, $uid ) Vergelijk sprintf() $o = db_fetch_object( $r )
  • 264. Menustructuur MENU_NORMAL_ITEM MENU_SUGGESTED_ITEM MENU_LOCAL_TASK MENU_DEFAULT_LOCAL_TASK MENU_CALLBACK
  • 265.
  • 266.
  • 267.
  • 268.
  • 271.  
  • 272. unity_check_tool.info name = UCT core description = Perform unity checks on finite element analysis data core = 6.x package = Unity Check Tool
  • 273.
  • 280. Wijzig bestaande formulieren function moed_register _form_alter( &$form, $form_state, $form_id) { switch ( $form_id ) // Zie <form ..><input type=”hidden” name=”form_id”.../> { case 'user_register': case 'user_profile_form': $form['1. Ondernemingsgegevens']['profile_kvknr']['#element_validate'] = array('_moed_register_profile_kvknr_validate'); $form['2. Contactgegevens']['profile_plaats']['#element_validate'] = array('_moed_register_profile_plaats_validate'); $form['2. Contactgegevens']['profile_latitude']['#element_validate'] = array('_moed_register_profile_geocode_validate'); $form['2. Contactgegevens']['profile_longitude']['#element_validate'] = array('_moed_register_profile_geocode_validate'); $form['3. Website']['profile_website']['#element_validate'] = array('_moed_register_profile_website_validate'); $form['#submit'][] = '_moed_register_user_register_submit'; break; case 'cooperatie_node_form': $form['field_plaats']['#element_validate'] = array('_moed_register_cooperatie_plaats_validate'); $form['field_latitude']['#element_validate'] = array('_moed_register_cooperatie_geocode_validate'); $form['field_longitude']['#element_validate'] = array('_moed_register_cooperatie_geocode_validate'); break; default: break; } }
  • 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 ); }
  • 284. Block uitvoer function geolocate _block( $op = 'list', $delta = 0, $edit = array() ) { switch ( $op ) { default: case 'list': // Define the block $block = array( 0 => array( 'info' => geolocate_string(35), 'weight' => 0, 'status' => 1, 'region' => 'content' ) ); break; case 'save': case 'configure': // Nothing to save or configure break; case 'view': $result = db_query( “SELECT * FROM {users}” ); $output = '<div class=&quot;view-content&quot;><div class=&quot;item-list&quot;><ul>'; while ( $data = db_fetch_array( $result ) ) { $output .= geolocate_show_company_details( $data, $role_id, $distance ); } $output .= '</ul></div></div>'; $block = array( 'subject' => t('Aangesloten leden'), 'content' => $output ); break; } return $block; }
  • 285. Toegangsrechten /** * hook_perm * * Declare permissions for UCT * * @return string[] Main permissions for the roles */ function unity_check_tool _perm() { return array( 'use unity check tool', 'import profbib for unity check tool', 'administer unity check tool' ); }
  • 286. Admin settings formulier registratie function unity_check_tool _menu() { return array( // Administartor entry point 'admin/settings/unity_check_tool' => array( 'title' => 'Unity Check Tool', 'page callback' => 'drupal_get_form', 'page arguments' => array( 'unity_check_tool_admin_form' ), 'access arguments' => array( 'administer unity check tool' ), 'description' => 'Administer Unity Check Tool settings and data.', 'file' => 'unity_check_tool_admin.inc.php' ), 'admin/settings/unity_check_tool/admin' => array( 'title' => 'Settings', 'page callback' => 'drupal_get_form', 'page arguments' => array( 'unity_check_tool_admin_form' ), 'access arguments' => array( 'administer unity check tool' ), 'description' => 'Administer Unity Check Tool settings and data.', 'type' => MENU_DEFAULT_LOCAL_TASK, 'file' => 'unity_check_tool_admin.inc.php', 'weight' => -2 ), // Profbib admin entry point 'admin/settings/unity_check_tool/profbib' => array( 'title' => 'Profbib', 'page callback' => 'drupal_get_form', 'page arguments' => array( 'unity_check_tool_profbib_form' ), 'access arguments' => array( 'import profbib for unity check tool' ), 'description' => 'Import new or updated profbib element information into Unity Check Tool.', 'type' => MENU_LOCAL_TASK, 'file' => 'unity_check_tool_profbib.inc.php', 'weight' => -1 ) ); }
  • 287. Admin settings formulier definitie function unity_check_tool _admin_form() { $form = array( 'unity_check_tool_job_lifetime' => array( '#type' => 'textfield', '#title' => 'Job lifetime [days]', '#default_value' => variable_get('unity_check_tool_job_lifetime', 30 ), '#size' => 4, '#maxlength' => 4, '#description' => 'The number of days to keep older jobs in the database', '#required' => true ), 'unity_check_tool_tensile_strength' => array( '#type' => 'textfield', '#title' => 'Default Youngapos;s modulus [N/mm^2]', '#default_value' => variable_get('unity_check_tool_tensile_strength', 210000 ), '#size' => 20, '#maxlength' => 20, '#description' => 'This is the tensile strength to use on all elements where none is defined', '#required' => true ), 'unity_check_tool_epsilon' => array( '#type' => 'textfield', '#title' => 'Default decision margin', '#default_value' => variable_get('unity_check_tool_epsilon', 0.05 ), '#size' => 20, '#maxlength' => 20, '#description' => 'If a unity check falls within this margin, itapos;s considered a pass. I.e. 0.05 means 0.95&lt;=result&lt;=1.05 =&gt; pass', '#required' => true ) ); return system_settings_form( $form ); } function unity_check_tool_admin_form_validate( $form, &$form_state ) ...
  • 288.
  • 289. Eigen tabellen? Dan zeker een .install bestand
  • 290.
  • 291.
  • 292. .install bestand (1) /** * hook_install * * Install tables * * @return void */ function unity_check_tool _install() { drupal_install_schema( ' unity_check_tool ' ); } /** * hook_uninstall * * Uninstall tables * * @return void */ function unity_check_tool _uninstall() { drupal_uninstall_schema( ' unity_check_tool ' ); }
  • 293. .install bestand (2) /** * hook_schema * * Create database tables * * @return array Database tables */ function unity_check_tool _schema() { return array( // Input classes table 'unity_check_tool_input_filters' => array( 'description' => t('UCT input filter classes to read calculation results data'), 'fields' => array( 'classname' => array( 'description' => t('Class name for input filter objects'), 'type' => 'varchar', 'length' => 255, 'not null' => true, 'default' => '' ), … ); }
  • 295.
  • 296. 3 MB file space voor Drupal code
  • 297.
  • 299. Extra modules = extra tabellen
  • 301.
  • 302.
  • 304. Q A