show_full = WT_Filter::getInteger('show_full', 0, 1, $PEDIGREE_FULL_DETAILS); $this->show_cousins = WT_Filter::getInteger('show_cousins', 0, 1); $this->chart_style = WT_Filter::getInteger('chart_style', 0, 3); $box_width = WT_Filter::getInteger('box_width', 50, 300, 100); $PEDIGREE_GENERATIONS = WT_Filter::getInteger('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS); // This is passed as a global. A parameter would be better... $show_full=$this->show_full; $OLD_PGENS = $PEDIGREE_GENERATIONS; // -- size of the detailed boxes based upon optional width parameter $Dbwidth=($box_width*$bwidth)/100; $Dbheight=($box_width*$bheight)/100; $bwidth=$Dbwidth; $bheight=$Dbheight; // -- adjust size of the compact box if (!$this->show_full) { $bwidth = $cbwidth; $bheight = $cbheight; } $pbwidth = $bwidth+12; $pbheight = $bheight+14; if ($this->root && $this->root->canShowName()) { $this->setPageTitle( /* I18N: %s is an individual’s name */ WT_I18N::translate('Ancestors of %s', $this->root->getFullName()) ); } else { $this->setPageTitle(WT_I18N::translate('Ancestors')); } if (strlen($this->name)<30) $this->cellwidth="420"; else $this->cellwidth=(strlen($this->name)*14); } /** * print a child ascendancy * * @param string $pid individual Gedcom Id * @param int $sosa child sosa number * @param int $depth the ascendancy depth to show */ function print_child_ascendancy($person, $sosa, $depth) { global $OLD_PGENS, $WT_IMAGES, $Dindent, $pidarr, $box_width; if ($person) { $pid=$person->getXref(); $label=WT_I18N::translate('Ancestors of %s', $person->getFullName()); } else { $pid=''; $label=''; } // child echo '
  • '; echo ''; echo ''; echo ''; echo '
    '; if ($sosa==1) { echo ''; } else { echo ''; echo ''; } print_pedigree_person($person, 1); echo ''; if ($sosa>1) { print_url_arrow($pid, '?rootid='.$pid.'&PEDIGREE_GENERATIONS='.$OLD_PGENS.'&show_full='.$this->show_full.'&box_width='.$box_width.'&chart_style='.$this->chart_style.'&ged='.WT_GEDURL, $label, 3); } echo '  ', $sosa, '  '; echo ''; $relation =''; $new=($pid=='' or !isset($pidarr[$pid])); if (!$new) $relation = '
    [='.$pidarr[$pid].' - '.get_sosa_name($pidarr[$pid]).']'; else $pidarr[$pid]=$sosa; echo get_sosa_name($sosa).$relation; echo '
    '; if (is_null($person)) { echo '
  • '; return; } // parents $family=$person->getPrimaryChildFamily(); if ($family && $new && $depth>0) { // print marriage info echo ''; echo ''; echo '  ', ($sosa*2), '  ', WT_I18N::translate('and'); echo '  ', ($sosa*2+1), '  '; if ($family->canShow()) { foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) { echo ' ', $fact->summary(), ''; } } echo ''; // display parents recursively - or show empty boxes echo ''; } echo ''; } }