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_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_fancybox_header($gallery) { 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_check($gallery, 'pagify', false) && i18n_gallery_needs_include('pagify.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery.pagify.js"></script> <?php } if (i18n_gallery_check($gallery, 'js') && i18n_gallery_needs_include('fancybox.js')) { ?> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery-migrate-1.2.1.min.js"></script> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery.mousewheel-3.0.4.pack.js"></script> <script type="text/javascript" src="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/js/jquery.fancybox-1.3.4.pack.js"></script> <?php } if (i18n_gallery_check($gallery, 'css') && i18n_gallery_needs_include('fancybox.css')) { ?> <link rel="stylesheet" href="<?php echo i18n_gallery_site_link(); ?> plugins/i18n_gallery/css/jquery.fancybox-1.3.4.css" type="text/css" media="screen" charset="utf-8" /> <style type="text/css"> .gallery-fancybox * { margin: 0; padding: 0; border: 0 none; vertical-align: middle; text-align: center; } .gallery-fancybox .gallery-thumb { float: left; padding: 3px; border: solid 1px #C7C7C7; margin-right: 10px; margin-bottom: 10px; } .gallery-fancybox a { display: table-cell; text-decoration: none; } .gallery-fancybox .gallery-thumb .gallery-title { margin: 0; padding: 2px 5px; } .gallery-fancybox .gallery-image { float: left; padding: 3px; border: solid 1px #C7C7C7; max-width: 100%; position:relative; } .gallery-fancybox .gallery-image #fancybox-left, .gallery-fancybox .gallery-image #fancybox-right { display: block; } .gallery-fancybox .gallery-image a#fancybox-close { display: block; position: relative; float: right; } .gallery-fancybox div.pagify { clear: both; text-align: left; } .gallery-fancybox div.pagify a { display: inline; font-size: 18px; border: 0 none; text-decoration: none; color: #999999; padding: 0px 5px; margin: 0px 2px; border: 1px solid #999999; background-color: white; } .gallery-fancybox div.pagify a.current { color: #C5400E; } </style> <?php } if (i18n_gallery_check($gallery, 'css')) { $id = i18n_gallery_id($gallery); $tw = @$gallery['thumbwidth']; $th = @$gallery['thumbheight']; ?> <style type="text/css"> .gallery-<?php echo $id; ?> .gallery-fancybox a { <?php if ($th) { echo 'height: ' . $th . 'px;'; } ?> } </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 } }