1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
<?php
/**
* Lightbox Album module for phpGedView
*
* Display media Items using Lightbox
*
* webtrees: Web based Family History software
* Copyright (C) 2010 webtrees development team.
*
* Derived from PhpGedView
* Copyright (C) 2002 to 2007 PHPGedView Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @package webtrees
* @subpackage Module
* @version $Id$
* @author Brian Holland
*/
if (!defined('WT_WEBTREES')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
// Set Link
/**
* Generate link flyout menu
*
* @param string $mediaid
*/
// function print_link_menu2($mediaid) {
$mediaid=$media["XREF"];
global $TEXT_DIRECTION, $WT_IMAGES;
if (!isset($WT_IMAGES['image_link'])) {
$WT_IMAGES['image_link']='modules/lightbox/images/image_link.gif';
}
$classSuffix = "";
if ($TEXT_DIRECTION=="rtl") $classSuffix = "_rtl";
// main link displayed on page
$menu = new Menu();
if ($LB_ML_THUMB_LINKS == "icon" || $LB_ML_THUMB_LINKS == "both") {
$menu->addIcon('image_link');
}
if ($LB_ML_THUMB_LINKS == "both") {
$menu->addLabel(i18n::translate('Set link'), "down");
}
if ($LB_ML_THUMB_LINKS == "text") {
$menu->addLabel(i18n::translate('Set link'));
}
$menu->addOnclick("return ilinkitem('$mediaid','person')");
$menu->addClass("", "", "submenu");
$menu->addFlyout("left");
$submenu = new Menu(i18n::translate('To Person'), "#");
$submenu->addOnclick("return ilinkitem('$mediaid','person')");
$submenu->addClass("submenuitem".$classSuffix, "submenuitem".$classSuffix);
$menu->addSubMenu($submenu);
$submenu = new Menu(i18n::translate('To Family'), "#");
$submenu->addOnclick("return ilinkitem('$mediaid','family')");
$submenu->addClass("submenuitem".$classSuffix, "submenuitem".$classSuffix);
$menu->addSubMenu($submenu);
$submenu = new Menu(i18n::translate('To Source'), "#");
$submenu->addOnclick("return ilinkitem('$mediaid','source')");
$submenu->addClass("submenuitem".$classSuffix, "submenuitem".$classSuffix);
$menu->addSubMenu($submenu);
echo $menu->getMenu();
?>
<script language="JavaScript" type="text/javascript">
function ilinkitem(mediaid, type) {
window.open('inverselink.php?mediaid='+mediaid+'&linkto='+type+'&'+sessionname+'='+sessionid, '_blank', 'top=50,left=50,width=400,height=300,resizable=1,scrollbars=1');
return false;
}
</script>
<?php
// }
// Only set link on media that is in the DB
// if ($media["XREF"] != "") {
// print_link_menu($media2["XREF"]);
// }
|