Drupal 7 module development

1,828
-1

Published on

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

No Downloads
Views
Total Views
1,828
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
39
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Drupal 7 module development

  1. 1. Adam Kalseyadam@tropo.com@akalsey www.Tropo.com @tropo
  2. 2. Who Am I?
  3. 3. Activity Stream
  4. 4. Phone Poll http://www.flickr.com/photos/comedynose/4584215861/ Vote in polls with SMS or voice http://www.flickr.com/photos/sanberdoo/510894918/
  5. 5. LoginLuxe User eXperience Enahcements
  6. 6. PasskeyLogin integrationwith externalsystems
  7. 7. The Basicshttp://www.flickr.com/photos/lrosa/2182577107
  8. 8. Mostly the sametropo.infoname  =  Tropodescription  =  Voice  and  SMS  Awesomenesscore  =  7.xdependencies[]  =  views  (>2.1)
  9. 9. /** * Remove block_callbackfield from {menu_router}. */ Documentationfunction system_update_7064(){ that appears in db_drop_field update.php(menu_router,block_callback);} Update comments
  10. 10. Everything’s an Object
  11. 11. Everything’s an Object Nodes
  12. 12. Everything’s an Object Nodes Users
  13. 13. Everything’s an Object Nodes Users Comments
  14. 14. Everything’s an Object Nodes Users Comments Files
  15. 15. Everything’s an Object Nodes Users Comments Files Taxonomy Terms
  16. 16. Everything has a hook http://www.flickr.com/photos/versageek
  17. 17. hook_nodeapi($op)
  18. 18. hook_node_load
  19. 19. hook_node_loadhook_user_loadhook_file_loadhook_comment_loadhook_taxonomy_term_loadhook_blah_load
  20. 20. hook_user($op)
  21. 21. hook_user($op) hook_user_presave hook_user_insert hook_user_load hook_user_operationNo moreUniversal Business Adaptors
  22. 22. Fieldshttp://www.flickr.com/photos/mikecattell
  23. 23. <?php  $node->body = array(    und => array(      array(        value  => body here,        summary => teaser here,        format => 1,        safe_value => sanitized body,        safe_summary => sanitized teaser,      )    ),  );?>
  24. 24. <?php// Drupal 6db_query("INSERT INTO {mytable} (intvar,stringvar, floatvar) VALUES (%d, %s, %f)", 5,hello world, 3.14);$id = db_last_insert_id();// Drupal 7$id = db_insert(mytable)  ->fields(array(    intvar => 5,    stringvar => hello world,    floatvar => 3.14,  ))  ->execute();?>
  25. 25. Form API http://www.flickr.com/photos/teegardin
  26. 26. <?php  //Drupal 6  $form[$theme->name][screenshot] = array(#value => $screenshot);  //Drupal 7  $form[$theme->name][screenshot] = array(#markup => $screenshot);?>
  27. 27. Function signaturesmy_function($argument, array $options);
  28. 28. Lots of little function name changesSet static variables with drupal_static()Email assumes everything’s htmlBlock deltas can be arbitrary stringsNew API for search tab creation
  29. 29. Lots of little function name changesSet static variables with drupal_static()Email assumes everything’s htmlBlock deltas can be arbitrary stringsNew API for search tab creationhttp://drupal.org/node/224333
  30. 30. Automate the grunt work TextCoder Upgrade module
  31. 31. Adam Kalseyadam@tropo.com@akalsey www.Tropo.com @tropo

×