| 1 |
<?php |
<?php |
| 2 |
// $Id: family.module,v 1.8.4.5.2.3.2.13 2008/10/01 19:16:55 pyutaros Exp $ |
// $Id: family.module,v 1.10.2.1 2008/10/09 01:55:57 pyutaros Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Family module - display and manage family tree data |
* Family module - display and manage family tree data |
| 63 |
'page callback' => 'family_view_tree_asc', |
'page callback' => 'family_view_tree_asc', |
| 64 |
'page arguments' => array(1), |
'page arguments' => array(1), |
| 65 |
'type' => MENU_LOCAL_TASK, |
'type' => MENU_LOCAL_TASK, |
| 66 |
'access arguments' => array('access family nodes'), |
'access callback' => 'family_individual_check_type', |
| 67 |
); |
'access arguments' => array(1), |
| 68 |
|
); |
| 69 |
$items['node/%/tree/desc'] = array( |
$items['node/%/tree/desc'] = array( |
| 70 |
'title' => 'Descendants', |
'title' => 'Descendants', |
| 71 |
'page callback' => 'family_view_tree_desc', |
'page callback' => 'family_view_tree_desc', |
| 72 |
'page arguments' => array(1), |
'page arguments' => array(1), |
| 73 |
'type' => MENU_LOCAL_TASK, |
'type' => MENU_LOCAL_TASK, |
| 74 |
'access arguments' => array('access family nodes'), |
'access callback' => 'family_individual_check_type', |
| 75 |
|
'access arguments' => array(1), |
| 76 |
); |
); |
| 77 |
return $items; |
return $items; |
| 78 |
} // function family_menu() |
} // function family_menu() |
| 79 |
|
|
| 80 |
|
function family_individual_check_type($nid){ |
| 81 |
|
if(is_numeric($nid)){ |
| 82 |
|
$node = node_load($nid); |
| 83 |
|
if($node->type == 'family_individual'){ |
| 84 |
|
return TRUE; |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
return FALSE; |
| 88 |
|
} |
| 89 |
|
|
| 90 |
/** |
/** |
| 91 |
* Implementation of hook_info(). |
* Implementation of hook_info(). |
| 92 |
*/ |
*/ |