summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorŁukasz Wilenski <wooc@gazeta.pl>2010-06-11 22:26:21 +0000
committerŁukasz Wilenski <wooc@gazeta.pl>2010-06-11 22:26:21 +0000
commit0706640822d2ec487d52b9a706db722baf64cee8 (patch)
tree522208c7675596bc77bca15dd5a87ff26c0295b7 /modules
parent90cb65d04756953b331c92e74da4f160abbf289d (diff)
downloadwebtrees-0706640822d2ec487d52b9a706db722baf64cee8.tar.gz
webtrees-0706640822d2ec487d52b9a706db722baf64cee8.tar.bz2
webtrees-0706640822d2ec487d52b9a706db722baf64cee8.zip
tidy up lightbox module
Diffstat (limited to 'modules')
-rw-r--r--modules/lightbox/db_schema/db_schema_0_1.php15
-rw-r--r--modules/lightbox/functions/lb_head.php22
-rw-r--r--modules/lightbox/lb_defaultconfig.php5
-rw-r--r--modules/lightbox/lb_editconfig.php15
4 files changed, 8 insertions, 49 deletions
diff --git a/modules/lightbox/db_schema/db_schema_0_1.php b/modules/lightbox/db_schema/db_schema_0_1.php
index 5593c4dc4b..75be9e80ca 100644
--- a/modules/lightbox/db_schema/db_schema_0_1.php
+++ b/modules/lightbox/db_schema/db_schema_0_1.php
@@ -45,14 +45,13 @@ define('WT_LB_DB_SCHEMA_0_1', '');
if (file_exists(WT_ROOT.'modules/lightbox/lb_config.php')) {
// Use @, in case the lb_config.php file is incomplete/corrupt
@require_once WT_ROOT.'modules/lightbox/lb_config.php';
- @set_module_setting('lightbox', 'LB_ENABLED', $mediatab);
- @set_module_setting('lightbox', 'LB_AL_HEAD_LINKS', $LB_AL_HEAD_LINKS);
- @set_module_setting('lightbox', 'LB_AL_THUMB_LINKS', $LB_AL_THUMB_LINKS);
- @set_module_setting('lightbox', 'LB_TT_BALLOON', $LB_TT_BALLOON);
- @set_module_setting('lightbox', 'LB_ML_THUMB_LINKS', $LB_ML_THUMB_LINKS);
- @set_module_setting('lightbox', 'LB_MUSIC_FILE', $LB_MUSIC_FILE);
- @set_module_setting('lightbox', 'LB_SS_SPEED', $LB_SS_SPEED);
- @set_module_setting('lightbox', 'LB_TRANSITION', $LB_TRANSITION);
+ @set_module_setting('lightbox', 'LB_AL_HEAD_LINKS', $LB_AL_HEAD_LINKS);
+ @set_module_setting('lightbox', 'LB_AL_THUMB_LINKS', $LB_AL_THUMB_LINKS);
+ @set_module_setting('lightbox', 'LB_TT_BALLOON', $LB_TT_BALLOON);
+ @set_module_setting('lightbox', 'LB_ML_THUMB_LINKS', $LB_ML_THUMB_LINKS);
+ @set_module_setting('lightbox', 'LB_MUSIC_FILE', $LB_MUSIC_FILE);
+ @set_module_setting('lightbox', 'LB_SS_SPEED', $LB_SS_SPEED);
+ @set_module_setting('lightbox', 'LB_TRANSITION', $LB_TRANSITION);
@set_module_setting('lightbox', 'LB_URL_WIDTH', $LB_URL_WIDTH);
@set_module_setting('lightbox', 'LB_URL_HEIGHT', $LB_URL_HEIGHT);
@unlink(WT_ROOT.'modules/lightbox/lb_config.php');
diff --git a/modules/lightbox/functions/lb_head.php b/modules/lightbox/functions/lb_head.php
index 5be9bef1e8..016520f349 100644
--- a/modules/lightbox/functions/lb_head.php
+++ b/modules/lightbox/functions/lb_head.php
@@ -39,29 +39,10 @@ global $reorder, $GEDCOM, $LB_AL_HEAD_LINKS;
$reorder=safe_get('reorder', '1', '0');
-/*
-if (!file_exists("modules/googlemap/defaultconfig.php")) {
- $tabno = "7";
-}else{
- $tabno = "8";
-}
-*/
-$tabno=safe_get('tab');
-
-// The following is temporary, until the handling of the Lightbox Help system
-// is adjusted to match the usual webtrees practice
-$lbHelpFile = "modules/lightbox/languages/help.".WT_LOCALE.".php";
-if (!file_exists($lbHelpFile)) $lbHelpFile = "modules/lightbox/languages/help_text.en.php";
-
?>
<script language="javascript" type="text/javascript">
<!--
- function album_help(OPTS) {
- var win01 = window.open("<?php print $lbHelpFile;?>?"+OPTS, "win01", "resizable=1, scrollbars=1, HEIGHT=780, WIDTH=500 ");
- win01.focus()
- }
-
function reorder_media() {
var win02 = window.open(
"edit_interface.php?action=reorder_media&pid=<?php print $pid; ?>", "win02", "resizable=1, menubar=0, scrollbars=1, top=20, HEIGHT=840, WIDTH=450 ");
@@ -81,7 +62,7 @@ if (!file_exists($lbHelpFile)) $lbHelpFile = "modules/lightbox/languages/help_te
}
function goto_config_lightbox() {
- window.location = "module.php?mod=lightbox&mod_action=lb_editconfig&pid=<?php print $pid; ?>&gedcom=<?php print $GEDCOM; ?>&tab="+selectedTab;
+ window.location = "module.php?mod=lightbox&mod_action=lb_editconfig&pid=<?php print $pid; ?>&gedcom=<?php print $GEDCOM; ?>#lightbox";
}
-->
</script>
@@ -113,7 +94,6 @@ require_once WT_ROOT.'includes/media_reorder_count.php';
if (WT_USER_IS_ADMIN) {
if ($LB_AL_HEAD_LINKS == "both") {
print "<td class=\"width15 center wrap\" valign=\"top\">";
- // print "<a href=\"".encode_url("module.php?mod=lightbox&mod_action=lb_editconfig&pid={$pid}&gedcom={$GEDCOM}&tab=4")."\">";
print "<a href=\"javascript:goto_config_lightbox()\">";
print "<img src=\"modules/lightbox/images/image_edit.gif\" class=\"icon\" title=\"".i18n::translate('Lightbox-Album Configuration')."\" alt=\"".i18n::translate('Lightbox-Album Configuration')."\" /><br />" ;
print "" . i18n::translate('Lightbox-Album Configuration') . "&nbsp;";
diff --git a/modules/lightbox/lb_defaultconfig.php b/modules/lightbox/lb_defaultconfig.php
index 9f5205b720..a8ad8ab4e6 100644
--- a/modules/lightbox/lb_defaultconfig.php
+++ b/modules/lightbox/lb_defaultconfig.php
@@ -52,11 +52,6 @@ try {
// TODO: it will be more efficient to fetch all LB_% settings in a single DB query
-$mediatab=get_module_setting('lightbox', 'LB_ENABLED', '1'); // Individual Page Media Tab
- // Set to 0 to hide Media Tab on Indi page from All Users,
- // Set to 1 to show Media Tab on Indi page to All Users, [Default]
-
-
$LB_AL_HEAD_LINKS=get_module_setting('lightbox', 'LB_AL_HEAD_LINKS', 'both'); // Album Tab Page Header Links.
// Set to 'icon' to view icon links.
// Set to 'text' to view text links
diff --git a/modules/lightbox/lb_editconfig.php b/modules/lightbox/lb_editconfig.php
index a35f9ab913..98528820d6 100644
--- a/modules/lightbox/lb_editconfig.php
+++ b/modules/lightbox/lb_editconfig.php
@@ -58,7 +58,6 @@ if (!WT_USER_IS_ADMIN) {
}
if ($action=='update' && !isset($security_user)) {
- set_module_setting('lightbox', 'LB_ENABLED', $_POST['NEW_mediatab']);
set_module_setting('lightbox', 'LB_AL_HEAD_LINKS', $_POST['NEW_LB_AL_HEAD_LINKS']);
set_module_setting('lightbox', 'LB_AL_THUMB_LINKS', $_POST['NEW_LB_AL_THUMB_LINKS']);
set_module_setting('lightbox', 'LB_TT_BALLOON', $_POST['NEW_LB_TT_BALLOON']);
@@ -82,20 +81,6 @@ $i = 0;
<table class="facts_table">
- <tr >
- <td class="descriptionbox" width="400"><b><?php print i18n::translate('Individual Page - Media Tab');?></b><?php echo help_link('mediatab', $this->getName()); ?><br />&nbsp;&nbsp;&nbsp;&nbsp;<?php print i18n::translate('Appearance');?></td>
- <td class="optionbox">
- <select name="NEW_mediatab" tabindex="<?php $i++; print $i?>">
- <option value="1" <?php if ($mediatab==1) print "selected=\"selected\""; ?>><?php print i18n::translate('Show');?></option>
- <option value="0" <?php if ($mediatab==0) print "selected=\"selected\""; ?>><?php print i18n::translate('Hide');?></option>
- </select>
- &nbsp;&nbsp;&nbsp; <?php print i18n::translate('Show');?>&nbsp;&nbsp;<?php print i18n::translate('Hide');?>
- </td>
- </tr>
- <tr><td><br>
- </td></tr>
-
-
<tr>
<td class="descriptionbox"><b><?php print i18n::translate('Individual Page - Album Tab Header');?></b><?php echo help_link('lb_al_head_links', $this->getName()); ?><br />&nbsp;&nbsp;&nbsp;&nbsp;<?php print i18n::translate('Link appearance');?></td>
<td class="optionbox">