17
© 2010 Mayflower GmbH http://www.ponc0.com/gambar/ drupal.png Drupal 6 Aufbau/API/Best practices Daniel Hallmann I 14. Januar 2010

Drupal 6: Aufbau/API/Best practices

Embed Size (px)

DESCRIPTION

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".

Citation preview

Page 1: Drupal 6: Aufbau/API/Best practices

© 2010 Mayflower GmbHhttp://www.ponc0.com/gambar/drupal.png

Drupal 6 Aufbau/API/Best practices

Daniel Hallmann I 14. Januar 2010

Page 2: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 2

I Daniel Hallmann Dipl.-Inf. (FH)

I Developer

I Seit zwei Jahren bei Mayflower tätig

I Schwerpunkte: Entwicklung unterschiedlicher

Kundenprojekte mit PHP, JS und MySQL

Referent

Page 3: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 3

Bereiche

API

Hooks

Module

Struktur

Best Practice

Page 4: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 4

Fakten

http://buytaert.net/sites/buytaert.net/files/images/blog/dries-buytaert-large-bw.jpg

Page 5: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 5

Vergleich

Treffer bei Google

Joomla91.800.000

Drupal 32.000.000

TYPO3 4.220.000

Module

Drupal 4000

TYPO3 1700

Joomla 437

Page 6: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 6

Struktur

Core

includes

modules

modules

functions/hooks

sitesFrontend

Backend

Internet

Page 7: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 7

API

Hooks/Module

DB Abstraction Layer

Form/Menu System

Page 8: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 12. April 2023 I 8

Theming

Page 9: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 12. April 2023 I 9

Hooks

Page 10: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 12. April 2023 I 10

Module

Page 11: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 12. April 2023 I 11

Beispiel

Page 12: Drupal 6: Aufbau/API/Best practices

Titel der Präsentation I Mayflower GmbH I 12. April 2023 I 12

function name_registration_form_alter(&$form, &$form_state, $form_id)

{ switch ($form_id) { case 'user_register': $firstname_field = variable_get('name_registration_fn_field',

'name_registration_fn_field'); $lastname_field = variable_get('name_registration_ln_field',

'name_registration_ln_field');

….

$form['account'][$firstname_field]['#weight'] = -99; $form['account'][$firstname_field]['#value'] = t('Type in

here a valid first name');; $form['account'][$firstname_field]['#attributes']['OnClick'] =

'this.value=""'; …

array_unshift($form['#validate'], 'name_registration_user_register_validate');

}

Page 13: Drupal 6: Aufbau/API/Best practices

Titel der Präsentation I Mayflower GmbH I 12. April 2023 I 13

function name_registration_user_register_validate($form, &$form_state)

{ $firstname_field = variable_get('name_registration_fn_field',

'name_registration_fn_field');

$firstname = $form_state['values'][$firstname_field];

if(!eregi ("(^[a-z0-9\._-]+)$",$firstname)) { // Change output of messages here - first name error form_set_error($firstname_field,

t(variable_get('name_registration_msg_a', 'Only numbers and characters are valid.')));

} …}

Page 14: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 12. April 2023 I 14

Tools

Page 15: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 15

Drupal 7

Head

WYSIWYG

Security

Testing Framework

Usability

Performance

Page 16: Drupal 6: Aufbau/API/Best practices

Drupal 6 I Mayflower GmbH I 13. Januar 2010 I 16

Links

I drupal.org

I drupalcontrib.org

I drupalcenter.de

I api.drupal.org

I groups.drupal.org/münchen

I drupal-dev-days.de

Page 17: Drupal 6: Aufbau/API/Best practices

Vielen Dank für Ihre Aufmerksamkeit!

© 2010 Mayflower GmbH

Daniel [email protected]+49 (89) 24 20 54 - 1135

Mayflower GmbHMannhardtstrasse 680538 München

Referent