Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary.

Similar presentations


Presentation on theme: "Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary."— Presentation transcript:

1

2 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

3 Working together q=user/131 $op = view

4 Working together q=user/131/ edit $op = view

5 Working together function user_view($uid = 0) { … foreach (module_list() as $module) { if ($data = module_invoke($module, 'user', 'view', '', $account)) { foreach ($data as $category => $items){ foreach ($items as $key => $item){ $item['class'] = "$module-". $item['class']; $fields[$category][$key] = $item; } … }

6 Working together Function XXXXX_user($op, &$edit, &$user, $category=NULL) { …. }

7 Working together function profile_user($op, &$edit, &$user, $category = NULL) { switch ($op) { … case 'view': return profile_view_profile($user); … }

8 Working together $op After_update Delete Form Insert Login Logout Load Register Submit Update Validate View

9 Working together function tracker_menu($may_cache) { …… else { if (arg(0) == 'user' && is_numeric(arg(1))) { $items[] = array('path' => 'user/'. arg(1).'/track', …); } …… }

10 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

11 Working with Nodes

12 Not Everything is a Node Users Blocks Comments

13 Working with Nodes MyNode MyNode_install (.install) MyNode_node_info (.module) MyNode_menu(url mapping) MyNode_perm (permission) MyNode_access (access control) MyNode_form (input form) MyNode_validate MyNode_insert (insert to DB) MyNode_update (update to DB) MyNode_delete (delete from DB) MyNode_load MyNode_view

14 Working with Nodes Node Object NodeChange logMyNodeCommentsTaxonomy

15 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

16 Working with Blocks 左欄左欄 頁首 內容 頁尾

17 Working with Blocks

18

19 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

20 Working with Taxonomy Taxonomy is classification of things Terms ~ tags. Assigning terms ~ tagging Synonyms

21 Working with Taxonomy

22

23 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

24 The Form API Fieldset Textfield

25 The Form API $form[‘name’] = array( ‘#title’ => t(‘Your Name’), ‘#type’ => ‘fieldset’, ‘#description’ => t(‘Please enter your name.’) ); Fieldset

26 The Form API $form[‘name’][‘user_name’] = array( ‘#title’ => t(‘Your Name’), ‘#type’ => ‘textfield’, ‘#description’ => t(‘Please enter your name.’) ); Textfield

27 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

28 jQuery http://jquery.com Write PHP in place of JavaScript

29 jQuery JavaScript window.onload = function{ /*your code*/ } PHP with jQuery $(document).ready( function{ /*your code*/ } ); Drupal with jQuery drupal_add_js(‘$(document).ready( function{ /*your code*/ } );’, ‘inline’);

30 jQuery jQuery (Drupal 5.0+) jQuery Xajax (PHP library) Xajax Prototype (JavaScript) Prototype Yahoo UI (YUI) (JavaScript) Yahoo UI (YUI)

31 Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary

32 Simple framework Develop fast Work together Work flow? Dependence sequence?


Download ppt "Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary."

Similar presentations


Ads by Google