Drupal 6: Aufbau/API/Best practices

1,055 views
942 views

Published on

Was unterscheidet Drupal von anderen Content-Management-Systemen? Wie ist es aufgebaut? Wie kann man neue Module entwickeln? Daniel Hallmann zeigt wie man Drupal 6 sinnvoll einsetzen kann und präsentiert die gängigsten "best practices".

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,055
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Drupal 6: Aufbau/API/Best practices

  1. 1. Drupal 6 Aufbau/API/Best practicesDaniel Hallmann I 14. Januar 2010<br />http://www.ponc0.com/gambar/drupal.png<br />
  2. 2. Daniel Hallmann Dipl.-Inf. (FH)<br />Developer<br />Seit zwei Jahren bei Mayflower tätig<br />Schwerpunkte: Entwicklung unterschiedlicher Kundenprojekte mit PHP, JS und MySQL<br />Referent<br />
  3. 3. Bereiche<br />Struktur<br />API<br />Hooks<br />Module<br />Best Practice<br />
  4. 4. Fakten<br />http://buytaert.net/sites/buytaert.net/files/images/blog/dries-buytaert-large-bw.jpg<br />
  5. 5. Vergleich<br />Treffer bei Google<br />Joomla91.800.000Drupal32.000.000<br />TYPO3 4.220.000<br />Module<br />Drupal4000<br />TYPO3 1700<br />Joomla437<br />
  6. 6. Struktur<br />Internet<br />modules<br />functions/hooks<br />Core<br />Frontend<br />modules<br />includes<br />sites<br />Backend<br />
  7. 7. API<br /> Hooks/Module<br /> DB Abstraction Layer<br /> Form/Menu System<br />
  8. 8. Theming<br />
  9. 9. Hooks<br />
  10. 10. Module<br />
  11. 11. Beispiel<br />
  12. 12. function name_registration_form_alter(&$form, &$form_state, $form_id) <br />{<br />switch ($form_id) {<br />case &apos;user_register&apos;:<br /> $firstname_field = variable_get(&apos;name_registration_fn_field&apos;, &apos;name_registration_fn_field&apos;);<br /> $lastname_field = variable_get(&apos;name_registration_ln_field&apos;, &apos;name_registration_ln_field&apos;);<br /> ….<br /> $form[&apos;account&apos;][$firstname_field][&apos;#weight&apos;] = -99;<br /> $form[&apos;account&apos;][$firstname_field][&apos;#value&apos;] = t(&apos;Type in here a valid first name&apos;);;<br /> $form[&apos;account&apos;][$firstname_field][&apos;#attributes&apos;][&apos;OnClick&apos;] = &apos;this.value=&quot;&quot;&apos;;<br /> …<br />array_unshift($form[&apos;#validate&apos;], &apos;name_registration_user_register_validate&apos;);<br />}<br />
  13. 13. functionname_registration_user_register_validate($form, &$form_state) <br />{<br /> $firstname_field = variable_get(&apos;name_registration_fn_field&apos;, &apos;name_registration_fn_field&apos;);<br /> $firstname = $form_state[&apos;values&apos;][$firstname_field];<br /> …<br />if(!eregi (&quot;(^[a-z0-9._-]+)$&quot;,$firstname)) {<br /> // Change output of messages here - first name error<br />form_set_error($firstname_field, t(variable_get(&apos;name_registration_msg_a&apos;, &apos;Only numbers and characters are valid.&apos;)));<br /> }<br /> …<br />}<br />
  14. 14. Tools<br />
  15. 15. Drupal 7<br />Head<br />Testing Framework<br />WYSIWYG<br />Security<br />Usability<br />Performance<br />
  16. 16. Links<br />drupal.org<br />drupalcontrib.org<br />drupalcenter.de<br />api.drupal.org<br />groups.drupal.org/münchen<br />drupal-dev-days.de<br />
  17. 17. Daniel Hallmann<br />daniel.hallmann@mayflower.de<br />+49 (89) 24 20 54 - 1135<br />Mayflower GmbH<br />Mannhardtstrasse 6<br />80538 München<br />Referent<br />

×