diff options
| -rw-r--r-- | modules_v2/lightbox/admin_config.php | 41 | ||||
| -rw-r--r-- | modules_v2/lightbox/functions/lb_head.php | 114 | ||||
| -rw-r--r-- | modules_v2/lightbox/functions/lb_link.php | 11 | ||||
| -rw-r--r-- | modules_v2/lightbox/functions/lightbox_print_media_row.php | 4 | ||||
| -rw-r--r-- | modules_v2/lightbox/help_text.php | 16 | ||||
| -rw-r--r-- | modules_v2/lightbox/lb_defaultconfig.php | 23 |
6 files changed, 36 insertions, 173 deletions
diff --git a/modules_v2/lightbox/admin_config.php b/modules_v2/lightbox/admin_config.php index 09285241c7..ce328df6cb 100644 --- a/modules_v2/lightbox/admin_config.php +++ b/modules_v2/lightbox/admin_config.php @@ -50,10 +50,6 @@ if (!WT_USER_IS_ADMIN) { } if ($action=='update' && !isset($security_user)) { - 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']); - set_module_setting('lightbox', 'LB_ML_THUMB_LINKS', $_POST['NEW_LB_ML_THUMB_LINKS']); set_module_setting('lightbox', 'LB_MUSIC_FILE', $_POST['NEW_LB_MUSIC_FILE']); set_module_setting('lightbox', 'LB_SS_SPEED', $_POST['NEW_LB_SS_SPEED']); set_module_setting('lightbox', 'LB_TRANSITION', $_POST['NEW_LB_TRANSITION']); @@ -70,32 +66,6 @@ if ($action=='update' && !isset($security_user)) { <input type="hidden" name="action" value="update" /> <table id="album_config"> <tr> - <td><?php echo WT_I18N::translate('Individual Page - Album Tab Header'); ?><?php echo help_link('lb_al_head_links', $this->getName()); ?><p><?php echo WT_I18N::translate('Link appearance'); ?></p></td> - <td> - <select name="NEW_LB_AL_HEAD_LINKS"> - <option value="icon" <?php if ($LB_AL_HEAD_LINKS=='icon') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Icon'); ?></option> - <option value="text" <?php if ($LB_AL_HEAD_LINKS=='text') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Text'); ?></option> - <option value="both" <?php if ($LB_AL_HEAD_LINKS=='both') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Both'); ?></option> - </select> - </td> - </tr> - <tr> - <td><?php echo WT_I18N::translate('Individual Page - Album Tab Thumbnail - Notes Tooltip'); ?><?php echo help_link('lb_tt_balloon', $this->getName()); ?><p><?php echo WT_I18N::translate('Notes - Tooltip appearance'); ?></p></td> - <td><select name="NEW_LB_TT_BALLOON"> - <option value="true" <?php if ($LB_TT_BALLOON=='true') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Balloon'); ?></option> - <option value="false" <?php if ($LB_TT_BALLOON=='false') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Normal'); ?></option> - </select> - </td> - </tr> - <tr> - <td><?php echo WT_I18N::translate('Individual Page - Album Tab Thumbnails'); ?><?php echo help_link('lb_al_thumb_links', $this->getName()); ?><p><?php echo WT_I18N::translate('Link appearance'); ?></p></td> - <td><select name="NEW_LB_AL_THUMB_LINKS"> - <option value="icon" <?php if ($LB_AL_THUMB_LINKS=='icon') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Icon'); ?></option> - <option value="text" <?php if ($LB_AL_THUMB_LINKS=='text') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Text'); ?></option> - </select> - </td> - </tr> - <tr> <td><?php echo WT_I18N::translate('Slide Show speed'); ?><?php echo help_link('lb_ss_speed', $this->getName()); ?></td> <td> <select name="NEW_LB_SS_SPEED"> @@ -145,17 +115,6 @@ if ($action=='update' && !isset($security_user)) { <?php echo WT_I18N::translate('Width and height of URL window in pixels'); ?> </td> </tr> - <tr> - <td><?php echo WT_I18N::translate('Multimedia Page - Thumbnails'); ?><?php echo help_link('lb_ml_thumb_links', $this->getName()); ?><p><?php echo WT_I18N::translate('Link appearance'); ?></p></td> - <td> - <select name="NEW_LB_ML_THUMB_LINKS"> - <option value= "none" <?php if ($LB_ML_THUMB_LINKS == 'none') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('None'); ?></option> - <option value= "text" <?php if ($LB_ML_THUMB_LINKS == 'text') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Text'); ?></option> - <option value= "icon" <?php if ($LB_ML_THUMB_LINKS == 'icon') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Icon'); ?></option> - <option value= "both" <?php if ($LB_ML_THUMB_LINKS == 'both') echo 'selected="selected"'; ?>><?php echo WT_I18N::translate('Both'); ?></option> - </select> - </td> - </tr> </table> <input type="submit" value="<?php echo WT_I18N::translate('Save configuration'); ?>" onclick="closeHelp();" /> diff --git a/modules_v2/lightbox/functions/lb_head.php b/modules_v2/lightbox/functions/lb_head.php index a329c84883..da930bd286 100644 --- a/modules_v2/lightbox/functions/lb_head.php +++ b/modules_v2/lightbox/functions/lb_head.php @@ -33,7 +33,7 @@ if (!defined('WT_WEBTREES')) { exit; } -global $GEDCOM, $LB_AL_HEAD_LINKS; +global $GEDCOM; $reorder=safe_get('reorder', '1', '0'); ?> <script language="javascript" type="text/javascript"> @@ -69,90 +69,36 @@ if (isset($reorder) && $reorder==1) { echo '<br />'; } else { //Show Lightbox-Album header Links - echo '<table border="0" width="75%"><tr>'; - if ($LB_AL_HEAD_LINKS == 'icon' || (!WT_USER_IS_ADMIN && !WT_USER_CAN_EDIT)) { - echo '<td>'; - } if (WT_USER_IS_ADMIN) { - if ($LB_AL_HEAD_LINKS == 'both') { - // Configuration - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript:goto_config_lightbox()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_edit.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Lightbox-Album Configuration'), '" alt="', WT_I18N::translate('Lightbox-Album Configuration'), '" /><br />'; - echo WT_I18N::translate('Lightbox-Album Configuration'), ' '; - echo '</a>'; - echo '</td>'; - // Add a new multimedia object - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript: album_add()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_add.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Add a new Multimedia Object to this Individual'), '" alt="', WT_I18N::translate('Add a new Multimedia Object to this Individual'), '" /><br />'; - echo WT_I18N::translate('Add a new Media Object'), ' '; - echo '</a>'; - echo '</td>'; - // Link to an existing item - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript: album_link()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_link.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Link this Individual to an existing Multimedia Object'), '" alt="', WT_I18N::translate('Link this Individual to an existing Multimedia Object'), '" /><br />'; - echo WT_I18N::translate('Link to an existing Media Object'), ' '; - echo '</a>'; - echo '</td>'; - // Popup Reorder Media - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript: reorder_media()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/images.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Re-order media (window)'), '" alt="', WT_I18N::translate('Re-order media (window)'), '" /><br />'; - echo WT_I18N::translate('Re-order media (window)'), ' '; - echo '</a>'; - echo '</td>'; - } else if ($LB_AL_HEAD_LINKS == 'text') { - // Configuration - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript:goto_config_lightbox()">'; - echo WT_I18N::translate('Lightbox-Album Configuration'), ' '; - echo '</a>'; - echo '</td>'; - //Add a new multimedia object - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript: album_add()"> '; - echo WT_I18N::translate('Add a new Media Object'), ' '; - echo '</a>'; - echo '</td>'; - // Link to an existing item - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript: album_link()">'; - echo WT_I18N::translate('Link to an existing Media Object'), ' '; - echo '</a>'; - echo '</td>'; - // Popup Reorder Media - echo '<td class="width15 center wrap" valign="top">'; - echo '<a href="javascript: reorder_media()">'; - echo WT_I18N::translate('Re-order media'), ' '; - echo '</a>'; - echo '</td>'; - } else if ($LB_AL_HEAD_LINKS == 'icon') { - // Configuration - echo ' '; - echo '<a href="javascript:goto_config_lightbox()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_edit.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Lightbox-Album Configuration'), '" alt="', WT_I18N::translate('Lightbox-Album Configuration'), '" />'; - echo '</a>'; - // Add a new multimedia object - echo ' '; - echo '<a href="javascript: album_add()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_add.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Add a new Multimedia Object to this Individual'), '" alt="', WT_I18N::translate('Add a new Multimedia Object to this Individual'), '" />'; - echo '</a>'; - // Link to an existing item - echo ' '; - echo '<a href="javascript: album_link()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_link.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Link this Individual to an existing Multimedia Object'), '" alt="', WT_I18N::translate('Link this Individual to an existing Multimedia Object'), '" />'; - echo '</a>'; - // Popup Reorder Media - echo ' '; - echo '<a href="javascript: reorder_media()">'; - echo '<img src="', WT_MODULES_DIR, 'lightbox/images/images.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Re-order media (window)'), '" alt="', WT_I18N::translate('Re-order media (window)'), '" /><br />'; - echo '</a>'; - } - } - if ($LB_AL_HEAD_LINKS == 'icon' || (!WT_USER_IS_ADMIN && !WT_USER_CAN_EDIT)) { + echo '<table border="0" width="75%"><tr>'; + // Configuration + echo '<td class="width15 center wrap" valign="top">'; + echo '<a href="javascript:goto_config_lightbox()">'; + echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_edit.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Lightbox-Album Configuration'), '" alt="', WT_I18N::translate('Lightbox-Album Configuration'), '" /><br />'; + echo WT_I18N::translate('Lightbox-Album Configuration'), ' '; + echo '</a>'; + echo '</td>'; + // Add a new multimedia object + echo '<td class="width15 center wrap" valign="top">'; + echo '<a href="javascript: album_add()">'; + echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_add.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Add a new Multimedia Object to this Individual'), '" alt="', WT_I18N::translate('Add a new Multimedia Object to this Individual'), '" /><br />'; + echo WT_I18N::translate('Add a new Media Object'), ' '; + echo '</a>'; + echo '</td>'; + // Link to an existing item + echo '<td class="width15 center wrap" valign="top">'; + echo '<a href="javascript: album_link()">'; + echo '<img src="', WT_MODULES_DIR, 'lightbox/images/image_link.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Link this Individual to an existing Multimedia Object'), '" alt="', WT_I18N::translate('Link this Individual to an existing Multimedia Object'), '" /><br />'; + echo WT_I18N::translate('Link to an existing Media Object'), ' '; + echo '</a>'; + echo '</td>'; + // Popup Reorder Media + echo '<td class="width15 center wrap" valign="top">'; + echo '<a href="javascript: reorder_media()">'; + echo '<img src="', WT_MODULES_DIR, 'lightbox/images/images.gif" id="head_icon" class="icon" title="', WT_I18N::translate('Re-order media (window)'), '" alt="', WT_I18N::translate('Re-order media (window)'), '" /><br />'; + echo WT_I18N::translate('Re-order media (window)'), ' '; + echo '</a>'; echo '</td>'; + echo '</tr></table>'; } - echo '</tr></table>'; } diff --git a/modules_v2/lightbox/functions/lb_link.php b/modules_v2/lightbox/functions/lb_link.php index b90deb611e..f70c2905fd 100644 --- a/modules_v2/lightbox/functions/lb_link.php +++ b/modules_v2/lightbox/functions/lb_link.php @@ -46,15 +46,8 @@ $classSuffix = ''; if ($TEXT_DIRECTION=='rtl') $classSuffix = '_rtl'; // main link displayed on page $menu = new WT_Menu(); -if ($LB_ML_THUMB_LINKS == 'icon' || $LB_ML_THUMB_LINKS == 'both') { - $menu->addIcon('image_link'); -} -if ($LB_ML_THUMB_LINKS == 'both') { - $menu->addLabel(WT_I18N::translate('Set link'), 'down'); -} -if ($LB_ML_THUMB_LINKS == 'text') { - $menu->addLabel(WT_I18N::translate('Set link')); -} +$menu->addIcon('image_link'); +$menu->addLabel(WT_I18N::translate('Set link'), 'down'); $menu->addOnclick("return ilinkitem('$mediaid','person')"); $menu->addClass('', '', 'submenu'); $menu->addFlyout('left'); diff --git a/modules_v2/lightbox/functions/lightbox_print_media_row.php b/modules_v2/lightbox/functions/lightbox_print_media_row.php index b5a0e9e419..50908b18eb 100644 --- a/modules_v2/lightbox/functions/lightbox_print_media_row.php +++ b/modules_v2/lightbox/functions/lightbox_print_media_row.php @@ -41,7 +41,7 @@ if (!defined('WT_WEBTREES')) { */ function lightbox_print_media_row($rtype, $rowm, $pid) { - global $TEXT_DIRECTION, $LB_TT_BALLOON; + global $TEXT_DIRECTION; global $item, $sort_i, $notes; $reorder=safe_get('reorder', '1', '0'); @@ -159,7 +159,7 @@ function lightbox_print_media_row($rtype, $rowm, $pid) { } // Tooltip Options - $tt_opts = ", BALLOON," . $LB_TT_BALLOON ; + $tt_opts = ", BALLOON," . true ; // true=balloon, false=normal $tt_opts .= ", LEFT," . $left; $tt_opts .= ", ABOVE, true"; $tt_opts .= ", TEXTALIGN, '" . $alignm . "'"; diff --git a/modules_v2/lightbox/help_text.php b/modules_v2/lightbox/help_text.php index c89dc1b49b..e1aff01fec 100644 --- a/modules_v2/lightbox/help_text.php +++ b/modules_v2/lightbox/help_text.php @@ -34,26 +34,10 @@ case 'LIGHTBOX_CONFIG': $title=WT_I18N::translate('Configure Lightbox'); $text=WT_I18N::translate('Configure all aspects of the Lightbox module here.'); break; -case 'lb_tt_balloon': - $title=WT_I18N::translate('Album Tab Thumbnail - Notes Link Tooltip'); - $text=WT_I18N::translate('This option lets you determine whether the \'View Notes\' link should show a \'Balloon\' Tooltip or \'Normal\' Tooltip when clicked. <br /><br />The link shown here show you the Notes associated with a Media item (if available).<br />'); - break; case 'mediatab': $title=WT_I18N::translate('Media Tab Appearance'); $text=WT_I18N::translate('This option lets you determine whether the Media tab should be shown on the Individual Information page.<br /><br />When this option is set to <b>Hide</b>, only the <b>Lightbox</b> tab will be shown.<br />'); break; -case 'lb_al_head_links': - $title=WT_I18N::translate('Album Tab Header Link appearance'); - $text=WT_I18N::translate('This option lets you determine whether the header area of the Lightbox tab, which contains links to control various aspects of the Lightbox module, should contain only icons, only text, or both.<br /><br />The <b>Icon</b> option is probably not very useful, since you won\'t see any indication of each icon\'s function until your mouse hovers over the icon.<br />'); - break; -case 'lb_al_thumb_links': - $title=WT_I18N::translate('Album Tab Thumbnails Link appearance'); - $text=WT_I18N::translate('This option lets you determine whether the links area below each thumbnail should show an icon or text. The links shown here let you edit the Media object\'s details or delete it.<br />'); - break; -case 'lb_ml_thumb_links': - $title=WT_I18N::translate('Thumbnails Link appearance'); - $text=WT_I18N::translate('This option lets you determine whether the Links area above the Media object\'s details in the MultiMedia list should contain only icons, only text, or both. The links shown here let you perform various editing actions on the Media object in question.<br /><br />The <b>None</b> option completely hides these links, and thus acts as if the user did not have any editing rights.<br />'); - break; case 'lb_ss_speed': $title=WT_I18N::translate('Slide Show speed'); $text=WT_I18N::translate('This option determines the length of time each image should be displayed before the Slide Show displays the next image in the sequence.<br />'); diff --git a/modules_v2/lightbox/lb_defaultconfig.php b/modules_v2/lightbox/lb_defaultconfig.php index 4702ed64a7..c7db93020f 100644 --- a/modules_v2/lightbox/lb_defaultconfig.php +++ b/modules_v2/lightbox/lb_defaultconfig.php @@ -33,21 +33,8 @@ if (!defined('WT_WEBTREES')) { exit; } -global $LB_AL_HEAD_LINKS,$LB_TT_BALLOON,$LB_AL_THUMB_LINKS,$LB_SS_SPEED; -global $LB_MUSIC_FILE,$LB_TRANSITION,$LB_URL_WIDTH,$LB_URL_HEIGHT,$LB_ML_THUMB_LINKS; - -$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 - // Set to 'both' to view both. - -$LB_TT_BALLOON=get_module_setting('lightbox', 'LB_TT_BALLOON', 'true'); // Album Tab Page - Above Thumbnail Links. - // Set to 'true' to view Tooltip Balloon. - // Set to 'false' to view Tooltip Normal. - -$LB_AL_THUMB_LINKS=get_module_setting('lightbox', 'LB_AL_THUMB_LINKS', 'text'); // Album Tab Page - Below Thumbnail Links. - // Set to 'icon' to view icon links. - // Set to 'text' to view text links. [Default] +global $LB_SS_SPEED; +global $LB_MUSIC_FILE,$LB_TRANSITION,$LB_URL_WIDTH,$LB_URL_HEIGHT; $LB_SS_SPEED=get_module_setting('lightbox', 'LB_SS_SPEED', '6'); // SlideShow speed in seconds. [Min 2 max 25] @@ -61,9 +48,3 @@ $LB_TRANSITION=get_module_setting('lightbox', 'LB_TRANSITION', 'warp'); // Nex $LB_URL_WIDTH =get_module_setting('lightbox', 'LB_URL_WIDTH', '1000'); // URL Window width in pixels $LB_URL_HEIGHT=get_module_setting('lightbox', 'LB_URL_HEIGHT', '600'); // URL Window height in pixels - -$LB_ML_THUMB_LINKS = get_module_setting('lightbox', 'LB_ML_THUMB_LINKS', 'text'); // MultiMedia List Page Thumbnail Links - // Set to 'icon' to view icon links. - // Set to 'text' to view text links. [Default] - // Set to 'both' to view both. - // Set to 'none' to view neither. |
