outline working together working with nodes working with blocks working with taxonomy the form api...
TRANSCRIPT
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary
Working togetherfunction 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;
} }
} }…}
Working togetherfunction profile_user($op, &$edit, &$user,
$category = NULL) { switch ($op) {
…case 'view': return
profile_view_profile($user); …
}}
Working togetherfunction tracker_menu($may_cache) {
……else {
if (arg(0) == 'user' && is_numeric(arg(1))) {
$items[] = array('path' => 'user/'. arg(1) .'/track', …);
} ……
}
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary
Working with NodesMyNode
MyNode_install (.install)MyNode_node_info (.module)MyNode_menu (url mapping)MyNode_perm (permission)MyNode_access (access control)MyNode_form (input form)MyNode_validateMyNode_insert (insert to DB)MyNode_update (update to DB)MyNode_delete (delete from DB)MyNode_loadMyNode_view
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary
Working with TaxonomyTaxonomy is classification of thingsTerms ~ tags.Assigning terms ~ taggingSynonyms
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary
The Form API$form[‘name’] = array(
‘#title’ => t(‘Your Name’),‘#type’ => ‘fieldset’,‘#description’ => t(‘Please enter your name.’)
); Fieldset
The Form API$form[‘name’][‘user_name’] = array(
‘#title’ => t(‘Your Name’),‘#type’ => ‘textfield’,‘#description’ => t(‘Please enter your name.’)
);Textfield
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary
jQueryJavaScript
window.onload = function{ /*your code*/ }
PHP with jQuery$(document).ready( function{ /*your code*/ } );
Drupal with jQuerydrupal_add_js(‘$(document).ready( function{ /*your code*/ } );’, ‘inline’);
OutlineWorking togetherWorking with NodesWorking with BlocksWorking with TaxonomyThe Form APIjQuerySummary