Version Description
Download this release
Release Info
Developer | supsystic.com |
Plugin | Photo Gallery by Supsystic |
Version | 1.12.2 |
Comparing to | |
See all releases |
Code changes from version 1.12.1 to 1.12.2
- app/assets/css/supsystic-ui.css +7 -0
- app/templates/grid-gallery.twig +1 -1
- index.php +2 -2
- readme.txt +15 -1
- src/GridGallery/Core/views/form.twig +7 -2
- src/GridGallery/Galleries/assets/css/grid-gallery.galleries.frontend.css +2 -1
- src/GridGallery/Galleries/assets/css/grid-gallery.galleries.style.css +1 -3
- src/GridGallery/Galleries/assets/js/frontend.js +28 -18
- src/GridGallery/Galleries/assets/js/jquery.photobox.js +4 -1
- src/GridGallery/Galleries/assets/js/settings.js +46 -23
- src/GridGallery/Galleries/configs/presets.php +6 -6
- src/GridGallery/Galleries/configs/tooltips.php +95 -46
- src/GridGallery/Galleries/views/gallery_preset.twig +47 -12
- src/GridGallery/Galleries/views/helpers/pagination_view.twig +5 -0
- src/GridGallery/Galleries/views/index.twig +1 -1
- src/GridGallery/Galleries/views/r314/shortcode/helpers.twig +2 -2
- src/GridGallery/Galleries/views/r314/shortcode/post_helpers.twig +2 -2
- src/GridGallery/Galleries/views/settings.twig +103 -44
- src/GridGallery/Galleries/views/shortcode/gallery.twig +3 -3
- src/GridGallery/Galleries/views/shortcode/helpers.twig +4 -3
- src/GridGallery/Galleries/views/view.twig +4 -4
- src/GridGallery/Optimization/views/index.twig +59 -7
- src/GridGallery/Promo/Model/classes/lib/Base/MixpanelBase.php +64 -64
- src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/AbstractConsumer.php +56 -56
- src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/CurlConsumer.php +220 -220
- src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/FileConsumer.php +37 -37
- src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/SocketConsumer.php +307 -307
- src/GridGallery/Promo/Model/classes/lib/Mixpanel.php +302 -302
- src/GridGallery/Promo/Model/classes/lib/Producers/MixpanelBaseProducer.php +228 -228
- src/GridGallery/Promo/Model/classes/lib/Producers/MixpanelEvents.php +163 -163
- src/GridGallery/Promo/Model/classes/lib/Producers/MixpanelPeople.php +147 -147
- src/GridGallery/Settings/views/index.twig +5 -5
- src/GridGallery/Ui/views/type.twig +65 -9
app/assets/css/supsystic-ui.css
CHANGED
@@ -589,6 +589,13 @@ h2 .nav-tab.active{
|
|
589 |
.supsystic-plugin .fa-question.supsystic-tooltip.fa-2x {
|
590 |
padding: 0 6px;
|
591 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
/*sticky items*/
|
593 |
.supsystic-sticky-active {
|
594 |
position: fixed !important;
|
589 |
.supsystic-plugin .fa-question.supsystic-tooltip.fa-2x {
|
590 |
padding: 0 6px;
|
591 |
}
|
592 |
+
.buttons-edit-preset-dialog .fa-question.supsystic-tooltip {
|
593 |
+
border: 1px solid #28282a;
|
594 |
+
border-radius: 50%;
|
595 |
+
margin-top: 1px;
|
596 |
+
padding: 1px 4px;
|
597 |
+
font-size: 14px;
|
598 |
+
}
|
599 |
/*sticky items*/
|
600 |
.supsystic-sticky-active {
|
601 |
position: fixed !important;
|
app/templates/grid-gallery.twig
CHANGED
@@ -45,7 +45,7 @@
|
|
45 |
<li class="supsystic-sticky {% if request.query.module == 'settings' %}active{% endif %}">
|
46 |
<a href="{{ environment.generateUrl('settings') }}">
|
47 |
<i class="fa fa-gear"></i>
|
48 |
-
<span class="gg-sps-sticky-link">{{ translate('Settings') }}</span>
|
49 |
</a>
|
50 |
</li>
|
51 |
|
45 |
<li class="supsystic-sticky {% if request.query.module == 'settings' %}active{% endif %}">
|
46 |
<a href="{{ environment.generateUrl('settings') }}">
|
47 |
<i class="fa fa-gear"></i>
|
48 |
+
<span class="gg-sps-sticky-link">{{ translate('Advanced Settings') }}</span>
|
49 |
</a>
|
50 |
</li>
|
51 |
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: Photo Gallery by Supsystic
|
5 |
* Description: Easy to use Gallery by Supsystic with professional gallery templates. Show off your best design, photography and creative work
|
6 |
-
* Version: 1.12.
|
7 |
* Author: supsystic.com
|
8 |
* Author URI: https://supsystic.com
|
9 |
* Text Domain: grid-gallery
|
@@ -11,5 +11,5 @@
|
|
11 |
|
12 |
require_once dirname(__FILE__) . '/app/SupsysticGallery.php';
|
13 |
|
14 |
-
$supsysticGallery = new SupsysticGallery('1.12.
|
15 |
$supsysticGallery->run();
|
3 |
/**
|
4 |
* Plugin Name: Photo Gallery by Supsystic
|
5 |
* Description: Easy to use Gallery by Supsystic with professional gallery templates. Show off your best design, photography and creative work
|
6 |
+
* Version: 1.12.2
|
7 |
* Author: supsystic.com
|
8 |
* Author URI: https://supsystic.com
|
9 |
* Text Domain: grid-gallery
|
11 |
|
12 |
require_once dirname(__FILE__) . '/app/SupsysticGallery.php';
|
13 |
|
14 |
+
$supsysticGallery = new SupsysticGallery('1.12.2');
|
15 |
$supsysticGallery->run();
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: supsystic.com
|
|
3 |
Donate link: http://supsystic.com/plugins/gallery
|
4 |
Tags: gallery, grid gallery, image gallery, video gallery, wordpress gallery plugin, responsive gallery, polaroid gallery, photo gallery
|
5 |
Tested up to: 4.9.6
|
6 |
-
Stable tag: 1.12.
|
7 |
|
8 |
Photo Gallery with visual editor to build amazing image gallery. Responsive mobile gallery with grid, masonry, carousel, polaroid and more gallery
|
9 |
|
@@ -298,6 +298,20 @@ Important! Photo gallery plugin shortcode must be added in a text editor page, a
|
|
298 |
|
299 |
== Changelog ==
|
300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
= Gallery 1.12.1 / 30.05.2018 =
|
302 |
* Fixed "Full screen width" parameter, when "Gallery Position" is "right"
|
303 |
* Added parameter "Strict use of images order"
|
3 |
Donate link: http://supsystic.com/plugins/gallery
|
4 |
Tags: gallery, grid gallery, image gallery, video gallery, wordpress gallery plugin, responsive gallery, polaroid gallery, photo gallery
|
5 |
Tested up to: 4.9.6
|
6 |
+
Stable tag: 1.12.2
|
7 |
|
8 |
Photo Gallery with visual editor to build amazing image gallery. Responsive mobile gallery with grid, masonry, carousel, polaroid and more gallery
|
9 |
|
298 |
|
299 |
== Changelog ==
|
300 |
|
301 |
+
= Gallery 1.12.2 / 21.06.2018 =
|
302 |
+
* Fixed popup-rotate for "portrait images"
|
303 |
+
* Fixed labels text and styles in admin
|
304 |
+
* Improve admin page
|
305 |
+
* Added slimScroll position to admin page, to restore scroll postion, after gallery save
|
306 |
+
* Fixed LazyLoad compatibility with "Fixed columns"
|
307 |
+
* Fixed bug with some Mosaic gallery empty places
|
308 |
+
* Fixed "Load More Button" text, to "Load More"
|
309 |
+
* Removed "Use old icons and overlay" option from Caption Builder
|
310 |
+
* Fixed option "Mobile - show always caption". Now popup opened in one click
|
311 |
+
* Improved render "Strict use of images order" script for mosaic Gallery
|
312 |
+
* Fixed tooltips
|
313 |
+
* Minor issues fixes
|
314 |
+
|
315 |
= Gallery 1.12.1 / 30.05.2018 =
|
316 |
* Fixed "Full screen width" parameter, when "Gallery Position" is "right"
|
317 |
* Added parameter "Strict use of images order"
|
src/GridGallery/Core/views/form.twig
CHANGED
@@ -27,12 +27,17 @@
|
|
27 |
<tr>
|
28 |
{% endif %}
|
29 |
<th scope="row">
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
31 |
<h3 style="margin: 0 !important;" {% if id is not empty %}id="label-{{ id }}"{% endif %}>
|
32 |
{{ label | raw }}
|
33 |
{{ form.show_tooltip(id) }}
|
34 |
</h3>
|
35 |
-
|
36 |
<label {% if id is not empty %}id="label-{{ id }}" for="{{ id }}"{% endif %}>
|
37 |
{{ label }}
|
38 |
{{ form.show_tooltip(id) }}
|
27 |
<tr>
|
28 |
{% endif %}
|
29 |
<th scope="row">
|
30 |
+
{% if titleRow | length == 2 and titleRow == "h4" %}
|
31 |
+
<h4 style="margin: 0 !important;" {% if id is not empty %}id="label-{{ id }}"{% endif %}>
|
32 |
+
{{ label | raw }}
|
33 |
+
{{ form.show_tooltip(id) }}
|
34 |
+
</h4>
|
35 |
+
{% elseif titleRow is not empty %}
|
36 |
<h3 style="margin: 0 !important;" {% if id is not empty %}id="label-{{ id }}"{% endif %}>
|
37 |
{{ label | raw }}
|
38 |
{{ form.show_tooltip(id) }}
|
39 |
</h3>
|
40 |
+
{% else %}
|
41 |
<label {% if id is not empty %}id="label-{{ id }}" for="{{ id }}"{% endif %}>
|
42 |
{{ label }}
|
43 |
{{ form.show_tooltip(id) }}
|
src/GridGallery/Galleries/assets/css/grid-gallery.galleries.frontend.css
CHANGED
@@ -259,7 +259,8 @@
|
|
259 |
.supsystic-grid-gallery-image-sharing {
|
260 |
position: absolute;
|
261 |
}
|
262 |
-
|
|
|
263 |
text-align: center !important;
|
264 |
}
|
265 |
.supsystic-grid-gallery-image-sharing .supsystic-social-sharing .social-sharing-button{
|
259 |
.supsystic-grid-gallery-image-sharing {
|
260 |
position: absolute;
|
261 |
}
|
262 |
+
.gallery-sharing-top .supsystic-social-sharing,
|
263 |
+
.gallery-sharing-bottom .supsystic-social-sharing{
|
264 |
text-align: center !important;
|
265 |
}
|
266 |
.supsystic-grid-gallery-image-sharing .supsystic-social-sharing .social-sharing-button{
|
src/GridGallery/Galleries/assets/css/grid-gallery.galleries.style.css
CHANGED
@@ -256,6 +256,7 @@ input.cmn-toggle-round:checked + label:after {
|
|
256 |
white-space: pre;
|
257 |
margin: 1em 0px;
|
258 |
cursor: pointer;
|
|
|
259 |
}
|
260 |
|
261 |
.delete-gallery {
|
@@ -443,9 +444,6 @@ div .image img {
|
|
443 |
top: -10px;
|
444 |
box-shadow: 1px 1px 5px #aaa;
|
445 |
}
|
446 |
-
.gallery-shortcode {
|
447 |
-
width: 200px;
|
448 |
-
}
|
449 |
div.shortcode {
|
450 |
display: inline-block;
|
451 |
line-height: 4;
|
256 |
white-space: pre;
|
257 |
margin: 1em 0px;
|
258 |
cursor: pointer;
|
259 |
+
width: 185px;
|
260 |
}
|
261 |
|
262 |
.delete-gallery {
|
444 |
top: -10px;
|
445 |
box-shadow: 1px 1px 5px #aaa;
|
446 |
}
|
|
|
|
|
|
|
447 |
div.shortcode {
|
448 |
display: inline-block;
|
449 |
line-height: 4;
|
src/GridGallery/Galleries/assets/js/frontend.js
CHANGED
@@ -1382,6 +1382,7 @@
|
|
1382 |
var caption = this,
|
1383 |
$caption = $(caption),
|
1384 |
hammer = new Hammer_gg(this),
|
|
|
1385 |
preventClick = false;
|
1386 |
|
1387 |
$caption.on('click', function(event) {
|
@@ -1402,7 +1403,9 @@
|
|
1402 |
if (!$caption.hasClass('hovered')) {
|
1403 |
self.$container.find('.grid-gallery-caption').not(caption).removeClass('hovered');
|
1404 |
$(caption).addClass('hovered');
|
1405 |
-
|
|
|
|
|
1406 |
}
|
1407 |
|
1408 |
}
|
@@ -1883,20 +1886,20 @@
|
|
1883 |
|
1884 |
|
1885 |
if (gallerySharing.position == 'top' || gallerySharing.position == 'all') {
|
1886 |
-
var buttons = this.$container.find('
|
1887 |
.html($socialButtons.html())
|
1888 |
.find('.supsystic-social-sharing');
|
1889 |
window.initSupsysticSocialSharing(buttons);
|
1890 |
}
|
1891 |
|
1892 |
if (gallerySharing.position == 'bottom' || gallerySharing.position == 'all'){
|
1893 |
-
var buttons = this.$container.find('
|
1894 |
.html($socialButtons.html())
|
1895 |
.find('.supsystic-social-sharing');
|
1896 |
window.initSupsysticSocialSharing(buttons);
|
1897 |
}
|
1898 |
|
1899 |
-
this.initEvent(this.$container.find('
|
1900 |
};
|
1901 |
|
1902 |
//init social share for all images in gallery
|
@@ -2300,20 +2303,27 @@
|
|
2300 |
clearTimeout(self.ggLazyTimeOut);
|
2301 |
}
|
2302 |
self.ggLazyTimeOut = setTimeout(function() {
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2317 |
}
|
2318 |
}, 200);
|
2319 |
});
|
1382 |
var caption = this,
|
1383 |
$caption = $(caption),
|
1384 |
hammer = new Hammer_gg(this),
|
1385 |
+
captionIsMobile = self.$container.attr('data-caption-mobile'),
|
1386 |
preventClick = false;
|
1387 |
|
1388 |
$caption.on('click', function(event) {
|
1403 |
if (!$caption.hasClass('hovered')) {
|
1404 |
self.$container.find('.grid-gallery-caption').not(caption).removeClass('hovered');
|
1405 |
$(caption).addClass('hovered');
|
1406 |
+
if(captionIsMobile == 'false') {
|
1407 |
+
preventClick = true;
|
1408 |
+
}
|
1409 |
}
|
1410 |
|
1411 |
}
|
1886 |
|
1887 |
|
1888 |
if (gallerySharing.position == 'top' || gallerySharing.position == 'all') {
|
1889 |
+
var buttons = this.$container.find('.gallery-sharing-top')
|
1890 |
.html($socialButtons.html())
|
1891 |
.find('.supsystic-social-sharing');
|
1892 |
window.initSupsysticSocialSharing(buttons);
|
1893 |
}
|
1894 |
|
1895 |
if (gallerySharing.position == 'bottom' || gallerySharing.position == 'all'){
|
1896 |
+
var buttons = this.$container.find('.gallery-sharing-bottom')
|
1897 |
.html($socialButtons.html())
|
1898 |
.find('.supsystic-social-sharing');
|
1899 |
window.initSupsysticSocialSharing(buttons);
|
1900 |
}
|
1901 |
|
1902 |
+
this.initEvent(this.$container.find('.gallery-sharing-top,.gallery-sharing-bottom'));
|
1903 |
};
|
1904 |
|
1905 |
//init social share for all images in gallery
|
2303 |
clearTimeout(self.ggLazyTimeOut);
|
2304 |
}
|
2305 |
self.ggLazyTimeOut = setTimeout(function() {
|
2306 |
+
switch(galleryType) {
|
2307 |
+
case 4:
|
2308 |
+
$(document).trigger('ggMosaicResizedEvent');
|
2309 |
+
break;
|
2310 |
+
case 0:
|
2311 |
+
// if hidden images not showing
|
2312 |
+
setTimeout(function() {
|
2313 |
+
self.lazyLoadTriggerHandler();
|
2314 |
+
}, 450); // animation transition time
|
2315 |
+
break;
|
2316 |
+
case 1:
|
2317 |
+
case 2:
|
2318 |
+
case 3:
|
2319 |
+
default:
|
2320 |
+
self.initWookmark();
|
2321 |
+
// if hidden images not showing
|
2322 |
+
setTimeout(function() {
|
2323 |
+
self.lazyLoadTriggerHandler();
|
2324 |
+
self.initWookmark();
|
2325 |
+
}, 450); // animation transition time
|
2326 |
+
break;
|
2327 |
}
|
2328 |
}, 200);
|
2329 |
});
|
src/GridGallery/Galleries/assets/js/jquery.photobox.js
CHANGED
@@ -739,7 +739,10 @@
|
|
739 |
}
|
740 |
})();
|
741 |
|
742 |
-
|
|
|
|
|
|
|
743 |
if(iframe){
|
744 |
var url = $(imageLinks[activeImage]).attr('href');
|
745 |
return url;
|
739 |
}
|
740 |
})();
|
741 |
|
742 |
+
function newVideo(iframe){
|
743 |
+
if(!iframe) {
|
744 |
+
iframe = false
|
745 |
+
}
|
746 |
if(iframe){
|
747 |
var url = $(imageLinks[activeImage]).attr('href');
|
748 |
return url;
|
src/GridGallery/Galleries/assets/js/settings.js
CHANGED
@@ -167,11 +167,20 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
167 |
};
|
168 |
|
169 |
Controller.prototype.saveButton = function() {
|
|
|
170 |
$('#btnSave').on('click', function() {
|
|
|
171 |
document.forms['form-settings'].submit();
|
172 |
});
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
Controller.prototype.setInputColor = (function() {
|
176 |
$('input[type="color"]').each(function() {
|
177 |
if(navigator.userAgent.match(/Trident\/7\./)) {
|
@@ -548,12 +557,12 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
548 |
if($previewFigcaption.length) {
|
549 |
var cssProperties = {};
|
550 |
cssProperties['background-color'] = $previewFigcaption.css('background-color');
|
551 |
-
|
552 |
cssProperties['top'] = 0;
|
553 |
cssProperties['bottom'] = 0;
|
554 |
}
|
555 |
$.each($elementsWithEffects, function( i, val ) {
|
556 |
-
if($(
|
557 |
cssProperties['transform'] = 'none';
|
558 |
} else {
|
559 |
delete cssProperties['transform'];
|
@@ -897,12 +906,12 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
897 |
Controller.prototype.areaNotifications = function () {
|
898 |
var $photoWidth = $('input[name= "area[photo_width]"]'),
|
899 |
$photoHeight = $('input[name= "area[photo_height]"]'),
|
900 |
-
|
901 |
$overlay = $('[name="thumbnail[overlay][enabled]"], [name="icons[enabled]"]'),
|
902 |
self = this;
|
903 |
|
904 |
$photoWidth.on('change' , function() {
|
905 |
-
|
906 |
$.jGrowl('Low image width \n post feed content can be too small');
|
907 |
}
|
908 |
|
@@ -912,7 +921,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
912 |
});
|
913 |
|
914 |
$photoHeight.on('change', function() {
|
915 |
-
|
916 |
$.jGrowl('Low image height \n post feed content can be too small');
|
917 |
}
|
918 |
|
@@ -940,14 +949,17 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
940 |
|
941 |
Controller.prototype.togglePostsTable = (function() {
|
942 |
var $navButtons = $('.form-tabs'),
|
|
|
943 |
$table = $('#gbox_ui-jqgrid-htable');
|
944 |
|
945 |
$navButtons.on('click', function() {
|
946 |
var currHref = $(this).find('a.active').attr('href');
|
947 |
if(currHref == 'post') {
|
948 |
$table.show();
|
|
|
949 |
} else {
|
950 |
-
|
|
|
951 |
}
|
952 |
if(currHref == 'area') {
|
953 |
$('.gg-wraper-anchor-nav-links').show();
|
@@ -989,23 +1001,25 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
989 |
});
|
990 |
|
991 |
Controller.prototype.togglePosts = function () {
|
992 |
-
|
993 |
$toggleRow = $('select[name="quicksand[enabled]"]'),
|
994 |
value = 0;
|
995 |
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
|
|
|
|
1009 |
};
|
1010 |
|
1011 |
Controller.prototype.toggleAutoPosts = function() {
|
@@ -1615,7 +1629,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
1615 |
self.slimScrollOnSizeEvent(self);
|
1616 |
});
|
1617 |
|
1618 |
-
$('.gg-anchor-nav-links').on('click', function(e1) {
|
1619 |
e1.preventDefault();
|
1620 |
var $settingsWrap = $('.settings-wrap')
|
1621 |
, urlLink = $(this).attr('href')
|
@@ -1625,6 +1639,10 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
1625 |
var offsetLink = $linkItem.offset().top
|
1626 |
, offsetTop = $topItem.offset().top
|
1627 |
, offsetAbs = Math.abs(offsetLink -offsetTop);
|
|
|
|
|
|
|
|
|
1628 |
if(!isNaN(offsetAbs)) {
|
1629 |
$settingsWrap.slimScroll({ scrollTo: offsetAbs + 'px' });
|
1630 |
}
|
@@ -1633,7 +1651,8 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
1633 |
|
1634 |
// init anchor link
|
1635 |
setTimeout(function() {
|
1636 |
-
$('
|
|
|
1637 |
}, 500);
|
1638 |
});
|
1639 |
|
@@ -2233,6 +2252,10 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
2233 |
controller.initSubMenuFastLinks();
|
2234 |
$(document).trigger('sggInitGallerySettingsPro', controller);
|
2235 |
//controller.callExtenedFunc('initExtendedGallerySettings', ['params1', 'params2']);
|
|
|
|
|
|
|
|
|
2236 |
$(document).one('input ifClicked', '.supsystic-plugin :input',function(event) {
|
2237 |
controller.settingsChanged = true;
|
2238 |
});
|
@@ -2402,7 +2425,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
|
|
2402 |
});
|
2403 |
|
2404 |
ImagePreview.prototype.updateIcons = (function() {
|
2405 |
-
var captBuilderVal = $('
|
2406 |
, captionBuilderIconsEnable = $('#captionBuilderIconsEnable:checked').length
|
2407 |
, captionIconsEnable = $('#icons-enable:checked').length
|
2408 |
, showFewIconsSel = $('#showFewIconsSel').val()
|
167 |
};
|
168 |
|
169 |
Controller.prototype.saveButton = function() {
|
170 |
+
var selfC = this;
|
171 |
$('#btnSave').on('click', function() {
|
172 |
+
selfC.saveScrollPos();
|
173 |
document.forms['form-settings'].submit();
|
174 |
});
|
175 |
}
|
176 |
|
177 |
+
Controller.prototype.saveScrollPos = (function() {
|
178 |
+
var scrollTopPos = parseInt($('.settings-wrap').scrollTop());
|
179 |
+
if(!isNaN(scrollTopPos)) {
|
180 |
+
$('#slimScrollStartPos').val(scrollTopPos);
|
181 |
+
}
|
182 |
+
});
|
183 |
+
|
184 |
Controller.prototype.setInputColor = (function() {
|
185 |
$('input[type="color"]').each(function() {
|
186 |
if(navigator.userAgent.match(/Trident\/7\./)) {
|
557 |
if($previewFigcaption.length) {
|
558 |
var cssProperties = {};
|
559 |
cssProperties['background-color'] = $previewFigcaption.css('background-color');
|
560 |
+
if($('.ggUserCaptionBuilderCl:checked').val() == '1') {
|
561 |
cssProperties['top'] = 0;
|
562 |
cssProperties['bottom'] = 0;
|
563 |
}
|
564 |
$.each($elementsWithEffects, function( i, val ) {
|
565 |
+
if($('.ggUserCaptionBuilderCl:checked') == '1' && $(val).data('gridGalleryType') == 'center') {
|
566 |
cssProperties['transform'] = 'none';
|
567 |
} else {
|
568 |
delete cssProperties['transform'];
|
906 |
Controller.prototype.areaNotifications = function () {
|
907 |
var $photoWidth = $('input[name= "area[photo_width]"]'),
|
908 |
$photoHeight = $('input[name= "area[photo_height]"]'),
|
909 |
+
isPostFeedEnabled = $('.ggPostsEnableCl:checked').val() == 1,
|
910 |
$overlay = $('[name="thumbnail[overlay][enabled]"], [name="icons[enabled]"]'),
|
911 |
self = this;
|
912 |
|
913 |
$photoWidth.on('change' , function() {
|
914 |
+
if($photoWidth.val() < 240 && isPostFeedEnabled) {
|
915 |
$.jGrowl('Low image width \n post feed content can be too small');
|
916 |
}
|
917 |
|
921 |
});
|
922 |
|
923 |
$photoHeight.on('change', function() {
|
924 |
+
if($photoHeight.val() < 240 && isPostFeedEnabled) {
|
925 |
$.jGrowl('Low image height \n post feed content can be too small');
|
926 |
}
|
927 |
|
949 |
|
950 |
Controller.prototype.togglePostsTable = (function() {
|
951 |
var $navButtons = $('.form-tabs'),
|
952 |
+
$prePostTableControls = $('.sggPostsPreTable'),
|
953 |
$table = $('#gbox_ui-jqgrid-htable');
|
954 |
|
955 |
$navButtons.on('click', function() {
|
956 |
var currHref = $(this).find('a.active').attr('href');
|
957 |
if(currHref == 'post') {
|
958 |
$table.show();
|
959 |
+
$prePostTableControls.show();
|
960 |
} else {
|
961 |
+
$table.hide();
|
962 |
+
$prePostTableControls.hide();
|
963 |
}
|
964 |
if(currHref == 'area') {
|
965 |
$('.gg-wraper-anchor-nav-links').show();
|
1001 |
});
|
1002 |
|
1003 |
Controller.prototype.togglePosts = function () {
|
1004 |
+
var $postsEnable = $('.ggPostsEnableCl'),
|
1005 |
$toggleRow = $('select[name="quicksand[enabled]"]'),
|
1006 |
value = 0;
|
1007 |
|
1008 |
+
$postsEnable.on('ifChanged', function () {
|
1009 |
+
var $currPostEnb = $(this);
|
1010 |
+
if($currPostEnb.is(':checked')) {
|
1011 |
+
value = parseInt($currPostEnb.val(), 10);
|
1012 |
+
if (value) {
|
1013 |
+
$toggleRow.attr('disabled', 'disabled');
|
1014 |
+
if ($toggleRow.val() > 0) {
|
1015 |
+
$.jGrowl('You cant use image shuffling option \n when post feed is enabled');
|
1016 |
+
$toggleRow.val('0');
|
1017 |
+
};
|
1018 |
+
} else {
|
1019 |
+
$toggleRow.removeAttr('disabled');
|
1020 |
+
}
|
1021 |
+
}
|
1022 |
+
}).trigger('ifChanged');
|
1023 |
};
|
1024 |
|
1025 |
Controller.prototype.toggleAutoPosts = function() {
|
1629 |
self.slimScrollOnSizeEvent(self);
|
1630 |
});
|
1631 |
|
1632 |
+
$('.gg-anchor-nav-links').on('click', function(e1, funcParams) {
|
1633 |
e1.preventDefault();
|
1634 |
var $settingsWrap = $('.settings-wrap')
|
1635 |
, urlLink = $(this).attr('href')
|
1639 |
var offsetLink = $linkItem.offset().top
|
1640 |
, offsetTop = $topItem.offset().top
|
1641 |
, offsetAbs = Math.abs(offsetLink -offsetTop);
|
1642 |
+
// if need to set start position
|
1643 |
+
if(funcParams && funcParams.offsetScTop) {
|
1644 |
+
offsetAbs = funcParams.offsetScTop;
|
1645 |
+
}
|
1646 |
if(!isNaN(offsetAbs)) {
|
1647 |
$settingsWrap.slimScroll({ scrollTo: offsetAbs + 'px' });
|
1648 |
}
|
1651 |
|
1652 |
// init anchor link
|
1653 |
setTimeout(function() {
|
1654 |
+
var slScrollTopPos = parseInt($('#slimScrollStartPos').val());
|
1655 |
+
$('.gg-anchor-nav-links[href="#gg-anl-main"]').trigger('click', {'offsetScTop':slScrollTopPos});
|
1656 |
}, 500);
|
1657 |
});
|
1658 |
|
2252 |
controller.initSubMenuFastLinks();
|
2253 |
$(document).trigger('sggInitGallerySettingsPro', controller);
|
2254 |
//controller.callExtenedFunc('initExtendedGallerySettings', ['params1', 'params2']);
|
2255 |
+
// prevent click for icons
|
2256 |
+
$(document).on('click', '#preview .hi-icon.fa', function(event) {
|
2257 |
+
event.preventDefault();
|
2258 |
+
});
|
2259 |
$(document).one('input ifClicked', '.supsystic-plugin :input',function(event) {
|
2260 |
controller.settingsChanged = true;
|
2261 |
});
|
2425 |
});
|
2426 |
|
2427 |
ImagePreview.prototype.updateIcons = (function() {
|
2428 |
+
var captBuilderVal = $('.ggUserCaptionBuilderCl:checked').val()
|
2429 |
, captionBuilderIconsEnable = $('#captionBuilderIconsEnable:checked').length
|
2430 |
, captionIconsEnable = $('#icons-enable:checked').length
|
2431 |
, showFewIconsSel = $('#showFewIconsSel').val()
|
src/GridGallery/Galleries/configs/presets.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
|
3 |
return array(
|
4 |
'gallery_presets' => array(
|
5 |
-
1 => 'a:26:{s:5:"title";s:11:"new_preset1";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:10:{s:4:"grid";s:1:"0";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:2:"10";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:1:"5";s:1:"x";s:1:"2";s:1:"y";s:1:"4";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#6f0000";s:12:"transparency";s:1:"5";s:6:"effect";s:16:"quarter-slide-up";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:
|
6 |
-
2 => 'a:26:{s:5:"title";s:12:"new-preset-2";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:8:{s:4:"grid";s:1:"1";s:8:"position";s:1:"1";s:8:"distance";s:1:"0";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:5:"black";s:5:"width";s:1:"3";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:16:{s:10:"text_align";s:4:"left";s:8:"position";s:3:"top";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0a076d";s:12:"transparency";s:1:"5";s:6:"effect";s:19:"revolving-door-left";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:
|
7 |
-
3 => 'a:26:{s:5:"title";s:12:"new-preset-3";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:10:{s:4:"grid";s:1:"0";s:8:"position";s:1:"1";s:8:"distance";s:1:"7";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:3:"100";s:11:"radius_unit";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#ffffff";s:5:"width";s:1:"5";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:2:"10";s:1:"x";s:1:"0";s:1:"y";s:1:"0";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#3498db";s:12:"transparency";s:2:"10";s:6:"effect";s:6:"center";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:
|
8 |
-
4 => 'a:26:{s:5:"title";s:12:"new preset 4";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:8:{s:4:"grid";s:1:"2";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:2:"20";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:5:"black";s:5:"width";s:1:"3";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:1:"5";s:1:"x";s:1:"2";s:1:"y";s:1:"4";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0c0000";s:12:"transparency";s:1:"5";s:6:"effect";s:16:"quarter-two-step";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:
|
9 |
-
5 => 'a:26:{s:5:"title";s:12:"new-preset-5";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:10:{s:4:"grid";s:1:"0";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:1:"0";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:17:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#ffffff";s:12:"transparency";s:1:"4";s:6:"effect";s:16:"quarter-slide-up";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"12";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";s:9:"fontStyle";a:1:{i:0;s:4:"bold";}}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:
|
10 |
6 => 'a:14:{s:5:"title";s:0:"";s:4:"area";a:8:{s:4:"grid";s:1:"0";s:8:"distance";s:1:"5";s:5:"width";s:2:"75";s:10:"width_unit";s:1:"1";s:11:"photo_width";s:3:"250";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"200";s:17:"photo_height_unit";s:1:"0";}s:9:"thumbnail";a:3:{s:6:"border";a:5:{s:6:"radius";s:2:"30";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:1:"0";}s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:8:{s:7:"enabled";s:4:"true";s:6:"effect";s:14:"quarter-appear";s:10:"background";s:7:"#3498db";s:10:"foreground";s:7:"#ecf0f1";s:12:"transparency";s:1:"5";s:9:"text_size";s:2:"12";s:14:"text_size_unit";s:1:"0";s:10:"text_align";s:1:"3";}}s:11:"border-type";s:5:"Types";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:6:{s:4:"type";s:1:"0";s:5:"theme";s:7:"theme_1";s:10:"transition";s:7:"elastic";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:13:"slideshowAuto";s:5:"false";}s:5:"posts";a:7:{s:6:"enable";s:1:"1";s:5:"style";s:1:"2";s:7:"current";s:3:"233";s:6:"author";s:1:"1";s:4:"date";s:1:"1";s:8:"contents";s:1:"1";s:10:"categories";s:1:"1";}s:5:"pages";a:1:{s:7:"current";s:2:"33";}s:5:"icons";a:11:{s:7:"enabled";s:5:"false";s:6:"effect";s:17:"hi-icon-effect-5d";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:4:"size";s:2:"16";s:6:"margin";s:1:"5";s:15:"overlay_enabled";s:4:"true";s:13:"overlay_color";s:7:"#3498db";s:20:"overlay_transparency";s:1:"5";}s:10:"categories";a:13:{s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:6:"preset";s:1:"0";s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:0:"";}s:10:"pagination";a:10:{s:7:"enabled";s:4:"true";s:8:"per_page";s:1:"6";s:3:"pos";s:3:"top";s:5:"align";s:5:"right";s:6:"preset";s:1:"5";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:3:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#1e73be";}s:7:"padding";a:2:{s:8:"vertical";s:1:"6";s:10:"horizontal";s:2:"10";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"10";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"0";s:11:"radius_unit";s:2:"px";}}s:12:"previewImage";a:4:{i:0;s:85:"http://dev.supsystic.com/wp-content/uploads/2015/01/113917523_natyurmortuy_foto_2.jpg";i:1;i:280;i:2;i:420;i:3;b:0;}}',
|
11 |
7 => 'a:14:{s:5:"title";s:0:"";s:4:"area";a:8:{s:4:"grid";s:1:"0";s:8:"distance";s:2:"10";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:11:"photo_width";s:3:"350";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"200";s:17:"photo_height_unit";s:1:"0";}s:9:"thumbnail";a:3:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:2:"10";}s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#c0c0c0";s:4:"blur";s:1:"3";s:1:"x";s:1:"4";s:1:"y";s:2:"-4";}s:7:"overlay";a:8:{s:7:"enabled";s:4:"true";s:6:"effect";s:16:"quarter-slide-up";s:10:"background";s:7:"#6f0000";s:10:"foreground";s:7:"#ffffff";s:12:"transparency";s:1:"5";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"text_align";s:1:"2";}}s:11:"border-type";s:5:"Types";s:10:"use_shadow";s:1:"1";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:6:{s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:10:"transition";s:4:"fade";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:13:"slideshowAuto";s:5:"false";}s:5:"posts";a:7:{s:6:"enable";s:1:"1";s:5:"style";s:1:"5";s:7:"current";s:4:"1999";s:6:"author";s:1:"1";s:4:"date";s:1:"1";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:2:"33";}s:5:"icons";a:11:{s:7:"enabled";s:5:"false";s:6:"effect";s:17:"hi-icon-effect-5d";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:4:"size";s:2:"16";s:6:"margin";s:1:"5";s:15:"overlay_enabled";s:4:"true";s:13:"overlay_color";s:7:"#3498db";s:20:"overlay_transparency";s:1:"5";}s:10:"categories";a:13:{s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:6:"preset";s:1:"0";s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:0:"";}s:10:"pagination";a:10:{s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:6:"preset";s:1:"0";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:3:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:12:"previewImage";a:4:{i:0;s:85:"http://dev.supsystic.com/wp-content/uploads/2015/01/113917523_natyurmortuy_foto_2.jpg";i:1;i:280;i:2;i:420;i:3;b:0;}}',
|
12 |
8 => 'a:14:{s:5:"title";s:0:"";s:4:"area";a:8:{s:4:"grid";s:1:"0";s:8:"distance";s:2:"10";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:11:"photo_width";s:3:"500";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"200";s:17:"photo_height_unit";s:1:"0";}s:9:"thumbnail";a:3:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:1:"0";}s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:8:{s:7:"enabled";s:4:"true";s:6:"effect";s:14:"quarter-appear";s:10:"background";s:7:"#3498db";s:10:"foreground";s:7:"#ecf0f1";s:12:"transparency";s:1:"5";s:9:"text_size";s:2:"12";s:14:"text_size_unit";s:1:"0";s:10:"text_align";s:1:"3";}}s:11:"border-type";s:5:"Types";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:6:{s:4:"type";s:1:"0";s:5:"theme";s:7:"theme_1";s:10:"transition";s:7:"elastic";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:13:"slideshowAuto";s:5:"false";}s:5:"posts";a:7:{s:6:"enable";s:1:"1";s:5:"style";s:1:"3";s:7:"current";s:3:"233";s:6:"author";s:1:"1";s:4:"date";s:1:"1";s:8:"contents";s:1:"1";s:10:"categories";s:1:"1";}s:5:"pages";a:1:{s:7:"current";s:2:"33";}s:5:"icons";a:11:{s:7:"enabled";s:5:"false";s:6:"effect";s:17:"hi-icon-effect-5d";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:4:"size";s:2:"16";s:6:"margin";s:1:"5";s:15:"overlay_enabled";s:4:"true";s:13:"overlay_color";s:7:"#3498db";s:20:"overlay_transparency";s:1:"5";}s:10:"categories";a:13:{s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:6:"preset";s:1:"0";s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:0:"";}s:10:"pagination";a:10:{s:7:"enabled";s:5:"false";s:8:"per_page";s:1:"6";s:3:"pos";s:3:"top";s:5:"align";s:5:"right";s:6:"preset";s:1:"5";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:3:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#1e73be";}s:7:"padding";a:2:{s:8:"vertical";s:1:"6";s:10:"horizontal";s:2:"10";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"10";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"0";s:11:"radius_unit";s:2:"px";}}s:12:"previewImage";a:4:{i:0;s:85:"http://dev.supsystic.com/wp-content/uploads/2015/01/113917523_natyurmortuy_foto_2.jpg";i:1;i:280;i:2;i:420;i:3;b:0;}}',
|
13 |
-
9 => 'a:26:{s:5:"title";s:6:"mosaic";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:9:{s:4:"grid";s:1:"4";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"ggMosaicType";a:7:{s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:2:"43";s:12:"fontSizeUnit";s:1:"0";s:10:"foreground";s:4:"#fff";s:9:"fontStyle";a:1:{i:0;s:4:"bold";}s:7:"bgColor";s:4:"#000";s:19:"bgColorTransparency";s:1:"4";}}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:2:"10";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:1:"5";s:1:"x";s:1:"2";s:1:"y";s:1:"4";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#6f0000";s:12:"transparency";s:1:"5";s:6:"effect";s:16:"quarter-slide-up";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:
|
14 |
),
|
15 |
);
|
2 |
|
3 |
return array(
|
4 |
'gallery_presets' => array(
|
5 |
+
1 => 'a:26:{s:5:"title";s:11:"new_preset1";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:10:{s:4:"grid";s:1:"0";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:2:"10";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:1:"5";s:1:"x";s:1:"2";s:1:"y";s:1:"4";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#6f0000";s:12:"transparency";s:1:"5";s:6:"effect";s:16:"quarter-slide-up";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:9:"Load More";s:11:"loadingText";s:10:"Loading...";s:12:"imagesAmount";s:2:"20";s:14:"showMoreAmount";s:2:"10";}s:16:"horizontalScroll";a:3:{s:7:"enabled";s:5:"false";s:5:"color";s:0:"";s:12:"transparency";s:2:"60";}s:11:"border-type";s:7:"Example";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:13:{s:7:"enabled";s:4:"true";s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:9:"imageText";s:16:"data-description";s:15:"linkedImageText";s:10:"data-title";s:10:"background";s:0:"";s:12:"transparency";s:2:"30";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:14:"popupHoverStop";s:4:"true";s:13:"slideshowAuto";s:5:"false";s:10:"popupwidth";s:0:"";s:11:"popupheight";s:0:"";}s:5:"popup";a:1:{s:5:"video";a:4:{s:5:"width";s:3:"853";s:6:"height";s:3:"480";s:8:"autoplay";s:5:"false";s:5:"onEnd";s:1:"0";}}s:7:"preload";a:4:{s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0073AA";s:9:"icon_name";s:7:"default";s:10:"icon_items";s:1:"0";}s:5:"posts";a:9:{s:6:"enable";s:1:"0";s:5:"style";s:1:"0";s:9:"autoposts";s:1:"0";s:15:"autopostsNumber";s:1:"5";s:7:"current";s:3:"671";s:6:"author";s:1:"0";s:4:"date";s:1:"0";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:3:"655";}s:5:"icons";a:12:{s:7:"enabled";s:5:"false";s:13:"overlay_color";s:7:"#3498db";s:15:"overlay_enabled";s:4:"true";s:4:"size";s:2:"16";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:20:"overlay_transparency";s:1:"5";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:14:"bgTransparency";s:1:"0";s:6:"margin";s:1:"5";s:6:"effect";s:17:"hi-icon-effect-5d";}s:14:"captionBuilder";a:5:{s:10:"isOnceUsed";s:1:"1";s:10:"background";a:1:{s:6:"enable";s:1:"1";}s:5:"title";a:5:{s:6:"enable";s:1:"1";s:8:"position";s:13:"center_bottom";s:8:"paddings";a:4:{s:4:"left";s:2:"10";s:5:"right";s:2:"10";s:3:"top";s:2:"20";s:6:"bottom";s:1:"0";}s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:11:"description";a:8:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:11:"font_family";s:7:"Default";s:9:"font_size";s:2:"14";s:14:"font_size_unit";s:1:"0";s:9:"fontColor";s:0:"";s:7:"bgColor";s:7:"#0c0c0c";s:19:"bgColorTransparency";s:1:"5";}s:5:"icons";a:7:{s:8:"position";s:10:"center_top";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:21:"popupFontAwesomeClass";s:9:"fa-expand";s:21:"videoFontAwesomeClass";s:0:"";s:20:"linkFontAwesomeClass";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}}s:10:"categories";a:15:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:5:"order";a:1:{i:0;s:7:"__all__";}s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:11:"theme_color";s:3:"off";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:4:"1800";}s:10:"pagination";a:10:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:4:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";s:10:"hide_color";s:3:"off";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:9:"watermark";a:9:{s:7:"enabled";s:0:"";s:8:"show_for";s:1:"3";s:11:"all_img_sel";s:1:"1";s:4:"type";s:3:"img";s:3:"url";s:0:"";s:6:"margin";s:1:"0";s:8:"position";s:13:"center_center";s:6:"rotate";s:1:"0";s:12:"transparency";s:2:"50";}s:7:"buttons";a:12:{s:5:"class";s:0:"";s:5:"color";s:7:"#000000";s:15:"backgroundColor";s:0:"";s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:0:"";s:10:"fontWeight";s:6:"normal";s:8:"paddingV";s:1:"5";s:8:"paddingH";s:1:"8";s:11:"borderStyle";s:5:"solid";s:11:"borderWidth";s:1:"1";s:11:"borderColor";s:7:"#000000";s:12:"borderRadius";s:1:"2";}s:8:"lazyload";a:1:{s:7:"enabled";s:1:"1";}}',
|
6 |
+
2 => 'a:26:{s:5:"title";s:12:"new-preset-2";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:8:{s:4:"grid";s:1:"1";s:8:"position";s:1:"1";s:8:"distance";s:1:"0";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:5:"black";s:5:"width";s:1:"3";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:16:{s:10:"text_align";s:4:"left";s:8:"position";s:3:"top";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0a076d";s:12:"transparency";s:1:"5";s:6:"effect";s:19:"revolving-door-left";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:9:"Load More";s:11:"loadingText";s:10:"Loading...";s:12:"imagesAmount";s:2:"20";s:14:"showMoreAmount";s:2:"10";}s:16:"horizontalScroll";a:3:{s:7:"enabled";s:5:"false";s:5:"color";s:0:"";s:12:"transparency";s:2:"60";}s:11:"border-type";s:7:"Example";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:13:{s:7:"enabled";s:4:"true";s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:9:"imageText";s:12:"data-caption";s:15:"linkedImageText";s:10:"data-title";s:10:"background";s:0:"";s:12:"transparency";s:2:"30";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:14:"popupHoverStop";s:4:"true";s:13:"slideshowAuto";s:5:"false";s:10:"popupwidth";s:0:"";s:11:"popupheight";s:0:"";}s:5:"popup";a:1:{s:5:"video";a:4:{s:5:"width";s:3:"853";s:6:"height";s:3:"480";s:8:"autoplay";s:5:"false";s:5:"onEnd";s:1:"0";}}s:7:"preload";a:4:{s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0073AA";s:9:"icon_name";s:7:"default";s:10:"icon_items";s:1:"0";}s:5:"posts";a:9:{s:6:"enable";s:1:"0";s:5:"style";s:1:"0";s:9:"autoposts";s:1:"0";s:15:"autopostsNumber";s:1:"5";s:7:"current";s:3:"671";s:6:"author";s:1:"0";s:4:"date";s:1:"0";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:3:"655";}s:5:"icons";a:12:{s:7:"enabled";s:5:"false";s:13:"overlay_color";s:7:"#3498db";s:15:"overlay_enabled";s:4:"true";s:4:"size";s:2:"16";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:20:"overlay_transparency";s:1:"5";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:14:"bgTransparency";s:1:"0";s:6:"margin";s:1:"5";s:6:"effect";s:17:"hi-icon-effect-5d";}s:14:"captionBuilder";a:5:{s:10:"isOnceUsed";s:1:"1";s:10:"background";a:1:{s:6:"enable";s:1:"1";}s:5:"title";a:5:{s:6:"enable";s:1:"1";s:8:"position";s:10:"center_top";s:8:"paddings";a:4:{s:4:"left";s:2:"10";s:5:"right";s:2:"10";s:3:"top";s:2:"10";s:6:"bottom";s:2:"10";}s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:11:"description";a:8:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:11:"font_family";s:7:"Default";s:9:"font_size";s:2:"14";s:14:"font_size_unit";s:1:"0";s:9:"fontColor";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:5:"icons";a:7:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:21:"popupFontAwesomeClass";s:9:"fa-expand";s:21:"videoFontAwesomeClass";s:0:"";s:20:"linkFontAwesomeClass";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}}s:10:"categories";a:15:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:5:"order";a:1:{i:0;s:7:"__all__";}s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:11:"theme_color";s:3:"off";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:4:"1800";}s:10:"pagination";a:10:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:4:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";s:10:"hide_color";s:3:"off";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:9:"watermark";a:9:{s:7:"enabled";s:0:"";s:8:"show_for";s:1:"3";s:11:"all_img_sel";s:1:"1";s:4:"type";s:3:"img";s:3:"url";s:0:"";s:6:"margin";s:1:"0";s:8:"position";s:13:"center_center";s:6:"rotate";s:1:"0";s:12:"transparency";s:2:"50";}s:7:"buttons";a:12:{s:5:"class";s:0:"";s:5:"color";s:7:"#000000";s:15:"backgroundColor";s:0:"";s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:0:"";s:10:"fontWeight";s:6:"normal";s:8:"paddingV";s:1:"5";s:8:"paddingH";s:1:"8";s:11:"borderStyle";s:5:"solid";s:11:"borderWidth";s:1:"1";s:11:"borderColor";s:7:"#000000";s:12:"borderRadius";s:1:"2";}s:8:"lazyload";a:1:{s:7:"enabled";s:1:"1";}}',
|
7 |
+
3 => 'a:26:{s:5:"title";s:12:"new-preset-3";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:10:{s:4:"grid";s:1:"0";s:8:"position";s:1:"1";s:8:"distance";s:1:"7";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:3:"100";s:11:"radius_unit";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#ffffff";s:5:"width";s:1:"5";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:2:"10";s:1:"x";s:1:"0";s:1:"y";s:1:"0";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#3498db";s:12:"transparency";s:2:"10";s:6:"effect";s:6:"center";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:9:"Load More";s:11:"loadingText";s:10:"Loading...";s:12:"imagesAmount";s:2:"20";s:14:"showMoreAmount";s:2:"10";}s:16:"horizontalScroll";a:3:{s:7:"enabled";s:5:"false";s:5:"color";s:0:"";s:12:"transparency";s:2:"60";}s:11:"border-type";s:7:"Example";s:10:"use_shadow";s:1:"1";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:13:{s:7:"enabled";s:4:"true";s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:9:"imageText";s:16:"data-description";s:15:"linkedImageText";s:10:"data-title";s:10:"background";s:0:"";s:12:"transparency";s:2:"30";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:14:"popupHoverStop";s:4:"true";s:13:"slideshowAuto";s:5:"false";s:10:"popupwidth";s:0:"";s:11:"popupheight";s:0:"";}s:5:"popup";a:1:{s:5:"video";a:4:{s:5:"width";s:3:"853";s:6:"height";s:3:"480";s:8:"autoplay";s:5:"false";s:5:"onEnd";s:1:"0";}}s:7:"preload";a:4:{s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0073AA";s:9:"icon_name";s:7:"default";s:10:"icon_items";s:1:"0";}s:5:"posts";a:9:{s:6:"enable";s:1:"0";s:5:"style";s:1:"0";s:9:"autoposts";s:1:"0";s:15:"autopostsNumber";s:1:"5";s:7:"current";s:3:"671";s:6:"author";s:1:"0";s:4:"date";s:1:"0";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:3:"655";}s:5:"icons";a:12:{s:7:"enabled";s:5:"false";s:13:"overlay_color";s:7:"#3498db";s:15:"overlay_enabled";s:4:"true";s:4:"size";s:2:"16";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:20:"overlay_transparency";s:1:"5";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:14:"bgTransparency";s:1:"0";s:6:"margin";s:1:"5";s:6:"effect";s:17:"hi-icon-effect-7a";}s:14:"captionBuilder";a:5:{s:10:"isOnceUsed";s:1:"1";s:10:"background";a:1:{s:6:"enable";s:1:"1";}s:5:"title";a:5:{s:6:"enable";s:1:"1";s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"5";s:5:"right";s:1:"5";s:3:"top";s:1:"5";s:6:"bottom";s:1:"0";}s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:11:"description";a:8:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:11:"font_family";s:7:"Default";s:9:"font_size";s:2:"14";s:14:"font_size_unit";s:1:"0";s:9:"fontColor";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:5:"icons";a:7:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:21:"popupFontAwesomeClass";s:9:"fa-expand";s:21:"videoFontAwesomeClass";s:0:"";s:20:"linkFontAwesomeClass";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}}s:10:"categories";a:15:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:4:"left";s:5:"order";a:1:{i:0;s:7:"__all__";}s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:11:"theme_color";s:3:"off";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:4:"1800";}s:10:"pagination";a:10:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"per_page";s:1:"6";s:3:"pos";s:3:"top";s:5:"align";s:6:"center";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:4:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";s:10:"hide_color";s:3:"off";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:9:"watermark";a:9:{s:7:"enabled";s:0:"";s:8:"show_for";s:1:"3";s:11:"all_img_sel";s:1:"1";s:4:"type";s:3:"img";s:3:"url";s:0:"";s:6:"margin";s:1:"0";s:8:"position";s:13:"center_center";s:6:"rotate";s:1:"0";s:12:"transparency";s:2:"50";}s:7:"buttons";a:12:{s:5:"class";s:0:"";s:5:"color";s:7:"#000000";s:15:"backgroundColor";s:0:"";s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:0:"";s:10:"fontWeight";s:6:"normal";s:8:"paddingV";s:1:"5";s:8:"paddingH";s:1:"8";s:11:"borderStyle";s:5:"solid";s:11:"borderWidth";s:1:"1";s:11:"borderColor";s:7:"#000000";s:12:"borderRadius";s:1:"2";}s:8:"lazyload";a:1:{s:7:"enabled";s:1:"1";}}',
|
8 |
+
4 => 'a:26:{s:5:"title";s:12:"new preset 4";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:8:{s:4:"grid";s:1:"2";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:2:"20";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:5:"black";s:5:"width";s:1:"3";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:1:"5";s:1:"x";s:1:"2";s:1:"y";s:1:"4";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0c0000";s:12:"transparency";s:1:"5";s:6:"effect";s:16:"quarter-two-step";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:9:"Load More";s:11:"loadingText";s:10:"Loading...";s:12:"imagesAmount";s:2:"20";s:14:"showMoreAmount";s:2:"10";}s:16:"horizontalScroll";a:3:{s:7:"enabled";s:5:"false";s:5:"color";s:0:"";s:12:"transparency";s:2:"60";}s:11:"border-type";s:7:"Example";s:10:"use_shadow";s:1:"1";s:12:"mouse_shadow";s:1:"1";s:3:"box";a:13:{s:7:"enabled";s:4:"true";s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:9:"imageText";s:16:"data-description";s:15:"linkedImageText";s:10:"data-title";s:10:"background";s:0:"";s:12:"transparency";s:2:"30";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:14:"popupHoverStop";s:4:"true";s:13:"slideshowAuto";s:5:"false";s:10:"popupwidth";s:0:"";s:11:"popupheight";s:0:"";}s:5:"popup";a:1:{s:5:"video";a:4:{s:5:"width";s:3:"853";s:6:"height";s:3:"480";s:8:"autoplay";s:5:"false";s:5:"onEnd";s:1:"0";}}s:7:"preload";a:4:{s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0073AA";s:9:"icon_name";s:7:"default";s:10:"icon_items";s:1:"0";}s:5:"posts";a:9:{s:6:"enable";s:1:"0";s:5:"style";s:1:"0";s:9:"autoposts";s:1:"0";s:15:"autopostsNumber";s:1:"5";s:7:"current";s:3:"671";s:6:"author";s:1:"0";s:4:"date";s:1:"0";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:3:"655";}s:5:"icons";a:12:{s:7:"enabled";s:5:"false";s:13:"overlay_color";s:7:"#3498db";s:15:"overlay_enabled";s:4:"true";s:4:"size";s:2:"16";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:20:"overlay_transparency";s:1:"5";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:14:"bgTransparency";s:1:"0";s:6:"margin";s:1:"5";s:6:"effect";s:17:"hi-icon-effect-5d";}s:14:"captionBuilder";a:5:{s:10:"isOnceUsed";s:1:"1";s:10:"background";a:1:{s:6:"enable";s:1:"1";}s:5:"title";a:5:{s:6:"enable";s:1:"1";s:8:"position";s:10:"center_top";s:8:"paddings";a:4:{s:4:"left";s:1:"7";s:5:"right";s:1:"7";s:3:"top";s:2:"20";s:6:"bottom";s:1:"0";}s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:11:"description";a:8:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:11:"font_family";s:7:"Default";s:9:"font_size";s:2:"14";s:14:"font_size_unit";s:1:"0";s:9:"fontColor";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:5:"icons";a:7:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:21:"popupFontAwesomeClass";s:9:"fa-expand";s:21:"videoFontAwesomeClass";s:0:"";s:20:"linkFontAwesomeClass";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}}s:10:"categories";a:15:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:5:"order";a:1:{i:0;s:7:"__all__";}s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:11:"theme_color";s:3:"off";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:4:"1800";}s:10:"pagination";a:10:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:4:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";s:10:"hide_color";s:3:"off";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:9:"watermark";a:9:{s:7:"enabled";s:0:"";s:8:"show_for";s:1:"3";s:11:"all_img_sel";s:1:"1";s:4:"type";s:3:"img";s:3:"url";s:0:"";s:6:"margin";s:1:"0";s:8:"position";s:13:"center_center";s:6:"rotate";s:1:"0";s:12:"transparency";s:2:"50";}s:7:"buttons";a:12:{s:5:"class";s:0:"";s:5:"color";s:7:"#000000";s:15:"backgroundColor";s:0:"";s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:0:"";s:10:"fontWeight";s:6:"normal";s:8:"paddingV";s:1:"5";s:8:"paddingH";s:1:"8";s:11:"borderStyle";s:5:"solid";s:11:"borderWidth";s:1:"1";s:11:"borderColor";s:7:"#000000";s:12:"borderRadius";s:1:"2";}s:8:"lazyload";a:1:{s:7:"enabled";s:1:"1";}}',
|
9 |
+
5 => 'a:26:{s:5:"title";s:12:"new-preset-5";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:10:{s:4:"grid";s:1:"0";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"215";s:17:"photo_height_unit";s:1:"0";}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:1:"0";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:17:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#ffffff";s:12:"transparency";s:1:"4";s:6:"effect";s:16:"quarter-slide-up";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"12";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";s:9:"fontStyle";a:1:{i:0;s:4:"bold";}}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:9:"Load More";s:11:"loadingText";s:10:"Loading...";s:12:"imagesAmount";s:2:"20";s:14:"showMoreAmount";s:2:"10";}s:16:"horizontalScroll";a:3:{s:7:"enabled";s:5:"false";s:5:"color";s:0:"";s:12:"transparency";s:2:"60";}s:11:"border-type";s:7:"Example";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:13:{s:7:"enabled";s:4:"true";s:4:"type";s:1:"0";s:5:"theme";s:7:"theme_1";s:9:"imageText";s:16:"data-description";s:15:"linkedImageText";s:10:"data-title";s:10:"background";s:0:"";s:12:"transparency";s:2:"30";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:14:"popupHoverStop";s:4:"true";s:13:"slideshowAuto";s:5:"false";s:10:"popupwidth";s:0:"";s:11:"popupheight";s:0:"";}s:5:"popup";a:1:{s:5:"video";a:4:{s:5:"width";s:3:"853";s:6:"height";s:3:"480";s:8:"autoplay";s:5:"false";s:5:"onEnd";s:1:"0";}}s:7:"preload";a:4:{s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0073AA";s:9:"icon_name";s:7:"default";s:10:"icon_items";s:1:"0";}s:5:"posts";a:9:{s:6:"enable";s:1:"0";s:5:"style";s:1:"0";s:9:"autoposts";s:1:"0";s:15:"autopostsNumber";s:1:"5";s:7:"current";s:3:"671";s:6:"author";s:1:"0";s:4:"date";s:1:"0";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:3:"655";}s:5:"icons";a:12:{s:7:"enabled";s:4:"true";s:13:"overlay_color";s:7:"#ffffff";s:15:"overlay_enabled";s:4:"true";s:4:"size";s:2:"20";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:20:"overlay_transparency";s:1:"5";s:10:"background";s:7:"#000000";s:16:"background_hover";s:7:"#820101";s:14:"bgTransparency";s:1:"0";s:6:"margin";s:1:"5";s:6:"effect";s:17:"hi-icon-effect-7b";}s:14:"captionBuilder";a:5:{s:10:"isOnceUsed";s:1:"1";s:10:"background";a:1:{s:6:"enable";s:1:"1";}s:5:"title";a:5:{s:6:"enable";s:1:"1";s:8:"position";s:13:"center_bottom";s:8:"paddings";a:4:{s:4:"left";s:2:"10";s:5:"right";s:2:"10";s:3:"top";s:2:"10";s:6:"bottom";s:1:"0";}s:7:"bgColor";s:7:"#6f0000";s:19:"bgColorTransparency";s:1:"4";}s:11:"description";a:8:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:11:"font_family";s:7:"Default";s:9:"font_size";s:2:"12";s:14:"font_size_unit";s:1:"0";s:9:"fontColor";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:5:"icons";a:8:{s:6:"enable";s:1:"1";s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:21:"popupFontAwesomeClass";s:9:"fa-expand";s:21:"videoFontAwesomeClass";s:0:"";s:20:"linkFontAwesomeClass";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}}s:10:"categories";a:15:{s:6:"preset";s:1:"5";s:7:"enabled";s:4:"true";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:5:"order";a:1:{i:0;s:7:"__all__";}s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#000000";s:11:"theme_color";s:3:"off";s:7:"padding";a:2:{s:4:"vert";s:1:"6";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"0";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:2:"40";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:4:"1800";}s:10:"pagination";a:10:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:4:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";s:10:"hide_color";s:3:"off";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:9:"watermark";a:9:{s:7:"enabled";s:0:"";s:8:"show_for";s:1:"3";s:11:"all_img_sel";s:1:"1";s:4:"type";s:3:"img";s:3:"url";s:0:"";s:6:"margin";s:1:"0";s:8:"position";s:13:"center_center";s:6:"rotate";s:1:"0";s:12:"transparency";s:2:"50";}s:7:"buttons";a:12:{s:5:"class";s:0:"";s:5:"color";s:7:"#000000";s:15:"backgroundColor";s:0:"";s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:0:"";s:10:"fontWeight";s:6:"normal";s:8:"paddingV";s:1:"5";s:8:"paddingH";s:1:"8";s:11:"borderStyle";s:5:"solid";s:11:"borderWidth";s:1:"1";s:11:"borderColor";s:7:"#000000";s:12:"borderRadius";s:1:"2";}s:8:"lazyload";a:1:{s:7:"enabled";s:1:"1";}}',
|
10 |
6 => 'a:14:{s:5:"title";s:0:"";s:4:"area";a:8:{s:4:"grid";s:1:"0";s:8:"distance";s:1:"5";s:5:"width";s:2:"75";s:10:"width_unit";s:1:"1";s:11:"photo_width";s:3:"250";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"200";s:17:"photo_height_unit";s:1:"0";}s:9:"thumbnail";a:3:{s:6:"border";a:5:{s:6:"radius";s:2:"30";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:1:"0";}s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:8:{s:7:"enabled";s:4:"true";s:6:"effect";s:14:"quarter-appear";s:10:"background";s:7:"#3498db";s:10:"foreground";s:7:"#ecf0f1";s:12:"transparency";s:1:"5";s:9:"text_size";s:2:"12";s:14:"text_size_unit";s:1:"0";s:10:"text_align";s:1:"3";}}s:11:"border-type";s:5:"Types";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:6:{s:4:"type";s:1:"0";s:5:"theme";s:7:"theme_1";s:10:"transition";s:7:"elastic";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:13:"slideshowAuto";s:5:"false";}s:5:"posts";a:7:{s:6:"enable";s:1:"1";s:5:"style";s:1:"2";s:7:"current";s:3:"233";s:6:"author";s:1:"1";s:4:"date";s:1:"1";s:8:"contents";s:1:"1";s:10:"categories";s:1:"1";}s:5:"pages";a:1:{s:7:"current";s:2:"33";}s:5:"icons";a:11:{s:7:"enabled";s:5:"false";s:6:"effect";s:17:"hi-icon-effect-5d";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:4:"size";s:2:"16";s:6:"margin";s:1:"5";s:15:"overlay_enabled";s:4:"true";s:13:"overlay_color";s:7:"#3498db";s:20:"overlay_transparency";s:1:"5";}s:10:"categories";a:13:{s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:6:"preset";s:1:"0";s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:0:"";}s:10:"pagination";a:10:{s:7:"enabled";s:4:"true";s:8:"per_page";s:1:"6";s:3:"pos";s:3:"top";s:5:"align";s:5:"right";s:6:"preset";s:1:"5";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:3:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#1e73be";}s:7:"padding";a:2:{s:8:"vertical";s:1:"6";s:10:"horizontal";s:2:"10";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"10";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"0";s:11:"radius_unit";s:2:"px";}}s:12:"previewImage";a:4:{i:0;s:85:"http://dev.supsystic.com/wp-content/uploads/2015/01/113917523_natyurmortuy_foto_2.jpg";i:1;i:280;i:2;i:420;i:3;b:0;}}',
|
11 |
7 => 'a:14:{s:5:"title";s:0:"";s:4:"area";a:8:{s:4:"grid";s:1:"0";s:8:"distance";s:2:"10";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:11:"photo_width";s:3:"350";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"200";s:17:"photo_height_unit";s:1:"0";}s:9:"thumbnail";a:3:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:2:"10";}s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#c0c0c0";s:4:"blur";s:1:"3";s:1:"x";s:1:"4";s:1:"y";s:2:"-4";}s:7:"overlay";a:8:{s:7:"enabled";s:4:"true";s:6:"effect";s:16:"quarter-slide-up";s:10:"background";s:7:"#6f0000";s:10:"foreground";s:7:"#ffffff";s:12:"transparency";s:1:"5";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"text_align";s:1:"2";}}s:11:"border-type";s:5:"Types";s:10:"use_shadow";s:1:"1";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:6:{s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:10:"transition";s:4:"fade";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:13:"slideshowAuto";s:5:"false";}s:5:"posts";a:7:{s:6:"enable";s:1:"1";s:5:"style";s:1:"5";s:7:"current";s:4:"1999";s:6:"author";s:1:"1";s:4:"date";s:1:"1";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:2:"33";}s:5:"icons";a:11:{s:7:"enabled";s:5:"false";s:6:"effect";s:17:"hi-icon-effect-5d";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:4:"size";s:2:"16";s:6:"margin";s:1:"5";s:15:"overlay_enabled";s:4:"true";s:13:"overlay_color";s:7:"#3498db";s:20:"overlay_transparency";s:1:"5";}s:10:"categories";a:13:{s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:6:"preset";s:1:"0";s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:0:"";}s:10:"pagination";a:10:{s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:6:"preset";s:1:"0";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:3:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:12:"previewImage";a:4:{i:0;s:85:"http://dev.supsystic.com/wp-content/uploads/2015/01/113917523_natyurmortuy_foto_2.jpg";i:1;i:280;i:2;i:420;i:3;b:0;}}',
|
12 |
8 => 'a:14:{s:5:"title";s:0:"";s:4:"area";a:8:{s:4:"grid";s:1:"0";s:8:"distance";s:2:"10";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:11:"photo_width";s:3:"500";s:16:"photo_width_unit";s:1:"0";s:12:"photo_height";s:3:"200";s:17:"photo_height_unit";s:1:"0";}s:9:"thumbnail";a:3:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:1:"0";}s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#aaaaaa";s:4:"blur";s:2:"10";s:1:"x";s:1:"1";s:1:"y";s:1:"1";}s:7:"overlay";a:8:{s:7:"enabled";s:4:"true";s:6:"effect";s:14:"quarter-appear";s:10:"background";s:7:"#3498db";s:10:"foreground";s:7:"#ecf0f1";s:12:"transparency";s:1:"5";s:9:"text_size";s:2:"12";s:14:"text_size_unit";s:1:"0";s:10:"text_align";s:1:"3";}}s:11:"border-type";s:5:"Types";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:6:{s:4:"type";s:1:"0";s:5:"theme";s:7:"theme_1";s:10:"transition";s:7:"elastic";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:13:"slideshowAuto";s:5:"false";}s:5:"posts";a:7:{s:6:"enable";s:1:"1";s:5:"style";s:1:"3";s:7:"current";s:3:"233";s:6:"author";s:1:"1";s:4:"date";s:1:"1";s:8:"contents";s:1:"1";s:10:"categories";s:1:"1";}s:5:"pages";a:1:{s:7:"current";s:2:"33";}s:5:"icons";a:11:{s:7:"enabled";s:5:"false";s:6:"effect";s:17:"hi-icon-effect-5d";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:4:"size";s:2:"16";s:6:"margin";s:1:"5";s:15:"overlay_enabled";s:4:"true";s:13:"overlay_color";s:7:"#3498db";s:20:"overlay_transparency";s:1:"5";}s:10:"categories";a:13:{s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:6:"preset";s:1:"0";s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:0:"";}s:10:"pagination";a:10:{s:7:"enabled";s:5:"false";s:8:"per_page";s:1:"6";s:3:"pos";s:3:"top";s:5:"align";s:5:"right";s:6:"preset";s:1:"5";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:3:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#1e73be";}s:7:"padding";a:2:{s:8:"vertical";s:1:"6";s:10:"horizontal";s:2:"10";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"10";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"0";s:11:"radius_unit";s:2:"px";}}s:12:"previewImage";a:4:{i:0;s:85:"http://dev.supsystic.com/wp-content/uploads/2015/01/113917523_natyurmortuy_foto_2.jpg";i:1;i:280;i:2;i:420;i:3;b:0;}}',
|
13 |
+
9 => 'a:26:{s:5:"title";s:6:"mosaic";s:12:"previewImage";s:0:"";s:4:"sort";a:2:{s:6:"sortto";s:0:"";s:6:"sortby";s:0:"";}s:7:"plugins";a:1:{s:10:"membership";a:1:{s:6:"enable";s:0:"";}}s:4:"area";a:9:{s:4:"grid";s:1:"4";s:8:"position";s:1:"1";s:8:"distance";s:1:"5";s:5:"width";s:3:"100";s:10:"width_unit";s:1:"1";s:7:"padding";s:1:"0";s:11:"photo_width";s:3:"215";s:16:"photo_width_unit";s:1:"0";s:12:"ggMosaicType";a:7:{s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:2:"43";s:12:"fontSizeUnit";s:1:"0";s:10:"foreground";s:4:"#fff";s:9:"fontStyle";a:1:{i:0;s:4:"bold";}s:7:"bgColor";s:4:"#000";s:19:"bgColorTransparency";s:1:"4";}}s:7:"general";a:2:{s:7:"columns";a:1:{s:6:"number";s:1:"3";}s:17:"responsiveColumns";a:3:{s:7:"desktop";a:2:{s:5:"width";s:4:"1200";s:7:"columns";s:1:"3";}s:6:"tablet";a:2:{s:5:"width";s:3:"768";s:7:"columns";s:1:"3";}s:6:"mobile";a:2:{s:5:"width";s:3:"320";s:7:"columns";s:1:"3";}}}s:9:"thumbnail";a:7:{s:6:"border";a:5:{s:6:"radius";s:1:"0";s:11:"radius_unit";s:1:"0";s:4:"type";s:4:"none";s:5:"color";s:7:"#fefefe";s:5:"width";s:2:"10";}s:11:"cropQuality";s:3:"100";s:6:"shadow";a:5:{s:7:"overlay";s:1:"0";s:5:"color";s:7:"#000000";s:4:"blur";s:1:"5";s:1:"x";s:1:"2";s:1:"y";s:1:"4";}s:7:"overlay";a:16:{s:10:"text_align";s:1:"2";s:8:"position";s:0:"";s:7:"enabled";s:4:"true";s:10:"background";s:7:"#6f0000";s:12:"transparency";s:1:"5";s:6:"effect";s:16:"quarter-slide-up";s:18:"imageOnHoverEnable";s:1:"0";s:12:"imageOnHover";s:0:"";s:8:"personal";s:5:"false";s:17:"polaroidAnimation";s:4:"true";s:18:"polaroidScattering";s:4:"true";s:18:"polaroidFrameWidth";s:2:"20";s:11:"font_family";s:7:"Default";s:9:"text_size";s:2:"14";s:14:"text_size_unit";s:1:"0";s:10:"foreground";s:7:"#ffffff";}s:7:"tooltip";s:5:"false";s:8:"isMobile";s:5:"false";s:22:"isDisableMobileCaption";s:5:"false";}s:13:"socialSharing";a:1:{s:7:"enabled";s:0:"";}s:8:"showMore";a:6:{s:7:"enabled";s:5:"false";s:12:"loadOnScroll";s:5:"false";s:10:"buttonText";s:9:"Load More";s:11:"loadingText";s:10:"Loading...";s:12:"imagesAmount";s:2:"20";s:14:"showMoreAmount";s:2:"10";}s:16:"horizontalScroll";a:3:{s:7:"enabled";s:5:"false";s:5:"color";s:0:"";s:12:"transparency";s:2:"60";}s:11:"border-type";s:7:"Example";s:10:"use_shadow";s:1:"0";s:12:"mouse_shadow";s:1:"0";s:3:"box";a:13:{s:7:"enabled";s:4:"true";s:4:"type";s:1:"1";s:5:"theme";s:7:"theme_6";s:9:"imageText";s:16:"data-description";s:15:"linkedImageText";s:10:"data-title";s:10:"background";s:0:"";s:12:"transparency";s:2:"30";s:9:"slideshow";s:5:"false";s:14:"slideshowSpeed";s:4:"2500";s:14:"popupHoverStop";s:4:"true";s:13:"slideshowAuto";s:5:"false";s:10:"popupwidth";s:0:"";s:11:"popupheight";s:0:"";}s:5:"popup";a:1:{s:5:"video";a:4:{s:5:"width";s:3:"853";s:6:"height";s:3:"480";s:8:"autoplay";s:5:"false";s:5:"onEnd";s:1:"0";}}s:7:"preload";a:4:{s:7:"enabled";s:4:"true";s:10:"background";s:7:"#0073AA";s:9:"icon_name";s:7:"default";s:10:"icon_items";s:1:"0";}s:5:"posts";a:9:{s:6:"enable";s:1:"0";s:5:"style";s:1:"0";s:9:"autoposts";s:1:"0";s:15:"autopostsNumber";s:1:"5";s:7:"current";s:3:"671";s:6:"author";s:1:"0";s:4:"date";s:1:"0";s:8:"contents";s:1:"0";s:10:"categories";s:1:"0";}s:5:"pages";a:1:{s:7:"current";s:3:"655";}s:5:"icons";a:12:{s:7:"enabled";s:5:"false";s:13:"overlay_color";s:7:"#3498db";s:15:"overlay_enabled";s:4:"true";s:4:"size";s:2:"16";s:5:"color";s:7:"#ffffff";s:11:"hover_color";s:7:"#ffffff";s:20:"overlay_transparency";s:1:"5";s:10:"background";s:7:"#1e73be";s:16:"background_hover";s:7:"#1e73be";s:14:"bgTransparency";s:1:"0";s:6:"margin";s:1:"5";s:6:"effect";s:17:"hi-icon-effect-5d";}s:14:"captionBuilder";a:5:{s:10:"isOnceUsed";s:1:"1";s:10:"background";a:1:{s:6:"enable";s:1:"1";}s:5:"title";a:5:{s:6:"enable";s:1:"1";s:8:"position";s:13:"center_bottom";s:8:"paddings";a:4:{s:4:"left";s:2:"10";s:5:"right";s:2:"10";s:3:"top";s:2:"20";s:6:"bottom";s:1:"0";}s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}s:11:"description";a:8:{s:8:"position";s:13:"center_center";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:11:"font_family";s:7:"Default";s:9:"font_size";s:2:"14";s:14:"font_size_unit";s:1:"0";s:9:"fontColor";s:0:"";s:7:"bgColor";s:7:"#0c0c0c";s:19:"bgColorTransparency";s:1:"5";}s:5:"icons";a:7:{s:8:"position";s:10:"center_top";s:8:"paddings";a:4:{s:4:"left";s:1:"0";s:5:"right";s:1:"0";s:3:"top";s:1:"0";s:6:"bottom";s:1:"0";}s:21:"popupFontAwesomeClass";s:9:"fa-expand";s:21:"videoFontAwesomeClass";s:0:"";s:20:"linkFontAwesomeClass";s:0:"";s:7:"bgColor";s:0:"";s:19:"bgColorTransparency";s:1:"0";}}s:10:"categories";a:15:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"position";s:3:"top";s:5:"align";s:6:"center";s:5:"order";a:1:{i:0;s:7:"__all__";}s:6:"nav_bg";s:7:"#1e73be";s:11:"hide_nav_bg";s:2:"on";s:7:"text_bg";s:7:"#82a0bf";s:12:"hide_text_bg";s:2:"on";s:10:"text_color";s:7:"#1e73be";s:11:"theme_color";s:3:"off";s:7:"padding";a:2:{s:4:"vert";s:1:"3";s:3:"hor";s:2:"10";}s:11:"font_weight";s:6:"normal";s:9:"font_size";s:2:"12";s:6:"border";a:5:{s:5:"width";s:1:"1";s:5:"style";s:5:"solid";s:5:"color";s:7:"#1e73be";s:6:"radius";s:1:"3";s:11:"radius_unit";s:2:"px";}}s:9:"quicksand";a:2:{s:7:"enabled";s:1:"0";s:8:"duration";s:4:"1800";}s:10:"pagination";a:10:{s:6:"preset";s:1:"0";s:7:"enabled";s:5:"false";s:8:"per_page";s:2:"10";s:3:"pos";s:3:"top";s:5:"align";s:4:"left";s:9:"container";a:2:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";}s:4:"text";a:4:{s:10:"background";s:0:"";s:15:"hide_background";s:2:"on";s:5:"color";s:7:"#0a0a0a";s:10:"hide_color";s:3:"off";}s:7:"padding";a:2:{s:8:"vertical";s:1:"4";s:10:"horizontal";s:1:"8";}s:4:"font";a:2:{s:6:"weight";s:6:"normal";s:4:"size";s:2:"13";}s:6:"border";a:5:{s:5:"width";s:1:"1";s:4:"type";s:5:"solid";s:5:"color";s:7:"#999999";s:6:"radius";s:1:"4";s:11:"radius_unit";s:2:"px";}}s:9:"watermark";a:9:{s:7:"enabled";s:0:"";s:8:"show_for";s:1:"3";s:11:"all_img_sel";s:1:"1";s:4:"type";s:3:"img";s:3:"url";s:0:"";s:6:"margin";s:1:"0";s:8:"position";s:13:"center_center";s:6:"rotate";s:1:"0";s:12:"transparency";s:2:"50";}s:7:"buttons";a:12:{s:5:"class";s:0:"";s:5:"color";s:7:"#000000";s:15:"backgroundColor";s:0:"";s:10:"fontFamily";s:7:"Default";s:8:"fontSize";s:0:"";s:10:"fontWeight";s:6:"normal";s:8:"paddingV";s:1:"5";s:8:"paddingH";s:1:"8";s:11:"borderStyle";s:5:"solid";s:11:"borderWidth";s:1:"1";s:11:"borderColor";s:7:"#000000";s:12:"borderRadius";s:1:"2";}s:8:"lazyload";a:1:{s:7:"enabled";s:1:"1";}}',
|
14 |
),
|
15 |
);
|
src/GridGallery/Galleries/configs/tooltips.php
CHANGED
@@ -2,69 +2,118 @@
|
|
2 |
|
3 |
return array(
|
4 |
'tooltips' => array(
|
|
|
|
|
|
|
|
|
|
|
5 |
// Area
|
6 |
-
|
|
|
|
|
7 |
'columns' => __('Number of columns with images on gallery page', 'sgg'),
|
8 |
'responsive-columns' => __('The number of columns for a given width of the screen. We specify the standard 1200px for medium-sized screens, 768px for the tablets, 320 for mobile. You can change this sizes if you want.', 'sgg'),
|
9 |
-
|
10 |
'area-height' => __('Height', 'sgg'),
|
11 |
-
|
12 |
-
'full-screen-width' => __('
|
13 |
-
'area-padding' => __('
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
// Border
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
'
|
|
|
24 |
'display-first-photo' => __('When this option is enabled, only first picture from this gallery will be seen on the website. The other pictures will be seen in the popup window after clicking on the first picture.', 'sgg'),
|
25 |
-
|
26 |
'social-buttons-project' =>__('Select Social Share Buttons project', 'sgg'),
|
|
|
27 |
'gallery-social-sharing' =>__('Enable social share buttons on gallery page', 'sgg'),
|
28 |
'image-social-sharing' =>__('Enable social share buttons on images', 'sgg'),
|
29 |
'popup-social-sharing' =>__('Enable social share buttons in popup images', 'sgg'),
|
30 |
-
|
31 |
// Shadow
|
32 |
-
|
33 |
-
|
34 |
-
'when-mouse-is-over' =>__('
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
'
|
42 |
-
|
43 |
-
'
|
44 |
-
'
|
45 |
-
'
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
'
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
//Categories
|
58 |
-
|
59 |
'animation-duration' =>__('Transition/animation speed in milliseconds', 'sgg'),
|
60 |
'enable-shuffling-animation' =>__('Animated sorting and laying out a group of images', 'sgg'),
|
61 |
//Pagination
|
62 |
-
|
63 |
//Mosaic
|
64 |
'mosaic-images-count' =>__('Show first images', 'sgg'),
|
65 |
-
'mosaic-show-hidden-images' =>__('If this option is enabled
|
66 |
-
|
67 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
),
|
69 |
'tooltips_icon' => array(
|
70 |
'icon' => 'question'
|
2 |
|
3 |
return array(
|
4 |
'tooltips' => array(
|
5 |
+
// settings page
|
6 |
+
'sgg-shortcode' => __('This shortcode helps you insert your gallery into post or page content. Just copy it and then paste the shortcode into your post or page body. ', 'sgg')
|
7 |
+
. '<a target=\'_blank\' href=\'https://supsystic.com/documentation/add-gallery-site-content\'>https://supsystic.com/documentation/add-gallery-site-content/</a>',
|
8 |
+
'sgg-php-code' => __('You may use PHPCode, if you need to insert a gallery shortcode to your php code directly. ', 'sgg')
|
9 |
+
. '<a target=\'_blank\' href=\'https://supsystic.com/documentation/add-gallery-site-content\'>https://supsystic.com/documentation/add-gallery-site-content/</a>',
|
10 |
// Area
|
11 |
+
'grid-type' => __('Here you can change your gallery type. ', 'sgg') . '</br><img src=@url/Grid.jpg />',
|
12 |
+
'title' => __('Here you can change your gallery name. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/main-settings/\'>https://supsystic.com/documentation/main-settings/</a>',
|
13 |
+
'gallery-align' => __('Choose the most suitable gallery alignment for your site design. Gallery may be aligned by center, left or right side of the page. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/main-settings/\'>https://supsystic.com/documentation/main-settings</a>',
|
14 |
'columns' => __('Number of columns with images on gallery page', 'sgg'),
|
15 |
'responsive-columns' => __('The number of columns for a given width of the screen. We specify the standard 1200px for medium-sized screens, 768px for the tablets, 320 for mobile. You can change this sizes if you want.', 'sgg'),
|
16 |
+
'distance' => __('Here you can set the distance between images in your gallery. This parameter affects both horyzontal and vertical distance.', 'sgg') . '</br><img src=@url/distance_between_photos.jpg />',
|
17 |
'area-height' => __('Height', 'sgg'),
|
18 |
+
'area-width' => __('This option helps you set gallery width in pixels or percents. Note: setting this parameter in percents allows your gallery to adjust to any screen size. ', 'sgg') . '</br><img src=@url/gallery-width.jpg />',
|
19 |
+
'full-screen-width' => __('Check this checkbox if you want your gallery to be displayed at full screen width. This option is of no use in Vertical gallery layout. Click the link below to see the example of Full Screen Width gallery. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/example/full-width-gallery-example/\'>https://supsystic.com/example/full-width-gallery-example/</a>',
|
20 |
+
'area-padding' => __('Here you may set gallery padding value in pixels. Padding will be the same from both sides of the gallery. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/main-settings/\'>https://supsystic.com/documentation/main-settings/</a>',
|
21 |
+
'photo-width' => __('Set your image width in pixels or percents. This option is not available in Horizontal gallery. Note: setting this parameter in percents allows your gallery to adjust to any screen size. ', 'sgg') . '</br><img src=@url/width_bet_photos.jpg>',
|
22 |
+
'photo-height' => __('Set your image height in pixels or percents. This option is not available in Vertical gallery. Note: setting this parameter in percents allows your gallery to adjust to any screen size. ', 'sgg') . '</br><img src=@url/height_bet_photos.jpg>',
|
23 |
+
'browserUrlTooltipHideFree' => __('If this option is enabled, the links on the images will not be displayed in the browser. Also, it will be impossible to open gallery in popup. In the case you are not sure, please do not enable the option. ', 'sgg'),
|
24 |
+
'default-settings' =>__('All new galleries you create after enabling the option will be created with these settings by default (even gallery type). Important! This feature may be enabled only in single gallery at once. ', 'sgg'),
|
25 |
// Border
|
26 |
+
'border-type' => __('Select border type for your gallery thumbnails. ', 'sgg') . '<p><img src=@url/solid_border.jpg><img src=@url/Dashed_border.jpg></p><p><img src=@url/dotted_border.jpg><img src=@url/double_border.jpg></p>',
|
27 |
+
// 'border-type' => __('Select border type for your gallery thumbnails. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/border-type/\'>https://supsystic.com/documentation/border-type/</a>',
|
28 |
+
'border-color' => __('Select border color for your gallery thumbnails.', 'sgg'),
|
29 |
+
'border-width' =>__('Select border thickness for your gallery thumbnails.', 'sgg'),
|
30 |
+
'border-radius' => __('Set the radius of corner rounding for your button in pixels. ', 'sgg') . '</br><img src=@url/image-radius.jpg>',
|
31 |
+
'cropQuality' => __('Here you may set the quality of your displayed gallery thumbnails in percents. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/main-settings/\'>https://supsystic.com/documentation/main-settings/</a>',
|
32 |
'display-first-photo' => __('When this option is enabled, only first picture from this gallery will be seen on the website. The other pictures will be seen in the popup window after clicking on the first picture.', 'sgg'),
|
33 |
+
'open-by-link' =>__('If this option is enabled, you may insert your gallery short link into the content of your page. In this case gallery thumbnails will not be displayed on the page and the gallery will open in pop-up box in the same window after clicking on the link. You may find the detailed instructions here: ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/gallery-by-link-in-popup/\'>https://supsystic.com/documentation/gallery-by-link-in-popup/</a>',
|
34 |
'social-buttons-project' =>__('Select Social Share Buttons project', 'sgg'),
|
35 |
+
'social-sharing' => __('In order to use this option you need to additionally install Social Share Buttons plugin by Supsystic. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/social-sharing/\'>https://supsystic.com/documentation/social-sharing/</a>',
|
36 |
'gallery-social-sharing' =>__('Enable social share buttons on gallery page', 'sgg'),
|
37 |
'image-social-sharing' =>__('Enable social share buttons on images', 'sgg'),
|
38 |
'popup-social-sharing' =>__('Enable social share buttons in popup images', 'sgg'),
|
39 |
+
|
40 |
// Shadow
|
41 |
+
'sgg-t-shadow' => __('Enable and customize shadows on the background of your thumbnails. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/shadow/\'>https://supsystic.com/documentation/shadow/</a>',
|
42 |
+
'sgg-t-shadow-eff-preset' => __('Choose one of these dramatic shadow effects for your thumbnails.', 'sgg'),
|
43 |
+
'when-mouse-is-over' =>__('This option determines whether the shadow thumbnail appears or disappears when mouse is over it.', 'sgg'),
|
44 |
+
'overlay-type' =>__('If this option is enabled, all image thumbnails in your gallery will be shadowed.', 'sgg'),
|
45 |
+
'shadow-color' => __('Here you may define your shadow color.', 'sgg'),
|
46 |
+
'shadow-blur' =>__('Here you may set the shadow blur in percents. Note: if \'Overlay image with shadow\' option is enabled, your thumbnails may become blurry.', 'sgg'),
|
47 |
+
'shadow-x' =>__('Shadow shifting along X axis.', 'sgg'),
|
48 |
+
'shadow-y' =>__('Shadow shifting along Y axis.', 'sgg'),
|
49 |
+
//popup
|
50 |
+
'box' => __('Customize your pop-up image settings. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/pop-up-image/\'>https://supsystic.com/documentation/pop-up-image/</a>',
|
51 |
+
'sgg-t-popup-theme' => __('Choose the most attractive and convenient theme for your pop-up box. Note: \'Linked images\' option works only with Theme #7.', 'sgg'),
|
52 |
+
'mobile' =>__('If this option is enabled, your pop-up box will not show up on mobile devices.', 'sgg'),
|
53 |
+
'popup-image-text' =>__('Here you may select the type of text that will be displayed in your popup box.', 'sgg'),
|
54 |
+
'captions' =>__('If this option is enabled, your captions will not be displayed in pop-up box. ', 'sgg'),
|
55 |
+
'hide-long-tooltip-titles' => __('In order to see the whole caption text in popup window you should hover on it and a new semi-transparent box with the whole text will appear. If you don\'t use long texts in captions, just tick this checkbox and extra tooltip in popup will be disabled.', 'sgg'),
|
56 |
+
'box-background' => __('Choose color for pop-up page background. ', 'sgg'),
|
57 |
+
'box-transparency' => __('Choose pop-up background transparency.', 'sgg'),
|
58 |
+
'slideshow' =>__('Enable and customize the slideshow option in your pop-up box.', 'sgg'),
|
59 |
+
'sgg-t-popup-slide-show-speed' => __('Set the speed of changing slide in milliseconds.', 'sgg'),
|
60 |
+
'popupHoverStop' => __('If this option is enabled, slideshow pauses, when mouse cursor is over image.', 'sgg'),
|
61 |
+
'sgg-t-popup-slideshow-autostart' => __('If this option is enabled, slideshow starts automatically. If it is disabled, the play/pause button will appear in left down corner of your pop-up gallery window.', 'sgg'),
|
62 |
+
'box-popupsize' => __('Here you may set your pop-up image size.', 'sgg'),
|
63 |
+
'box-disableHistory' => __('If this option is enabled, after clicking \'back\' button in your browser, pop-up window will be closed and all image data will be cleared. If disabled - images will be saved in browser history and will be opened again on \'back\' or \'forward\' button click.', 'sgg'),
|
64 |
+
// lazy-load
|
65 |
+
'sgg-t-lazyload-enable' => __('This option is important for big galleries. When it is enabled, images are loading gradually as the page scrolls down.', 'sgg'),
|
66 |
+
// Gallery Loader
|
67 |
+
'preload' =>__('This option enables animated loader to indicate, that images are loading. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/gallery-loader/\'>https://supsystic.com/documentation/gallery-loader/</a>',
|
68 |
+
// caption and icons
|
69 |
+
'sgg-ci-caption-enable' => __('If this option is enabled, captions are displayed when mouse cursor is over the thumbnail. You may also find detailed caption settings below. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/captions/\'>https://supsystic.com/documentation/captions/</a>',
|
70 |
+
'chooseEffect' => __('Choose your captions visual effect. If you are going to enable icons, you need to choose effects with icons. ', 'sgg'),
|
71 |
+
'polaroid-effect' => __('If this option is enabled, your gallery image thumbnails will be displayed in Polaroid style frames. Images will be cropped to a square shape. Captions will apperar below the thumbnails when hovering mouse over it. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/polaroid-gallery/\'>https://supsystic.com/documentation/polaroid-gallery/</a>',
|
72 |
+
'polaroid-animation' => __('If this option is enabled, your polaroid image thumbnails move when mouse cursor is over them. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/polaroid-gallery/\'>https://supsystic.com/documentation/polaroid-gallery/</a>',
|
73 |
+
'polaroid-scattering' => __('Choose this option to make your polaroid image thumbnails scatter in a random way. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/polaroid-gallery/\'>https://supsystic.com/documentation/polaroid-gallery/</a>',
|
74 |
+
'polaroid-frame-width' => __('Set polaroid frame padding in pixels. Note: increasing this parameter may make your thumbnail images smaller. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/polaroid-gallery/\'>https://supsystic.com/documentation/polaroid-gallery/</a>',
|
75 |
+
'overlay-background' => __('Choose your caption background color.', 'sgg'),
|
76 |
+
'overlay-foreground' => __('Choose your caption text color.', 'sgg'),
|
77 |
+
'overlay-transparency' => __('Choose your caption background transparency.', 'sgg'),
|
78 |
+
'text-size' => __('Set your caption text size.', 'sgg'),
|
79 |
+
'text-align' => __('Choose the horizontal align for your caption text.', 'sgg'),
|
80 |
+
'overlay-position' => __('Choose the vertical align for your caption text.', 'sgg'),
|
81 |
+
'font-family' => __('Choose font family for your caption text.', 'sgg'),
|
82 |
+
'tooltip' =>__('If this option is enabled, image title will not appear when mouse cursor is over the image.', 'sgg'),
|
83 |
+
'ismobile' =>__('When this option is enabled, caption will be always visible when gallery is displayed on mobile devices.', 'sgg'),
|
84 |
+
'photo-icon' =>__('If this option is enabled, icons are displayed when mouse cursor is over the thumbnail. Icons make your gallery interactive and allow your site visitors to take different actions with thumbnails. ', 'sgg') . '</br><img src=@url/icons.jpg />',
|
85 |
+
'ci-icons-animation-effects' => __('Here you may choose the animation effects for your icon symbols. Chosen effect will be the same for all the icons.', 'sgg'),
|
86 |
+
'ci-icons-color' => __('Choose the color for your icon symbols.', 'sgg'),
|
87 |
+
'ci-icons-hover-color' => __('Choose the color for your icon symbols while hovering over them.', 'sgg'),
|
88 |
+
'ci-icons-bg-color' => __('Choose the color for your icon backgrounds while hovering over them.', 'sgg'),
|
89 |
+
'ci-icons-hover-bg-color' => __('Choose the icon background color transparency.', 'sgg'),
|
90 |
+
'ci-icons-hover-size' => __('Here you may set icons size in pixels.', 'sgg'),
|
91 |
+
'ci-icons-distance' => __('Set the distance between icons. Note: you may set this parameter only for several icons. ', 'sgg'),
|
92 |
+
'ci-icons-show-overlay' => __('This option enables icon background overlay.', 'sgg'),
|
93 |
+
'ci-icons-overlay-color' => __('Choose the background overlay color.', 'sgg'),
|
94 |
+
'ci-icons-overlay-transparency' => __('Set the value for overlay transparency in percents.', 'sgg'),
|
95 |
+
'overlay-personal' => __('If option enabled you can choose personal caption effect per image in images list. If option disabled chosen effect will be used for all images', 'sgg'),
|
96 |
+
'overlay-effect-image-on-hover-enable' => __('\'Image on hover\' - If this effect is enabled, the other image will be shown on the place of the current one, when mouse cursor is over it. The other image could be selected in the option below (\'Select Image on hover\') and will be shown for all images in this gallery. In case you want to show different pictures, upload them for each image separately on Images List section (\'Hover Caption Image\' tab). Please note, that \'Personal Captions\' option should be enabled.', 'sgg'),
|
97 |
+
'overlay-effect-image-on-hover' => __('You may upload an image from Wordpress media library. This image will appear while hovering over any gallery thumbnail.', 'sgg'),
|
98 |
+
'isDisableMobileCaption' =>__('When this option is enabled, caption will never be seen when gallery is displayed on mobile devices.', 'sgg'),
|
99 |
//Categories
|
100 |
+
'categories-show' =>__('This option allows you to arrange your gallery images by categories. It may be useful for the galleries with great amount of images. ', 'sgg') . '</br><img src=@url/show_categories.jpg />',
|
101 |
'animation-duration' =>__('Transition/animation speed in milliseconds', 'sgg'),
|
102 |
'enable-shuffling-animation' =>__('Animated sorting and laying out a group of images', 'sgg'),
|
103 |
//Pagination
|
104 |
+
'pages-show' =>__('This option allows you to split your gallery images to several pages for comfortable navigation. It may be useful for the galleries with great amount of images. ', 'sgg') . '</br><img src=@url/enable_pagination.jpg />',
|
105 |
//Mosaic
|
106 |
'mosaic-images-count' =>__('Show first images', 'sgg'),
|
107 |
+
'mosaic-show-hidden-images' =>__('If this option is enabled, all hidden thumbnails will be displayed below after clicking on thumbnail with count.', 'sgg'),
|
108 |
+
// horizontal scroll
|
109 |
+
'horizontal-scroll' => __('This option enables horizontal scroll bar for your gallery. You may customize your scroll bar below. Please note, that this option is not available for Mosaic gallery layout. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/horizontal-scroll/\'>https://supsystic.com/documentation/horizontal-scroll/</a>',
|
110 |
+
'horizontal-scroll-color' => __('Choose the color of your horizontal scrollbar', 'sgg'),
|
111 |
+
'horizontal-scroll-transparency' => __('Choose the transparency of your horizontal scrollbar', 'sgg'),
|
112 |
+
'hscroll-mouse-wheel' =>__('You may increase or decrease the mouse scrolling speed for those, who use desktop PC\'s or laptops by changing value of scroll step', 'sgg'),
|
113 |
+
'hscroll-touch-gest' =>__('You may increase or decrease the gesture scrolling speed for those, who use the devices with touchscreen by changing value of scroll step', 'sgg'),
|
114 |
+
'hScrollResponsiveMode' => __('If this option is enabled, images automatically adjust to the screen size of the mobile device.', 'sgg'),
|
115 |
+
// custom buttons
|
116 |
+
'custom-buttons-preview' => __('Here you may find a great number of presets to customize your gallery buttons. ', 'sgg') . '<a target=\'_blank\' href=\'https://supsystic.com/documentation/custom-buttons/\'>https://supsystic.com/documentation/custom-buttons/</a>',
|
117 |
),
|
118 |
'tooltips_icon' => array(
|
119 |
'icon' => 'question'
|
src/GridGallery/Galleries/views/gallery_preset.twig
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
{% extends 'grid-gallery.twig' %}
|
2 |
|
3 |
{% macro putPreset(data) %}
|
4 |
-
<div class="preset {% if environment.isPro() == false and data.pro %}disabled{% endif %}"
|
5 |
-
|
|
|
6 |
{% if data.pro and environment.isPro() == false %}
|
7 |
<img onclick="document.location='{{ data.link }}'" src="{{ environment.getModule('galleries').getLocationUrl() }}/assets/img/{{ data.image }}" alt=""/>
|
8 |
<a class="button button-primary" href="{{ data.link }}" style="position: absolute; top: 50%; left: 30%; background-color: #ffffff;">
|
@@ -32,9 +33,16 @@
|
|
32 |
{% endblock %}
|
33 |
|
34 |
{% block content %}
|
|
|
|
|
35 |
<h3 style="margin-left: 10px;padding-bottom: 10px !important;border-bottom: 1px solid;">{{ translate('Choose Gallery Template. You can change template and settings on the next step.') }}</h3>
|
36 |
<div id="gg-create-gallery-text">
|
37 |
-
<h3 style="float: left; margin: 10px !important;">{{ translate('Gallery Name:') }}
|
|
|
|
|
|
|
|
|
|
|
38 |
<input name="title" type="text" style="float: left; width: 60%; height: 36px;"/>
|
39 |
<button id="gallery-create" class="button button-primary" type="button" style="height:37px;">
|
40 |
<i class="fa fa-check"></i>
|
@@ -53,15 +61,42 @@
|
|
53 |
{% import _self as preset %}
|
54 |
|
55 |
{% set presets = [
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
] %}
|
66 |
|
67 |
{#Pro presets#}
|
1 |
{% extends 'grid-gallery.twig' %}
|
2 |
|
3 |
{% macro putPreset(data) %}
|
4 |
+
<div class="preset supsystic-tooltip {% if environment.isPro() == false and data.pro %}disabled{% endif %}"
|
5 |
+
title="{{ data.tooltip | raw }}"
|
6 |
+
data-preset="{{ data.value }}">
|
7 |
{% if data.pro and environment.isPro() == false %}
|
8 |
<img onclick="document.location='{{ data.link }}'" src="{{ environment.getModule('galleries').getLocationUrl() }}/assets/img/{{ data.image }}" alt=""/>
|
9 |
<a class="button button-primary" href="{{ data.link }}" style="position: absolute; top: 50%; left: 30%; background-color: #ffffff;">
|
33 |
{% endblock %}
|
34 |
|
35 |
{% block content %}
|
36 |
+
{% import '@core/helpers.twig' as hlp %}
|
37 |
+
|
38 |
<h3 style="margin-left: 10px;padding-bottom: 10px !important;border-bottom: 1px solid;">{{ translate('Choose Gallery Template. You can change template and settings on the next step.') }}</h3>
|
39 |
<div id="gg-create-gallery-text">
|
40 |
+
<h3 style="float: left; margin: 10px !important;">{{ translate('Gallery Name:') }}
|
41 |
+
{{ hlp.showTooltip(
|
42 |
+
translate('Type your new gallery name here. It is for internal use only and will not be visible on your site.')
|
43 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/gallery-getting-started/\'>https://supsystic.com/documentation/gallery-getting-started/</a>'
|
44 |
+
, 'top', true) }}
|
45 |
+
</h3>
|
46 |
<input name="title" type="text" style="float: left; width: 60%; height: 36px;"/>
|
47 |
<button id="gallery-create" class="button button-primary" type="button" style="height:37px;">
|
48 |
<i class="fa fa-check"></i>
|
61 |
{% import _self as preset %}
|
62 |
|
63 |
{% set presets = [
|
64 |
+
{
|
65 |
+
'title':'Standard Gallery', 'image':'template1.jpg', 'pro': false, 'value': 1,
|
66 |
+
'tooltip': translate('Gallery with fixed grid. If the original image is larger, the picture will be proportionally reduced and cropped to the specified thumbnail size.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/fixed-type/\'>https://supsystic.com/documentation/fixed-type/</a>'
|
67 |
+
},
|
68 |
+
{
|
69 |
+
'title':'Vertical Gallery', 'image':'template2.jpg', 'pro': false, 'value': 2,
|
70 |
+
'tooltip': translate('In this gallery images are arranged into vertical columns. In vertical gallery type you may set image width only, image height will change automatically, accordingly to original size proportions.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/vertical-type/\'>https://supsystic.com/documentation/vertical-type/</a>'
|
71 |
+
},
|
72 |
+
{
|
73 |
+
'title':'Rounded Gallery', 'image':'template3.jpg', 'pro': false, 'value': 3,
|
74 |
+
'tooltip': translate('Gallery with rounded thumbnails and fixed grid. Images will be proportionally reduced and cropped to the specified thumbnail size and shape.')
|
75 |
+
},
|
76 |
+
{
|
77 |
+
'title':'Horizontal Gallery', 'image':'template4.jpg', 'pro': false, 'value': 4,
|
78 |
+
'tooltip': translate('In this gallery images are arranged into horizontal rows. In horizontal gallery type you may set image height only, image width will change automatically, accordingly to original size proportions.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/horizontal-type/\'>https://supsystic.com/documentation/horizontal-type/</a>'
|
79 |
+
},
|
80 |
+
{
|
81 |
+
'title':'Categories and Icons', 'image':'template5.jpg', 'pro': true, 'value': 5, 'link': 'https://supsystic.com/categories-gallery-example/',
|
82 |
+
'tooltip': translate('If choosing this gallery template you may easily arrange your images by categories and add icons. Get step by step instructions from our knowledge base.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/categories/\'>https://supsystic.com/documentation/categories/</a>'
|
83 |
+
},
|
84 |
+
{
|
85 |
+
'title':'Post feed and Pagination', 'image':'template6.jpg', 'pro': true, 'value': 6, 'link': 'https://supsystic.com/pagination-gallery-example/',
|
86 |
+
'tooltip': translate('This gallery template with active presets of post feed and pagination options will help you organize handy post feed navigation. Note: you don\'t need to add images to your gallery if using it as a post feed. You should add them directly at the post body.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/example/pagination-gallery-example/\'>https://supsystic.com/example/pagination-gallery-example/</a>'
|
87 |
+
},
|
88 |
+
{
|
89 |
+
'title':'Post feed Slide Up', 'image':'template7.jpg', 'pro': true, 'value': 7, 'link': 'https://supsystic.com/post-feed-slide-up/',
|
90 |
+
'tooltip': translate('This gallery template with active presets of post feed slide up helps you create a stylish post feed with sliding highlight effect. Note: you don\'t need to add images to your gallery if using it as a post feed. You should add them directly at the post body.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/example/post-feed-slide-up/\'>https://supsystic.com/example/post-feed-slide-up/</a>'
|
91 |
+
},
|
92 |
+
{
|
93 |
+
'title':'Post feed Description', 'image':'template8.jpg', 'pro': true, 'value': 8, 'link': 'https://supsystic.com/post-feed-description/',
|
94 |
+
'tooltip': translate('Gallery template with small images and fixed place for description. Suits perfectly for Feedback page or \'Our Team\' presentation page. Note: you don\'t need to add images to your gallery if using it as a post feed. You should add them directly at the post body.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/example/post-feed-description/\'>https://supsystic.com/example/post-feed-description/</a>'
|
95 |
+
},
|
96 |
+
{
|
97 |
+
'title':'Mosaic Gallery', 'image':'template9.png', 'pro': true, 'value': 9, 'link': 'https://supsystic.com/mosaic-gallery-example/',
|
98 |
+
'tooltip': translate('Cute mosaic gallery layout with enabled captions.') ~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/gallery-mosaic-type/\'>https://supsystic.com/documentation/gallery-mosaic-type/</a>'
|
99 |
+
},
|
100 |
] %}
|
101 |
|
102 |
{#Pro presets#}
|
src/GridGallery/Galleries/views/helpers/pagination_view.twig
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
{% macro paginationRender(settings) %}
|
2 |
{% import '@core/form.twig' as form %}
|
|
|
3 |
|
4 |
<div class="gg-sett-pagination-wrapper">
|
5 |
<label class="gg-pagination-per-page-lbl">{{ translate('Select images per page') }}
|
|
|
|
|
|
|
|
|
6 |
{{ form.select('gg-pagination-per-page', settings.info.perPageArr, settings.info.perPage, {
|
7 |
'id': 'gg-pagination-per-page',
|
8 |
}) }}
|
1 |
{% macro paginationRender(settings) %}
|
2 |
{% import '@core/form.twig' as form %}
|
3 |
+
{% import '@core/helpers.twig' as hlp %}
|
4 |
|
5 |
<div class="gg-sett-pagination-wrapper">
|
6 |
<label class="gg-pagination-per-page-lbl">{{ translate('Select images per page') }}
|
7 |
+
{{ hlp.showTooltip(
|
8 |
+
translate('Here you may choose the amount of images per page, displayed at the image list below. ')
|
9 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
10 |
+
, 'top', true) }}
|
11 |
{{ form.select('gg-pagination-per-page', settings.info.perPageArr, settings.info.perPage, {
|
12 |
'id': 'gg-pagination-per-page',
|
13 |
}) }}
|
src/GridGallery/Galleries/views/index.twig
CHANGED
@@ -58,7 +58,7 @@
|
|
58 |
<li>
|
59 |
<a href="{{ environment.generateUrl('galleries', 'settings', { 'gallery_id': gallery.id }) }}"
|
60 |
class="button background">
|
61 |
-
|
62 |
{{ translate('Settings') }}
|
63 |
</a>
|
64 |
</li>
|
58 |
<li>
|
59 |
<a href="{{ environment.generateUrl('galleries', 'settings', { 'gallery_id': gallery.id }) }}"
|
60 |
class="button background">
|
61 |
+
<i class="fa fa-cogs"></i>
|
62 |
{{ translate('Settings') }}
|
63 |
</a>
|
64 |
</li>
|
src/GridGallery/Galleries/views/r314/shortcode/helpers.twig
CHANGED
@@ -183,8 +183,8 @@
|
|
183 |
{% set videoIcon = 'youtu' in photo.attachment.video ? 'icon-youtube' : 'icon-vimeo' %}
|
184 |
|
185 |
{% set iconStyle %}
|
186 |
-
|
187 |
-
|
188 |
{% endset %}
|
189 |
|
190 |
<a href="{{ videoUrl|trim }}" class="hi-icon gg-video {{ videoIcon }}" style="{{ iconStyle|trim }}">
|
183 |
{% set videoIcon = 'youtu' in photo.attachment.video ? 'icon-youtube' : 'icon-vimeo' %}
|
184 |
|
185 |
{% set iconStyle %}
|
186 |
+
margin-left:{{ settings.icons.margin|default(5) ~ 'px' }};
|
187 |
+
margin-right:{{ settings.icons.margin|default(5) ~ 'px' }};
|
188 |
{% endset %}
|
189 |
|
190 |
<a href="{{ videoUrl|trim }}" class="hi-icon gg-video {{ videoIcon }}" style="{{ iconStyle|trim }}">
|
src/GridGallery/Galleries/views/r314/shortcode/post_helpers.twig
CHANGED
@@ -152,7 +152,7 @@
|
|
152 |
src="{{ get_attachment(photo.photoId, width, height, crop) }}" />
|
153 |
</div>
|
154 |
{% set postCropStyle %}
|
155 |
-
|
156 |
text-align: center;
|
157 |
text-transform: uppercase;
|
158 |
{% endset %}
|
@@ -265,7 +265,7 @@
|
|
265 |
{% set postCropStyle %}
|
266 |
text-align: center;
|
267 |
text-transform: uppercase;
|
268 |
-
|
269 |
{% endset %}
|
270 |
|
271 |
{% set figcaptionStyle %}
|
152 |
src="{{ get_attachment(photo.photoId, width, height, crop) }}" />
|
153 |
</div>
|
154 |
{% set postCropStyle %}
|
155 |
+
width: {{ width - 20 }}px;
|
156 |
text-align: center;
|
157 |
text-transform: uppercase;
|
158 |
{% endset %}
|
265 |
{% set postCropStyle %}
|
266 |
text-align: center;
|
267 |
text-transform: uppercase;
|
268 |
+
width: {{ width - 20 }}px;
|
269 |
{% endset %}
|
270 |
|
271 |
{% set figcaptionStyle %}
|
src/GridGallery/Galleries/views/settings.twig
CHANGED
@@ -38,12 +38,12 @@
|
|
38 |
|
39 |
<a class="nav-tab change-tab" href="overlay">
|
40 |
<i class="fa fa-info"></i>
|
41 |
-
<span class="nav-tab-item-span">{{ translate('Captions') }}</span>
|
42 |
</a>
|
43 |
|
44 |
<a class="nav-tab change-tab" href="cats">
|
45 |
<i class="fa fa-bookmark-o"></i>
|
46 |
-
<span class="nav-tab-item-span">{{ translate('Categories') }}</span>
|
47 |
</a>
|
48 |
|
49 |
<a class="nav-tab change-tab" href="post">
|
@@ -184,8 +184,14 @@
|
|
184 |
<div style="clear: both;"></div>
|
185 |
|
186 |
<div class="shortcode-wrap" style="margin-top: 20px">
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
</div>
|
190 |
|
191 |
<small style="left:25px;position:absolute;top:10px;display:none;">Oops! Transparency doesn't work in live preview. </small>
|
@@ -258,7 +264,7 @@
|
|
258 |
|
259 |
<div class="gg-wraper-anchor-nav-links" style="display: none;">
|
260 |
<a href="#gg-anl-main" class="gg-anchor-nav-links">{{ translate('Type')}}</a>
|
261 |
-
<a href="#gg-mosaic-image-count-text-wrapper" class="gg-anchor-nav-links ggSettingsDisplNone" id="gg-anl-mosaic-settings-link">{{ translate('Image Count
|
262 |
<a href="#gg-anl-soc-share" class="gg-anchor-nav-links">{{ translate('Social')}}</a>
|
263 |
<a href="#gg-anl-load-more" class="gg-anchor-nav-links" id="gg-anl-load-more-link">{{ translate('Load More')}}</a>
|
264 |
<a href="#gg-anl-cust-button" class="gg-anchor-nav-links">{{ translate('Buttons')}}</a>
|
@@ -335,11 +341,11 @@
|
|
335 |
form.input('text', 'title', gallery.title|raw, { 'style': { 'width': '232px;' } })
|
336 |
, 'title') }}
|
337 |
|
338 |
-
|
339 |
-
|
340 |
|
341 |
|
342 |
-
|
343 |
form.input('number', 'area[distance]', settings.area.distance, { 'style': { 'width': '140px;' } })
|
344 |
~ form.span('', 'pixels'), 'distance') }}
|
345 |
|
@@ -443,7 +449,7 @@
|
|
443 |
{% block disableRightClick %}
|
444 |
{% endblock %}
|
445 |
|
446 |
-
|
447 |
form.checkbox(
|
448 |
'defaultsettings',
|
449 |
'1',
|
@@ -493,7 +499,14 @@
|
|
493 |
|
494 |
|
495 |
{{ form.row(translate('Gallery Sharing'),
|
496 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
|
498 |
{{ form.row(translate('Buttons position'),
|
499 |
form.select('socialSharing[gallerySharing][buttonsPosition]',
|
@@ -511,7 +524,14 @@
|
|
511 |
|
512 |
{% set enabled = settings.socialSharing.imageSharing.enabled %}
|
513 |
{{ form.row(translate('Image Sharing'),
|
514 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
|
516 |
{{ form.row(translate('Buttons position'),
|
517 |
form.select('socialSharing[imageSharing][buttonsPosition]',
|
@@ -552,7 +572,14 @@
|
|
552 |
|
553 |
{% set enabled = settings.socialSharing.popupImageSharing.enabled %}
|
554 |
{{ form.row(translate('Popup Image Sharing'),
|
555 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
|
557 |
{{ form.row(translate('Buttons position'),
|
558 |
form.select('socialSharing[popupImageSharing][buttonsPosition]',
|
@@ -762,6 +789,7 @@
|
|
762 |
<th scope="row">
|
763 |
<h3 style="margin: 0 !important;">
|
764 |
{{ translate('Shadow') }}
|
|
|
765 |
</h3>
|
766 |
</th>
|
767 |
<td>
|
@@ -775,7 +803,8 @@
|
|
775 |
<tbody>
|
776 |
<tr>
|
777 |
<th scope="row">
|
778 |
-
{{ translate('Shadow preset') }}
|
|
|
779 |
</th>
|
780 |
<td>
|
781 |
<button id="chooseShadowPreset" class="button bordered" type="button">
|
@@ -865,7 +894,7 @@
|
|
865 |
'box[theme]',
|
866 |
settings.box.theme,
|
867 |
{'id':'bigImageTheme'}
|
868 |
-
|
869 |
}}
|
870 |
|
871 |
{# Enable/Disable popup on mobile devices #}
|
@@ -949,7 +978,7 @@
|
|
949 |
'captions')
|
950 |
}}
|
951 |
|
952 |
-
|
953 |
form.checkbox(
|
954 |
'hideLongTooltipTitles',
|
955 |
'on',
|
@@ -968,7 +997,7 @@
|
|
968 |
}}
|
969 |
|
970 |
{# Popup overlay transparency #}
|
971 |
-
|
972 |
form.select(
|
973 |
'box[transparency]',
|
974 |
{
|
@@ -997,8 +1026,9 @@
|
|
997 |
settings.box.slideshow|default('false'),
|
998 |
{'style': 'width: auto'}
|
999 |
),
|
1000 |
-
|
1001 |
-
|
|
|
1002 |
|
1003 |
{# Popup slideshow speed #}
|
1004 |
{{ form.row(translate('Slideshow speed'),
|
@@ -1008,7 +1038,7 @@
|
|
1008 |
settings.box.slideshowSpeed|default(2500),
|
1009 |
{'style': {'width': 'auto'}},
|
1010 |
'box-slideshowSpeed'
|
1011 |
-
|
1012 |
}}
|
1013 |
|
1014 |
{# Popup slideshow mouse hover stop #}
|
@@ -1031,7 +1061,7 @@
|
|
1031 |
settings.box.slideshowAuto|default('false'),
|
1032 |
{'style': 'width: auto'},
|
1033 |
'box-slideshowAuto'
|
1034 |
-
|
1035 |
}}
|
1036 |
|
1037 |
{# Popup image size #}
|
@@ -1179,7 +1209,7 @@
|
|
1179 |
translate('Disable'),
|
1180 |
'lazyLoadDisabled'
|
1181 |
),
|
1182 |
-
'lazyload-
|
1183 |
true,
|
1184 |
'sggLazyLoadEnableRow'
|
1185 |
)}}
|
@@ -1246,7 +1276,7 @@
|
|
1246 |
{% block additionalCaptionSettings %}
|
1247 |
<table class="form-table" name="captionAdditSett" id="gg-anl-caption-add-sett">
|
1248 |
<thead>
|
1249 |
-
{{ form.rowpro(translate('
|
1250 |
'utm_source=plugin&utm_medium=additinalCaptionSettings&utm_campaign=gallery',
|
1251 |
'additionalCaptionSettingInPro',
|
1252 |
form.radio(
|
@@ -1273,6 +1303,11 @@
|
|
1273 |
</thead>
|
1274 |
</table>
|
1275 |
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
1276 |
</div>
|
1277 |
|
1278 |
{% block post %}
|
@@ -1322,9 +1357,9 @@
|
|
1322 |
'sqkwoosh': 'Skwoosh',
|
1323 |
'tunnel': 'Tunnel',
|
1324 |
'direction-aware': 'Direction Aware',
|
1325 |
-
'phophorus-rotate': '
|
1326 |
-
'phophorus-offset': '
|
1327 |
-
'phophorus-scale': '
|
1328 |
'cube': 'Cube',
|
1329 |
'polaroid': 'Polaroid',
|
1330 |
'3d-cube' : '3D Cube',
|
@@ -1347,15 +1382,26 @@
|
|
1347 |
{{ form.rowpro(translate('Use Caption Builder'),
|
1348 |
'utm_source=plugin&utm_medium=caption_settings_type&utm_campaign=gallery',
|
1349 |
'caption-settings-type-pro',
|
1350 |
-
form.
|
1351 |
-
'
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
'
|
1357 |
-
|
1358 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1359 |
)}}
|
1360 |
</tbody>
|
1361 |
</table>
|
@@ -1394,7 +1440,7 @@
|
|
1394 |
translate('Disable'),
|
1395 |
'hideCaptions'
|
1396 |
),
|
1397 |
-
'', true, 'useCaptions')
|
1398 |
}}
|
1399 |
|
1400 |
{# Choise effect #}
|
@@ -1458,8 +1504,9 @@
|
|
1458 |
polaroidIsEnable,
|
1459 |
{'style': 'width: auto;', 'class' : 'polaroid-effect-class'}
|
1460 |
),
|
1461 |
-
|
1462 |
-
|
|
|
1463 |
|
1464 |
{# Enable/Disable polaroid animation #}
|
1465 |
{{ form.row(translate('Polaroid Image Animation'),
|
@@ -1579,7 +1626,7 @@
|
|
1579 |
|
1580 |
|
1581 |
{# Hide image tooltip(browser default tooltip) #}
|
1582 |
-
{{ form.row(translate('Hide image title
|
1583 |
form.select(
|
1584 |
'thumbnail[tooltip]',
|
1585 |
{'false': translate('No'), 'true': translate('Yes')},
|
@@ -1590,7 +1637,7 @@
|
|
1590 |
}}
|
1591 |
|
1592 |
{# Mobile - show always caption(show none effect in mobile devices) #}
|
1593 |
-
{{ form.row(translate('
|
1594 |
form.select(
|
1595 |
'thumbnail[isMobile]',
|
1596 |
{'false': translate('No'), 'true': translate('Yes')},
|
@@ -1618,7 +1665,7 @@
|
|
1618 |
<table class="form-table" name="icons">
|
1619 |
<thead>
|
1620 |
{% set iconsEnabled = settings.icons.enabled|default('false') == 'true' %}
|
1621 |
-
{{ form.row(translate('
|
1622 |
form.radio('icons[enabled]', 'true', {'id':'icons-enable'}|merge(iconsEnabled ? {'checked':'checked'} : {})) ~
|
1623 |
form.label(translate('Enable'), 'icons-enable') ~
|
1624 |
form.radio('icons[enabled]', 'false', {'id':'icons-disable'}|merge(iconsEnabled ? {} : {'checked':'checked'})) ~
|
@@ -1626,13 +1673,15 @@
|
|
1626 |
}}
|
1627 |
</thead>
|
1628 |
<tbody>
|
1629 |
-
{{ form.row(translate('
|
1630 |
-
form.button(null, translate('Animation'), {'class': 'button bordered', 'id': 'selectIconsEffect'})
|
|
|
1631 |
) }}
|
1632 |
<tr>
|
1633 |
<th scope="row">
|
1634 |
<label for="iconsColor">
|
1635 |
{{ translate('Icons color') }}
|
|
|
1636 |
</label>
|
1637 |
</th>
|
1638 |
<td>
|
@@ -1643,6 +1692,7 @@
|
|
1643 |
<th scope="row">
|
1644 |
<label for="iconsHoverColor">
|
1645 |
{{ translate('Icons hover color') }}
|
|
|
1646 |
</label>
|
1647 |
</th>
|
1648 |
<td>
|
@@ -1653,6 +1703,7 @@
|
|
1653 |
<th scope="row">
|
1654 |
<label for="iconsBackgroundColor">
|
1655 |
{{ translate('Background color') }}
|
|
|
1656 |
</label>
|
1657 |
</th>
|
1658 |
<td>
|
@@ -1663,6 +1714,7 @@
|
|
1663 |
<th scope="row">
|
1664 |
<label for="iconsBackgroundHoverColor">
|
1665 |
{{ translate('Background hover color') }}
|
|
|
1666 |
</label>
|
1667 |
</th>
|
1668 |
<td>
|
@@ -1673,6 +1725,7 @@
|
|
1673 |
<th scope="row">
|
1674 |
<label for="iconsSize">
|
1675 |
{{ translate('Icons size') }}
|
|
|
1676 |
</label>
|
1677 |
</th>
|
1678 |
<td>
|
@@ -1683,6 +1736,7 @@
|
|
1683 |
<th scope="row">
|
1684 |
<label for="iconsMargin">
|
1685 |
{{ translate('Distance between icons') }}
|
|
|
1686 |
</label>
|
1687 |
</th>
|
1688 |
<td>
|
@@ -1693,6 +1747,7 @@
|
|
1693 |
<th scope="row">
|
1694 |
<label for="iconsOverlay">
|
1695 |
{{ translate('Show overlay') }}
|
|
|
1696 |
</label>
|
1697 |
</th>
|
1698 |
<td>
|
@@ -1710,6 +1765,7 @@
|
|
1710 |
<th scope="row">
|
1711 |
<label for="iconsOverlayColor">
|
1712 |
{{ translate('Overlay color') }}
|
|
|
1713 |
</label>
|
1714 |
</th>
|
1715 |
<td>
|
@@ -1720,6 +1776,7 @@
|
|
1720 |
<th scope="row">
|
1721 |
<label for="iconsOverlayTransparency">
|
1722 |
{{ translate('Overlay transparency') }}
|
|
|
1723 |
</label>
|
1724 |
</th>
|
1725 |
<td>
|
@@ -2310,7 +2367,9 @@
|
|
2310 |
},
|
2311 |
settings.icons.showFewIcons | default('default'),
|
2312 |
{ 'style': 'width: auto;', 'id' : 'showFewIconsSel'}
|
2313 |
-
)
|
|
|
|
|
2314 |
)
|
2315 |
}}
|
2316 |
{{
|
@@ -2343,7 +2402,7 @@
|
|
2343 |
'showPopupIconInp',
|
2344 |
{'class': 'sggCheckboxLabelInOneRow'}
|
2345 |
),
|
2346 |
-
|
2347 |
null,
|
2348 |
'sggFewIconsShowingRow'
|
2349 |
)
|
38 |
|
39 |
<a class="nav-tab change-tab" href="overlay">
|
40 |
<i class="fa fa-info"></i>
|
41 |
+
<span class="nav-tab-item-span">{{ translate('Captions and icons') }}</span>
|
42 |
</a>
|
43 |
|
44 |
<a class="nav-tab change-tab" href="cats">
|
45 |
<i class="fa fa-bookmark-o"></i>
|
46 |
+
<span class="nav-tab-item-span">{{ translate('Categories and Pagination') }}</span>
|
47 |
</a>
|
48 |
|
49 |
<a class="nav-tab change-tab" href="post">
|
184 |
<div style="clear: both;"></div>
|
185 |
|
186 |
<div class="shortcode-wrap" style="margin-top: 20px">
|
187 |
+
<div class="shortcode">{{ translate('Shortcode:') }}
|
188 |
+
<input type="text" id="shortcode" class="gallery-shortcode" value="[{{ environment.config.get('shortcode_name') }} id={{ gallery.id }}]" onclick="this.select();" size="42" style="font-size: 12px;" readonly>
|
189 |
+
{{ form.show_tooltip('sgg-shortcode') }}
|
190 |
+
</div>
|
191 |
+
<div class="shortcode">{{ translate('PHPCode:') }}
|
192 |
+
<input type="text" id="shortcode" class="gallery-shortcode" value="{{ '<?php echo do_shortcode(\'[supsystic-gallery id=' ~ gallery.id ~ ']\') ?>' }}" onclick="this.select();" size="42" style="font-size: 12px;" readonly>
|
193 |
+
{{ form.show_tooltip('sgg-php-code') }}
|
194 |
+
</div>
|
195 |
</div>
|
196 |
|
197 |
<small style="left:25px;position:absolute;top:10px;display:none;">Oops! Transparency doesn't work in live preview. </small>
|
264 |
|
265 |
<div class="gg-wraper-anchor-nav-links" style="display: none;">
|
266 |
<a href="#gg-anl-main" class="gg-anchor-nav-links">{{ translate('Type')}}</a>
|
267 |
+
<a href="#gg-mosaic-image-count-text-wrapper" class="gg-anchor-nav-links ggSettingsDisplNone" id="gg-anl-mosaic-settings-link">{{ translate('Image Count Settings')}}</a>
|
268 |
<a href="#gg-anl-soc-share" class="gg-anchor-nav-links">{{ translate('Social')}}</a>
|
269 |
<a href="#gg-anl-load-more" class="gg-anchor-nav-links" id="gg-anl-load-more-link">{{ translate('Load More')}}</a>
|
270 |
<a href="#gg-anl-cust-button" class="gg-anchor-nav-links">{{ translate('Buttons')}}</a>
|
341 |
form.input('text', 'title', gallery.title|raw, { 'style': { 'width': '232px;' } })
|
342 |
, 'title') }}
|
343 |
|
344 |
+
{{ form.row(environment.translate('Gallery alignment'),
|
345 |
+
form.select('area[position]', ['Left', 'Center', 'Right'], settings.area.position|default(1), { 'style': 'width: 100px;' }), 'gallery-align') }}
|
346 |
|
347 |
|
348 |
+
{{ form.row(translate('Distance between images'),
|
349 |
form.input('number', 'area[distance]', settings.area.distance, { 'style': { 'width': '140px;' } })
|
350 |
~ form.span('', 'pixels'), 'distance') }}
|
351 |
|
449 |
{% block disableRightClick %}
|
450 |
{% endblock %}
|
451 |
|
452 |
+
{{ form.row(translate('Use these settings by default'),
|
453 |
form.checkbox(
|
454 |
'defaultsettings',
|
455 |
'1',
|
499 |
|
500 |
|
501 |
{{ form.row(translate('Gallery Sharing'),
|
502 |
+
form.checkbox(
|
503 |
+
'socialSharing[gallerySharing][enabled]',
|
504 |
+
true,
|
505 |
+
settings.socialSharing.gallerySharing.enabled ? {'checked':'checked'} : {}
|
506 |
+
),
|
507 |
+
'gallery-social-sharing',
|
508 |
+
'h4'
|
509 |
+
) }}
|
510 |
|
511 |
{{ form.row(translate('Buttons position'),
|
512 |
form.select('socialSharing[gallerySharing][buttonsPosition]',
|
524 |
|
525 |
{% set enabled = settings.socialSharing.imageSharing.enabled %}
|
526 |
{{ form.row(translate('Image Sharing'),
|
527 |
+
form.checkbox(
|
528 |
+
'socialSharing[imageSharing][enabled]',
|
529 |
+
true,
|
530 |
+
enabled != '0' ? {'checked':'checked'} : {}
|
531 |
+
),
|
532 |
+
'image-social-sharing',
|
533 |
+
'h4'
|
534 |
+
) }}
|
535 |
|
536 |
{{ form.row(translate('Buttons position'),
|
537 |
form.select('socialSharing[imageSharing][buttonsPosition]',
|
572 |
|
573 |
{% set enabled = settings.socialSharing.popupImageSharing.enabled %}
|
574 |
{{ form.row(translate('Popup Image Sharing'),
|
575 |
+
form.checkbox(
|
576 |
+
'socialSharing[popupImageSharing][enabled]',
|
577 |
+
true,
|
578 |
+
enabled != '0' ? {'checked':'checked'} : {}
|
579 |
+
),
|
580 |
+
'popup-social-sharing',
|
581 |
+
'h4'
|
582 |
+
) }}
|
583 |
|
584 |
{{ form.row(translate('Buttons position'),
|
585 |
form.select('socialSharing[popupImageSharing][buttonsPosition]',
|
789 |
<th scope="row">
|
790 |
<h3 style="margin: 0 !important;">
|
791 |
{{ translate('Shadow') }}
|
792 |
+
{{ form.show_tooltip('sgg-t-shadow') }}
|
793 |
</h3>
|
794 |
</th>
|
795 |
<td>
|
803 |
<tbody>
|
804 |
<tr>
|
805 |
<th scope="row">
|
806 |
+
{{ translate('Shadow effect preset') }}
|
807 |
+
{{ form.show_tooltip('sgg-t-shadow-eff-preset') }}
|
808 |
</th>
|
809 |
<td>
|
810 |
<button id="chooseShadowPreset" class="button bordered" type="button">
|
894 |
'box[theme]',
|
895 |
settings.box.theme,
|
896 |
{'id':'bigImageTheme'}
|
897 |
+
), 'sgg-t-popup-theme')
|
898 |
}}
|
899 |
|
900 |
{# Enable/Disable popup on mobile devices #}
|
978 |
'captions')
|
979 |
}}
|
980 |
|
981 |
+
{{ form.row(translate('Hide long captions'),
|
982 |
form.checkbox(
|
983 |
'hideLongTooltipTitles',
|
984 |
'on',
|
997 |
}}
|
998 |
|
999 |
{# Popup overlay transparency #}
|
1000 |
+
{{ form.row(translate('Background transparency'),
|
1001 |
form.select(
|
1002 |
'box[transparency]',
|
1003 |
{
|
1026 |
settings.box.slideshow|default('false'),
|
1027 |
{'style': 'width: auto'}
|
1028 |
),
|
1029 |
+
'slideshow',
|
1030 |
+
'h4'
|
1031 |
+
)}}
|
1032 |
|
1033 |
{# Popup slideshow speed #}
|
1034 |
{{ form.row(translate('Slideshow speed'),
|
1038 |
settings.box.slideshowSpeed|default(2500),
|
1039 |
{'style': {'width': 'auto'}},
|
1040 |
'box-slideshowSpeed'
|
1041 |
+
), 'sgg-t-popup-slide-show-speed')
|
1042 |
}}
|
1043 |
|
1044 |
{# Popup slideshow mouse hover stop #}
|
1061 |
settings.box.slideshowAuto|default('false'),
|
1062 |
{'style': 'width: auto'},
|
1063 |
'box-slideshowAuto'
|
1064 |
+
), 'sgg-t-popup-slideshow-autostart')
|
1065 |
}}
|
1066 |
|
1067 |
{# Popup image size #}
|
1209 |
translate('Disable'),
|
1210 |
'lazyLoadDisabled'
|
1211 |
),
|
1212 |
+
'sgg-t-lazyload-enable',
|
1213 |
true,
|
1214 |
'sggLazyLoadEnableRow'
|
1215 |
)}}
|
1276 |
{% block additionalCaptionSettings %}
|
1277 |
<table class="form-table" name="captionAdditSett" id="gg-anl-caption-add-sett">
|
1278 |
<thead>
|
1279 |
+
{{ form.rowpro(translate('Thumbnail transformations'),
|
1280 |
'utm_source=plugin&utm_medium=additinalCaptionSettings&utm_campaign=gallery',
|
1281 |
'additionalCaptionSettingInPro',
|
1282 |
form.radio(
|
1303 |
</thead>
|
1304 |
</table>
|
1305 |
{% endblock %}
|
1306 |
+
{{ form.hidden(
|
1307 |
+
'adminPage[slimScrollStartPos]',
|
1308 |
+
settings.adminPage.slimScrollStartPos | default(0),
|
1309 |
+
{'id': 'slimScrollStartPos'}
|
1310 |
+
) }}
|
1311 |
</div>
|
1312 |
|
1313 |
{% block post %}
|
1357 |
'sqkwoosh': 'Skwoosh',
|
1358 |
'tunnel': 'Tunnel',
|
1359 |
'direction-aware': 'Direction Aware',
|
1360 |
+
'phophorus-rotate': 'Phosphorus Rotate',
|
1361 |
+
'phophorus-offset': 'Phosphorus Offset',
|
1362 |
+
'phophorus-scale': 'Phosphorus Scale',
|
1363 |
'cube': 'Cube',
|
1364 |
'polaroid': 'Polaroid',
|
1365 |
'3d-cube' : '3D Cube',
|
1382 |
{{ form.rowpro(translate('Use Caption Builder'),
|
1383 |
'utm_source=plugin&utm_medium=caption_settings_type&utm_campaign=gallery',
|
1384 |
'caption-settings-type-pro',
|
1385 |
+
form.radio(
|
1386 |
+
'captionBuilder[enabled]',
|
1387 |
+
1,
|
1388 |
+
{'id':'ggsShowUserCaptionBuilder', 'class': 'ggUserCaptionBuilderCl', 'disabled':'disabled'}
|
1389 |
+
) ~
|
1390 |
+
f.label(
|
1391 |
+
translate('Enable'),
|
1392 |
+
'ggsShowUserCaptionBuilder'
|
1393 |
+
) ~
|
1394 |
+
form.radio(
|
1395 |
+
'captionBuilder[enabled]',
|
1396 |
+
0,
|
1397 |
+
{'id':'ggsHideUserCaptionBuilder', 'class': 'ggUserCaptionBuilderCl', 'disabled':'disabled', 'checked':'checked'}
|
1398 |
+
) ~
|
1399 |
+
f.label(
|
1400 |
+
translate('Disable'),
|
1401 |
+
'ggsHideUserCaptionBuilder'
|
1402 |
+
),
|
1403 |
+
'useCaptionBuilder',
|
1404 |
+
true
|
1405 |
)}}
|
1406 |
</tbody>
|
1407 |
</table>
|
1440 |
translate('Disable'),
|
1441 |
'hideCaptions'
|
1442 |
),
|
1443 |
+
'sgg-ci-caption-enable', true, 'useCaptions')
|
1444 |
}}
|
1445 |
|
1446 |
{# Choise effect #}
|
1504 |
polaroidIsEnable,
|
1505 |
{'style': 'width: auto;', 'class' : 'polaroid-effect-class'}
|
1506 |
),
|
1507 |
+
'polaroid-effect',
|
1508 |
+
'h4'
|
1509 |
+
)}}
|
1510 |
|
1511 |
{# Enable/Disable polaroid animation #}
|
1512 |
{{ form.row(translate('Polaroid Image Animation'),
|
1626 |
|
1627 |
|
1628 |
{# Hide image tooltip(browser default tooltip) #}
|
1629 |
+
{{ form.row(translate('Hide image title'),
|
1630 |
form.select(
|
1631 |
'thumbnail[tooltip]',
|
1632 |
{'false': translate('No'), 'true': translate('Yes')},
|
1637 |
}}
|
1638 |
|
1639 |
{# Mobile - show always caption(show none effect in mobile devices) #}
|
1640 |
+
{{ form.row(translate('Always show captions on mobile'),
|
1641 |
form.select(
|
1642 |
'thumbnail[isMobile]',
|
1643 |
{'false': translate('No'), 'true': translate('Yes')},
|
1665 |
<table class="form-table" name="icons">
|
1666 |
<thead>
|
1667 |
{% set iconsEnabled = settings.icons.enabled|default('false') == 'true' %}
|
1668 |
+
{{ form.row(translate('Icons'),
|
1669 |
form.radio('icons[enabled]', 'true', {'id':'icons-enable'}|merge(iconsEnabled ? {'checked':'checked'} : {})) ~
|
1670 |
form.label(translate('Enable'), 'icons-enable') ~
|
1671 |
form.radio('icons[enabled]', 'false', {'id':'icons-disable'}|merge(iconsEnabled ? {} : {'checked':'checked'})) ~
|
1673 |
}}
|
1674 |
</thead>
|
1675 |
<tbody>
|
1676 |
+
{{ form.row(translate('Animation effects'),
|
1677 |
+
form.button(null, translate('Animation'), {'class': 'button bordered', 'id': 'selectIconsEffect'}),
|
1678 |
+
'ci-icons-animation-effects'
|
1679 |
) }}
|
1680 |
<tr>
|
1681 |
<th scope="row">
|
1682 |
<label for="iconsColor">
|
1683 |
{{ translate('Icons color') }}
|
1684 |
+
{{ form.show_tooltip('ci-icons-color') }}
|
1685 |
</label>
|
1686 |
</th>
|
1687 |
<td>
|
1692 |
<th scope="row">
|
1693 |
<label for="iconsHoverColor">
|
1694 |
{{ translate('Icons hover color') }}
|
1695 |
+
{{ form.show_tooltip('ci-icons-hover-color') }}
|
1696 |
</label>
|
1697 |
</th>
|
1698 |
<td>
|
1703 |
<th scope="row">
|
1704 |
<label for="iconsBackgroundColor">
|
1705 |
{{ translate('Background color') }}
|
1706 |
+
{{ form.show_tooltip('ci-icons-bg-color') }}
|
1707 |
</label>
|
1708 |
</th>
|
1709 |
<td>
|
1714 |
<th scope="row">
|
1715 |
<label for="iconsBackgroundHoverColor">
|
1716 |
{{ translate('Background hover color') }}
|
1717 |
+
{{ form.show_tooltip('ci-icons-hover-bg-color') }}
|
1718 |
</label>
|
1719 |
</th>
|
1720 |
<td>
|
1725 |
<th scope="row">
|
1726 |
<label for="iconsSize">
|
1727 |
{{ translate('Icons size') }}
|
1728 |
+
{{ form.show_tooltip('ci-icons-hover-size') }}
|
1729 |
</label>
|
1730 |
</th>
|
1731 |
<td>
|
1736 |
<th scope="row">
|
1737 |
<label for="iconsMargin">
|
1738 |
{{ translate('Distance between icons') }}
|
1739 |
+
{{ form.show_tooltip('ci-icons-distance') }}
|
1740 |
</label>
|
1741 |
</th>
|
1742 |
<td>
|
1747 |
<th scope="row">
|
1748 |
<label for="iconsOverlay">
|
1749 |
{{ translate('Show overlay') }}
|
1750 |
+
{{ form.show_tooltip('ci-icons-show-overlay') }}
|
1751 |
</label>
|
1752 |
</th>
|
1753 |
<td>
|
1765 |
<th scope="row">
|
1766 |
<label for="iconsOverlayColor">
|
1767 |
{{ translate('Overlay color') }}
|
1768 |
+
{{ form.show_tooltip('ci-icons-overlay-color') }}
|
1769 |
</label>
|
1770 |
</th>
|
1771 |
<td>
|
1776 |
<th scope="row">
|
1777 |
<label for="iconsOverlayTransparency">
|
1778 |
{{ translate('Overlay transparency') }}
|
1779 |
+
{{ form.show_tooltip('ci-icons-overlay-transparency') }}
|
1780 |
</label>
|
1781 |
</th>
|
1782 |
<td>
|
2367 |
},
|
2368 |
settings.icons.showFewIcons | default('default'),
|
2369 |
{ 'style': 'width: auto;', 'id' : 'showFewIconsSel'}
|
2370 |
+
),
|
2371 |
+
'capt-showt-few-icons-by',
|
2372 |
+
'h4'
|
2373 |
)
|
2374 |
}}
|
2375 |
{{
|
2402 |
'showPopupIconInp',
|
2403 |
{'class': 'sggCheckboxLabelInOneRow'}
|
2404 |
),
|
2405 |
+
'capt-showv-few-icons-by',
|
2406 |
null,
|
2407 |
'sggFewIconsShowingRow'
|
2408 |
)
|
src/GridGallery/Galleries/views/shortcode/gallery.twig
CHANGED
@@ -223,11 +223,11 @@
|
|
223 |
</div>
|
224 |
{% endif %}
|
225 |
|
226 |
-
|
227 |
<div
|
228 |
{% block photos_attributes %}
|
229 |
id="photos-{{ gallery.id }}"
|
230 |
-
class="grid-gallery-photos"
|
231 |
{% endblock %}>
|
232 |
|
233 |
{% block photos %}
|
@@ -241,7 +241,7 @@
|
|
241 |
|
242 |
<div class="grid-gallery-clearfix"></div>
|
243 |
</div>
|
244 |
-
|
245 |
|
246 |
<div class="grid-gallery-clearfix"></div>
|
247 |
|
223 |
</div>
|
224 |
{% endif %}
|
225 |
|
226 |
+
<div class="gallery-sharing-top"></div>
|
227 |
<div
|
228 |
{% block photos_attributes %}
|
229 |
id="photos-{{ gallery.id }}"
|
230 |
+
class="grid-gallery-photos {% block photos_attributes_class %}{% endblock %}"
|
231 |
{% endblock %}>
|
232 |
|
233 |
{% block photos %}
|
241 |
|
242 |
<div class="grid-gallery-clearfix"></div>
|
243 |
</div>
|
244 |
+
<div class="gallery-sharing-bottom"></div>
|
245 |
|
246 |
<div class="grid-gallery-clearfix"></div>
|
247 |
|
src/GridGallery/Galleries/views/shortcode/helpers.twig
CHANGED
@@ -279,8 +279,9 @@
|
|
279 |
{% block figcaption_attributes %}
|
280 |
{% if settings.icons is defined and settings.icons.enabled == 'true' %}
|
281 |
data-alpha="{{ settings.icons.overlay_transparency|default(5)|trim }}"
|
|
|
|
|
282 |
{% endif %}
|
283 |
-
data-alpha="{{ settings.thumbnail.overlay.transparency|trim }}"
|
284 |
style="{{ figcaptionStyle|trim }}"
|
285 |
{% endblock %}
|
286 |
{% endset %}
|
@@ -339,8 +340,8 @@
|
|
339 |
{% set videoIcon = 'youtu' in photo.attachment.video ? 'icon-youtube' : 'icon-vimeo' %}
|
340 |
|
341 |
{% set iconStyle %}
|
342 |
-
margin-left:{{ settings.icons.margin|default(5) }};
|
343 |
-
margin-right:{{ settings.icons.margin|default(5) }};
|
344 |
{% endset %}
|
345 |
|
346 |
<a href="{{ videoUrl|trim }}"
|
279 |
{% block figcaption_attributes %}
|
280 |
{% if settings.icons is defined and settings.icons.enabled == 'true' %}
|
281 |
data-alpha="{{ settings.icons.overlay_transparency|default(5)|trim }}"
|
282 |
+
{% else %}
|
283 |
+
data-alpha="{{ settings.thumbnail.overlay.transparency|trim }}"
|
284 |
{% endif %}
|
|
|
285 |
style="{{ figcaptionStyle|trim }}"
|
286 |
{% endblock %}
|
287 |
{% endset %}
|
340 |
{% set videoIcon = 'youtu' in photo.attachment.video ? 'icon-youtube' : 'icon-vimeo' %}
|
341 |
|
342 |
{% set iconStyle %}
|
343 |
+
margin-left:{{ settings.icons.margin|default(5) ~ 'px' }};
|
344 |
+
margin-right:{{ settings.icons.margin|default(5) ~ 'px' }};
|
345 |
{% endset %}
|
346 |
|
347 |
<a href="{{ videoUrl|trim }}"
|
src/GridGallery/Galleries/views/view.twig
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
<a href="{{ environment.generateUrl('galleries', 'settings', { 'gallery_id': gallery.id }) }}"
|
22 |
class="button">
|
23 |
<i class="fa fa-fw fa-cogs"></i>
|
24 |
-
|
25 |
</a>
|
26 |
</li>
|
27 |
|
@@ -204,9 +204,9 @@
|
|
204 |
'sqkwoosh': 'Skwoosh',
|
205 |
'tunnel': 'Tunnel',
|
206 |
'direction-aware': 'Direction Aware',
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
'cube': 'Cube',
|
211 |
'polaroid': 'Polaroid',
|
212 |
'3d-cube': '3D Cube',
|
21 |
<a href="{{ environment.generateUrl('galleries', 'settings', { 'gallery_id': gallery.id }) }}"
|
22 |
class="button">
|
23 |
<i class="fa fa-fw fa-cogs"></i>
|
24 |
+
{{ translate('Settings') }}
|
25 |
</a>
|
26 |
</li>
|
27 |
|
204 |
'sqkwoosh': 'Skwoosh',
|
205 |
'tunnel': 'Tunnel',
|
206 |
'direction-aware': 'Direction Aware',
|
207 |
+
'phophorus-rotate': 'Phosphorus Rotate',
|
208 |
+
'phophorus-offset': 'Phosphorus Offset',
|
209 |
+
'phophorus-scale': 'Phosphorus Scale',
|
210 |
'cube': 'Cube',
|
211 |
'polaroid': 'Polaroid',
|
212 |
'3d-cube': '3D Cube',
|
src/GridGallery/Optimization/views/index.twig
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
{% extends 'grid-gallery.twig' %}
|
2 |
|
3 |
{% block header %}
|
|
|
|
|
4 |
<nav id="supsystic-breadcrumbs" class="supsystic-breadcrumbs">
|
5 |
<a href="{{ environment.generateUrl('galleries') }}">{{ translate('Gallery by Supsystic') }}</a>
|
6 |
<i class="fa fa-angle-right"></i>
|
@@ -11,10 +13,17 @@
|
|
11 |
<a href="#" class="sgg-io-tab-link sggActive" data-tab-id="sgg-maintab-image-opt">
|
12 |
<i class="fa fa-compress"></i>
|
13 |
{{ translate('Image Optimize') }}
|
|
|
|
|
|
|
14 |
</a>
|
15 |
<a href="#" class="sgg-io-tab-link" data-tab-id="sgg-maintab-transfer-cdn">
|
16 |
<i class="fa fa-cloud-upload"></i>
|
17 |
{{ translate('Transfer to CDN') }}
|
|
|
|
|
|
|
|
|
18 |
</a>
|
19 |
</div>
|
20 |
{% endblock %}
|
@@ -47,6 +56,8 @@
|
|
47 |
{% endblock %}
|
48 |
|
49 |
{% macro imageOptimizeCdnTab(cdnSettings, cdnGalleryList) %}
|
|
|
|
|
50 |
<input type="hidden" id="sgg-transfer-to-cdn-used";/>
|
51 |
<div class="supsystic-io-block sgg-cdn-service-block">
|
52 |
<div class="supsystic-io-block-table sgg-cnd-service-info">
|
@@ -54,8 +65,15 @@
|
|
54 |
<div class="supsystic-io-block-cell sgg-io-tab-hidden">
|
55 |
<input value="keycdn" {% if cdnSettings.current == 'keycdn' %} checked="checked" {% endif %} type="radio" class="selected-cnd-opt-service" name="selected-cdn-opt-service"/>
|
56 |
</div>
|
57 |
-
<div class="supsystic-io-block-cell">{{ translate('KeyCDN') }}</div>
|
58 |
<div class="supsystic-io-block-cell">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<a href="" class="button sgg-setup-button" data-dialog-code="keycdn" data-dialog-title="{{ translate("KeyCDN Settings") }}">
|
60 |
<i class="fa fa-info-circle"></i>
|
61 |
{% if cdnSettings.setting.keycdn.u_name is defined and cdnSettings.setting.keycdn.u_name != '' %}
|
@@ -308,14 +326,23 @@
|
|
308 |
{% endmacro %}
|
309 |
|
310 |
{% macro imageOptimizeServiceSettingTable(_selfTemplate, ioSetting) %}
|
|
|
|
|
311 |
<div class="supsystic-io-block sgg-service-setting">
|
312 |
<div class="supsystic-io-block-table sgg-service-info">
|
313 |
<div class="supsystic-io-block-row">
|
314 |
<div class="supsystic-io-block-cell sgg-io-tab-hidden">
|
315 |
<input value="tinypng" {% if ioSetting.current == 'tinypng' %} checked="checked" {% endif %} type="radio" class="selected-opt-service" name="selected-opt-service"/>
|
316 |
</div>
|
317 |
-
<div class="supsystic-io-block-cell">{{ translate('TinyPNG') }}</div>
|
318 |
<div class="supsystic-io-block-cell">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
<a href="" class="button sgg-setup-button" data-dialog-code="tinypng" data-dialog-title="{{ translate("TinyPNG Settings") }}">
|
320 |
<i class="fa fa-info-circle"></i>
|
321 |
{% if ioSetting.setting.tinypng.auth_key is defined and ioSetting.setting.tinypng.auth_key != '' %}
|
@@ -343,6 +370,8 @@
|
|
343 |
{% endmacro %}
|
344 |
|
345 |
{% macro imageOptimizeMainTab(_selfTemplate, ioSetting, galleryList, statistic) %}
|
|
|
|
|
346 |
<input type="hidden" id="sgg-optimize-main-tab-inp"/>
|
347 |
{{ _selfTemplate.imageOptimizeServiceSettingTable(_selfTemplate, ioSetting) }}
|
348 |
|
@@ -364,6 +393,11 @@
|
|
364 |
|
365 |
<div class="supsystic-io-block sgg-optimize-list">
|
366 |
<button class="button sgg-optimize-selected" disabled="disabled">{{ translate('Optimize selected') }}</button>
|
|
|
|
|
|
|
|
|
|
|
367 |
<div class="supsystic-io-block-table sgg-gallery-opt-table">
|
368 |
<div class="supsystic-io-block-row sgg-table-row-header">
|
369 |
<div class="supsystic-io-block-cell"></div>
|
@@ -456,27 +490,39 @@
|
|
456 |
<div class="sgg-dialog-block-part sgg-io-tab-hidden" data-img-opt-sett-code="keycdn">
|
457 |
<label>
|
458 |
{{ translate('Enter your Site name') }}
|
459 |
-
{{ helper1.showTooltip(
|
|
|
|
|
|
|
460 |
<br/>
|
461 |
<input type="text" autocomplete="off" class="sgg-keycdn-sett-zonename" name="sgg-keycdn-sett-sitename" value="{% if cdnSett.setting.keycdn.zone_name is defined %}{{ cdnSett.setting.keycdn.zone_name }}{% endif %}"/>
|
462 |
</label>
|
463 |
<br/>
|
464 |
<label>
|
465 |
{{ translate('Enter your username') }}
|
466 |
-
{{ helper1.showTooltip(
|
|
|
|
|
|
|
467 |
<br/>
|
468 |
<input type="text" autocomplete="off" class="sgg-keycdn-sett-uname" name="sgg-keycdn-sett-uname" value="{% if cdnSett.setting.keycdn.u_name is defined %}{{ cdnSett.setting.keycdn.u_name }}{% endif %}"/>
|
469 |
</label><br/>
|
470 |
<label>
|
471 |
{{ translate('Enter your password') }}
|
472 |
-
{{ helper1.showTooltip(
|
|
|
|
|
|
|
473 |
<br/>
|
474 |
{# {% if cdnSett.setting.keycdn.u_pass is defined %}{{ cdnSett.setting.keycdn.u_pass }}{% endif %} #}
|
475 |
<input type="password" autocomplete="off" class="sgg-keycdn-sett-upass" name="sgg-keycdn-sett-upass" value=""/>
|
476 |
</label><br/>
|
477 |
<label>
|
478 |
{{ translate('Enter your ftp base path') }}
|
479 |
-
{{ helper1.showTooltip(
|
|
|
|
|
|
|
480 |
<br/>
|
481 |
<input type="text" class="sgg-keycdn-sett-base-ftp" name="sgg-keycdn-sett-base-ftp" value="{% if cdnSett.setting.keycdn.base_ftp_path is defined %}{{ cdnSett.setting.keycdn.base_ftp_path }}{% endif %}"/>
|
482 |
</label>
|
@@ -486,11 +532,17 @@
|
|
486 |
{% endmacro %}
|
487 |
|
488 |
{% macro oneImageOptimizeStatTable(serviceCode, tblData, statistic) %}
|
|
|
|
|
489 |
<div class="supsystic-io-block-table sgg-service-stat-info">
|
490 |
<div class="supsystic-io-block-caption">
|
491 |
<h4>
|
492 |
{% if serviceCode == 'tinypng' %}
|
493 |
-
|
|
|
|
|
|
|
|
|
494 |
{% else %}
|
495 |
{{ translate('Incorrect service Code') }}
|
496 |
{% endif %}
|
1 |
{% extends 'grid-gallery.twig' %}
|
2 |
|
3 |
{% block header %}
|
4 |
+
{% import '@core/helpers.twig' as hlp %}
|
5 |
+
|
6 |
<nav id="supsystic-breadcrumbs" class="supsystic-breadcrumbs">
|
7 |
<a href="{{ environment.generateUrl('galleries') }}">{{ translate('Gallery by Supsystic') }}</a>
|
8 |
<i class="fa fa-angle-right"></i>
|
13 |
<a href="#" class="sgg-io-tab-link sggActive" data-tab-id="sgg-maintab-image-opt">
|
14 |
<i class="fa fa-compress"></i>
|
15 |
{{ translate('Image Optimize') }}
|
16 |
+
{{ hlp.showTooltip(
|
17 |
+
translate('Onboard image opimization with TinyPNG. ')
|
18 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/image-optimize/\'>https://supsystic.com/documentation/image-optimize/</a>', 'top', true) }}
|
19 |
</a>
|
20 |
<a href="#" class="sgg-io-tab-link" data-tab-id="sgg-maintab-transfer-cdn">
|
21 |
<i class="fa fa-cloud-upload"></i>
|
22 |
{{ translate('Transfer to CDN') }}
|
23 |
+
{{ hlp.showTooltip(
|
24 |
+
translate('Here you may transfer your gallery images to CDN (Content Delivery Network) in order to reduce your site database load. ')
|
25 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/transfer-to-cdn/\'>https://supsystic.com/documentation/transfer-to-cdn/</a>', 'top',
|
26 |
+
true) }}
|
27 |
</a>
|
28 |
</div>
|
29 |
{% endblock %}
|
56 |
{% endblock %}
|
57 |
|
58 |
{% macro imageOptimizeCdnTab(cdnSettings, cdnGalleryList) %}
|
59 |
+
{% import '@core/helpers.twig' as hlp %}
|
60 |
+
|
61 |
<input type="hidden" id="sgg-transfer-to-cdn-used";/>
|
62 |
<div class="supsystic-io-block sgg-cdn-service-block">
|
63 |
<div class="supsystic-io-block-table sgg-cnd-service-info">
|
65 |
<div class="supsystic-io-block-cell sgg-io-tab-hidden">
|
66 |
<input value="keycdn" {% if cdnSettings.current == 'keycdn' %} checked="checked" {% endif %} type="radio" class="selected-cnd-opt-service" name="selected-cdn-opt-service"/>
|
67 |
</div>
|
|
|
68 |
<div class="supsystic-io-block-cell">
|
69 |
+
{{ translate('KeyCDN') }}
|
70 |
+
{{ hlp.showTooltip(
|
71 |
+
translate('Transfer your galleries to Content Delivery Network. Note: in order to do this, you should be a member of CDN. ')
|
72 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/transfer-to-cdn/\'>https://supsystic.com/documentation/transfer-to-cdn/</a>'
|
73 |
+
~ '<br/>' ~ translate('Note: before starting the transfer you should press the \'Setup\' button, fill in the data and save the settings.')
|
74 |
+
, 'top', true) }}
|
75 |
+
</div>
|
76 |
+
<div class="supsystic-io-block-cell">
|
77 |
<a href="" class="button sgg-setup-button" data-dialog-code="keycdn" data-dialog-title="{{ translate("KeyCDN Settings") }}">
|
78 |
<i class="fa fa-info-circle"></i>
|
79 |
{% if cdnSettings.setting.keycdn.u_name is defined and cdnSettings.setting.keycdn.u_name != '' %}
|
326 |
{% endmacro %}
|
327 |
|
328 |
{% macro imageOptimizeServiceSettingTable(_selfTemplate, ioSetting) %}
|
329 |
+
{% import '@core/helpers.twig' as hlp %}
|
330 |
+
|
331 |
<div class="supsystic-io-block sgg-service-setting">
|
332 |
<div class="supsystic-io-block-table sgg-service-info">
|
333 |
<div class="supsystic-io-block-row">
|
334 |
<div class="supsystic-io-block-cell sgg-io-tab-hidden">
|
335 |
<input value="tinypng" {% if ioSetting.current == 'tinypng' %} checked="checked" {% endif %} type="radio" class="selected-opt-service" name="selected-opt-service"/>
|
336 |
</div>
|
|
|
337 |
<div class="supsystic-io-block-cell">
|
338 |
+
{{ translate('TinyPNG') }}
|
339 |
+
{{ hlp.showTooltip(
|
340 |
+
translate('The intelligent image optimization feature allows you to save bandwidth and make your gallery load faster. ')
|
341 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/image-optimize/\'>https://supsystic.com/documentation/image-optimize/</a> '
|
342 |
+
~ '<br/>' ~ translate('Note: before starting the optimization you should press the \'Change Details\' button, get your TinyPNG API key and insert it to the text field. Use the tooltip to find the key. '), 'top',
|
343 |
+
true) }}
|
344 |
+
</div>
|
345 |
+
<div class="supsystic-io-block-cell">
|
346 |
<a href="" class="button sgg-setup-button" data-dialog-code="tinypng" data-dialog-title="{{ translate("TinyPNG Settings") }}">
|
347 |
<i class="fa fa-info-circle"></i>
|
348 |
{% if ioSetting.setting.tinypng.auth_key is defined and ioSetting.setting.tinypng.auth_key != '' %}
|
370 |
{% endmacro %}
|
371 |
|
372 |
{% macro imageOptimizeMainTab(_selfTemplate, ioSetting, galleryList, statistic) %}
|
373 |
+
{% import '@core/helpers.twig' as hlp %}
|
374 |
+
|
375 |
<input type="hidden" id="sgg-optimize-main-tab-inp"/>
|
376 |
{{ _selfTemplate.imageOptimizeServiceSettingTable(_selfTemplate, ioSetting) }}
|
377 |
|
393 |
|
394 |
<div class="supsystic-io-block sgg-optimize-list">
|
395 |
<button class="button sgg-optimize-selected" disabled="disabled">{{ translate('Optimize selected') }}</button>
|
396 |
+
{{ hlp.showTooltip(
|
397 |
+
translate('You may choose one, several or all the galleries at once to optimize them. ')
|
398 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/image-optimize/\'>https://supsystic.com/documentation/image-optimize/</a>'
|
399 |
+
, 'top', true) }}
|
400 |
+
|
401 |
<div class="supsystic-io-block-table sgg-gallery-opt-table">
|
402 |
<div class="supsystic-io-block-row sgg-table-row-header">
|
403 |
<div class="supsystic-io-block-cell"></div>
|
490 |
<div class="sgg-dialog-block-part sgg-io-tab-hidden" data-img-opt-sett-code="keycdn">
|
491 |
<label>
|
492 |
{{ translate('Enter your Site name') }}
|
493 |
+
{{ helper1.showTooltip(
|
494 |
+
translate("Enter your KeyCdn Zone name (for example: pz-6f09.kxcdn.com)")
|
495 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/transfer-to-cdn/\'>https://supsystic.com/documentation/transfer-to-cdn/</a>'
|
496 |
+
, 'top', true) }}
|
497 |
<br/>
|
498 |
<input type="text" autocomplete="off" class="sgg-keycdn-sett-zonename" name="sgg-keycdn-sett-sitename" value="{% if cdnSett.setting.keycdn.zone_name is defined %}{{ cdnSett.setting.keycdn.zone_name }}{% endif %}"/>
|
499 |
</label>
|
500 |
<br/>
|
501 |
<label>
|
502 |
{{ translate('Enter your username') }}
|
503 |
+
{{ helper1.showTooltip(
|
504 |
+
translate("Enter your KeyCdn username")
|
505 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/transfer-to-cdn/\'>https://supsystic.com/documentation/transfer-to-cdn/</a>'
|
506 |
+
, 'top', true) }}
|
507 |
<br/>
|
508 |
<input type="text" autocomplete="off" class="sgg-keycdn-sett-uname" name="sgg-keycdn-sett-uname" value="{% if cdnSett.setting.keycdn.u_name is defined %}{{ cdnSett.setting.keycdn.u_name }}{% endif %}"/>
|
509 |
</label><br/>
|
510 |
<label>
|
511 |
{{ translate('Enter your password') }}
|
512 |
+
{{ helper1.showTooltip(
|
513 |
+
translate("Enter your KeyCdn password")
|
514 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/transfer-to-cdn/\'>https://supsystic.com/documentation/transfer-to-cdn/</a>'
|
515 |
+
, 'top', true) }}
|
516 |
<br/>
|
517 |
{# {% if cdnSett.setting.keycdn.u_pass is defined %}{{ cdnSett.setting.keycdn.u_pass }}{% endif %} #}
|
518 |
<input type="password" autocomplete="off" class="sgg-keycdn-sett-upass" name="sgg-keycdn-sett-upass" value=""/>
|
519 |
</label><br/>
|
520 |
<label>
|
521 |
{{ translate('Enter your ftp base path') }}
|
522 |
+
{{ helper1.showTooltip(
|
523 |
+
translate("Enter your KeyCdn ftp base path (for example: /pz)")
|
524 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/transfer-to-cdn/\'>https://supsystic.com/documentation/transfer-to-cdn/</a>'
|
525 |
+
, 'top', true) }}
|
526 |
<br/>
|
527 |
<input type="text" class="sgg-keycdn-sett-base-ftp" name="sgg-keycdn-sett-base-ftp" value="{% if cdnSett.setting.keycdn.base_ftp_path is defined %}{{ cdnSett.setting.keycdn.base_ftp_path }}{% endif %}"/>
|
528 |
</label>
|
532 |
{% endmacro %}
|
533 |
|
534 |
{% macro oneImageOptimizeStatTable(serviceCode, tblData, statistic) %}
|
535 |
+
{% import '@core/helpers.twig' as hlp %}
|
536 |
+
|
537 |
<div class="supsystic-io-block-table sgg-service-stat-info">
|
538 |
<div class="supsystic-io-block-caption">
|
539 |
<h4>
|
540 |
{% if serviceCode == 'tinypng' %}
|
541 |
+
{{ translate('TinyPNG Statistics') }}
|
542 |
+
{{ hlp.showTooltip(
|
543 |
+
translate('Here you may find the detailed optimization statistics for your gallery. ')
|
544 |
+
~ '<a target=\'_blank\' href=\'https://supsystic.com/documentation/image-optimize/\'>https://supsystic.com/documentation/image-optimize/</a>'
|
545 |
+
, 'top', true) }}
|
546 |
{% else %}
|
547 |
{{ translate('Incorrect service Code') }}
|
548 |
{% endif %}
|
src/GridGallery/Promo/Model/classes/lib/Base/MixpanelBase.php
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This a Base class which all Mixpanel classes extend from to provide some very basic
|
5 |
-
* debugging and logging functionality. It also serves to persist $_options across the library.
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
class Base_MixpanelBase {
|
9 |
-
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Default options that can be overridden via the $options constructor arg
|
13 |
-
* @var array
|
14 |
-
*/
|
15 |
-
private $_defaults = array(
|
16 |
-
"max_batch_size" => 50, // the max batch size Mixpanel will accept is 50,
|
17 |
-
"max_queue_size" => 1000, // the max num of items to hold in memory before flushing
|
18 |
-
"debug" => true, // enable/disable debug mode
|
19 |
-
"consumer" => "curl", // which consumer to use
|
20 |
-
"host" => "api.mixpanel.com", // the host name for api calls
|
21 |
-
"events_endpoint" => "/track", // host relative endpoint for events
|
22 |
-
"people_endpoint" => "/engage", // host relative endpoint for people updates
|
23 |
-
"use_ssl" => true, // use ssl when available
|
24 |
-
"error_callback" => null // callback to use on consumption failures
|
25 |
-
);
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* An array of options to be used by the Mixpanel library.
|
30 |
-
* @var array
|
31 |
-
*/
|
32 |
-
protected $_options = array();
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Construct a new MixpanelBase object and merge custom options with defaults
|
37 |
-
* @param array $options
|
38 |
-
*/
|
39 |
-
public function __construct($options = array()) {
|
40 |
-
$options = array_merge($this->_defaults, $options);
|
41 |
-
$this->_options = $options;
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Log a message to PHP's error log
|
47 |
-
* @param $msg
|
48 |
-
*/
|
49 |
-
protected function _log($msg) {
|
50 |
-
$arr = debug_backtrace();
|
51 |
-
$class = $arr[0]['class'];
|
52 |
-
$line = $arr[0]['line'];
|
53 |
-
error_log ( "[ $class - line $line ] : " . $msg );
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Returns true if in debug mode, false if in production mode
|
59 |
-
* @return bool
|
60 |
-
*/
|
61 |
-
protected function _debug() {
|
62 |
-
return array_key_exists("debug", $this->_options) && $this->_options["debug"] == true;
|
63 |
-
}
|
64 |
-
|
65 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This a Base class which all Mixpanel classes extend from to provide some very basic
|
5 |
+
* debugging and logging functionality. It also serves to persist $_options across the library.
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
class Base_MixpanelBase {
|
9 |
+
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Default options that can be overridden via the $options constructor arg
|
13 |
+
* @var array
|
14 |
+
*/
|
15 |
+
private $_defaults = array(
|
16 |
+
"max_batch_size" => 50, // the max batch size Mixpanel will accept is 50,
|
17 |
+
"max_queue_size" => 1000, // the max num of items to hold in memory before flushing
|
18 |
+
"debug" => true, // enable/disable debug mode
|
19 |
+
"consumer" => "curl", // which consumer to use
|
20 |
+
"host" => "api.mixpanel.com", // the host name for api calls
|
21 |
+
"events_endpoint" => "/track", // host relative endpoint for events
|
22 |
+
"people_endpoint" => "/engage", // host relative endpoint for people updates
|
23 |
+
"use_ssl" => true, // use ssl when available
|
24 |
+
"error_callback" => null // callback to use on consumption failures
|
25 |
+
);
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* An array of options to be used by the Mixpanel library.
|
30 |
+
* @var array
|
31 |
+
*/
|
32 |
+
protected $_options = array();
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Construct a new MixpanelBase object and merge custom options with defaults
|
37 |
+
* @param array $options
|
38 |
+
*/
|
39 |
+
public function __construct($options = array()) {
|
40 |
+
$options = array_merge($this->_defaults, $options);
|
41 |
+
$this->_options = $options;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Log a message to PHP's error log
|
47 |
+
* @param $msg
|
48 |
+
*/
|
49 |
+
protected function _log($msg) {
|
50 |
+
$arr = debug_backtrace();
|
51 |
+
$class = $arr[0]['class'];
|
52 |
+
$line = $arr[0]['line'];
|
53 |
+
error_log ( "[ $class - line $line ] : " . $msg );
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Returns true if in debug mode, false if in production mode
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
protected function _debug() {
|
62 |
+
return array_key_exists("debug", $this->_options) && $this->_options["debug"] == true;
|
63 |
+
}
|
64 |
+
|
65 |
}
|
src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/AbstractConsumer.php
CHANGED
@@ -1,57 +1,57 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(dirname(__FILE__) . "/../Base/MixpanelBase.php");
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Provides some base methods for use by a Consumer implementation
|
6 |
-
*/
|
7 |
-
abstract class ConsumerStrategies_AbstractConsumer extends Base_MixpanelBase {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Creates a new AbstractConsumer
|
11 |
-
* @param array $options
|
12 |
-
*/
|
13 |
-
function __construct($options = array()) {
|
14 |
-
|
15 |
-
parent::__construct($options);
|
16 |
-
|
17 |
-
if ($this->_debug()) {
|
18 |
-
$this->_log("Instantiated new Consumer");
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Encode an array to be persisted
|
25 |
-
* @param array $params
|
26 |
-
* @return string
|
27 |
-
*/
|
28 |
-
protected function _encode($params) {
|
29 |
-
return base64_encode(json_encode($params));
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Handles errors that occur in a consumer
|
34 |
-
* @param $code
|
35 |
-
* @param $msg
|
36 |
-
*/
|
37 |
-
protected function _handleError($code, $msg) {
|
38 |
-
if (isset($this->_options['error_callback'])) {
|
39 |
-
$handler = $this->_options['error_callback'];
|
40 |
-
call_user_func($handler, $code, $msg);
|
41 |
-
}
|
42 |
-
|
43 |
-
if ($this->_debug()) {
|
44 |
-
$arr = debug_backtrace();
|
45 |
-
$class = get_class($arr[0]['object']);
|
46 |
-
$line = $arr[0]['line'];
|
47 |
-
error_log ( "[ $class - line $line ] : " . print_r($msg, true) );
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Persist a batch of messages in whatever way the implementer sees fit
|
53 |
-
* @param array $batch an array of messages to consume
|
54 |
-
* @return boolean success or fail
|
55 |
-
*/
|
56 |
-
abstract function persist($batch);
|
57 |
}
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__) . "/../Base/MixpanelBase.php");
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Provides some base methods for use by a Consumer implementation
|
6 |
+
*/
|
7 |
+
abstract class ConsumerStrategies_AbstractConsumer extends Base_MixpanelBase {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Creates a new AbstractConsumer
|
11 |
+
* @param array $options
|
12 |
+
*/
|
13 |
+
function __construct($options = array()) {
|
14 |
+
|
15 |
+
parent::__construct($options);
|
16 |
+
|
17 |
+
if ($this->_debug()) {
|
18 |
+
$this->_log("Instantiated new Consumer");
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Encode an array to be persisted
|
25 |
+
* @param array $params
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
protected function _encode($params) {
|
29 |
+
return base64_encode(json_encode($params));
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Handles errors that occur in a consumer
|
34 |
+
* @param $code
|
35 |
+
* @param $msg
|
36 |
+
*/
|
37 |
+
protected function _handleError($code, $msg) {
|
38 |
+
if (isset($this->_options['error_callback'])) {
|
39 |
+
$handler = $this->_options['error_callback'];
|
40 |
+
call_user_func($handler, $code, $msg);
|
41 |
+
}
|
42 |
+
|
43 |
+
if ($this->_debug()) {
|
44 |
+
$arr = debug_backtrace();
|
45 |
+
$class = get_class($arr[0]['object']);
|
46 |
+
$line = $arr[0]['line'];
|
47 |
+
error_log ( "[ $class - line $line ] : " . print_r($msg, true) );
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Persist a batch of messages in whatever way the implementer sees fit
|
53 |
+
* @param array $batch an array of messages to consume
|
54 |
+
* @return boolean success or fail
|
55 |
+
*/
|
56 |
+
abstract function persist($batch);
|
57 |
}
|
src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/CurlConsumer.php
CHANGED
@@ -1,221 +1,221 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(dirname(__FILE__) . "/AbstractConsumer.php");
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Consumes messages and sends them to a host/endpoint using cURL
|
6 |
-
*/
|
7 |
-
class ConsumerStrategies_CurlConsumer extends ConsumerStrategies_AbstractConsumer {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* @var string the host to connect to (e.g. api.mixpanel.com)
|
11 |
-
*/
|
12 |
-
protected $_host;
|
13 |
-
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var string the host-relative endpoint to write to (e.g. /engage)
|
17 |
-
*/
|
18 |
-
protected $_endpoint;
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var int connect_timeout The number of seconds to wait while trying to connect. Default is 5 seconds.
|
23 |
-
*/
|
24 |
-
protected $_connect_timeout;
|
25 |
-
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @var int timeout The maximum number of seconds to allow cURL call to execute. Default is 30 seconds.
|
29 |
-
*/
|
30 |
-
protected $_timeout;
|
31 |
-
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @var string the protocol to use for the cURL connection
|
35 |
-
*/
|
36 |
-
protected $_protocol;
|
37 |
-
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @var bool|null true to fork the cURL process (using exec) or false to use PHP's cURL extension. false by default
|
41 |
-
*/
|
42 |
-
protected $_fork = null;
|
43 |
-
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Creates a new CurlConsumer and assigns properties from the $options array
|
47 |
-
* @param array $options
|
48 |
-
* @throws Exception
|
49 |
-
*/
|
50 |
-
function __construct($options) {
|
51 |
-
parent::__construct($options);
|
52 |
-
|
53 |
-
$this->_host = $options['host'];
|
54 |
-
$this->_endpoint = $options['endpoint'];
|
55 |
-
$this->_connect_timeout = array_key_exists('connect_timeout', $options) ? $options['connect_timeout'] : 5;
|
56 |
-
$this->_timeout = array_key_exists('timeout', $options) ? $options['timeout'] : 30;
|
57 |
-
$this->_protocol = array_key_exists('use_ssl', $options) && $options['use_ssl'] == true ? "https" : "http";
|
58 |
-
$this->_fork = array_key_exists('fork', $options) ? ($options['fork'] == true) : false;
|
59 |
-
|
60 |
-
// ensure the environment is workable for the given settings
|
61 |
-
if ($this->_fork == true) {
|
62 |
-
$exists = function_exists('exec');
|
63 |
-
if (!$exists) {
|
64 |
-
throw new Exception('The "exec" function must exist to use the cURL consumer in "fork" mode. Try setting fork = false or use another consumer.');
|
65 |
-
}
|
66 |
-
$disabled = explode(', ', ini_get('disable_functions'));
|
67 |
-
$enabled = !in_array('exec', $disabled);
|
68 |
-
if (!$enabled) {
|
69 |
-
throw new Exception('The "exec" function must be enabled to use the cURL consumer in "fork" mode. Try setting fork = false or use another consumer.');
|
70 |
-
}
|
71 |
-
} else {
|
72 |
-
if (!function_exists('curl_init')) {
|
73 |
-
throw new Exception('The cURL PHP extension is required to use the cURL consumer with fork = false. Try setting fork = true or use another consumer.');
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Write to the given host/endpoint using either a forked cURL process or using PHP's cURL extension
|
81 |
-
* @param array $batch
|
82 |
-
* @return bool
|
83 |
-
*/
|
84 |
-
public function persist($batch) {
|
85 |
-
if (count($batch) > 0) {
|
86 |
-
$data = "data=" . $this->_encode($batch);
|
87 |
-
$url = $this->_protocol . "://" . $this->_host . $this->_endpoint;
|
88 |
-
if ($this->_fork) {
|
89 |
-
return $this->_execute_forked($url, $data);
|
90 |
-
} else {
|
91 |
-
return $this->_execute($url, $data);
|
92 |
-
}
|
93 |
-
} else {
|
94 |
-
return true;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Write using the cURL php extension
|
101 |
-
* @param $url
|
102 |
-
* @param $data
|
103 |
-
* @return bool
|
104 |
-
*/
|
105 |
-
protected function _execute($url, $data) {
|
106 |
-
if ($this->_debug()) {
|
107 |
-
$this->_log("Making blocking cURL call to $url");
|
108 |
-
}
|
109 |
-
|
110 |
-
$ch = curl_init();
|
111 |
-
curl_setopt($ch, CURLOPT_URL, $url);
|
112 |
-
curl_setopt($ch, CURLOPT_HEADER, 0);
|
113 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->_connect_timeout);
|
114 |
-
curl_setopt($ch, CURLOPT_TIMEOUT, $this->_timeout);
|
115 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
116 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
117 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
118 |
-
$response = curl_exec($ch);
|
119 |
-
if (false === $response) {
|
120 |
-
$curl_error = curl_error($ch);
|
121 |
-
$curl_errno = curl_errno($ch);
|
122 |
-
curl_close($ch);
|
123 |
-
$this->_handleError($curl_errno, $curl_error);
|
124 |
-
return false;
|
125 |
-
} else {
|
126 |
-
curl_close($ch);
|
127 |
-
if (trim($response) == "1") {
|
128 |
-
return true;
|
129 |
-
} else {
|
130 |
-
$this->_handleError(0, $response);
|
131 |
-
return false;
|
132 |
-
}
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Write using a forked cURL process
|
139 |
-
* @param $url
|
140 |
-
* @param $data
|
141 |
-
* @return bool
|
142 |
-
*/
|
143 |
-
protected function _execute_forked($url, $data) {
|
144 |
-
|
145 |
-
if ($this->_debug()) {
|
146 |
-
$this->_log("Making forked cURL call to $url");
|
147 |
-
}
|
148 |
-
|
149 |
-
$exec = 'curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d ' . $data . ' "' . $url . '"';
|
150 |
-
|
151 |
-
if(!$this->_debug()) {
|
152 |
-
$exec .= " >/dev/null 2>&1 &";
|
153 |
-
}
|
154 |
-
|
155 |
-
exec($exec, $output, $return_var);
|
156 |
-
|
157 |
-
if ($return_var != 0) {
|
158 |
-
$this->_handleError($return_var, $output);
|
159 |
-
}
|
160 |
-
|
161 |
-
return $return_var == 0;
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* @return int
|
166 |
-
*/
|
167 |
-
public function getConnectTimeout()
|
168 |
-
{
|
169 |
-
return $this->_connect_timeout;
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* @return string
|
174 |
-
*/
|
175 |
-
public function getEndpoint()
|
176 |
-
{
|
177 |
-
return $this->_endpoint;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* @return bool|null
|
182 |
-
*/
|
183 |
-
public function getFork()
|
184 |
-
{
|
185 |
-
return $this->_fork;
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* @return string
|
190 |
-
*/
|
191 |
-
public function getHost()
|
192 |
-
{
|
193 |
-
return $this->_host;
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* @return array
|
198 |
-
*/
|
199 |
-
public function getOptions()
|
200 |
-
{
|
201 |
-
return $this->_options;
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* @return string
|
206 |
-
*/
|
207 |
-
public function getProtocol()
|
208 |
-
{
|
209 |
-
return $this->_protocol;
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* @return int
|
214 |
-
*/
|
215 |
-
public function getTimeout()
|
216 |
-
{
|
217 |
-
return $this->_timeout;
|
218 |
-
}
|
219 |
-
|
220 |
-
|
221 |
}
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__) . "/AbstractConsumer.php");
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Consumes messages and sends them to a host/endpoint using cURL
|
6 |
+
*/
|
7 |
+
class ConsumerStrategies_CurlConsumer extends ConsumerStrategies_AbstractConsumer {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @var string the host to connect to (e.g. api.mixpanel.com)
|
11 |
+
*/
|
12 |
+
protected $_host;
|
13 |
+
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var string the host-relative endpoint to write to (e.g. /engage)
|
17 |
+
*/
|
18 |
+
protected $_endpoint;
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var int connect_timeout The number of seconds to wait while trying to connect. Default is 5 seconds.
|
23 |
+
*/
|
24 |
+
protected $_connect_timeout;
|
25 |
+
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @var int timeout The maximum number of seconds to allow cURL call to execute. Default is 30 seconds.
|
29 |
+
*/
|
30 |
+
protected $_timeout;
|
31 |
+
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @var string the protocol to use for the cURL connection
|
35 |
+
*/
|
36 |
+
protected $_protocol;
|
37 |
+
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @var bool|null true to fork the cURL process (using exec) or false to use PHP's cURL extension. false by default
|
41 |
+
*/
|
42 |
+
protected $_fork = null;
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Creates a new CurlConsumer and assigns properties from the $options array
|
47 |
+
* @param array $options
|
48 |
+
* @throws Exception
|
49 |
+
*/
|
50 |
+
function __construct($options) {
|
51 |
+
parent::__construct($options);
|
52 |
+
|
53 |
+
$this->_host = $options['host'];
|
54 |
+
$this->_endpoint = $options['endpoint'];
|
55 |
+
$this->_connect_timeout = array_key_exists('connect_timeout', $options) ? $options['connect_timeout'] : 5;
|
56 |
+
$this->_timeout = array_key_exists('timeout', $options) ? $options['timeout'] : 30;
|
57 |
+
$this->_protocol = array_key_exists('use_ssl', $options) && $options['use_ssl'] == true ? "https" : "http";
|
58 |
+
$this->_fork = array_key_exists('fork', $options) ? ($options['fork'] == true) : false;
|
59 |
+
|
60 |
+
// ensure the environment is workable for the given settings
|
61 |
+
if ($this->_fork == true) {
|
62 |
+
$exists = function_exists('exec');
|
63 |
+
if (!$exists) {
|
64 |
+
throw new Exception('The "exec" function must exist to use the cURL consumer in "fork" mode. Try setting fork = false or use another consumer.');
|
65 |
+
}
|
66 |
+
$disabled = explode(', ', ini_get('disable_functions'));
|
67 |
+
$enabled = !in_array('exec', $disabled);
|
68 |
+
if (!$enabled) {
|
69 |
+
throw new Exception('The "exec" function must be enabled to use the cURL consumer in "fork" mode. Try setting fork = false or use another consumer.');
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
if (!function_exists('curl_init')) {
|
73 |
+
throw new Exception('The cURL PHP extension is required to use the cURL consumer with fork = false. Try setting fork = true or use another consumer.');
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Write to the given host/endpoint using either a forked cURL process or using PHP's cURL extension
|
81 |
+
* @param array $batch
|
82 |
+
* @return bool
|
83 |
+
*/
|
84 |
+
public function persist($batch) {
|
85 |
+
if (count($batch) > 0) {
|
86 |
+
$data = "data=" . $this->_encode($batch);
|
87 |
+
$url = $this->_protocol . "://" . $this->_host . $this->_endpoint;
|
88 |
+
if ($this->_fork) {
|
89 |
+
return $this->_execute_forked($url, $data);
|
90 |
+
} else {
|
91 |
+
return $this->_execute($url, $data);
|
92 |
+
}
|
93 |
+
} else {
|
94 |
+
return true;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Write using the cURL php extension
|
101 |
+
* @param $url
|
102 |
+
* @param $data
|
103 |
+
* @return bool
|
104 |
+
*/
|
105 |
+
protected function _execute($url, $data) {
|
106 |
+
if ($this->_debug()) {
|
107 |
+
$this->_log("Making blocking cURL call to $url");
|
108 |
+
}
|
109 |
+
|
110 |
+
$ch = curl_init();
|
111 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
112 |
+
curl_setopt($ch, CURLOPT_HEADER, 0);
|
113 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->_connect_timeout);
|
114 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, $this->_timeout);
|
115 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
116 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
117 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
118 |
+
$response = curl_exec($ch);
|
119 |
+
if (false === $response) {
|
120 |
+
$curl_error = curl_error($ch);
|
121 |
+
$curl_errno = curl_errno($ch);
|
122 |
+
curl_close($ch);
|
123 |
+
$this->_handleError($curl_errno, $curl_error);
|
124 |
+
return false;
|
125 |
+
} else {
|
126 |
+
curl_close($ch);
|
127 |
+
if (trim($response) == "1") {
|
128 |
+
return true;
|
129 |
+
} else {
|
130 |
+
$this->_handleError(0, $response);
|
131 |
+
return false;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Write using a forked cURL process
|
139 |
+
* @param $url
|
140 |
+
* @param $data
|
141 |
+
* @return bool
|
142 |
+
*/
|
143 |
+
protected function _execute_forked($url, $data) {
|
144 |
+
|
145 |
+
if ($this->_debug()) {
|
146 |
+
$this->_log("Making forked cURL call to $url");
|
147 |
+
}
|
148 |
+
|
149 |
+
$exec = 'curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d ' . $data . ' "' . $url . '"';
|
150 |
+
|
151 |
+
if(!$this->_debug()) {
|
152 |
+
$exec .= " >/dev/null 2>&1 &";
|
153 |
+
}
|
154 |
+
|
155 |
+
exec($exec, $output, $return_var);
|
156 |
+
|
157 |
+
if ($return_var != 0) {
|
158 |
+
$this->_handleError($return_var, $output);
|
159 |
+
}
|
160 |
+
|
161 |
+
return $return_var == 0;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* @return int
|
166 |
+
*/
|
167 |
+
public function getConnectTimeout()
|
168 |
+
{
|
169 |
+
return $this->_connect_timeout;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* @return string
|
174 |
+
*/
|
175 |
+
public function getEndpoint()
|
176 |
+
{
|
177 |
+
return $this->_endpoint;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* @return bool|null
|
182 |
+
*/
|
183 |
+
public function getFork()
|
184 |
+
{
|
185 |
+
return $this->_fork;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* @return string
|
190 |
+
*/
|
191 |
+
public function getHost()
|
192 |
+
{
|
193 |
+
return $this->_host;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* @return array
|
198 |
+
*/
|
199 |
+
public function getOptions()
|
200 |
+
{
|
201 |
+
return $this->_options;
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* @return string
|
206 |
+
*/
|
207 |
+
public function getProtocol()
|
208 |
+
{
|
209 |
+
return $this->_protocol;
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* @return int
|
214 |
+
*/
|
215 |
+
public function getTimeout()
|
216 |
+
{
|
217 |
+
return $this->_timeout;
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
}
|
src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/FileConsumer.php
CHANGED
@@ -1,38 +1,38 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(dirname(__FILE__) . "/AbstractConsumer.php");
|
3 |
-
/**
|
4 |
-
* Consumes messages and writes them to a file
|
5 |
-
*/
|
6 |
-
class ConsumerStrategies_FileConsumer extends ConsumerStrategies_AbstractConsumer {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @var string path to a file that we want to write the messages to
|
10 |
-
*/
|
11 |
-
private $_file;
|
12 |
-
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Creates a new FileConsumer and assigns properties from the $options array
|
16 |
-
* @param array $options
|
17 |
-
*/
|
18 |
-
function __construct($options) {
|
19 |
-
parent::__construct($options);
|
20 |
-
|
21 |
-
// what file to write to?
|
22 |
-
$this->_file = array_key_exists("file", $options) ? $options['file'] : dirname(__FILE__)."/../../messages.txt";
|
23 |
-
}
|
24 |
-
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Append $batch to a file
|
28 |
-
* @param array $batch
|
29 |
-
* @return bool
|
30 |
-
*/
|
31 |
-
public function persist($batch) {
|
32 |
-
if (count($batch) > 0) {
|
33 |
-
return file_put_contents($this->_file, json_encode($batch)."\n", FILE_APPEND | LOCK_EX) !== false;
|
34 |
-
} else {
|
35 |
-
return true;
|
36 |
-
}
|
37 |
-
}
|
38 |
}
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__) . "/AbstractConsumer.php");
|
3 |
+
/**
|
4 |
+
* Consumes messages and writes them to a file
|
5 |
+
*/
|
6 |
+
class ConsumerStrategies_FileConsumer extends ConsumerStrategies_AbstractConsumer {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @var string path to a file that we want to write the messages to
|
10 |
+
*/
|
11 |
+
private $_file;
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Creates a new FileConsumer and assigns properties from the $options array
|
16 |
+
* @param array $options
|
17 |
+
*/
|
18 |
+
function __construct($options) {
|
19 |
+
parent::__construct($options);
|
20 |
+
|
21 |
+
// what file to write to?
|
22 |
+
$this->_file = array_key_exists("file", $options) ? $options['file'] : dirname(__FILE__)."/../../messages.txt";
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Append $batch to a file
|
28 |
+
* @param array $batch
|
29 |
+
* @return bool
|
30 |
+
*/
|
31 |
+
public function persist($batch) {
|
32 |
+
if (count($batch) > 0) {
|
33 |
+
return file_put_contents($this->_file, json_encode($batch)."\n", FILE_APPEND | LOCK_EX) !== false;
|
34 |
+
} else {
|
35 |
+
return true;
|
36 |
+
}
|
37 |
+
}
|
38 |
}
|
src/GridGallery/Promo/Model/classes/lib/ConsumerStrategies/SocketConsumer.php
CHANGED
@@ -1,308 +1,308 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Portions of this class were borrowed from
|
4 |
-
* https://github.com/segmentio/analytics-php/blob/master/lib/Analytics/Consumer/Socket.php.
|
5 |
-
* Thanks for the work!
|
6 |
-
*
|
7 |
-
* WWWWWW||WWWWWW
|
8 |
-
* W W W||W W W
|
9 |
-
* ||
|
10 |
-
* ( OO )__________
|
11 |
-
* / | \
|
12 |
-
* /o o| MIT \
|
13 |
-
* \___/||_||__||_|| *
|
14 |
-
* || || || ||
|
15 |
-
* _||_|| _||_||
|
16 |
-
* (__|__|(__|__|
|
17 |
-
* (The MIT License)
|
18 |
-
*
|
19 |
-
* Copyright (c) 2013 Segment.io Inc. friends@segment.io
|
20 |
-
*
|
21 |
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
22 |
-
* documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the
|
23 |
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
24 |
-
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
25 |
-
*
|
26 |
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
27 |
-
* Software.
|
28 |
-
*
|
29 |
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
30 |
-
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
31 |
-
* OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
32 |
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
33 |
-
*/
|
34 |
-
require_once(dirname(__FILE__) . "/AbstractConsumer.php");
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Consumes messages and writes them to host/endpoint using a persistent socket
|
38 |
-
*/
|
39 |
-
class ConsumerStrategies_SocketConsumer extends ConsumerStrategies_AbstractConsumer {
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @var string the host to connect to (e.g. api.mixpanel.com)
|
43 |
-
*/
|
44 |
-
private $_host;
|
45 |
-
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @var string the host-relative endpoint to write to (e.g. /engage)
|
49 |
-
*/
|
50 |
-
private $_endpoint;
|
51 |
-
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @var int connect_timeout the socket connection timeout in seconds
|
55 |
-
*/
|
56 |
-
private $_connect_timeout;
|
57 |
-
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @var string the protocol to use for the socket connection
|
61 |
-
*/
|
62 |
-
private $_protocol;
|
63 |
-
|
64 |
-
|
65 |
-
/**
|
66 |
-
* @var resource holds the socket resource
|
67 |
-
*/
|
68 |
-
private $_socket;
|
69 |
-
|
70 |
-
/**
|
71 |
-
* @var bool whether or not to wait for a response
|
72 |
-
*/
|
73 |
-
private $_async;
|
74 |
-
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Creates a new SocketConsumer and assigns properties from the $options array
|
78 |
-
* @param array $options
|
79 |
-
*/
|
80 |
-
public function __construct($options = array()) {
|
81 |
-
parent::__construct($options);
|
82 |
-
|
83 |
-
|
84 |
-
$this->_host = $options['host'];
|
85 |
-
$this->_endpoint = $options['endpoint'];
|
86 |
-
$this->_connect_timeout = array_key_exists('connect_timeout', $options) ? $options['connect_timeout'] : 5;
|
87 |
-
$this->_async = array_key_exists('async', $options) && $options['async'] === false ? false : true;
|
88 |
-
|
89 |
-
if (array_key_exists('use_ssl', $options) && $options['use_ssl'] == true) {
|
90 |
-
$this->_protocol = "ssl";
|
91 |
-
$this->_port = 443;
|
92 |
-
} else {
|
93 |
-
$this->_protocol = "tcp";
|
94 |
-
$this->_port = 80;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Write using a persistent socket connection.
|
101 |
-
* @param array $batch
|
102 |
-
* @return bool
|
103 |
-
*/
|
104 |
-
public function persist($batch) {
|
105 |
-
|
106 |
-
$socket = $this->_getSocket();
|
107 |
-
if (!is_resource($socket)) {
|
108 |
-
return false;
|
109 |
-
}
|
110 |
-
|
111 |
-
$data = "data=".$this->_encode($batch);
|
112 |
-
|
113 |
-
$body = "";
|
114 |
-
$body.= "POST ".$this->_endpoint." HTTP/1.1\r\n";
|
115 |
-
$body.= "Host: " . $this->_host . "\r\n";
|
116 |
-
$body.= "Content-Type: application/x-www-form-urlencoded\r\n";
|
117 |
-
$body.= "Accept: application/json\r\n";
|
118 |
-
$body.= "Content-length: " . strlen($data) . "\r\n";
|
119 |
-
$body.= "\r\n";
|
120 |
-
$body.= $data;
|
121 |
-
|
122 |
-
return $this->_write($socket, $body);
|
123 |
-
}
|
124 |
-
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Return cached socket if open or create a new persistent socket
|
128 |
-
* @return bool|resource
|
129 |
-
*/
|
130 |
-
private function _getSocket() {
|
131 |
-
if(is_resource($this->_socket)) {
|
132 |
-
|
133 |
-
if ($this->_debug()) {
|
134 |
-
$this->_log("Using existing socket");
|
135 |
-
}
|
136 |
-
|
137 |
-
return $this->_socket;
|
138 |
-
} else {
|
139 |
-
|
140 |
-
if ($this->_debug()) {
|
141 |
-
$this->_log("Creating new socket at ".time());
|
142 |
-
}
|
143 |
-
|
144 |
-
return $this->_createSocket();
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Attempt to open a new socket connection, cache it, and return the resource
|
150 |
-
* @param bool $retry
|
151 |
-
* @return bool|resource
|
152 |
-
*/
|
153 |
-
private function _createSocket($retry = true) {
|
154 |
-
try {
|
155 |
-
$socket = pfsockopen($this->_protocol . "://" . $this->_host, $this->_port, $err_no, $err_msg, $this->_connect_timeout);
|
156 |
-
|
157 |
-
if ($this->_debug()) {
|
158 |
-
$this->_log("Opening socket connection to " . $this->_protocol . "://" . $this->_host . ":" . $this->_port);
|
159 |
-
}
|
160 |
-
|
161 |
-
if ($err_no != 0) {
|
162 |
-
$this->_handleError($err_no, $err_msg);
|
163 |
-
return $retry == true ? $this->_createSocket(false) : false;
|
164 |
-
} else {
|
165 |
-
// cache the socket
|
166 |
-
$this->_socket = $socket;
|
167 |
-
return $socket;
|
168 |
-
}
|
169 |
-
|
170 |
-
} catch (Exception $e) {
|
171 |
-
$this->_handleError($e->getCode(), $e->getMessage());
|
172 |
-
return $retry == true ? $this->_createSocket(false) : false;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Attempt to close and dereference a socket resource
|
178 |
-
*/
|
179 |
-
private function _destroySocket() {
|
180 |
-
$socket = $this->_socket;
|
181 |
-
$this->_socket = null;
|
182 |
-
fclose($socket);
|
183 |
-
}
|
184 |
-
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Write $data through the given $socket
|
188 |
-
* @param $socket
|
189 |
-
* @param $data
|
190 |
-
* @param bool $retry
|
191 |
-
* @return bool
|
192 |
-
*/
|
193 |
-
private function _write($socket, $data, $retry = true) {
|
194 |
-
|
195 |
-
$bytes_sent = 0;
|
196 |
-
$bytes_total = strlen($data);
|
197 |
-
$socket_closed = false;
|
198 |
-
$success = true;
|
199 |
-
$max_bytes_per_write = 8192;
|
200 |
-
|
201 |
-
// if we have no data to write just return true
|
202 |
-
if ($bytes_total == 0) {
|
203 |
-
return true;
|
204 |
-
}
|
205 |
-
|
206 |
-
// try to write the data
|
207 |
-
while (!$socket_closed && $bytes_sent < $bytes_total) {
|
208 |
-
|
209 |
-
try {
|
210 |
-
$bytes = fwrite($socket, $data, $max_bytes_per_write);
|
211 |
-
|
212 |
-
if ($this->_debug()) {
|
213 |
-
$this->_log("Socket wrote ".$bytes." bytes");
|
214 |
-
}
|
215 |
-
|
216 |
-
// if we actually wrote data, then remove the written portion from $data left to write
|
217 |
-
if ($bytes > 0) {
|
218 |
-
$data = substr($data, $max_bytes_per_write);
|
219 |
-
}
|
220 |
-
|
221 |
-
} catch (Exception $e) {
|
222 |
-
$this->_handleError($e->getCode(), $e->getMessage());
|
223 |
-
$socket_closed = true;
|
224 |
-
}
|
225 |
-
|
226 |
-
if (isset($bytes) && $bytes) {
|
227 |
-
$bytes_sent += $bytes;
|
228 |
-
} else {
|
229 |
-
$socket_closed = true;
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
// create a new socket if the current one is closed and retry the message
|
234 |
-
if ($socket_closed) {
|
235 |
-
|
236 |
-
$this->_destroySocket();
|
237 |
-
|
238 |
-
if ($retry) {
|
239 |
-
if ($this->_debug()) {
|
240 |
-
$this->_log("Retrying socket write...");
|
241 |
-
}
|
242 |
-
$socket = $this->_getSocket();
|
243 |
-
if ($socket) return $this->_write($socket, $data, false);
|
244 |
-
}
|
245 |
-
|
246 |
-
return false;
|
247 |
-
}
|
248 |
-
|
249 |
-
|
250 |
-
// only wait for the response in debug mode or if we explicitly want to be synchronous
|
251 |
-
if ($this->_debug() || !$this->_async) {
|
252 |
-
$res = $this->handleResponse(fread($socket, 2048));
|
253 |
-
if ($res["status"] != "200") {
|
254 |
-
$this->_handleError($res["status"], $res["body"]);
|
255 |
-
$success = false;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
return $success;
|
260 |
-
}
|
261 |
-
|
262 |
-
|
263 |
-
/**
|
264 |
-
* Parse the response from a socket write (only used for debugging)
|
265 |
-
* @param $response
|
266 |
-
* @return array
|
267 |
-
*/
|
268 |
-
private function handleResponse($response) {
|
269 |
-
|
270 |
-
$lines = explode("\n", $response);
|
271 |
-
|
272 |
-
// extract headers
|
273 |
-
$headers = array();
|
274 |
-
foreach($lines as $line) {
|
275 |
-
$kvsplit = explode(":", $line);
|
276 |
-
if (count($kvsplit) == 2) {
|
277 |
-
$header = $kvsplit[0];
|
278 |
-
$value = $kvsplit[1];
|
279 |
-
$headers[$header] = trim($value);
|
280 |
-
}
|
281 |
-
|
282 |
-
}
|
283 |
-
|
284 |
-
// extract status
|
285 |
-
$line_one_exploded = explode(" ", $lines[0]);
|
286 |
-
$status = $line_one_exploded[1];
|
287 |
-
|
288 |
-
// extract body
|
289 |
-
$body = $lines[count($lines) - 1];
|
290 |
-
|
291 |
-
// if the connection has been closed lets kill the socket
|
292 |
-
if ($headers['Connection'] == "close") {
|
293 |
-
$this->_destroySocket();
|
294 |
-
if ($this->_debug()) {
|
295 |
-
$this->_log("Server told us connection closed so lets destroy the socket so it'll reconnect on next call");
|
296 |
-
}
|
297 |
-
}
|
298 |
-
|
299 |
-
$ret = array(
|
300 |
-
"status" => $status,
|
301 |
-
"body" => $body,
|
302 |
-
);
|
303 |
-
|
304 |
-
return $ret;
|
305 |
-
}
|
306 |
-
|
307 |
-
|
308 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Portions of this class were borrowed from
|
4 |
+
* https://github.com/segmentio/analytics-php/blob/master/lib/Analytics/Consumer/Socket.php.
|
5 |
+
* Thanks for the work!
|
6 |
+
*
|
7 |
+
* WWWWWW||WWWWWW
|
8 |
+
* W W W||W W W
|
9 |
+
* ||
|
10 |
+
* ( OO )__________
|
11 |
+
* / | \
|
12 |
+
* /o o| MIT \
|
13 |
+
* \___/||_||__||_|| *
|
14 |
+
* || || || ||
|
15 |
+
* _||_|| _||_||
|
16 |
+
* (__|__|(__|__|
|
17 |
+
* (The MIT License)
|
18 |
+
*
|
19 |
+
* Copyright (c) 2013 Segment.io Inc. friends@segment.io
|
20 |
+
*
|
21 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
22 |
+
* documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the
|
23 |
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
24 |
+
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
25 |
+
*
|
26 |
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
27 |
+
* Software.
|
28 |
+
*
|
29 |
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
30 |
+
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
31 |
+
* OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
32 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
33 |
+
*/
|
34 |
+
require_once(dirname(__FILE__) . "/AbstractConsumer.php");
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Consumes messages and writes them to host/endpoint using a persistent socket
|
38 |
+
*/
|
39 |
+
class ConsumerStrategies_SocketConsumer extends ConsumerStrategies_AbstractConsumer {
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @var string the host to connect to (e.g. api.mixpanel.com)
|
43 |
+
*/
|
44 |
+
private $_host;
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @var string the host-relative endpoint to write to (e.g. /engage)
|
49 |
+
*/
|
50 |
+
private $_endpoint;
|
51 |
+
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @var int connect_timeout the socket connection timeout in seconds
|
55 |
+
*/
|
56 |
+
private $_connect_timeout;
|
57 |
+
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @var string the protocol to use for the socket connection
|
61 |
+
*/
|
62 |
+
private $_protocol;
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @var resource holds the socket resource
|
67 |
+
*/
|
68 |
+
private $_socket;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* @var bool whether or not to wait for a response
|
72 |
+
*/
|
73 |
+
private $_async;
|
74 |
+
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Creates a new SocketConsumer and assigns properties from the $options array
|
78 |
+
* @param array $options
|
79 |
+
*/
|
80 |
+
public function __construct($options = array()) {
|
81 |
+
parent::__construct($options);
|
82 |
+
|
83 |
+
|
84 |
+
$this->_host = $options['host'];
|
85 |
+
$this->_endpoint = $options['endpoint'];
|
86 |
+
$this->_connect_timeout = array_key_exists('connect_timeout', $options) ? $options['connect_timeout'] : 5;
|
87 |
+
$this->_async = array_key_exists('async', $options) && $options['async'] === false ? false : true;
|
88 |
+
|
89 |
+
if (array_key_exists('use_ssl', $options) && $options['use_ssl'] == true) {
|
90 |
+
$this->_protocol = "ssl";
|
91 |
+
$this->_port = 443;
|
92 |
+
} else {
|
93 |
+
$this->_protocol = "tcp";
|
94 |
+
$this->_port = 80;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Write using a persistent socket connection.
|
101 |
+
* @param array $batch
|
102 |
+
* @return bool
|
103 |
+
*/
|
104 |
+
public function persist($batch) {
|
105 |
+
|
106 |
+
$socket = $this->_getSocket();
|
107 |
+
if (!is_resource($socket)) {
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
|
111 |
+
$data = "data=".$this->_encode($batch);
|
112 |
+
|
113 |
+
$body = "";
|
114 |
+
$body.= "POST ".$this->_endpoint." HTTP/1.1\r\n";
|
115 |
+
$body.= "Host: " . $this->_host . "\r\n";
|
116 |
+
$body.= "Content-Type: application/x-www-form-urlencoded\r\n";
|
117 |
+
$body.= "Accept: application/json\r\n";
|
118 |
+
$body.= "Content-length: " . strlen($data) . "\r\n";
|
119 |
+
$body.= "\r\n";
|
120 |
+
$body.= $data;
|
121 |
+
|
122 |
+
return $this->_write($socket, $body);
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Return cached socket if open or create a new persistent socket
|
128 |
+
* @return bool|resource
|
129 |
+
*/
|
130 |
+
private function _getSocket() {
|
131 |
+
if(is_resource($this->_socket)) {
|
132 |
+
|
133 |
+
if ($this->_debug()) {
|
134 |
+
$this->_log("Using existing socket");
|
135 |
+
}
|
136 |
+
|
137 |
+
return $this->_socket;
|
138 |
+
} else {
|
139 |
+
|
140 |
+
if ($this->_debug()) {
|
141 |
+
$this->_log("Creating new socket at ".time());
|
142 |
+
}
|
143 |
+
|
144 |
+
return $this->_createSocket();
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Attempt to open a new socket connection, cache it, and return the resource
|
150 |
+
* @param bool $retry
|
151 |
+
* @return bool|resource
|
152 |
+
*/
|
153 |
+
private function _createSocket($retry = true) {
|
154 |
+
try {
|
155 |
+
$socket = pfsockopen($this->_protocol . "://" . $this->_host, $this->_port, $err_no, $err_msg, $this->_connect_timeout);
|
156 |
+
|
157 |
+
if ($this->_debug()) {
|
158 |
+
$this->_log("Opening socket connection to " . $this->_protocol . "://" . $this->_host . ":" . $this->_port);
|
159 |
+
}
|
160 |
+
|
161 |
+
if ($err_no != 0) {
|
162 |
+
$this->_handleError($err_no, $err_msg);
|
163 |
+
return $retry == true ? $this->_createSocket(false) : false;
|
164 |
+
} else {
|
165 |
+
// cache the socket
|
166 |
+
$this->_socket = $socket;
|
167 |
+
return $socket;
|
168 |
+
}
|
169 |
+
|
170 |
+
} catch (Exception $e) {
|
171 |
+
$this->_handleError($e->getCode(), $e->getMessage());
|
172 |
+
return $retry == true ? $this->_createSocket(false) : false;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Attempt to close and dereference a socket resource
|
178 |
+
*/
|
179 |
+
private function _destroySocket() {
|
180 |
+
$socket = $this->_socket;
|
181 |
+
$this->_socket = null;
|
182 |
+
fclose($socket);
|
183 |
+
}
|
184 |
+
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Write $data through the given $socket
|
188 |
+
* @param $socket
|
189 |
+
* @param $data
|
190 |
+
* @param bool $retry
|
191 |
+
* @return bool
|
192 |
+
*/
|
193 |
+
private function _write($socket, $data, $retry = true) {
|
194 |
+
|
195 |
+
$bytes_sent = 0;
|
196 |
+
$bytes_total = strlen($data);
|
197 |
+
$socket_closed = false;
|
198 |
+
$success = true;
|
199 |
+
$max_bytes_per_write = 8192;
|
200 |
+
|
201 |
+
// if we have no data to write just return true
|
202 |
+
if ($bytes_total == 0) {
|
203 |
+
return true;
|
204 |
+
}
|
205 |
+
|
206 |
+
// try to write the data
|
207 |
+
while (!$socket_closed && $bytes_sent < $bytes_total) {
|
208 |
+
|
209 |
+
try {
|
210 |
+
$bytes = fwrite($socket, $data, $max_bytes_per_write);
|
211 |
+
|
212 |
+
if ($this->_debug()) {
|
213 |
+
$this->_log("Socket wrote ".$bytes." bytes");
|
214 |
+
}
|
215 |
+
|
216 |
+
// if we actually wrote data, then remove the written portion from $data left to write
|
217 |
+
if ($bytes > 0) {
|
218 |
+
$data = substr($data, $max_bytes_per_write);
|
219 |
+
}
|
220 |
+
|
221 |
+
} catch (Exception $e) {
|
222 |
+
$this->_handleError($e->getCode(), $e->getMessage());
|
223 |
+
$socket_closed = true;
|
224 |
+
}
|
225 |
+
|
226 |
+
if (isset($bytes) && $bytes) {
|
227 |
+
$bytes_sent += $bytes;
|
228 |
+
} else {
|
229 |
+
$socket_closed = true;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
// create a new socket if the current one is closed and retry the message
|
234 |
+
if ($socket_closed) {
|
235 |
+
|
236 |
+
$this->_destroySocket();
|
237 |
+
|
238 |
+
if ($retry) {
|
239 |
+
if ($this->_debug()) {
|
240 |
+
$this->_log("Retrying socket write...");
|
241 |
+
}
|
242 |
+
$socket = $this->_getSocket();
|
243 |
+
if ($socket) return $this->_write($socket, $data, false);
|
244 |
+
}
|
245 |
+
|
246 |
+
return false;
|
247 |
+
}
|
248 |
+
|
249 |
+
|
250 |
+
// only wait for the response in debug mode or if we explicitly want to be synchronous
|
251 |
+
if ($this->_debug() || !$this->_async) {
|
252 |
+
$res = $this->handleResponse(fread($socket, 2048));
|
253 |
+
if ($res["status"] != "200") {
|
254 |
+
$this->_handleError($res["status"], $res["body"]);
|
255 |
+
$success = false;
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
return $success;
|
260 |
+
}
|
261 |
+
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Parse the response from a socket write (only used for debugging)
|
265 |
+
* @param $response
|
266 |
+
* @return array
|
267 |
+
*/
|
268 |
+
private function handleResponse($response) {
|
269 |
+
|
270 |
+
$lines = explode("\n", $response);
|
271 |
+
|
272 |
+
// extract headers
|
273 |
+
$headers = array();
|
274 |
+
foreach($lines as $line) {
|
275 |
+
$kvsplit = explode(":", $line);
|
276 |
+
if (count($kvsplit) == 2) {
|
277 |
+
$header = $kvsplit[0];
|
278 |
+
$value = $kvsplit[1];
|
279 |
+
$headers[$header] = trim($value);
|
280 |
+
}
|
281 |
+
|
282 |
+
}
|
283 |
+
|
284 |
+
// extract status
|
285 |
+
$line_one_exploded = explode(" ", $lines[0]);
|
286 |
+
$status = $line_one_exploded[1];
|
287 |
+
|
288 |
+
// extract body
|
289 |
+
$body = $lines[count($lines) - 1];
|
290 |
+
|
291 |
+
// if the connection has been closed lets kill the socket
|
292 |
+
if ($headers['Connection'] == "close") {
|
293 |
+
$this->_destroySocket();
|
294 |
+
if ($this->_debug()) {
|
295 |
+
$this->_log("Server told us connection closed so lets destroy the socket so it'll reconnect on next call");
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
$ret = array(
|
300 |
+
"status" => $status,
|
301 |
+
"body" => $body,
|
302 |
+
);
|
303 |
+
|
304 |
+
return $ret;
|
305 |
+
}
|
306 |
+
|
307 |
+
|
308 |
}
|
src/GridGallery/Promo/Model/classes/lib/Mixpanel.php
CHANGED
@@ -1,302 +1,302 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once(dirname(__FILE__) . "/Base/MixpanelBase.php");
|
4 |
-
require_once(dirname(__FILE__) . "/Producers/MixpanelPeople.php");
|
5 |
-
require_once(dirname(__FILE__) . "/Producers/MixpanelEvents.php");
|
6 |
-
|
7 |
-
/**
|
8 |
-
* This is the main class for the Mixpanel PHP Library which provides all of the methods you need to track events and
|
9 |
-
* create/update profiles.
|
10 |
-
*
|
11 |
-
* Architecture
|
12 |
-
* -------------
|
13 |
-
*
|
14 |
-
* This library is built such that all messages are buffered in an in-memory "queue"
|
15 |
-
* The queue will be automatically flushed at the end of every request. Alternatively, you can call "flush()" manually
|
16 |
-
* at any time. Flushed messages will be passed to a Consumer's "persist" method. The library comes with a handful of
|
17 |
-
* Consumers. The "CurlConsumer" is used by default which will send the messages to Mixpanel using forked cURL processes.
|
18 |
-
* You can implement your own custom Consumer to customize how a message is sent to Mixpanel. This can be useful when
|
19 |
-
* you want to put messages onto a distributed queue (such as ActiveMQ or Kestrel) instead of writing to Mixpanel in
|
20 |
-
* the user thread.
|
21 |
-
*
|
22 |
-
* Options
|
23 |
-
* -------------
|
24 |
-
*
|
25 |
-
* <table width="100%" cellpadding="5">
|
26 |
-
* <tr>
|
27 |
-
* <th>Option</th>
|
28 |
-
* <th>Description</th>
|
29 |
-
* <th>Default</th>
|
30 |
-
* </tr>
|
31 |
-
* <tr>
|
32 |
-
* <td>max_queue_size</td>
|
33 |
-
* <td>The maximum number of items to buffer in memory before flushing</td>
|
34 |
-
* <td>1000</td>
|
35 |
-
* </tr>
|
36 |
-
* <tr>
|
37 |
-
* <td>debug</td>
|
38 |
-
* <td>Enable/disable debug mode</td>
|
39 |
-
* <td>false</td>
|
40 |
-
* </tr>
|
41 |
-
* <tr>
|
42 |
-
* <td>consumer</td>
|
43 |
-
* <td>The consumer to use for writing messages</td>
|
44 |
-
* <td>curl</td>
|
45 |
-
* </tr>
|
46 |
-
* <tr>
|
47 |
-
* <td>consumers</td>
|
48 |
-
* <td>An array of custom consumers in the format array(consumer_key => class_name)</td>
|
49 |
-
* <td>null</td>
|
50 |
-
* </tr>
|
51 |
-
* <tr>
|
52 |
-
* <td>host</td>
|
53 |
-
* <td>The host name for api calls (used by some consumers)</td>
|
54 |
-
* <td>api.mixpanel.com</td>
|
55 |
-
* </tr>
|
56 |
-
* <tr>
|
57 |
-
* <td>events_endpoint</td>
|
58 |
-
* <td>The endpoint for tracking events (relative to the host)</td>
|
59 |
-
* <td>/events</td>
|
60 |
-
* </tr>
|
61 |
-
* <tr>
|
62 |
-
* <td>people_endpoint</td>
|
63 |
-
* <td>The endpoint for making people updates (relative to the host)</td>
|
64 |
-
* <td>/engage</td>
|
65 |
-
* </tr>
|
66 |
-
* <tr>
|
67 |
-
* <td>use_ssl</td>
|
68 |
-
* <td>Tell the consumer whether or not to use ssl (when available)</td>
|
69 |
-
* <td>true</td>
|
70 |
-
* </tr>
|
71 |
-
* <tr>
|
72 |
-
* <td>error_callback</td>
|
73 |
-
* <td>The name of a function to be called on consumption failures</td>
|
74 |
-
* <td>null</td>
|
75 |
-
* </tr>
|
76 |
-
* <tr>
|
77 |
-
* <td>connect_timeout</td>
|
78 |
-
* <td>In both the SocketConsumer and CurlConsumer, this is used for the connection timeout (i.e. How long it has take to actually make a connection).
|
79 |
-
* <td>5</td>
|
80 |
-
* </tr>
|
81 |
-
* <tr>
|
82 |
-
* <td>timeout</td>
|
83 |
-
* <td>In the CurlConsumer (non-forked), it is used to determine how long the cURL call has to execute.
|
84 |
-
* <td>30</td>
|
85 |
-
* </tr>
|
86 |
-
* </table>
|
87 |
-
*
|
88 |
-
* Example: Tracking an Event
|
89 |
-
* -------------
|
90 |
-
*
|
91 |
-
* $mp = Mixpanel::getInstance("MY_TOKEN");
|
92 |
-
*
|
93 |
-
* $mp->track("My Event");
|
94 |
-
*
|
95 |
-
* Example: Setting Profile Properties
|
96 |
-
* -------------
|
97 |
-
*
|
98 |
-
* $mp = Mixpanel::getInstance("MY_TOKEN", array("use_ssl" => false));
|
99 |
-
*
|
100 |
-
* $mp->people->set(12345, array(
|
101 |
-
* '$first_name' => "John",
|
102 |
-
* '$last_name' => "Doe",
|
103 |
-
* '$email' => "john.doe@example.com",
|
104 |
-
* '$phone' => "5555555555",
|
105 |
-
* 'Favorite Color' => "red"
|
106 |
-
* ));
|
107 |
-
*
|
108 |
-
*/
|
109 |
-
class Mixpanel extends Base_MixpanelBase {
|
110 |
-
|
111 |
-
|
112 |
-
/**
|
113 |
-
* An instance of the MixpanelPeople class (used to create/update profiles)
|
114 |
-
* @var MixpanelPeople
|
115 |
-
*/
|
116 |
-
public $people;
|
117 |
-
|
118 |
-
|
119 |
-
/**
|
120 |
-
* An instance of the MixpanelEvents class
|
121 |
-
* @var Producers_MixpanelEvents
|
122 |
-
*/
|
123 |
-
private $_events;
|
124 |
-
|
125 |
-
|
126 |
-
/**
|
127 |
-
* An instance of the Mixpanel class (for singleton use)
|
128 |
-
* @var Mixpanel
|
129 |
-
*/
|
130 |
-
private static $_instance;
|
131 |
-
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Instantiates a new Mixpanel instance.
|
135 |
-
* @param $token
|
136 |
-
* @param array $options
|
137 |
-
*/
|
138 |
-
public function __construct($token, $options = array()) {
|
139 |
-
parent::__construct($options);
|
140 |
-
$this->people = new Producers_MixpanelPeople($token, $options);
|
141 |
-
$this->_events = new Producers_MixpanelEvents($token, $options);
|
142 |
-
}
|
143 |
-
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Returns a singleton instance of Mixpanel
|
147 |
-
* @param $token
|
148 |
-
* @param array $options
|
149 |
-
* @return Mixpanel
|
150 |
-
*/
|
151 |
-
public static function getInstance($token, $options = array()) {
|
152 |
-
if(!isset(self::$_instance)) {
|
153 |
-
self::$_instance = new Mixpanel($token, $options);
|
154 |
-
}
|
155 |
-
return self::$_instance;
|
156 |
-
}
|
157 |
-
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Add an array representing a message to be sent to Mixpanel to the in-memory queue.
|
161 |
-
* @param array $message
|
162 |
-
*/
|
163 |
-
public function enqueue($message = array()) {
|
164 |
-
$this->_events->enqueue($message);
|
165 |
-
}
|
166 |
-
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Add an array representing a list of messages to be sent to Mixpanel to a queue.
|
170 |
-
* @param array $messages
|
171 |
-
*/
|
172 |
-
public function enqueueAll($messages = array()) {
|
173 |
-
$this->_events->enqueueAll($messages);
|
174 |
-
}
|
175 |
-
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Flush the events queue
|
179 |
-
* @param int $desired_batch_size
|
180 |
-
*/
|
181 |
-
public function flush($desired_batch_size = 50) {
|
182 |
-
$this->_events->flush($desired_batch_size);
|
183 |
-
}
|
184 |
-
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Empty the events queue
|
188 |
-
*/
|
189 |
-
public function reset() {
|
190 |
-
$this->_events->reset();
|
191 |
-
}
|
192 |
-
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Identify the user you want to associate to tracked events
|
196 |
-
* @param string|int $user_id
|
197 |
-
*/
|
198 |
-
public function identify($user_id) {
|
199 |
-
$this->_events->identify($user_id);
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Track an event defined by $event associated with metadata defined by $properties
|
204 |
-
* @param string $event
|
205 |
-
* @param array $properties
|
206 |
-
*/
|
207 |
-
public function track($event, $properties = array()) {
|
208 |
-
$this->_events->track($event, $properties);
|
209 |
-
}
|
210 |
-
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Register a property to be sent with every event.
|
214 |
-
*
|
215 |
-
* If the property has already been registered, it will be
|
216 |
-
* overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class instance.
|
217 |
-
* @param string $property
|
218 |
-
* @param mixed $value
|
219 |
-
*/
|
220 |
-
public function register($property, $value) {
|
221 |
-
$this->_events->register($property, $value);
|
222 |
-
}
|
223 |
-
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Register multiple properties to be sent with every event.
|
227 |
-
*
|
228 |
-
* If any of the properties have already been registered,
|
229 |
-
* they will be overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class
|
230 |
-
* instance.
|
231 |
-
* @param array $props_and_vals
|
232 |
-
*/
|
233 |
-
public function registerAll($props_and_vals = array()) {
|
234 |
-
$this->_events->registerAll($props_and_vals);
|
235 |
-
}
|
236 |
-
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Register a property to be sent with every event.
|
240 |
-
*
|
241 |
-
* If the property has already been registered, it will NOT be
|
242 |
-
* overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class instance.
|
243 |
-
* @param $property
|
244 |
-
* @param $value
|
245 |
-
*/
|
246 |
-
public function registerOnce($property, $value) {
|
247 |
-
$this->_events->registerOnce($property, $value);
|
248 |
-
}
|
249 |
-
|
250 |
-
|
251 |
-
/**
|
252 |
-
* Register multiple properties to be sent with every event.
|
253 |
-
*
|
254 |
-
* If any of the properties have already been registered,
|
255 |
-
* they will NOT be overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class
|
256 |
-
* instance.
|
257 |
-
* @param array $props_and_vals
|
258 |
-
*/
|
259 |
-
public function registerAllOnce($props_and_vals = array()) {
|
260 |
-
$this->_events->registerAllOnce($props_and_vals);
|
261 |
-
}
|
262 |
-
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Un-register an property to be sent with every event.
|
266 |
-
* @param string $property
|
267 |
-
*/
|
268 |
-
public function unregister($property) {
|
269 |
-
$this->_events->unregister($property);
|
270 |
-
}
|
271 |
-
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Un-register a list of properties to be sent with every event.
|
275 |
-
* @param array $properties
|
276 |
-
*/
|
277 |
-
public function unregisterAll($properties) {
|
278 |
-
$this->_events->unregisterAll($properties);
|
279 |
-
}
|
280 |
-
|
281 |
-
|
282 |
-
/**
|
283 |
-
* Get a property that is set to be sent with every event
|
284 |
-
* @param string $property
|
285 |
-
* @return mixed
|
286 |
-
*/
|
287 |
-
public function getProperty($property)
|
288 |
-
{
|
289 |
-
return $this->_events->getProperty($property);
|
290 |
-
}
|
291 |
-
|
292 |
-
|
293 |
-
/**
|
294 |
-
* Alias an existing id with a different unique id. This is helpful when you want to associate a generated id
|
295 |
-
* (such as a session id) to a user id or username.
|
296 |
-
* @param string|int $original_id
|
297 |
-
* @param string|int $new_id
|
298 |
-
*/
|
299 |
-
public function createAlias($original_id, $new_id) {
|
300 |
-
$this->_events->createAlias($original_id, $new_id);
|
301 |
-
}
|
302 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once(dirname(__FILE__) . "/Base/MixpanelBase.php");
|
4 |
+
require_once(dirname(__FILE__) . "/Producers/MixpanelPeople.php");
|
5 |
+
require_once(dirname(__FILE__) . "/Producers/MixpanelEvents.php");
|
6 |
+
|
7 |
+
/**
|
8 |
+
* This is the main class for the Mixpanel PHP Library which provides all of the methods you need to track events and
|
9 |
+
* create/update profiles.
|
10 |
+
*
|
11 |
+
* Architecture
|
12 |
+
* -------------
|
13 |
+
*
|
14 |
+
* This library is built such that all messages are buffered in an in-memory "queue"
|
15 |
+
* The queue will be automatically flushed at the end of every request. Alternatively, you can call "flush()" manually
|
16 |
+
* at any time. Flushed messages will be passed to a Consumer's "persist" method. The library comes with a handful of
|
17 |
+
* Consumers. The "CurlConsumer" is used by default which will send the messages to Mixpanel using forked cURL processes.
|
18 |
+
* You can implement your own custom Consumer to customize how a message is sent to Mixpanel. This can be useful when
|
19 |
+
* you want to put messages onto a distributed queue (such as ActiveMQ or Kestrel) instead of writing to Mixpanel in
|
20 |
+
* the user thread.
|
21 |
+
*
|
22 |
+
* Options
|
23 |
+
* -------------
|
24 |
+
*
|
25 |
+
* <table width="100%" cellpadding="5">
|
26 |
+
* <tr>
|
27 |
+
* <th>Option</th>
|
28 |
+
* <th>Description</th>
|
29 |
+
* <th>Default</th>
|
30 |
+
* </tr>
|
31 |
+
* <tr>
|
32 |
+
* <td>max_queue_size</td>
|
33 |
+
* <td>The maximum number of items to buffer in memory before flushing</td>
|
34 |
+
* <td>1000</td>
|
35 |
+
* </tr>
|
36 |
+
* <tr>
|
37 |
+
* <td>debug</td>
|
38 |
+
* <td>Enable/disable debug mode</td>
|
39 |
+
* <td>false</td>
|
40 |
+
* </tr>
|
41 |
+
* <tr>
|
42 |
+
* <td>consumer</td>
|
43 |
+
* <td>The consumer to use for writing messages</td>
|
44 |
+
* <td>curl</td>
|
45 |
+
* </tr>
|
46 |
+
* <tr>
|
47 |
+
* <td>consumers</td>
|
48 |
+
* <td>An array of custom consumers in the format array(consumer_key => class_name)</td>
|
49 |
+
* <td>null</td>
|
50 |
+
* </tr>
|
51 |
+
* <tr>
|
52 |
+
* <td>host</td>
|
53 |
+
* <td>The host name for api calls (used by some consumers)</td>
|
54 |
+
* <td>api.mixpanel.com</td>
|
55 |
+
* </tr>
|
56 |
+
* <tr>
|
57 |
+
* <td>events_endpoint</td>
|
58 |
+
* <td>The endpoint for tracking events (relative to the host)</td>
|
59 |
+
* <td>/events</td>
|
60 |
+
* </tr>
|
61 |
+
* <tr>
|
62 |
+
* <td>people_endpoint</td>
|
63 |
+
* <td>The endpoint for making people updates (relative to the host)</td>
|
64 |
+
* <td>/engage</td>
|
65 |
+
* </tr>
|
66 |
+
* <tr>
|
67 |
+
* <td>use_ssl</td>
|
68 |
+
* <td>Tell the consumer whether or not to use ssl (when available)</td>
|
69 |
+
* <td>true</td>
|
70 |
+
* </tr>
|
71 |
+
* <tr>
|
72 |
+
* <td>error_callback</td>
|
73 |
+
* <td>The name of a function to be called on consumption failures</td>
|
74 |
+
* <td>null</td>
|
75 |
+
* </tr>
|
76 |
+
* <tr>
|
77 |
+
* <td>connect_timeout</td>
|
78 |
+
* <td>In both the SocketConsumer and CurlConsumer, this is used for the connection timeout (i.e. How long it has take to actually make a connection).
|
79 |
+
* <td>5</td>
|
80 |
+
* </tr>
|
81 |
+
* <tr>
|
82 |
+
* <td>timeout</td>
|
83 |
+
* <td>In the CurlConsumer (non-forked), it is used to determine how long the cURL call has to execute.
|
84 |
+
* <td>30</td>
|
85 |
+
* </tr>
|
86 |
+
* </table>
|
87 |
+
*
|
88 |
+
* Example: Tracking an Event
|
89 |
+
* -------------
|
90 |
+
*
|
91 |
+
* $mp = Mixpanel::getInstance("MY_TOKEN");
|
92 |
+
*
|
93 |
+
* $mp->track("My Event");
|
94 |
+
*
|
95 |
+
* Example: Setting Profile Properties
|
96 |
+
* -------------
|
97 |
+
*
|
98 |
+
* $mp = Mixpanel::getInstance("MY_TOKEN", array("use_ssl" => false));
|
99 |
+
*
|
100 |
+
* $mp->people->set(12345, array(
|
101 |
+
* '$first_name' => "John",
|
102 |
+
* '$last_name' => "Doe",
|
103 |
+
* '$email' => "john.doe@example.com",
|
104 |
+
* '$phone' => "5555555555",
|
105 |
+
* 'Favorite Color' => "red"
|
106 |
+
* ));
|
107 |
+
*
|
108 |
+
*/
|
109 |
+
class Mixpanel extends Base_MixpanelBase {
|
110 |
+
|
111 |
+
|
112 |
+
/**
|
113 |
+
* An instance of the MixpanelPeople class (used to create/update profiles)
|
114 |
+
* @var MixpanelPeople
|
115 |
+
*/
|
116 |
+
public $people;
|
117 |
+
|
118 |
+
|
119 |
+
/**
|
120 |
+
* An instance of the MixpanelEvents class
|
121 |
+
* @var Producers_MixpanelEvents
|
122 |
+
*/
|
123 |
+
private $_events;
|
124 |
+
|
125 |
+
|
126 |
+
/**
|
127 |
+
* An instance of the Mixpanel class (for singleton use)
|
128 |
+
* @var Mixpanel
|
129 |
+
*/
|
130 |
+
private static $_instance;
|
131 |
+
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Instantiates a new Mixpanel instance.
|
135 |
+
* @param $token
|
136 |
+
* @param array $options
|
137 |
+
*/
|
138 |
+
public function __construct($token, $options = array()) {
|
139 |
+
parent::__construct($options);
|
140 |
+
$this->people = new Producers_MixpanelPeople($token, $options);
|
141 |
+
$this->_events = new Producers_MixpanelEvents($token, $options);
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Returns a singleton instance of Mixpanel
|
147 |
+
* @param $token
|
148 |
+
* @param array $options
|
149 |
+
* @return Mixpanel
|
150 |
+
*/
|
151 |
+
public static function getInstance($token, $options = array()) {
|
152 |
+
if(!isset(self::$_instance)) {
|
153 |
+
self::$_instance = new Mixpanel($token, $options);
|
154 |
+
}
|
155 |
+
return self::$_instance;
|
156 |
+
}
|
157 |
+
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Add an array representing a message to be sent to Mixpanel to the in-memory queue.
|
161 |
+
* @param array $message
|
162 |
+
*/
|
163 |
+
public function enqueue($message = array()) {
|
164 |
+
$this->_events->enqueue($message);
|
165 |
+
}
|
166 |
+
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Add an array representing a list of messages to be sent to Mixpanel to a queue.
|
170 |
+
* @param array $messages
|
171 |
+
*/
|
172 |
+
public function enqueueAll($messages = array()) {
|
173 |
+
$this->_events->enqueueAll($messages);
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Flush the events queue
|
179 |
+
* @param int $desired_batch_size
|
180 |
+
*/
|
181 |
+
public function flush($desired_batch_size = 50) {
|
182 |
+
$this->_events->flush($desired_batch_size);
|
183 |
+
}
|
184 |
+
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Empty the events queue
|
188 |
+
*/
|
189 |
+
public function reset() {
|
190 |
+
$this->_events->reset();
|
191 |
+
}
|
192 |
+
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Identify the user you want to associate to tracked events
|
196 |
+
* @param string|int $user_id
|
197 |
+
*/
|
198 |
+
public function identify($user_id) {
|
199 |
+
$this->_events->identify($user_id);
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Track an event defined by $event associated with metadata defined by $properties
|
204 |
+
* @param string $event
|
205 |
+
* @param array $properties
|
206 |
+
*/
|
207 |
+
public function track($event, $properties = array()) {
|
208 |
+
$this->_events->track($event, $properties);
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Register a property to be sent with every event.
|
214 |
+
*
|
215 |
+
* If the property has already been registered, it will be
|
216 |
+
* overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class instance.
|
217 |
+
* @param string $property
|
218 |
+
* @param mixed $value
|
219 |
+
*/
|
220 |
+
public function register($property, $value) {
|
221 |
+
$this->_events->register($property, $value);
|
222 |
+
}
|
223 |
+
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Register multiple properties to be sent with every event.
|
227 |
+
*
|
228 |
+
* If any of the properties have already been registered,
|
229 |
+
* they will be overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class
|
230 |
+
* instance.
|
231 |
+
* @param array $props_and_vals
|
232 |
+
*/
|
233 |
+
public function registerAll($props_and_vals = array()) {
|
234 |
+
$this->_events->registerAll($props_and_vals);
|
235 |
+
}
|
236 |
+
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Register a property to be sent with every event.
|
240 |
+
*
|
241 |
+
* If the property has already been registered, it will NOT be
|
242 |
+
* overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class instance.
|
243 |
+
* @param $property
|
244 |
+
* @param $value
|
245 |
+
*/
|
246 |
+
public function registerOnce($property, $value) {
|
247 |
+
$this->_events->registerOnce($property, $value);
|
248 |
+
}
|
249 |
+
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Register multiple properties to be sent with every event.
|
253 |
+
*
|
254 |
+
* If any of the properties have already been registered,
|
255 |
+
* they will NOT be overwritten. NOTE: Registered properties are only persisted for the life of the Mixpanel class
|
256 |
+
* instance.
|
257 |
+
* @param array $props_and_vals
|
258 |
+
*/
|
259 |
+
public function registerAllOnce($props_and_vals = array()) {
|
260 |
+
$this->_events->registerAllOnce($props_and_vals);
|
261 |
+
}
|
262 |
+
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Un-register an property to be sent with every event.
|
266 |
+
* @param string $property
|
267 |
+
*/
|
268 |
+
public function unregister($property) {
|
269 |
+
$this->_events->unregister($property);
|
270 |
+
}
|
271 |
+
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Un-register a list of properties to be sent with every event.
|
275 |
+
* @param array $properties
|
276 |
+
*/
|
277 |
+
public function unregisterAll($properties) {
|
278 |
+
$this->_events->unregisterAll($properties);
|
279 |
+
}
|
280 |
+
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Get a property that is set to be sent with every event
|
284 |
+
* @param string $property
|
285 |
+
* @return mixed
|
286 |
+
*/
|
287 |
+
public function getProperty($property)
|
288 |
+
{
|
289 |
+
return $this->_events->getProperty($property);
|
290 |
+
}
|
291 |
+
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Alias an existing id with a different unique id. This is helpful when you want to associate a generated id
|
295 |
+
* (such as a session id) to a user id or username.
|
296 |
+
* @param string|int $original_id
|
297 |
+
* @param string|int $new_id
|
298 |
+
*/
|
299 |
+
public function createAlias($original_id, $new_id) {
|
300 |
+
$this->_events->createAlias($original_id, $new_id);
|
301 |
+
}
|
302 |
+
}
|
src/GridGallery/Promo/Model/classes/lib/Producers/MixpanelBaseProducer.php
CHANGED
@@ -1,229 +1,229 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(dirname(__FILE__) . "/../Base/MixpanelBase.php");
|
3 |
-
require_once(dirname(__FILE__) . "/../ConsumerStrategies/FileConsumer.php");
|
4 |
-
require_once(dirname(__FILE__) . "/../ConsumerStrategies/CurlConsumer.php");
|
5 |
-
require_once(dirname(__FILE__) . "/../ConsumerStrategies/SocketConsumer.php");
|
6 |
-
|
7 |
-
if (!function_exists('json_encode')) {
|
8 |
-
throw new Exception('The JSON PHP extension is required.');
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Provides some base methods for use by a message Producer
|
13 |
-
*/
|
14 |
-
abstract class Producers_MixpanelBaseProducer extends Base_MixpanelBase {
|
15 |
-
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var string a token associated to a Mixpanel project
|
19 |
-
*/
|
20 |
-
protected $_token;
|
21 |
-
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var array a queue to hold messages in memory before flushing in batches
|
25 |
-
*/
|
26 |
-
private $_queue = array();
|
27 |
-
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @var ConsumerStrategies_AbstractConsumer the consumer to use when flushing messages
|
31 |
-
*/
|
32 |
-
private $_consumer = null;
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @var array The list of available consumers
|
37 |
-
*/
|
38 |
-
private $_consumers = array(
|
39 |
-
"file" => "ConsumerStrategies_FileConsumer",
|
40 |
-
"curl" => "ConsumerStrategies_CurlConsumer",
|
41 |
-
"socket" => "ConsumerStrategies_SocketConsumer"
|
42 |
-
);
|
43 |
-
|
44 |
-
|
45 |
-
/**
|
46 |
-
* If the queue reaches this size we'll auto-flush to prevent out of memory errors
|
47 |
-
* @var int
|
48 |
-
*/
|
49 |
-
protected $_max_queue_size = 1000;
|
50 |
-
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Creates a new MixpanelBaseProducer, assings Mixpanel project token, registers custom Consumers, and instantiates
|
54 |
-
* the desired consumer
|
55 |
-
* @param $token
|
56 |
-
* @param array $options
|
57 |
-
*/
|
58 |
-
public function __construct($token, $options = array()) {
|
59 |
-
|
60 |
-
parent::__construct($options);
|
61 |
-
|
62 |
-
// register any customer consumers
|
63 |
-
if (array_key_exists("consumers", $options)) {
|
64 |
-
$this->_consumers = array_merge($this->_consumers, $options['consumers']);
|
65 |
-
}
|
66 |
-
|
67 |
-
// set max queue size
|
68 |
-
if (array_key_exists("max_queue_size", $options)) {
|
69 |
-
$this->_max_queue_size = $options['max_queue_size'];
|
70 |
-
}
|
71 |
-
|
72 |
-
// associate token
|
73 |
-
$this->_token = $token;
|
74 |
-
|
75 |
-
if ($this->_debug()) {
|
76 |
-
$this->_log("Using token: ".$this->_token);
|
77 |
-
}
|
78 |
-
|
79 |
-
// instantiate the chosen consumer
|
80 |
-
$this->_consumer = $this->_getConsumer();
|
81 |
-
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Flush the queue when we destruct the client with retries
|
87 |
-
*/
|
88 |
-
public function __destruct() {
|
89 |
-
$attempts = 0;
|
90 |
-
$max_attempts = 10;
|
91 |
-
$success = false;
|
92 |
-
while (!$success && $attempts < $max_attempts) {
|
93 |
-
if ($this->_debug()) {
|
94 |
-
$this->_log("destruct flush attempt #".($attempts+1));
|
95 |
-
}
|
96 |
-
$success = $this->flush();
|
97 |
-
$attempts++;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Iterate the queue and write in batches using the instantiated Consumer Strategy
|
104 |
-
* @param int $desired_batch_size
|
105 |
-
* @return bool whether or not the flush was successful
|
106 |
-
*/
|
107 |
-
public function flush($desired_batch_size = 50) {
|
108 |
-
$queue_size = count($this->_queue);
|
109 |
-
$succeeded = true;
|
110 |
-
if ($this->_debug()) {
|
111 |
-
$this->_log("Flush called - queue size: ".$queue_size);
|
112 |
-
}
|
113 |
-
|
114 |
-
while($queue_size > 0 && $succeeded) {
|
115 |
-
$batch_size = min(array($queue_size, $desired_batch_size, $this->_options['max_batch_size']));
|
116 |
-
$batch = array_splice($this->_queue, 0, $batch_size);
|
117 |
-
$succeeded = $this->_persist($batch);
|
118 |
-
|
119 |
-
if (!$succeeded) {
|
120 |
-
if ($this->_debug()) {
|
121 |
-
$this->_log("Batch consumption failed!");
|
122 |
-
}
|
123 |
-
$this->_queue = array_merge($batch, $this->_queue);
|
124 |
-
|
125 |
-
if ($this->_debug()) {
|
126 |
-
$this->_log("added batch back to queue, queue size is now $queue_size");
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
$queue_size = count($this->_queue);
|
131 |
-
|
132 |
-
if ($this->_debug()) {
|
133 |
-
$this->_log("Batch of $batch_size consumed, queue size is now $queue_size");
|
134 |
-
}
|
135 |
-
}
|
136 |
-
return $succeeded;
|
137 |
-
}
|
138 |
-
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Empties the queue without persisting any of the messages
|
142 |
-
*/
|
143 |
-
public function reset() {
|
144 |
-
$this->_queue = array();
|
145 |
-
}
|
146 |
-
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Returns the in-memory queue
|
150 |
-
* @return array
|
151 |
-
*/
|
152 |
-
public function getQueue() {
|
153 |
-
return $this->_queue;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Returns the current Mixpanel project token
|
158 |
-
* @return string
|
159 |
-
*/
|
160 |
-
public function getToken() {
|
161 |
-
return $this->_token;
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Given a strategy type, return a new PersistenceStrategy object
|
167 |
-
* @return ConsumerStrategies_AbstractConsumer
|
168 |
-
*/
|
169 |
-
protected function _getConsumer() {
|
170 |
-
$key = $this->_options['consumer'];
|
171 |
-
$Strategy = $this->_consumers[$key];
|
172 |
-
if ($this->_debug()) {
|
173 |
-
$this->_log("Using consumer: " . $key . " -> " . $Strategy);
|
174 |
-
}
|
175 |
-
$this->_options['endpoint'] = $this->_getEndpoint();
|
176 |
-
|
177 |
-
return new $Strategy($this->_options);
|
178 |
-
}
|
179 |
-
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Add an array representing a message to be sent to Mixpanel to a queue.
|
183 |
-
* @param array $message
|
184 |
-
*/
|
185 |
-
public function enqueue($message = array()) {
|
186 |
-
array_push($this->_queue, $message);
|
187 |
-
|
188 |
-
// force a flush if we've reached our threshold
|
189 |
-
if (count($this->_queue) > $this->_max_queue_size) {
|
190 |
-
$this->flush();
|
191 |
-
}
|
192 |
-
|
193 |
-
if ($this->_debug()) {
|
194 |
-
$this->_log("Queued message: ".json_encode($message));
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Add an array representing a list of messages to be sent to Mixpanel to a queue.
|
201 |
-
* @param array $messages
|
202 |
-
*/
|
203 |
-
public function enqueueAll($messages = array()) {
|
204 |
-
foreach($messages as $message) {
|
205 |
-
$this->enqueue($message);
|
206 |
-
}
|
207 |
-
|
208 |
-
}
|
209 |
-
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Given an array of messages, persist it with the instantiated Persistence Strategy
|
213 |
-
* @param $message
|
214 |
-
* @return mixed
|
215 |
-
*/
|
216 |
-
protected function _persist($message) {
|
217 |
-
return $this->_consumer->persist($message);
|
218 |
-
}
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Return the endpoint that should be used by a consumer that consumes messages produced by this producer.
|
225 |
-
* @return string
|
226 |
-
*/
|
227 |
-
abstract function _getEndpoint();
|
228 |
-
|
229 |
}
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__) . "/../Base/MixpanelBase.php");
|
3 |
+
require_once(dirname(__FILE__) . "/../ConsumerStrategies/FileConsumer.php");
|
4 |
+
require_once(dirname(__FILE__) . "/../ConsumerStrategies/CurlConsumer.php");
|
5 |
+
require_once(dirname(__FILE__) . "/../ConsumerStrategies/SocketConsumer.php");
|
6 |
+
|
7 |
+
if (!function_exists('json_encode')) {
|
8 |
+
throw new Exception('The JSON PHP extension is required.');
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Provides some base methods for use by a message Producer
|
13 |
+
*/
|
14 |
+
abstract class Producers_MixpanelBaseProducer extends Base_MixpanelBase {
|
15 |
+
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var string a token associated to a Mixpanel project
|
19 |
+
*/
|
20 |
+
protected $_token;
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @var array a queue to hold messages in memory before flushing in batches
|
25 |
+
*/
|
26 |
+
private $_queue = array();
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @var ConsumerStrategies_AbstractConsumer the consumer to use when flushing messages
|
31 |
+
*/
|
32 |
+
private $_consumer = null;
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var array The list of available consumers
|
37 |
+
*/
|
38 |
+
private $_consumers = array(
|
39 |
+
"file" => "ConsumerStrategies_FileConsumer",
|
40 |
+
"curl" => "ConsumerStrategies_CurlConsumer",
|
41 |
+
"socket" => "ConsumerStrategies_SocketConsumer"
|
42 |
+
);
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* If the queue reaches this size we'll auto-flush to prevent out of memory errors
|
47 |
+
* @var int
|
48 |
+
*/
|
49 |
+
protected $_max_queue_size = 1000;
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Creates a new MixpanelBaseProducer, assings Mixpanel project token, registers custom Consumers, and instantiates
|
54 |
+
* the desired consumer
|
55 |
+
* @param $token
|
56 |
+
* @param array $options
|
57 |
+
*/
|
58 |
+
public function __construct($token, $options = array()) {
|
59 |
+
|
60 |
+
parent::__construct($options);
|
61 |
+
|
62 |
+
// register any customer consumers
|
63 |
+
if (array_key_exists("consumers", $options)) {
|
64 |
+
$this->_consumers = array_merge($this->_consumers, $options['consumers']);
|
65 |
+
}
|
66 |
+
|
67 |
+
// set max queue size
|
68 |
+
if (array_key_exists("max_queue_size", $options)) {
|
69 |
+
$this->_max_queue_size = $options['max_queue_size'];
|
70 |
+
}
|
71 |
+
|
72 |
+
// associate token
|
73 |
+
$this->_token = $token;
|
74 |
+
|
75 |
+
if ($this->_debug()) {
|
76 |
+
$this->_log("Using token: ".$this->_token);
|
77 |
+
}
|
78 |
+
|
79 |
+
// instantiate the chosen consumer
|
80 |
+
$this->_consumer = $this->_getConsumer();
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Flush the queue when we destruct the client with retries
|
87 |
+
*/
|
88 |
+
public function __destruct() {
|
89 |
+
$attempts = 0;
|
90 |
+
$max_attempts = 10;
|
91 |
+
$success = false;
|
92 |
+
while (!$success && $attempts < $max_attempts) {
|
93 |
+
if ($this->_debug()) {
|
94 |
+
$this->_log("destruct flush attempt #".($attempts+1));
|
95 |
+
}
|
96 |
+
$success = $this->flush();
|
97 |
+
$attempts++;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Iterate the queue and write in batches using the instantiated Consumer Strategy
|
104 |
+
* @param int $desired_batch_size
|
105 |
+
* @return bool whether or not the flush was successful
|
106 |
+
*/
|
107 |
+
public function flush($desired_batch_size = 50) {
|
108 |
+
$queue_size = count($this->_queue);
|
109 |
+
$succeeded = true;
|
110 |
+
if ($this->_debug()) {
|
111 |
+
$this->_log("Flush called - queue size: ".$queue_size);
|
112 |
+
}
|
113 |
+
|
114 |
+
while($queue_size > 0 && $succeeded) {
|
115 |
+
$batch_size = min(array($queue_size, $desired_batch_size, $this->_options['max_batch_size']));
|
116 |
+
$batch = array_splice($this->_queue, 0, $batch_size);
|
117 |
+
$succeeded = $this->_persist($batch);
|
118 |
+
|
119 |
+
if (!$succeeded) {
|
120 |
+
if ($this->_debug()) {
|
121 |
+
$this->_log("Batch consumption failed!");
|
122 |
+
}
|
123 |
+
$this->_queue = array_merge($batch, $this->_queue);
|
124 |
+
|
125 |
+
if ($this->_debug()) {
|
126 |
+
$this->_log("added batch back to queue, queue size is now $queue_size");
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
$queue_size = count($this->_queue);
|
131 |
+
|
132 |
+
if ($this->_debug()) {
|
133 |
+
$this->_log("Batch of $batch_size consumed, queue size is now $queue_size");
|
134 |
+
}
|
135 |
+
}
|
136 |
+
return $succeeded;
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Empties the queue without persisting any of the messages
|
142 |
+
*/
|
143 |
+
public function reset() {
|
144 |
+
$this->_queue = array();
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Returns the in-memory queue
|
150 |
+
* @return array
|
151 |
+
*/
|
152 |
+
public function getQueue() {
|
153 |
+
return $this->_queue;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Returns the current Mixpanel project token
|
158 |
+
* @return string
|
159 |
+
*/
|
160 |
+
public function getToken() {
|
161 |
+
return $this->_token;
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Given a strategy type, return a new PersistenceStrategy object
|
167 |
+
* @return ConsumerStrategies_AbstractConsumer
|
168 |
+
*/
|
169 |
+
protected function _getConsumer() {
|
170 |
+
$key = $this->_options['consumer'];
|
171 |
+
$Strategy = $this->_consumers[$key];
|
172 |
+
if ($this->_debug()) {
|
173 |
+
$this->_log("Using consumer: " . $key . " -> " . $Strategy);
|
174 |
+
}
|
175 |
+
$this->_options['endpoint'] = $this->_getEndpoint();
|
176 |
+
|
177 |
+
return new $Strategy($this->_options);
|
178 |
+
}
|
179 |
+
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Add an array representing a message to be sent to Mixpanel to a queue.
|
183 |
+
* @param array $message
|
184 |
+
*/
|
185 |
+
public function enqueue($message = array()) {
|
186 |
+
array_push($this->_queue, $message);
|
187 |
+
|
188 |
+
// force a flush if we've reached our threshold
|
189 |
+
if (count($this->_queue) > $this->_max_queue_size) {
|
190 |
+
$this->flush();
|
191 |
+
}
|
192 |
+
|
193 |
+
if ($this->_debug()) {
|
194 |
+
$this->_log("Queued message: ".json_encode($message));
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Add an array representing a list of messages to be sent to Mixpanel to a queue.
|
201 |
+
* @param array $messages
|
202 |
+
*/
|
203 |
+
public function enqueueAll($messages = array()) {
|
204 |
+
foreach($messages as $message) {
|
205 |
+
$this->enqueue($message);
|
206 |
+
}
|
207 |
+
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Given an array of messages, persist it with the instantiated Persistence Strategy
|
213 |
+
* @param $message
|
214 |
+
* @return mixed
|
215 |
+
*/
|
216 |
+
protected function _persist($message) {
|
217 |
+
return $this->_consumer->persist($message);
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Return the endpoint that should be used by a consumer that consumes messages produced by this producer.
|
225 |
+
* @return string
|
226 |
+
*/
|
227 |
+
abstract function _getEndpoint();
|
228 |
+
|
229 |
}
|
src/GridGallery/Promo/Model/classes/lib/Producers/MixpanelEvents.php
CHANGED
@@ -1,164 +1,164 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(dirname(__FILE__) . "/MixpanelBaseProducer.php");
|
3 |
-
require_once(dirname(__FILE__) . "/MixpanelPeople.php");
|
4 |
-
require_once(dirname(__FILE__) . "/../ConsumerStrategies/CurlConsumer.php");
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Provides an API to track events on Mixpanel
|
8 |
-
*/
|
9 |
-
class Producers_MixpanelEvents extends Producers_MixpanelBaseProducer {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* An array of properties to attach to every tracked event
|
13 |
-
* @var array
|
14 |
-
*/
|
15 |
-
private $_super_properties = array("mp_lib" => "php");
|
16 |
-
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Track an event defined by $event associated with metadata defined by $properties
|
20 |
-
* @param string $event
|
21 |
-
* @param array $properties
|
22 |
-
*/
|
23 |
-
public function track($event, $properties = array()) {
|
24 |
-
|
25 |
-
// if no token is passed in, use current token
|
26 |
-
if (!array_key_exists("token", $properties)) $properties['token'] = $this->_token;
|
27 |
-
|
28 |
-
// if no time is passed in, use the current time
|
29 |
-
if (!array_key_exists('time', $properties)) $properties['time'] = time();
|
30 |
-
|
31 |
-
$params['event'] = $event;
|
32 |
-
$params['properties'] = array_merge($this->_super_properties, $properties);
|
33 |
-
|
34 |
-
$this->enqueue($params);
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Register a property to be sent with every event. If the property has already been registered, it will be
|
40 |
-
* overwritten.
|
41 |
-
* @param string $property
|
42 |
-
* @param mixed $value
|
43 |
-
*/
|
44 |
-
public function register($property, $value) {
|
45 |
-
$this->_super_properties[$property] = $value;
|
46 |
-
}
|
47 |
-
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Register multiple properties to be sent with every event. If any of the properties have already been registered,
|
51 |
-
* they will be overwritten.
|
52 |
-
* @param array $props_and_vals
|
53 |
-
*/
|
54 |
-
public function registerAll($props_and_vals = array()) {
|
55 |
-
foreach($props_and_vals as $property => $value) {
|
56 |
-
$this->register($property, $value);
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Register a property to be sent with every event. If the property has already been registered, it will NOT be
|
63 |
-
* overwritten.
|
64 |
-
* @param $property
|
65 |
-
* @param $value
|
66 |
-
*/
|
67 |
-
public function registerOnce($property, $value) {
|
68 |
-
if (!isset($this->_super_properties[$property])) {
|
69 |
-
$this->register($property, $value);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Register multiple properties to be sent with every event. If any of the properties have already been registered,
|
76 |
-
* they will NOT be overwritten.
|
77 |
-
* @param array $props_and_vals
|
78 |
-
*/
|
79 |
-
public function registerAllOnce($props_and_vals = array()) {
|
80 |
-
foreach($props_and_vals as $property => $value) {
|
81 |
-
if (!isset($this->_super_properties[$property])) {
|
82 |
-
$this->register($property, $value);
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Un-register an property to be sent with every event.
|
90 |
-
* @param string $property
|
91 |
-
*/
|
92 |
-
public function unregister($property) {
|
93 |
-
unset($this->_super_properties[$property]);
|
94 |
-
}
|
95 |
-
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Un-register a list of properties to be sent with every event.
|
99 |
-
* @param array $properties
|
100 |
-
*/
|
101 |
-
public function unregisterAll($properties) {
|
102 |
-
foreach($properties as $property) {
|
103 |
-
$this->unregister($property);
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Get a property that is set to be sent with every event
|
110 |
-
* @param string $property
|
111 |
-
* @return mixed
|
112 |
-
*/
|
113 |
-
public function getProperty($property) {
|
114 |
-
return $this->_super_properties[$property];
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Identify the user you want to associate to tracked events
|
120 |
-
* @param string|int $user_id
|
121 |
-
*/
|
122 |
-
public function identify($user_id) {
|
123 |
-
$this->register("distinct_id", $user_id);
|
124 |
-
}
|
125 |
-
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Alias an existing id with a different unique id. This is helpful when you want to associate a generated id to
|
129 |
-
* a username or e-mail address.
|
130 |
-
*
|
131 |
-
* Because aliasing can be extremely vulnerable to race conditions and ordering issues, we'll make a synchronous
|
132 |
-
* call directly to Mixpanel when this method is called. If it fails we'll throw an Exception as subsequent
|
133 |
-
* events are likely to be incorrectly tracked.
|
134 |
-
* @param string|int $original_id
|
135 |
-
* @param string|int $new_id
|
136 |
-
* @return array $msg
|
137 |
-
* @throws Exception
|
138 |
-
*/
|
139 |
-
public function createAlias($original_id, $new_id) {
|
140 |
-
$msg = array(
|
141 |
-
"event" => '$create_alias',
|
142 |
-
"properties" => array("distinct_id" => $original_id, "alias" => $new_id, "token" => $this->_token)
|
143 |
-
);
|
144 |
-
|
145 |
-
$options = array_merge($this->_options, array("endpoint" => $this->_getEndpoint(), "fork" => false));
|
146 |
-
$curlConsumer = new ConsumerStrategies_CurlConsumer($options);
|
147 |
-
$success = $curlConsumer->persist(array($msg));
|
148 |
-
if (!$success) {
|
149 |
-
error_log("Creating Mixpanel Alias (original id: $original_id, new id: $new_id) failed");
|
150 |
-
throw new Exception("Tried to create an alias but the call was not successful");
|
151 |
-
} else {
|
152 |
-
return $msg;
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Returns the "events" endpoint
|
159 |
-
* @return string
|
160 |
-
*/
|
161 |
-
function _getEndpoint() {
|
162 |
-
return $this->_options['events_endpoint'];
|
163 |
-
}
|
164 |
}
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__) . "/MixpanelBaseProducer.php");
|
3 |
+
require_once(dirname(__FILE__) . "/MixpanelPeople.php");
|
4 |
+
require_once(dirname(__FILE__) . "/../ConsumerStrategies/CurlConsumer.php");
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Provides an API to track events on Mixpanel
|
8 |
+
*/
|
9 |
+
class Producers_MixpanelEvents extends Producers_MixpanelBaseProducer {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* An array of properties to attach to every tracked event
|
13 |
+
* @var array
|
14 |
+
*/
|
15 |
+
private $_super_properties = array("mp_lib" => "php");
|
16 |
+
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Track an event defined by $event associated with metadata defined by $properties
|
20 |
+
* @param string $event
|
21 |
+
* @param array $properties
|
22 |
+
*/
|
23 |
+
public function track($event, $properties = array()) {
|
24 |
+
|
25 |
+
// if no token is passed in, use current token
|
26 |
+
if (!array_key_exists("token", $properties)) $properties['token'] = $this->_token;
|
27 |
+
|
28 |
+
// if no time is passed in, use the current time
|
29 |
+
if (!array_key_exists('time', $properties)) $properties['time'] = time();
|
30 |
+
|
31 |
+
$params['event'] = $event;
|
32 |
+
$params['properties'] = array_merge($this->_super_properties, $properties);
|
33 |
+
|
34 |
+
$this->enqueue($params);
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Register a property to be sent with every event. If the property has already been registered, it will be
|
40 |
+
* overwritten.
|
41 |
+
* @param string $property
|
42 |
+
* @param mixed $value
|
43 |
+
*/
|
44 |
+
public function register($property, $value) {
|
45 |
+
$this->_super_properties[$property] = $value;
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Register multiple properties to be sent with every event. If any of the properties have already been registered,
|
51 |
+
* they will be overwritten.
|
52 |
+
* @param array $props_and_vals
|
53 |
+
*/
|
54 |
+
public function registerAll($props_and_vals = array()) {
|
55 |
+
foreach($props_and_vals as $property => $value) {
|
56 |
+
$this->register($property, $value);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Register a property to be sent with every event. If the property has already been registered, it will NOT be
|
63 |
+
* overwritten.
|
64 |
+
* @param $property
|
65 |
+
* @param $value
|
66 |
+
*/
|
67 |
+
public function registerOnce($property, $value) {
|
68 |
+
if (!isset($this->_super_properties[$property])) {
|
69 |
+
$this->register($property, $value);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Register multiple properties to be sent with every event. If any of the properties have already been registered,
|
76 |
+
* they will NOT be overwritten.
|
77 |
+
* @param array $props_and_vals
|
78 |
+
*/
|
79 |
+
public function registerAllOnce($props_and_vals = array()) {
|
80 |
+
foreach($props_and_vals as $property => $value) {
|
81 |
+
if (!isset($this->_super_properties[$property])) {
|
82 |
+
$this->register($property, $value);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Un-register an property to be sent with every event.
|
90 |
+
* @param string $property
|
91 |
+
*/
|
92 |
+
public function unregister($property) {
|
93 |
+
unset($this->_super_properties[$property]);
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Un-register a list of properties to be sent with every event.
|
99 |
+
* @param array $properties
|
100 |
+
*/
|
101 |
+
public function unregisterAll($properties) {
|
102 |
+
foreach($properties as $property) {
|
103 |
+
$this->unregister($property);
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Get a property that is set to be sent with every event
|
110 |
+
* @param string $property
|
111 |
+
* @return mixed
|
112 |
+
*/
|
113 |
+
public function getProperty($property) {
|
114 |
+
return $this->_super_properties[$property];
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Identify the user you want to associate to tracked events
|
120 |
+
* @param string|int $user_id
|
121 |
+
*/
|
122 |
+
public function identify($user_id) {
|
123 |
+
$this->register("distinct_id", $user_id);
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Alias an existing id with a different unique id. This is helpful when you want to associate a generated id to
|
129 |
+
* a username or e-mail address.
|
130 |
+
*
|
131 |
+
* Because aliasing can be extremely vulnerable to race conditions and ordering issues, we'll make a synchronous
|
132 |
+
* call directly to Mixpanel when this method is called. If it fails we'll throw an Exception as subsequent
|
133 |
+
* events are likely to be incorrectly tracked.
|
134 |
+
* @param string|int $original_id
|
135 |
+
* @param string|int $new_id
|
136 |
+
* @return array $msg
|
137 |
+
* @throws Exception
|
138 |
+
*/
|
139 |
+
public function createAlias($original_id, $new_id) {
|
140 |
+
$msg = array(
|
141 |
+
"event" => '$create_alias',
|
142 |
+
"properties" => array("distinct_id" => $original_id, "alias" => $new_id, "token" => $this->_token)
|
143 |
+
);
|
144 |
+
|
145 |
+
$options = array_merge($this->_options, array("endpoint" => $this->_getEndpoint(), "fork" => false));
|
146 |
+
$curlConsumer = new ConsumerStrategies_CurlConsumer($options);
|
147 |
+
$success = $curlConsumer->persist(array($msg));
|
148 |
+
if (!$success) {
|
149 |
+
error_log("Creating Mixpanel Alias (original id: $original_id, new id: $new_id) failed");
|
150 |
+
throw new Exception("Tried to create an alias but the call was not successful");
|
151 |
+
} else {
|
152 |
+
return $msg;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Returns the "events" endpoint
|
159 |
+
* @return string
|
160 |
+
*/
|
161 |
+
function _getEndpoint() {
|
162 |
+
return $this->_options['events_endpoint'];
|
163 |
+
}
|
164 |
}
|
src/GridGallery/Promo/Model/classes/lib/Producers/MixpanelPeople.php
CHANGED
@@ -1,147 +1,147 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(dirname(__FILE__) . "/MixpanelBaseProducer.php");
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Provides an API to create/update profiles on Mixpanel
|
6 |
-
*/
|
7 |
-
class Producers_MixpanelPeople extends Producers_MixpanelBaseProducer {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Internal method to prepare a message given the message data
|
11 |
-
* @param $distinct_id
|
12 |
-
* @param $operation
|
13 |
-
* @param $value
|
14 |
-
* @param null $ip
|
15 |
-
* @return array
|
16 |
-
*/
|
17 |
-
private function _constructPayload($distinct_id, $operation, $value, $ip = null, $ignore_time = false) {
|
18 |
-
$payload = array(
|
19 |
-
'$token' => $this->_token,
|
20 |
-
'$distinct_id' => $distinct_id,
|
21 |
-
$operation => $value
|
22 |
-
);
|
23 |
-
if ($ip !== null) $payload['$ip'] = $ip;
|
24 |
-
if ($ignore_time === true) $payload['$ignore_time'] = true;
|
25 |
-
return $payload;
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Set properties on a user record. If the profile does not exist, it creates it with these properties.
|
30 |
-
* If it does exist, it sets the properties to these values, overwriting existing values.
|
31 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
32 |
-
* @param array $props associative array of properties to set on the profile
|
33 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
34 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
35 |
-
*/
|
36 |
-
public function set($distinct_id, $props, $ip = null, $ignore_time = false) {
|
37 |
-
$payload = $this->_constructPayload($distinct_id, '$set', $props, $ip, $ignore_time);
|
38 |
-
$this->enqueue($payload);
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Set properties on a user record. If the profile does not exist, it creates it with these properties.
|
43 |
-
* If it does exist, it sets the properties to these values but WILL NOT overwrite existing values.
|
44 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
45 |
-
* @param array $props associative array of properties to set on the profile
|
46 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
47 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
48 |
-
*/
|
49 |
-
public function setOnce($distinct_id, $props, $ip = null, $ignore_time = false) {
|
50 |
-
$payload = $this->_constructPayload($distinct_id, '$set_once', $props, $ip, $ignore_time);
|
51 |
-
$this->enqueue($payload);
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Unset properties on a user record. If the profile does not exist, it creates it with no properties.
|
56 |
-
* If it does exist, it unsets these properties. NOTE: In other libraries we use 'unset' which is
|
57 |
-
* a reserved word in PHP.
|
58 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
59 |
-
* @param array $props associative array of properties to unset on the profile
|
60 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
61 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
62 |
-
*/
|
63 |
-
public function remove($distinct_id, $props, $ip = null, $ignore_time = false) {
|
64 |
-
$payload = $this->_constructPayload($distinct_id, '$unset', $props, $ip, $ignore_time);
|
65 |
-
$this->enqueue($payload);
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Increments the value of a property on a user record. If the profile does not exist, it creates it and sets the
|
70 |
-
* property to the increment value.
|
71 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
72 |
-
* @param $prop string the property to increment
|
73 |
-
* @param int $val the amount to increment the property by
|
74 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
75 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
76 |
-
*/
|
77 |
-
public function increment($distinct_id, $prop, $val, $ip = null, $ignore_time = false) {
|
78 |
-
$payload = $this->_constructPayload($distinct_id, '$add', array("$prop" => $val), $ip, $ignore_time);
|
79 |
-
$this->enqueue($payload);
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Adds $val to a list located at $prop. If the property does not exist, it will be created. If $val is a string
|
84 |
-
* and the list is empty or does not exist, a new list with one value will be created.
|
85 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
86 |
-
* @param string $prop the property that holds the list
|
87 |
-
* @param string|array $val items to add to the list
|
88 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
89 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
90 |
-
*/
|
91 |
-
public function append($distinct_id, $prop, $val, $ip = null, $ignore_time = false) {
|
92 |
-
$operation = gettype($val) == "array" ? '$union' : '$append';
|
93 |
-
$payload = $this->_constructPayload($distinct_id, $operation, array("$prop" => $val), $ip, $ignore_time);
|
94 |
-
$this->enqueue($payload);
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Adds a transaction to the user's profile for revenue tracking
|
99 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
100 |
-
* @param string $amount the transaction amount e.g. "20.50"
|
101 |
-
* @param null $timestamp the timestamp of when the transaction occurred (default to current timestamp)
|
102 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
103 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
104 |
-
*/
|
105 |
-
public function trackCharge($distinct_id, $amount, $timestamp = null, $ip = null, $ignore_time = false) {
|
106 |
-
$timestamp = $timestamp == null ? time() : $timestamp;
|
107 |
-
$date_iso = date("c", $timestamp);
|
108 |
-
$transaction = array(
|
109 |
-
'$time' => $date_iso,
|
110 |
-
'$amount' => $amount
|
111 |
-
);
|
112 |
-
$val = array('$transactions' => $transaction);
|
113 |
-
$payload = $this->_constructPayload($distinct_id, '$append', $val, $ip, $ignore_time);
|
114 |
-
$this->enqueue($payload);
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Clear all transactions stored on a user's profile
|
119 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
120 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
121 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
122 |
-
*/
|
123 |
-
public function clearCharges($distinct_id, $ip = null, $ignore_time = false) {
|
124 |
-
$payload = $this->_constructPayload($distinct_id, '$set', array('$transactions' => array()), $ip, $ignore_time);
|
125 |
-
$this->enqueue($payload);
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Delete this profile from Mixpanel
|
130 |
-
* @param string|int $distinct_id the distinct_id or alias of a user
|
131 |
-
* @param string|null $ip the ip address of the client (used for geo-location)
|
132 |
-
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
133 |
-
*/
|
134 |
-
public function deleteUser($distinct_id, $ip = null, $ignore_time = false) {
|
135 |
-
$payload = $this->_constructPayload($distinct_id, '$delete', "", $ip, $ignore_time);
|
136 |
-
$this->enqueue($payload);
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Returns the "engage" endpoint
|
141 |
-
* @return string
|
142 |
-
*/
|
143 |
-
function _getEndpoint() {
|
144 |
-
return $this->_options['people_endpoint'];
|
145 |
-
}
|
146 |
-
|
147 |
-
}
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__) . "/MixpanelBaseProducer.php");
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Provides an API to create/update profiles on Mixpanel
|
6 |
+
*/
|
7 |
+
class Producers_MixpanelPeople extends Producers_MixpanelBaseProducer {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Internal method to prepare a message given the message data
|
11 |
+
* @param $distinct_id
|
12 |
+
* @param $operation
|
13 |
+
* @param $value
|
14 |
+
* @param null $ip
|
15 |
+
* @return array
|
16 |
+
*/
|
17 |
+
private function _constructPayload($distinct_id, $operation, $value, $ip = null, $ignore_time = false) {
|
18 |
+
$payload = array(
|
19 |
+
'$token' => $this->_token,
|
20 |
+
'$distinct_id' => $distinct_id,
|
21 |
+
$operation => $value
|
22 |
+
);
|
23 |
+
if ($ip !== null) $payload['$ip'] = $ip;
|
24 |
+
if ($ignore_time === true) $payload['$ignore_time'] = true;
|
25 |
+
return $payload;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Set properties on a user record. If the profile does not exist, it creates it with these properties.
|
30 |
+
* If it does exist, it sets the properties to these values, overwriting existing values.
|
31 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
32 |
+
* @param array $props associative array of properties to set on the profile
|
33 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
34 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
35 |
+
*/
|
36 |
+
public function set($distinct_id, $props, $ip = null, $ignore_time = false) {
|
37 |
+
$payload = $this->_constructPayload($distinct_id, '$set', $props, $ip, $ignore_time);
|
38 |
+
$this->enqueue($payload);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Set properties on a user record. If the profile does not exist, it creates it with these properties.
|
43 |
+
* If it does exist, it sets the properties to these values but WILL NOT overwrite existing values.
|
44 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
45 |
+
* @param array $props associative array of properties to set on the profile
|
46 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
47 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
48 |
+
*/
|
49 |
+
public function setOnce($distinct_id, $props, $ip = null, $ignore_time = false) {
|
50 |
+
$payload = $this->_constructPayload($distinct_id, '$set_once', $props, $ip, $ignore_time);
|
51 |
+
$this->enqueue($payload);
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Unset properties on a user record. If the profile does not exist, it creates it with no properties.
|
56 |
+
* If it does exist, it unsets these properties. NOTE: In other libraries we use 'unset' which is
|
57 |
+
* a reserved word in PHP.
|
58 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
59 |
+
* @param array $props associative array of properties to unset on the profile
|
60 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
61 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
62 |
+
*/
|
63 |
+
public function remove($distinct_id, $props, $ip = null, $ignore_time = false) {
|
64 |
+
$payload = $this->_constructPayload($distinct_id, '$unset', $props, $ip, $ignore_time);
|
65 |
+
$this->enqueue($payload);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Increments the value of a property on a user record. If the profile does not exist, it creates it and sets the
|
70 |
+
* property to the increment value.
|
71 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
72 |
+
* @param $prop string the property to increment
|
73 |
+
* @param int $val the amount to increment the property by
|
74 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
75 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
76 |
+
*/
|
77 |
+
public function increment($distinct_id, $prop, $val, $ip = null, $ignore_time = false) {
|
78 |
+
$payload = $this->_constructPayload($distinct_id, '$add', array("$prop" => $val), $ip, $ignore_time);
|
79 |
+
$this->enqueue($payload);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Adds $val to a list located at $prop. If the property does not exist, it will be created. If $val is a string
|
84 |
+
* and the list is empty or does not exist, a new list with one value will be created.
|
85 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
86 |
+
* @param string $prop the property that holds the list
|
87 |
+
* @param string|array $val items to add to the list
|
88 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
89 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
90 |
+
*/
|
91 |
+
public function append($distinct_id, $prop, $val, $ip = null, $ignore_time = false) {
|
92 |
+
$operation = gettype($val) == "array" ? '$union' : '$append';
|
93 |
+
$payload = $this->_constructPayload($distinct_id, $operation, array("$prop" => $val), $ip, $ignore_time);
|
94 |
+
$this->enqueue($payload);
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Adds a transaction to the user's profile for revenue tracking
|
99 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
100 |
+
* @param string $amount the transaction amount e.g. "20.50"
|
101 |
+
* @param null $timestamp the timestamp of when the transaction occurred (default to current timestamp)
|
102 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
103 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
104 |
+
*/
|
105 |
+
public function trackCharge($distinct_id, $amount, $timestamp = null, $ip = null, $ignore_time = false) {
|
106 |
+
$timestamp = $timestamp == null ? time() : $timestamp;
|
107 |
+
$date_iso = date("c", $timestamp);
|
108 |
+
$transaction = array(
|
109 |
+
'$time' => $date_iso,
|
110 |
+
'$amount' => $amount
|
111 |
+
);
|
112 |
+
$val = array('$transactions' => $transaction);
|
113 |
+
$payload = $this->_constructPayload($distinct_id, '$append', $val, $ip, $ignore_time);
|
114 |
+
$this->enqueue($payload);
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Clear all transactions stored on a user's profile
|
119 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
120 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
121 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
122 |
+
*/
|
123 |
+
public function clearCharges($distinct_id, $ip = null, $ignore_time = false) {
|
124 |
+
$payload = $this->_constructPayload($distinct_id, '$set', array('$transactions' => array()), $ip, $ignore_time);
|
125 |
+
$this->enqueue($payload);
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Delete this profile from Mixpanel
|
130 |
+
* @param string|int $distinct_id the distinct_id or alias of a user
|
131 |
+
* @param string|null $ip the ip address of the client (used for geo-location)
|
132 |
+
* @param boolean $ignore_time If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time
|
133 |
+
*/
|
134 |
+
public function deleteUser($distinct_id, $ip = null, $ignore_time = false) {
|
135 |
+
$payload = $this->_constructPayload($distinct_id, '$delete', "", $ip, $ignore_time);
|
136 |
+
$this->enqueue($payload);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Returns the "engage" endpoint
|
141 |
+
* @return string
|
142 |
+
*/
|
143 |
+
function _getEndpoint() {
|
144 |
+
return $this->_options['people_endpoint'];
|
145 |
+
}
|
146 |
+
|
147 |
+
}
|
src/GridGallery/Settings/views/index.twig
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
<div class="setting">
|
18 |
<div class="setting-description">
|
19 |
<label>{{ environment.translate('Send usage statistics') }}</label>
|
20 |
-
{{ h.showTooltip('
|
21 |
</div>
|
22 |
<div class="setting-control">
|
23 |
<input type="checkbox" name="settings[send_stats]" value="1" {% if settings.send_stats %}checked{% endif %} />
|
@@ -25,15 +25,15 @@
|
|
25 |
</div>
|
26 |
<div class="setting">
|
27 |
<div class="setting-description">
|
28 |
-
<label>{{ environment.translate('Image
|
29 |
-
{{ h.showTooltip('
|
30 |
</div>
|
31 |
<div class="setting-control">
|
32 |
<select name="settings[image_editor]">
|
33 |
{% set editors = {
|
34 |
auto: 'Auto',
|
35 |
gd: 'GD',
|
36 |
-
|
37 |
} %}
|
38 |
{% for name, title in editors %}
|
39 |
<option value="{{ name }}"
|
@@ -50,7 +50,7 @@
|
|
50 |
<div class="setting-description">
|
51 |
|
52 |
<label>{{ environment.translate('Roles') }}</label>
|
53 |
-
{{ h.showTooltip('
|
54 |
|
55 |
{% if environment.isPro() == false %}
|
56 |
<a target="_blank" href="{{ build_pro_url({ 'utm_medium': 'manage_roles' }) }}">
|
17 |
<div class="setting">
|
18 |
<div class="setting-description">
|
19 |
<label>{{ environment.translate('Send usage statistics') }}</label>
|
20 |
+
{{ h.showTooltip('If this option is enabled, the statistics about what plugin options you prefer to use will be collected and sent to us automatically. This information will help us make our solution better for you.', 'top', true) }}
|
21 |
</div>
|
22 |
<div class="setting-control">
|
23 |
<input type="checkbox" name="settings[send_stats]" value="1" {% if settings.send_stats %}checked{% endif %} />
|
25 |
</div>
|
26 |
<div class="setting">
|
27 |
<div class="setting-description">
|
28 |
+
<label>{{ environment.translate('Image Preprocessor') }}</label>
|
29 |
+
{{ h.showTooltip('Choose the preprocessor for image transformations (cropping, resizing etc.) Note: Changing the default settings may affect image quality. If you are not sure about how to use this option, please leave the settings by default.', 'top', true) }}
|
30 |
</div>
|
31 |
<div class="setting-control">
|
32 |
<select name="settings[image_editor]">
|
33 |
{% set editors = {
|
34 |
auto: 'Auto',
|
35 |
gd: 'GD',
|
36 |
+
imagic: 'Imagick',
|
37 |
} %}
|
38 |
{% for name, title in editors %}
|
39 |
<option value="{{ name }}"
|
50 |
<div class="setting-description">
|
51 |
|
52 |
<label>{{ environment.translate('Roles') }}</label>
|
53 |
+
{{ h.showTooltip('Here you may assign the roles of the persons, that are allowed to use the plugin. This feature is useful when you need to depute your site management to someone else. Administrator is included by default.', 'top', true) }}
|
54 |
|
55 |
{% if environment.isPro() == false %}
|
56 |
<a target="_blank" href="{{ build_pro_url({ 'utm_medium': 'manage_roles' }) }}">
|
src/GridGallery/Ui/views/type.twig
CHANGED
@@ -157,6 +157,8 @@
|
|
157 |
{% endmacro %}
|
158 |
|
159 |
{% macro list_image(image, sliderSettings, galleryId) %}
|
|
|
|
|
160 |
{% set nonProMsg = 'Available in PRO' %}
|
161 |
<tr data-entity data-entity-id="{{ image.id }}" data-settings="{{ sliderSettings|json_encode|e }}" data-entity-type="photo" data-entity-info="{{ image|json_encode|e }}" class="ggImgInfoRow">
|
162 |
<th scope="row" class="check-column ggImgVertMoveCol">
|
@@ -186,15 +188,69 @@
|
|
186 |
<td class="title column-title">
|
187 |
<form id="photo-editor-{{ image.id }}" class="photo-editor attachment-{{ image.attachment.id }}">
|
188 |
<div class="gg-tab-links gg-image-params" data-tabs="gg-image-{{ image.id }}">
|
189 |
-
<div class="gg-tab-link active" data-tab-info="page-{{ image.id }}-1">
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
<a data-image-id="{{ image.id }}" data-attachment-id="{{ image.attachment.id }}"
|
200 |
class="add-new-h2 button replace-image">
|
157 |
{% endmacro %}
|
158 |
|
159 |
{% macro list_image(image, sliderSettings, galleryId) %}
|
160 |
+
{% import '@core/helpers.twig' as hlp %}
|
161 |
+
|
162 |
{% set nonProMsg = 'Available in PRO' %}
|
163 |
<tr data-entity data-entity-id="{{ image.id }}" data-settings="{{ sliderSettings|json_encode|e }}" data-entity-type="photo" data-entity-info="{{ image|json_encode|e }}" class="ggImgInfoRow">
|
164 |
<th scope="row" class="check-column ggImgVertMoveCol">
|
188 |
<td class="title column-title">
|
189 |
<form id="photo-editor-{{ image.id }}" class="photo-editor attachment-{{ image.attachment.id }}">
|
190 |
<div class="gg-tab-links gg-image-params" data-tabs="gg-image-{{ image.id }}">
|
191 |
+
<div class="gg-tab-link active" data-tab-info="page-{{ image.id }}-1">
|
192 |
+
{{ translate('Caption') }}
|
193 |
+
{{ hlp.showTooltip(
|
194 |
+
translate('Add image caption. You may find detailed caption settings at Settings > Captions page.')
|
195 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
196 |
+
, 'top', true) }}
|
197 |
+
</div>
|
198 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-2">
|
199 |
+
{{ translate('Description') }}
|
200 |
+
{{ hlp.showTooltip(
|
201 |
+
translate('Add image description. You may find detailed description settings at Settings>Captions page. Note: in order to show descriptions and to change the description settings \'Caption builder\' option should be enabled first.')
|
202 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
203 |
+
, 'top', true) }}
|
204 |
+
</div>
|
205 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-3">
|
206 |
+
{{ translate('SEO') }}
|
207 |
+
{{ hlp.showTooltip(
|
208 |
+
translate('Add SEO keywords, separated by comma, or SEO-optimized sentences. They will appear under your image, when it opens in pop-up window.')
|
209 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
210 |
+
, 'top', true) }}
|
211 |
+
</div>
|
212 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-4">
|
213 |
+
{{ translate('Link') }}
|
214 |
+
{{ hlp.showTooltip(
|
215 |
+
translate('You may add the link, which opens when clicking on your image thumbnail instead of pop-up window. Note: if you add video URL, this option will be inactive.')
|
216 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
217 |
+
, 'top', true) }}
|
218 |
+
</div>
|
219 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-5">
|
220 |
+
{{ translate('Video') }}
|
221 |
+
{{ hlp.showTooltip(
|
222 |
+
translate('Here you may add the video url. After clicking on the image thumbnail, video will open in pop-up window instead of the image.')
|
223 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
224 |
+
, 'top', true) }}
|
225 |
+
</div>
|
226 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-6">
|
227 |
+
{{ translate('Categories') }}
|
228 |
+
{{ hlp.showTooltip(
|
229 |
+
translate('If you want to arrange your gallery by categories, you should add category names here and separate them by commas.')
|
230 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
231 |
+
, 'top', true) }}
|
232 |
+
</div>
|
233 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-7">
|
234 |
+
{{ translate('Linked images') }}
|
235 |
+
{{ hlp.showTooltip(
|
236 |
+
translate('Here you may choose one or several linked images for this image thumbnail. Note: this option works only with Popup theme #7.')
|
237 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/example/linked-images-popup/\'>https://supsystic.com/example/linked-images-popup/</a>'
|
238 |
+
, 'top', true) }}
|
239 |
+
</div>
|
240 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-8">
|
241 |
+
{{ translate('Crop') }}
|
242 |
+
{{ hlp.showTooltip(
|
243 |
+
translate('In some gallery types image thumbnails are cropped. Here you may select the crop position to be sure that the most important part of the image will be visible.')
|
244 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
245 |
+
, 'top', true) }}
|
246 |
+
</div>
|
247 |
+
<div class="gg-tab-link" data-tab-info="page-{{ image.id }}-9">
|
248 |
+
{{ translate('Image on hover') }}
|
249 |
+
{{ hlp.showTooltip(
|
250 |
+
translate('Here you may add the image that will the original image when mouse cursor is over the thumbnail. Note: in order to make this feature work, you should enable \'Image on hover\' option in Settings > Captions.')
|
251 |
+
~ ' <a target=\'_blank\' href=\'https://supsystic.com/documentation/images-settings/\'>https://supsystic.com/documentation/images-settings/</a>'
|
252 |
+
, 'top', true) }}
|
253 |
+
</div>
|
254 |
|
255 |
<a data-image-id="{{ image.id }}" data-attachment-id="{{ image.attachment.id }}"
|
256 |
class="add-new-h2 button replace-image">
|