function i18n_gallery_supersized_header($gallery) { if (i18n_gallery_check($gallery, 'css') && i18n_gallery_needs_include('supersized.css')) { ?> <link rel="stylesheet" href="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/css/supersized.css" type="text/css" media="screen" charset="utf-8" /> <link rel="stylesheet" href="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/css/supersized.shutter.css" type="text/css" media="screen" charset="utf-8" /> <?php } if (i18n_gallery_check($gallery, 'jquery') && i18n_gallery_needs_include('jquery.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery-1.11.2.min.js"></script> <?php } if (i18n_gallery_check($gallery, 'js') && i18n_gallery_needs_include('supersized.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery.easing.min.js"></script> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/supersized.3.2.6.min.js"></script> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/supersized.shutter.min.js"></script> <?php } }
function i18n_gallery_fancybox_content($gallery, $pic) { $id = i18n_gallery_id($gallery); if (i18n_gallery_is_show_image($pic)) { $item = i18n_gallery_item($gallery, $pic); ?> <div class="gallery gallery-fancybox gallery-<?php echo $id; ?> "> <div class="gallery-image "> <a id="fancybox-close" href="<?php i18n_gallery_back_link(); ?> " title="<?php i18n_gallery_BACK(); ?> "></a> <h2><?php echo htmlspecialchars(@$item['_title']); ?> </h2> <img src="<?php i18n_gallery_image_link($gallery, $pic); ?> " alt="<?php echo htmlspecialchars(@$item['_title']); ?> "/> <?php if (@$item['_description']) { echo '<p>' . htmlspecialchars(@$item['_description']) . '</p>'; } ?> <a id="fancybox-left" href="<?php i18n_gallery_prev_link($gallery, $pic); ?> " title="<?php i18n_gallery_PREV(); ?> "><span id="fancybox-left-ico" class="fancy-ico"></span></a> <a id="fancybox-right" href="<?php i18n_gallery_next_link($gallery, $pic); ?> " title="<?php i18n_gallery_NEXT(); ?> "><span id="fancybox-right-ico" class="fancy-ico"></span></a> </div> </div> <?php } else { $thumb = i18n_gallery_thumb($gallery); $showtitles = i18n_gallery_check($gallery, 'thumbtitles', false); $pageSize = !isset($thumb) && i18n_gallery_check($gallery, 'pagify', false) ? (int) $gallery['pagesize'] : 0; ?> <div class="gallery gallery-fancybox gallery-<?php echo $id; ?> "> <?php $i = 0; foreach ($gallery['items'] as $item) { $text = @$item['_title']; if (!$text) { $text = @$item['_description']; } else { if (@$item['_description']) { $text .= ' - ' . $item['_description']; } } ?> <div class="gallery-thumb" <?php if (isset($thumb) && $thumb != $i) { echo 'style="display:none"'; } ?> > <a href="<?php i18n_gallery_pic_link($gallery, $i); ?> " rel="fancybox-<?php echo $id; ?> " title="<?php echo htmlspecialchars($text); ?> "> <img src="<?php i18n_gallery_thumb_link($gallery, $item); ?> " alt="<?php echo htmlspecialchars(@$item['_description']); ?> "/> </a> <?php if ($showtitles) { ?> <p class="gallery-title"><?php echo htmlspecialchars(@$item['_title']); ?> </p> <?php } ?> </div> <?php $i++; } ?> <div style="clear:both"></div> </div> <script type="text/javascript"> $(document).ready(function(){ var $sel = $("[rel=fancybox-<?php echo $id; ?> ]") <?php i18n_gallery_replace_nojs_links($gallery, '$sel'); ?> $sel.fancybox({ <?php if ($pageSize >= 1) { ?> onStart: function(arr,index,opts) { var page = Math.floor(index/<?php echo $pageSize; ?> ) + 1; $('.gallery-<?php echo $id; ?> ').pagify('setPage', page); }, <?php } ?> cyclic: true <?php foreach ($gallery as $key => $value) { if (substr($key, 0, 2) == 'x-') { ?> ,<?php echo substr($key, 2); ?> : <?php echo preg_match('/^(null|true|false|\\d+)$/', $value) ? $value : json_encode($value); } } ?> }); <?php if (i18n_gallery_is_goto_image($pic)) { ?> $("[rel=fancybox-<?php echo $id; ?> ]:eq(<?php echo (int) $pic; ?> )").trigger('click'); <?php } if ($pageSize >= 1) { ?> $('.gallery-<?php echo $id; ?> ').pagify({ pageSize:<?php echo $pageSize; ?> , items:'.gallery-thumb' }); <?php } ?> }); </script> <?php } }
<label for="post-jquery"><?php i18n('i18n_gallery/DONT_INCLUDE_JQUERY'); ?> </label> <input type="checkbox" id="post-jquery" name="post-jquery" value="0" <?php echo !i18n_gallery_check($settings, 'jquery') ? 'checked="checked"' : ''; ?> /> </p> <p class="inline"> <label for="post-css"><?php i18n('i18n_gallery/DONT_INCLUDE_CSS'); ?> </label> <input type="checkbox" id="post-css" name="post-css" value="0" <?php echo !i18n_gallery_check($settings, 'css') ? 'checked="checked"' : ''; ?> /> </p> <p> <label for="post-thumbwidth"><?php i18n('i18n_gallery/DEFAULT_THUMB_DIMENSIONS'); ?> </label> <input type="text" class="text" id="post-thumbwidth" name="post-thumbwidth" value="<?php echo @$settings['thumbwidth']; ?> " style="width:5em"/> x <input type="text" class="text" id="post-thumbheight" name="post-thumbheight" value="<?php echo @$settings['thumbheight'];
function i18n_gallery_prettyphoto_content($gallery, $pic) { $id = i18n_gallery_id($gallery); if (i18n_gallery_is_show_image($pic)) { $item = i18n_gallery_item($gallery, $pic); ?> <div class="gallery gallery-prettyphoto gallery-<?php echo $id; ?> "> <div class="gallery-image pp_default"> <a class="pp_arrow_previous" href="<?php i18n_gallery_prev_link($gallery, $pic); ?> " title="<?php i18n_gallery_PREV(); ?> "><?php i18n_gallery_PREV(); ?> </a> <a class="pp_arrow_next" href="<?php i18n_gallery_next_link($gallery, $pic); ?> " title="<?php i18n_gallery_NEXT(); ?> "><?php i18n_gallery_NEXT(); ?> </a> <a class="pp_close" href="<?php i18n_gallery_back_link(); ?> " title="<?php i18n_gallery_BACK(); ?> "><?php i18n_gallery_BACK(); ?> </a> <h2><?php echo htmlspecialchars(@$item['_title']); ?> </h2> <img src="<?php i18n_gallery_image_link($gallery, $pic); ?> " alt="<?php echo htmlspecialchars(@$item['_title']); ?> "/> <?php if (@$item['_description']) { echo '<p>' . htmlspecialchars(@$item['_description']) . '</p>'; } ?> </div> </div> <?php } else { $thumb = i18n_gallery_thumb($gallery); $showtitles = i18n_gallery_check($gallery, 'thumbtitles', false); $pageSize = !isset($thumb) && i18n_gallery_check($gallery, 'pagify', false) ? (int) $gallery['pagesize'] : 0; ?> <div class="gallery gallery-prettyphoto gallery-<?php echo $id; ?> "> <?php $i = 0; foreach ($gallery['items'] as $item) { ?> <div class="gallery-thumb" <?php if (isset($thumb) && $thumb != $i) { echo 'style="display:none"'; } ?> > <a href="<?php i18n_gallery_pic_link($gallery, $i); ?> " rel="prettyPhoto[<?php echo $id; ?> ]" title="<?php echo htmlspecialchars(@$item['_description']); ?> "> <img src="<?php i18n_gallery_thumb_link($gallery, $item); ?> " alt="<?php echo htmlspecialchars(@$item['_title']); ?> "/> </a> <?php if ($showtitles) { ?> <p class="gallery-title"><?php echo htmlspecialchars(@$item['_title']); ?> </p> <?php } ?> </div> <?php $i++; } ?> <div style="clear:both"></div> </div> <script type="text/javascript"> $(document).ready(function(){ var $sel = $("a[rel='prettyPhoto[<?php echo $id; ?> ]']"); <?php i18n_gallery_replace_nojs_links($gallery, '$sel'); ?> $sel.prettyPhoto({ <?php if (i18n_gallery_check($gallery, 'autostart', false) && $pic == null) { echo "autoplay_slideshow: true, "; } if (@$gallery['theme']) { echo "theme: " . json_encode($gallery['theme']) . ", "; } if (intval(@$gallery['interval'])) { echo "slideshow: " . intval(@$gallery['interval']) . ", "; } ?> social_tools: false <?php foreach ($gallery as $key => $value) { if (substr($key, 0, 2) == 'x-') { ?> ,<?php echo substr($key, 2); ?> : <?php echo preg_match('/^(null|true|false|\\d+)$/', $value) ? $value : json_encode($value); } } ?> }); <?php if (i18n_gallery_is_goto_image($pic)) { ?> if (window.location.href.indexOf('#') < 0) $("a[rel='prettyPhoto[<?php echo $id; ?> ]']:eq(<?php echo (int) $pic; ?> )").trigger('click'); <?php } else { if (i18n_gallery_check($gallery, 'autostart', false)) { ?> if (window.location.href.indexOf('#') < 0) $("a[rel='prettyPhoto[<?php echo $id; ?> ]']:eq(0)").trigger('click'); <?php } } if ($pageSize >= 1) { ?> $('.gallery-<?php echo $id; ?> ').pagify({ pageSize:<?php echo $pageSize; ?> , items:'.gallery-thumb'}); <?php } ?> }); </script> <?php } }
function i18n_gallery_cycle_header($gallery) { global $SITEURL; if (i18n_gallery_check($gallery, 'jquery') && i18n_gallery_needs_include('jquery.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery-1.11.2.min.js"></script> <?php } if (i18n_gallery_check($gallery, 'js') && i18n_gallery_needs_include('cycle.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery.cycle.all.min.js"></script> <?php } if (i18n_gallery_check($gallery, 'css') && i18n_gallery_needs_include('cycle.css')) { ?> <style type="text/css"> .gallery-cycle { padding: 3px; border: solid 1px #C7C7C7; position: relative; } .gallery-cycle a { outline: none; } .gallery-cycle .gallery-container { margin: 0; padding: 0; border: 0 none; overflow: hidden; position: relative; } div.gallery-cycle .gallery-slide { margin: 0; padding: 0; border: 0 none; width: 100%; height: 100%; } .gallery-cycle .gallery-text { margin: 0; padding: 10px; border: 0 none; background-color: white; overflow: hidden; } .gallery-cycle .gallery-image { margin: 0; padding: 0; border: 0 none; display: table-cell; text-align: center; vertical-align: middle; background-color: white; } .gallery-cycle .gallery-image img { margin: 0; padding: 0; border: 0 none; } .gallery-cycle .gallery-control { position: absolute; margin: 0; padding: 5px 10px; border: 0 none; z-index: 10000; } .gallery-cycle .gallery-control-dots a { font-size: 40px; border: 0 none; text-decoration: none; color: #999999; } .gallery-cycle .gallery-control-numbers a { font-size: 18px; border: 0 none; text-decoration: none;cylce color: #999999; padding: 0px 5px; margin: 0px 2px; border: 1px solid #999999; background-color: white; } .gallery-cycle .gallery-control-images a { background: url(<?php echo $SITEURL; ?> plugins/i18n_gallery/images/cycle/pagination.png); width: 12px; height: 0px; overflow: hidden; padding-top: 12px; margin: 10px 2px; border: 0 none; display: block; float: left; } .gallery-cycle .gallery-control a:hover { color: #666666; } .gallery-cycle .gallery-control a.activeSlide { color: #C5400E; background-position: 0 -12px; } .gallery-cycle .prev { top: 0; left: 0; height: 100%; width: 35%; cursor: pointer; position: absolute; z-index: 9000; } .gallery-cycle .prev img { left: 10px; margin-top: -15px; position: absolute; top: 50%; display: none; } .gallery-cycle .next { top: 0; right: 0; height: 100%; width: 35%; cursor: pointer; position: absolute; z-index: 9000; } .gallery-cycle .next img { right: 10px; margin-top: -15px; position: absolute; top: 50%; display: none; } .gallery-cycle .prev:hover img, .gallery-cycle .next:hover img { display: block; } </style> <?php } if (i18n_gallery_check($gallery, 'css')) { $id = i18n_gallery_id($gallery); $w = @$gallery['width'] ? $gallery['width'] : (@$gallery['height'] ? (int) $gallery['height'] * $gallery['items'][0]['width'] / $gallery['items'][0]['height'] : $gallery['items'][0]['width']); $h = @$gallery['height'] ? $gallery['height'] : (@$gallery['width'] ? (int) $gallery['width'] * $gallery['items'][0]['height'] / $gallery['items'][0]['width'] : $gallery['items'][0]['height']); $tw = @$gallery['textwidth'] ? intval($gallery['textwidth']) : $w / 3; $tp = @$gallery['textpos']; ?> <style type="text/css"> #gallery-cycle-<?php echo $id; ?> .gallery-cycle { width: <?php echo $tp == 'left' || $tp == 'right' ? $w + $tw : $w; ?> px; height: <?php echo $tp == 'top' || $tp == 'bottom' ? $h + $tw : $h; ?> px; } #gallery-cycle-<?php echo $id; ?> .gallery-cycle .gallery-container { width: <?php echo $tp == 'left' || $tp == 'right' ? $w + $tw : $w; ?> px; height: <?php echo $tp == 'top' || $tp == 'bottom' ? $h + $tw : $h; ?> px; position: relative; } #gallery-cycle-<?php echo $id; ?> .gallery-cycle .gallery-text { <?php if ($tp == 'overlay') { ?> position:absolute; width: <?php echo $w; ?> px; bottom: 0; background: rgba(0,0,0,0.5); color: white; <?php } else { ?> width: <?php echo $tp == 'left' || $tp == 'right' ? $tw - 20 : $w - 20; ?> px; height: <?php echo $tp == 'top' || $tp == 'bottom' ? $tw - 20 : $h - 20; ?> px; <?php if ($tp == 'left') { echo 'float: left;'; } else { if ($tp == 'right') { echo 'float: right;'; } } ?> <?php } ?> } #gallery-cycle-<?php echo $id; ?> .gallery-cycle .gallery-image { width: <?php echo $w; ?> px; height: <?php echo $h; ?> px; } #gallery-cycle-<?php echo $id; ?> .gallery-cycle .gallery-control { <?php if ($tp == 'overlay') { ?> left: <?php echo $w / 2 - count($gallery['items']) * 16 / 2 - 10 + 4; ?> px; text-align: center; <?php } else { ?> <?php echo $tp == 'left' ? 'left: 0;' : 'right: 0;'; ?> <?php echo $tp == 'top' ? 'top: 0;' : 'bottom:0;'; ?> <?php } ?> } </style> <?php } }
function i18n_gallery_s3slider_header($gallery) { $id = 's3slider-' . i18n_gallery_id($gallery); $w = @$gallery['width'] ? $gallery['width'] : (@$gallery['height'] ? (int) $gallery['height'] * $gallery['items'][0]['width'] / $gallery['items'][0]['height'] : $gallery['items'][0]['width']); $h = @$gallery['height'] ? $gallery['height'] : (@$gallery['width'] ? (int) $gallery['width'] * $gallery['items'][0]['height'] / $gallery['items'][0]['width'] : $gallery['items'][0]['height']); if (i18n_gallery_check($gallery, 'jquery') && i18n_gallery_needs_include('jquery.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery-1.11.2.min.js"></script> <?php } if (i18n_gallery_check($gallery, 'js') && i18n_gallery_needs_include('s3slider.js')) { // packed version of js does not work! ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/s3Slider.js"></script> <?php } if (i18n_gallery_check($gallery, 'css')) { ?> <style type="text/css"> #<?php echo $id; ?> { width: <?php echo $w; ?> px; /* important to be same as image width */ height: <?php echo $h; ?> px; /* important to be same as image height */ position: relative; /* important */ overflow: hidden; /* important */ padding: 0; border: 0 none; } #<?php echo $id; ?> #<?php echo $id; ?> Content { width: <?php echo $w; ?> px; height: <?php echo $h; ?> px; position: absolute; top: 0; margin-left: 0; list-style: none; padding: 0; margin: 0; } #<?php echo $id; ?> .<?php echo $id; ?> Image { float: left; margin: 0 !important; padding: 0 !important; position: relative; display: none; background-image: none !important; } #<?php echo $id; ?> .<?php echo $id; ?> Image span { position: absolute; font: 10px/15px Arial, Helvetica, sans-serif; padding: 10px 13px; background-color: #000; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; color: #fff; display: none; word-wrap: break-word; <?php if (@$gallery['textpos'] == 'top') { ?> top: 0; left: 0; width: <?php echo $w - 2 * 13; ?> px; <?php } else { if (@$gallery['textpos'] == 'left') { ?> top: 0; left: 0; width: <?php echo (int) min(110, $w / 4); ?> px; height: <?php echo $h - 2 * 10; ?> px; <?php } else { if (@$gallery['textpos'] == 'right') { ?> right: 0; bottom: 0; width: <?php echo (int) min(110, $w / 4); ?> px; height: <?php echo $h - 10; ?> px; <?php } else { ?> bottom: 0; left: 0; width: <?php echo $w - 2 * 13; ?> px; <?php } } } ?> } .<?php echo $id; ?> Image span strong { font-size: 14px; } .clear { clear: both; } </style> <?php } }