summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-10-23 13:42:48 +0000
committerfisharebest <fisharebest@gmail.com>2011-10-23 13:42:48 +0000
commita63c59f5c29fc87ed502cf66e207ef62ec8aa3dd (patch)
tree268c1286c92a3b397203aa88542fe0bc4e1176b7 /includes
parentf01016d65de84fac2f3bd5550aba3007ce2b32ad (diff)
downloadwebtrees-a63c59f5c29fc87ed502cf66e207ef62ec8aa3dd.tar.gz
webtrees-a63c59f5c29fc87ed502cf66e207ef62ec8aa3dd.tar.bz2
webtrees-a63c59f5c29fc87ed502cf66e207ef62ec8aa3dd.zip
Remove the LINK_ICONS and ZOOM_BOXES options (which control whether popup menus are activated on click, hover, etc.) These are unnecessary, confusing, and don't work properly.
Diffstat (limited to 'includes')
-rw-r--r--includes/db_schema/db_schema_14_15.php2
-rw-r--r--includes/functions/functions.php2
-rw-r--r--includes/functions/functions_print.php152
-rw-r--r--includes/set_gedcom_defaults.php2
4 files changed, 55 insertions, 103 deletions
diff --git a/includes/db_schema/db_schema_14_15.php b/includes/db_schema/db_schema_14_15.php
index 233e27151e..234bde78a7 100644
--- a/includes/db_schema/db_schema_14_15.php
+++ b/includes/db_schema/db_schema_14_15.php
@@ -35,7 +35,7 @@ if (!defined('WT_WEBTREES')) {
}
// Remove the i_isdead column
-self::exec("DELETE FROM `##gedcom_setting` WHERE setting_name='GEDCOM_DEFAULT_TAB'");
+self::exec("DELETE FROM `##gedcom_setting` WHERE setting_name='GEDCOM_DEFAULT_TAB', 'LINK_ICONS', 'ZOOM_BOXES'");
self::exec("DELETE FROM `##user_setting` WHERE setting_name='default'");
// There is no way to add a RESN tag to NOTE objects
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index 1486fce3df..0e5661b532 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -230,7 +230,6 @@ function load_gedcom_settings($ged_id=WT_GED_ID) {
global $KEEP_ALIVE_YEARS_BIRTH; $KEEP_ALIVE_YEARS_BIRTH =get_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_BIRTH');
global $KEEP_ALIVE_YEARS_DEATH; $KEEP_ALIVE_YEARS_DEATH =get_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_DEATH');
global $LANGUAGE; $LANGUAGE =get_gedcom_setting($ged_id, 'LANGUAGE');
- global $LINK_ICONS; $LINK_ICONS =get_gedcom_setting($ged_id, 'LINK_ICONS');
global $MAX_ALIVE_AGE; $MAX_ALIVE_AGE =get_gedcom_setting($ged_id, 'MAX_ALIVE_AGE');
global $MAX_DESCENDANCY_GENERATIONS; $MAX_DESCENDANCY_GENERATIONS =get_gedcom_setting($ged_id, 'MAX_DESCENDANCY_GENERATIONS');
global $MAX_PEDIGREE_GENERATIONS; $MAX_PEDIGREE_GENERATIONS =get_gedcom_setting($ged_id, 'MAX_PEDIGREE_GENERATIONS');
@@ -289,7 +288,6 @@ function load_gedcom_settings($ged_id=WT_GED_ID) {
global $WELCOME_TEXT_AUTH_MODE; $WELCOME_TEXT_AUTH_MODE =get_gedcom_setting($ged_id, 'WELCOME_TEXT_AUTH_MODE');
global $WELCOME_TEXT_CUST_HEAD; $WELCOME_TEXT_CUST_HEAD =get_gedcom_setting($ged_id, 'WELCOME_TEXT_CUST_HEAD');
global $WORD_WRAPPED_NOTES; $WORD_WRAPPED_NOTES =get_gedcom_setting($ged_id, 'WORD_WRAPPED_NOTES');
- global $ZOOM_BOXES; $ZOOM_BOXES =get_gedcom_setting($ged_id, 'ZOOM_BOXES');
global $person_privacy; $person_privacy=array();
global $person_facts; $person_facts =array();
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index bbe35cb636..9a225291ee 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -41,7 +41,7 @@ require_once WT_ROOT.'includes/functions/functions_charts.php';
* @param int $count on some charts it is important to keep a count of how many boxes were printed
*/
function print_pedigree_person($person, $style=1, $count=0, $personcount="1") {
- global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $ZOOM_BOXES, $LINK_ICONS, $GEDCOM;
+ global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $GEDCOM;
global $SHOW_HIGHLIGHT_IMAGES, $bwidth, $bheight, $PEDIGREE_FULL_DETAILS, $SHOW_PEDIGREE_PLACES;
global $TEXT_DIRECTION, $DEFAULT_PEDIGREE_GENERATIONS, $OLD_PGENS, $talloffset, $PEDIGREE_LAYOUT;
global $WT_IMAGES, $ABBREVIATE_CHART_LABELS;
@@ -84,127 +84,83 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") {
$disp=$person->canDisplayDetails();
$uniqueID = floor(microtime() * 1000000);
$boxID = $pid.".".$personcount.".".$count.".".$uniqueID;
- $mouseAction1 = "onmouseover=\"clear_family_box_timeout('".$boxID."');\" onmouseout=\"family_box_timeout('".$boxID."');\"";
- $mouseAction2 = " onmouseover=\"expandbox('".$boxID."', $style); return false;\" onmouseout=\"restorebox('".$boxID."', $style); return false;\"";
- $mouseAction3 = " onmousedown=\"expandbox('".$boxID."', $style); return false;\" onmouseup=\"restorebox('".$boxID."', $style); return false;\"";
$mouseAction4 = " onclick=\"expandbox('".$boxID."', $style); return false;\"";
if ($person->canDisplayName()) {
if (empty($SEARCH_SPIDER)) {
- if ($LINK_ICONS!="disabled") {
- //-- draw a box for the family popup
- // NOTE: Start div I.$pid.$personcount.$count.links
- $personlinks .= "<table class=\"person_box$isF\"><tr><td class=\"details1\">";
- // NOTE: Zoom
- $personlinks .= "<a href=\"pedigree.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;talloffset={$talloffset}&amp;ged=".rawurlencode($GEDCOM)."\" $mouseAction1><b>".WT_I18N::translate('Pedigree')."</b></a>";
+ //-- draw a box for the family popup
+ // NOTE: Start div I.$pid.$personcount.$count.links
+ $personlinks .= "<table class=\"person_box$isF\"><tr><td class=\"details1\">";
+ // NOTE: Zoom
+ $personlinks .= "<a href=\"pedigree.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;talloffset={$talloffset}&amp;ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Pedigree')."</b></a>";
- if (array_key_exists('googlemap', WT_Module::getActiveModules())) {
- $personlinks .= '<br /><a href="module.php?mod=googlemap&amp;mod_action=pedigree_map&amp;rootid='.$pid.'&amp;ged='.WT_GEDURL.'" '.$mouseAction1.'><b>'.WT_I18N::translate('Pedigree map').'</b></a>';
- }
- if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID!=$pid) {
- $personlinks .= '<br /><a href="relationship.php?show_full='.$PEDIGREE_FULL_DETAILS.'&amp;pid1='.WT_USER_GEDCOM_ID.'&amp;pid2='.$pid.'&amp;show_full='.$PEDIGREE_FULL_DETAILS.'&amp;pretty=2&amp;followspouse=1&amp;ged='.WT_GEDURL.'" '.$mouseAction1.'><b>'.WT_I18N::translate('Relationship to me').'</b></a>';
- }
- $personlinks .= "<br /><a href=\"descendancy.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;generations={$generations}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM)."\" $mouseAction1><b>".WT_I18N::translate('Descendants')."</b></a><br />";
- $personlinks .= "<a href=\"ancestry.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM)."\" ".$mouseAction1."><b>".WT_I18N::translate('Ancestors')."</b></a><br />";
- $personlinks .= "<a href=\"compact.php?rootid={$pid}&amp;ged=".rawurlencode($GEDCOM)."\" ".$mouseAction1."><b>".WT_I18N::translate('Compact tree')."</b></a><br />";
- if (function_exists("imagettftext")) {
- $personlinks .= "<a href=\"fanchart.php?rootid={$pid}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;ged=".rawurlencode($GEDCOM)."\" ".$mouseAction1."><b>".WT_I18N::translate('Fan chart')."</b></a><br />";
- }
- $personlinks .= "<a href=\"hourglass.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM)."&amp;show_spouse={$show_spouse}\" ".$mouseAction1."><b>".WT_I18N::translate('Hourglass chart')."</b></a><br />";
- if (array_key_exists('tree', WT_Module::getActiveModules())) {
- $personlinks .= '<a href="module.php?mod=tree&amp;mod_action=treeview&amp;ged='.WT_GEDURL.'&amp;rootid='.$pid.'" '.$mouseAction1.'><b>'.WT_I18N::translate('Interactive tree').'</b></a><br />';
- }
+ if (array_key_exists('googlemap', WT_Module::getActiveModules())) {
+ $personlinks .= '<br /><a href="module.php?mod=googlemap&amp;mod_action=pedigree_map&amp;rootid='.$pid.'&amp;ged='.WT_GEDURL.'"><b>'.WT_I18N::translate('Pedigree map').'</b></a>';
+ }
+ if (WT_USER_GEDCOM_ID && WT_USER_GEDCOM_ID!=$pid) {
+ $personlinks .= '<br /><a href="relationship.php?show_full='.$PEDIGREE_FULL_DETAILS.'&amp;pid1='.WT_USER_GEDCOM_ID.'&amp;pid2='.$pid.'&amp;show_full='.$PEDIGREE_FULL_DETAILS.'&amp;pretty=2&amp;followspouse=1&amp;ged='.WT_GEDURL.'"><b>'.WT_I18N::translate('Relationship to me').'</b></a>';
+ }
+ $personlinks .= "<br /><a href=\"descendancy.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;generations={$generations}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Descendants')."</b></a><br />";
+ $personlinks .= "<a href=\"ancestry.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Ancestors')."</b></a><br />";
+ $personlinks .= "<a href=\"compact.php?rootid={$pid}&amp;ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Compact tree')."</b></a><br />";
+ if (function_exists("imagettftext")) {
+ $personlinks .= "<a href=\"fanchart.php?rootid={$pid}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;ged=".rawurlencode($GEDCOM)."\"><b>".WT_I18N::translate('Fan chart')."</b></a><br />";
+ }
+ $personlinks .= "<a href=\"hourglass.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM)."&amp;show_spouse={$show_spouse}\"><b>".WT_I18N::translate('Hourglass chart')."</b></a><br />";
+ if (array_key_exists('tree', WT_Module::getActiveModules())) {
+ $personlinks .= '<a href="module.php?mod=tree&amp;mod_action=treeview&amp;ged='.WT_GEDURL.'&amp;rootid='.$pid.'"><b>'.WT_I18N::translate('Interactive tree').'</b></a><br />';
+ }
- foreach ($person->getSpouseFamilies() as $family) {
- $spouse = $family->getSpouse($person);
+ foreach ($person->getSpouseFamilies() as $family) {
+ $spouse = $family->getSpouse($person);
- $children = $family->getChildren();
- $num = count($children);
- if ((!empty($spouse))||($num>0)) {
- $personlinks .= "<a href=\"".$family->getHtmlUrl()."&amp;show_full=1\" ".$mouseAction1."><b>".WT_I18N::translate('Family with spouse')."</b></a><br />";
- if (!empty($spouse)) {
- $personlinks .= "<a href=\"".$spouse->getHtmlUrl()."\" $mouseAction1>";
- $personlinks .= $spouse->getFullName();
- $personlinks .= "</a><br />";
- }
- }
- foreach ($children as $child) {
- $personlinks .= "&nbsp;&nbsp;<a href=\"".$child->getHtmlUrl()."\" $mouseAction1>";
- $personlinks .= $child->getFullName();
- $personlinks .= "<br /></a>";
+ $children = $family->getChildren();
+ $num = count($children);
+ if ((!empty($spouse))||($num>0)) {
+ $personlinks .= "<a href=\"".$family->getHtmlUrl()."&amp;show_full=1\"><b>".WT_I18N::translate('Family with spouse')."</b></a><br />";
+ if (!empty($spouse)) {
+ $personlinks .= "<a href=\"".$spouse->getHtmlUrl()."\">";
+ $personlinks .= $spouse->getFullName();
+ $personlinks .= "</a><br />";
}
}
- $personlinks .= "</td></tr></table>";
+ foreach ($children as $child) {
+ $personlinks .= "&nbsp;&nbsp;<a href=\"".$child->getHtmlUrl()."\">";
+ $personlinks .= $child->getFullName();
+ $personlinks .= "<br /></a>";
+ }
}
+ $personlinks .= "</td></tr></table>";
// NOTE: Start div out-$pid.$personcount.$count
if ($style==1) $outBoxAdd .= " class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden; z-index:-1;\"";
else $outBoxAdd .= " class=\"person_box$isF\" style=\"padding: 2px;\"";
// NOTE: Zoom
- if (($ZOOM_BOXES!="disabled")&&(!$show_full)) {
- if ($ZOOM_BOXES=="mouseover") $outBoxAdd .= $mouseAction2;
- if ($ZOOM_BOXES=="mousedown") $outBoxAdd .= $mouseAction3;
- if (($ZOOM_BOXES=="click")) $outBoxAdd .= $mouseAction4;
- }
- // NOTE: Zoom
- if (($ZOOM_BOXES!="disabled")&&($show_full)) {
+ if (!$show_full) {
+ $outBoxAdd .= $mouseAction4;
+ } else {
$icons .= "<a href=\"javascript:;\"";
- if ($ZOOM_BOXES=="mouseover") $icons .= $mouseAction2;
- if ($ZOOM_BOXES=="mousedown") $icons .= $mouseAction3;
- if ($ZOOM_BOXES=="click") $icons .= $mouseAction4;
+ $icons .= $mouseAction4;
$icons .= "><img id=\"iconz-$boxID\" src=\"".$WT_IMAGES["zoomin"]."\" border=\"0\" alt=\"".WT_I18N::translate('Zoom in/out on this box.')."\" title=\"".WT_I18N::translate('Zoom in/out on this box.')."\" /></a>";
}
- if ($LINK_ICONS!="disabled") {
- $click_link="javascript:;";
- if (WT_SCRIPT_NAME=='pedigree.php') {
- $click_link="pedigree.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;talloffset={$talloffset}&amp;ged=".rawurlencode($GEDCOM);
- $whichID=$pid;
- }
-
- if (WT_SCRIPT_NAME=='hourglass.php') {
- $click_link="hourglass.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;generations={$generations}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM);
- $whichID=$pid;
- }
- if (WT_SCRIPT_NAME=='ancestry.php') {
- $click_link="ancestry.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM);
- $whichID=$pid;
- }
-
- if (WT_SCRIPT_NAME=='descendancy.php') {
- $click_link="descendancy.php?show_full={$PEDIGREE_FULL_DETAILS}&amp;pid={$pid}&amp;generations={$generations}&box_width={$box_width}&amp;ged=".rawurlencode($GEDCOM);
- $whichID=$pid;
- }
-
- if (WT_SCRIPT_NAME=='family.php' && !empty($famid)) {
- $click_link="family.php?famid={$famid}&amp;show_full=1&amp;ged=".rawurlencode($GEDCOM);
- $whichID=$famid;
- }
-
- if (WT_SCRIPT_NAME=='individual.php') {
- $click_link="individual.php?pid={$pid}&amp;ged=".rawurlencode($GEDCOM);
- $whichID=$pid;
- }
-
- $icons .= '<a class="itr" href="#"'.
- '><img src="'.$WT_IMAGES['pedigree'].'" alt="" title="" /><span class="popup">'.$personlinks.'</span></a>';
- }
- }
- else {
+ $icons .= '<a class="itr" href="#"'.
+ '><img src="'.$WT_IMAGES['pedigree'].'" alt="" title="" /><span class="popup">'.$personlinks.'</span></a>';
+ } else {
if ($style==1) {
$outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden;\"";
} else {
$outBoxAdd .= "class=\"person_box$isF\" style=\"overflow: hidden;\"";
}
// NOTE: Zoom
- if (($ZOOM_BOXES!="disabled")&&(empty($SEARCH_SPIDER))) {
- if ($ZOOM_BOXES=="mouseover") $outBoxAdd .= $mouseAction2;
- if ($ZOOM_BOXES=="mousedown") $outBoxAdd .= $mouseAction3;
- if (($ZOOM_BOXES=="click")) $outBoxAdd .= $mouseAction4;
+ if (!$SEARCH_SPIDER) {
+ $outBoxAdd .= $mouseAction4;
}
}
- }
- else {
- if ($style==1) $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden;\"";
- else $outBoxAdd .= "class=\"person_box$isF\" style=\" overflow: hidden;\"";
+ } else {
+ if ($style==1) {
+ $outBoxAdd .= "class=\"person_box$isF\" style=\"width: ".$bwidth."px; height: ".$bheight."px; overflow: hidden;\"";
+ } else {
+ $outBoxAdd .= "class=\"person_box$isF\" style=\" overflow: hidden;\"";
+ }
}
//-- find the name
$name = $person->getFullName();
@@ -268,7 +224,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") {
// Show DEAT or equivalent event
foreach (explode('|', WT_EVENTS_DEAT) as $deattag) {
$event = $person->getFactByType($deattag);
- if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace()) && $event->canShow()) {
+ if (!is_null($event) && ($event->getDate()->isOK() || $event->getPlace() || $event->getDetail()=='Y') && $event->canShow()) {
$BirthDeath .= $event->print_simple_fact(true);
if (in_array($deattag, $opt_tags)) {
unset ($opt_tags[array_search($deattag, $opt_tags)]);
diff --git a/includes/set_gedcom_defaults.php b/includes/set_gedcom_defaults.php
index beeeaf67ca..194d1ad8b8 100644
--- a/includes/set_gedcom_defaults.php
+++ b/includes/set_gedcom_defaults.php
@@ -66,7 +66,6 @@ set_gedcom_setting($ged_id, 'INDI_FACTS_UNIQUE', '');
set_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_BIRTH', '');
set_gedcom_setting($ged_id, 'KEEP_ALIVE_YEARS_DEATH', '');
set_gedcom_setting($ged_id, 'LANGUAGE', WT_LOCALE); // Defualt to the current admin's language`
-set_gedcom_setting($ged_id, 'LINK_ICONS', 'click');
set_gedcom_setting($ged_id, 'MAX_ALIVE_AGE', 120);
set_gedcom_setting($ged_id, 'MAX_DESCENDANCY_GENERATIONS', '15');
set_gedcom_setting($ged_id, 'MAX_PEDIGREE_GENERATIONS', '10');
@@ -150,7 +149,6 @@ set_gedcom_setting($ged_id, 'WEBTREES_EMAIL', '');
set_gedcom_setting($ged_id, 'WELCOME_TEXT_AUTH_MODE', '1');
set_gedcom_setting($ged_id, 'WELCOME_TEXT_CUST_HEAD', false);
set_gedcom_setting($ged_id, 'WORD_WRAPPED_NOTES', false);
-set_gedcom_setting($ged_id, 'ZOOM_BOXES', 'click');
set_gedcom_setting($ged_id, 'imported', 0);
set_gedcom_setting($ged_id, 'title', WT_I18N::translate('Genealogy from [%s]', $ged_name));