Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hi, have changed in BL 1 the fancybox.cfg.php:
<?php defined('APP_DIR') or die('No direct script access allowed in ' . __FILE__); ?>
$('[data-fancybox=gallery]').on('click', function(e) {
<?php if ( $model->value('photos_for_download.source') != 'disabled' ): ?>
/**
* CMD/CTRL-Click to Download Image
*/
if( e.ctrlKey || e.metaKey ){
var href = $(e.target).closest('figure').find('.download_image').attr("href"),
path = href.split('file=')[1],
url = (
getMobileOperatingSystem() == 'Android' ||
getMobileOperatingSystem() == 'iOS' ||
getMobileOperatingSystem() == 'Windows Phone'
) ? path : href,
a = $('<a />').attr({ 'href' : url, 'target' : '_blank', 'download' : '' }).appendTo("body");
;
a[0].click(); a.remove();
}
else {
<?php endif; ?>
/**
* +Fancybox Gallery
*/
var visibleLinks = $('[data-fancybox=gallery]:visible, .page-navigation-notice');
$.fancybox.open( visibleLinks, {
animationEffect : <?php echo $model->value('slideshow.animationEffect') == 'disabled' ? 'false' : '\'' . $model->value('slideshow.animationEffect') . '\'' ?>,
slideShow : {
autoStart : false,
speed : 6000
},
animationDuration : 350,
baseClass : 'fancybox-pangolin-album',
loop : <?php echo $model->on('slideshow.loop') ? 'true' : 'false' ?>,
margin : [ 6 , 6 ],
transitionEffect : <?php echo $model->value('slideshow.transitionEffect') == 'disabled' ? 'false' : '\'' . $model->value('slideshow.transitionEffect') . '\'' ?>,
transitionDuration : 350,
trapFocus: <?php echo (__c('FOTOMOTO_STORE_ID') && $model->value('addon_feature') == 'fotomoto') ? 'false' : 'true' ?>,
zoomOpacity : true,
onInit : function( e, instance ) {
//console.log( $.fancybox.getInstance() );
},
lang : 'en',
i18n : {
'en' : {
CLOSE : '<?php echo __t('loc.fb.close', 'Close (Esc, X)') ?>',
NEXT : '<?php echo __t('loc.fb.next', 'Next (right arrow)') ?>',
PREV : '<?php echo __t('loc.fb.prev', 'Previous (left arrow)') ?>',
ERROR : '<?php echo __t('loc.fb.error', 'The requested content cannot be loaded. <br/> Please try again later.') ?>',
PLAY_START : '<?php echo __t('loc.fb.play', 'Start Slideshow (P)') ?>',
PLAY_STOP : '<?php echo __t('loc.fb.pause', 'Pause Slideshow (P)') ?>',
FULL_SCREEN : '<?php echo __t('loc.fb.fullscreen', 'Full-screen (F)') ?>',
THUMBS : '<?php echo __t('loc.fb.grid', 'Thumbnails (G)') ?>'
},
}
}, visibleLinks.index( this ) );
/**
* -Fancybox Gallery
*/
<?php if ( $model->value('photos_for_download.source') != 'disabled' ): ?>
}
<?php endif; ?>
return false;
}); // $('[data-fancybox=gallery]').on()
$(document).on('afterKeydown.fb', function(e, instance, current, keypress, keycode) {
// "Z"
if ( !keypress.ctrlKey && !keypress.metaKey && keycode === 90 ) {
keypress.preventDefault();
instance.isScaledDown() ? instance.scaleToActual() : instance.scaleToFit();
}
// "X"
if ( !keypress.ctrlKey && !keypress.metaKey && keycode === 88 ) {
keypress.preventDefault();
instance.close();
}
});
--------------
What do I have to change here?
Thank you Ben
Offline
Assuming by "here" you mean Backlight 2?
You'll need to edit the same file, but you'll need to edit it the file installed on your site. I'd first download the file, edit it, then upload it back to where you found it.
yoursite.com/backlight/modules/pangolin-album/dynamic/js
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Offline
to make it so you don't have to upload that file after every update, you could try the strategy outlined by Matt here:
http://community.theturninggate.net/vie … hp?id=8883
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Pages: 1