Slideshow Gallery - Version 1.5.3.3

Version Description

  • ADD: FontAwesome icons throughout
  • ADD: WPML multilingual support
  • ADD: qTranslate X multilingual support
  • IMPROVE: Improved error handling on multiple slides adding
  • IMPROVE: Minimalistic Colorbox design
  • IMPROVE: Remove dashicons and fonts completely
  • IMPROVE: New WordPress 4.3 check-column styling
  • FIX: Some notices/errors showing raw HTML code
  • FIX: Vulnerability/security issues
Download this release

Release Info

Developer contrid
Plugin Icon 128x128 Slideshow Gallery
Version 1.5.3.3
Comparing to
See all releases

Code changes from version 1.5.3.2 to 1.5.3.3

css/admin.css CHANGED
@@ -1,34 +1,90 @@
 
 
 
 
1
  #adminmenu .toplevel_page_slideshow-slides div.wp-menu-image:before,
2
  .mce-i-gallery:before {
3
- font-family: 'slideshow_dashicons' !important;
4
- content: '\f233';
5
- font-size: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  }
7
 
8
- @font-face {
9
- font-family: 'slideshow_dashicons';
10
- src: url('../fonts/slideshow_dashicons.eot'); // this is for IE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  }
12
 
13
- @font-face {
14
- font-family: 'slideshow_dashicons';
15
- src: url('../fonts/slideshow_dashicons.woff') format('woff'),
16
- url('../fonts/slideshow_dashicons.ttf') format('truetype'),
17
- url('../fonts/slideshow_dashicons.svg') format('svg');
18
- font-weight: normal;
19
- font-style: normal;
20
  }
21
 
22
- .slideshow-icon-delete {
23
- text-decoration: none !important;
 
 
 
 
 
 
 
 
24
  }
25
 
26
- .slideshow-icon-delete:before {
27
- font-family: 'dashicons' !important;
28
- content: "\f158";
29
- font-size: 20px;
30
- vertical-align: middle;
31
- /*float: right;*/
 
 
 
 
 
 
32
  }
33
 
34
  .slideshow .ui-slider {
@@ -66,10 +122,12 @@
66
  img.slideshow_dropshadow,
67
  .slideshow img.dropshadow,
68
  a.thickbox img.slideshow,
69
- a.colorbox img.slideshow {
70
- box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
71
- -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
72
- -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
 
 
73
  }
74
 
75
  .galleryhelp a,
@@ -79,19 +137,6 @@ a.colorbox img.slideshow {
79
  color: #333;
80
  }
81
 
82
- .galleryhelp a:before {
83
- font-family: 'slideshow_dashicons' !important;
84
- content: '\f223';
85
- font-weight: 400;
86
- font-size: 20px;
87
- vertical-align: top;
88
- text-decoration: none;
89
- line-height: 100%;
90
- height: auto;
91
- -webkit-font-smoothing: antialiased;
92
- -moz-osx-font-smoothing: grayscale;
93
- }
94
-
95
  .ui-tooltip {
96
  padding: 8px;
97
  position: absolute;
@@ -126,20 +171,6 @@ span.gallery_slides_convert_grid a{
126
  text-decoration: none;
127
  }
128
 
129
- span.gallery_slides_convert_list a:before {
130
- font-family: 'slideshow_dashicons' !important;
131
- content: '\f228';
132
- text-decoration: none;
133
- font-size: 20px;
134
- }
135
-
136
- span.gallery_slides_convert_grid a:before {
137
- font-family: 'slideshow_dashicons' !important;
138
- content: '\f180';
139
- text-decoration: none;
140
- font-size: 20px;
141
- }
142
-
143
  .sortable-elements {
144
  display:inline-block;
145
  }
@@ -238,7 +269,7 @@ span.gallery_slides_convert_grid a:before {
238
  overflow:hidden;
239
  }
240
 
241
- .gallery_slides_grid .wpml-placeholder, .gallery_slides_grid .gallery-placeholder {
242
  float:left;
243
  width:88px !important;
244
  min-width:88px !important;
@@ -280,7 +311,7 @@ span.gallery_slides_convert_grid a:before {
280
  text-align:center;
281
  }
282
 
283
- .wpml-placeholder, .gallery-placeholder {
284
  float:left;
285
  width:100%;
286
  height:43px;
1
+ .fa {
2
+ font: normal normal normal 16px/1.5 FontAwesome !important;
3
+ }
4
+
5
  #adminmenu .toplevel_page_slideshow-slides div.wp-menu-image:before,
6
  .mce-i-gallery:before {
7
+ font-family: 'FontAwesome' !important;
8
+ content: "\f03e";
9
+ -webkit-font-smoothing: antialiased;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ font-size: 16px;
12
+ top: 3px;
13
+ }
14
+
15
+ .slideshow-badge {
16
+ position: absolute;
17
+ top: 0;
18
+ right: 0;
19
+ background: #0074a2;
20
+ background-position: center 24px;
21
+ -webkit-background-size: 85px 85px;
22
+ background-size: 85px 85px;
23
+ color: #78c8e6;
24
+ font-size: 14px;
25
+ text-align: center;
26
+ font-weight: 600;
27
+ margin: 5px 0 0;
28
+ padding: 15px 0;
29
+ display: inline-block;
30
+ width: 150px;
31
+ text-rendering: optimizeLegibility;
32
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
33
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
34
  }
35
 
36
+ #wpadminbar .slideshow-lite {}
37
+
38
+ #wpadminbar .slideshow-lite a {}
39
+
40
+ #wpadminbar .slideshow-lite-listlimit {}
41
+
42
+ #wpadminbar .slideshow-lite-listlimit a {}
43
+
44
+ #wpadminbar .slideshow-lite-subscriberlimit {}
45
+
46
+ #wpadminbar .slideshow-lite-subscriberlimit a {}
47
+
48
+ #wpadminbar .slideshow-lite-emaillimit {}
49
+
50
+ #wpadminbar .slideshow-lite-emaillimit a {}
51
+
52
+ #wpadminbar .slideshow-lite-submitserial {}
53
+
54
+ #wpadminbar .slideshow-lite-submitserial a:before {
55
+ content: '' !important;
56
  }
57
 
58
+ #wpadminbar .slideshow-lite-submitserial a {
59
+ color: green !important;
60
+ background: white;
61
+ font-weight: bold;
 
 
 
62
  }
63
 
64
+ #wpadminbar .slideshow-lite-upgrade {}
65
+
66
+ #wpadminbar .slideshow-lite-upgrade a:before {
67
+ content: '' !important;
68
+ }
69
+
70
+ #wpadminbar .slideshow-lite-upgrade a {
71
+ color: red !important;
72
+ background: white;
73
+ font-weight: bold;
74
  }
75
 
76
+ #message.slideshow.updated,
77
+ #message.slideshow.error {
78
+ padding-right: 38px;
79
+ position: relative;
80
+ }
81
+
82
+ .slideshow #message a {
83
+ text-decoration: none;
84
+ }
85
+
86
+ .slideshow-icon-delete {
87
+ text-decoration: none !important;
88
  }
89
 
90
  .slideshow .ui-slider {
122
  img.slideshow_dropshadow,
123
  .slideshow img.dropshadow,
124
  a.thickbox img.slideshow,
125
+ a.colorbox img.slideshow,
126
+ .slideshow .img-rounded {
127
+ /*border-radius: 50%;
128
+ -moz-border-radius: 50%;
129
+ -webkit-border-radius: 50%;*/
130
+ border-radius: 6px;
131
  }
132
 
133
  .galleryhelp a,
137
  color: #333;
138
  }
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  .ui-tooltip {
141
  padding: 8px;
142
  position: absolute;
171
  text-decoration: none;
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  .sortable-elements {
175
  display:inline-block;
176
  }
269
  overflow:hidden;
270
  }
271
 
272
+ .gallery_slides_grid .gallery-placeholder {
273
  float:left;
274
  width:88px !important;
275
  min-width:88px !important;
311
  text-align:center;
312
  }
313
 
314
+ .gallery-placeholder {
315
  float:left;
316
  width:100%;
317
  height:43px;
css/colorbox.css CHANGED
@@ -1,62 +1,159 @@
1
  /*
2
- Colorbox Core Style:
3
  The following CSS is consistent between example themes and should not be altered.
4
  */
5
- #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
6
- #cboxWrapper {max-width:none;}
 
 
 
 
7
  #cboxOverlay{position:fixed; width:100%; height:100%;}
8
  #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
9
  #cboxContent{position:relative;}
10
- #cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
11
  #cboxTitle{margin:0;}
12
- #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
13
  #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
14
- .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
15
  .cboxIframe{width:100%; height:100%; display:block; border:0;}
16
- #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
17
 
18
  /*
19
  User Style:
20
- Change the following styles to modify the appearance of Colorbox. They are
21
  ordered & tabbed in a way that represents the nesting of the generated HTML.
22
  */
23
- #cboxOverlay{background:url(../images/colorbox/overlay.png) repeat 0 0;}
 
24
  #colorbox{outline:0;}
25
- #cboxTopLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -101px 0;}
26
- #cboxTopRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -130px 0;}
27
- #cboxBottomLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -101px -29px;}
28
- #cboxBottomRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -130px -29px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  #cboxMiddleLeft{width:21px; background:url(../images/colorbox/controls.png) left top repeat-y;}
30
  #cboxMiddleRight{width:21px; background:url(../images/colorbox/controls.png) right top repeat-y;}
31
  #cboxTopCenter{height:21px; background:url(../images/colorbox/border.png) 0 0 repeat-x;}
32
  #cboxBottomCenter{height:21px; background:url(../images/colorbox/border.png) 0 -29px repeat-x;}
33
  #cboxContent{background:#fff; overflow:hidden;}
34
- .cboxIframe{background:#fff;}
35
- #cboxError{padding:50px; border:1px solid #ccc;}
36
- #cboxLoadedContent{margin-bottom:28px;}
37
- #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
38
- #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
39
- #cboxLoadingOverlay{background:url(../images/colorbox/loading_background.png) no-repeat center center;}
40
- #cboxLoadingGraphic{background:url(../images/colorbox/loading.gif) no-repeat center center;}
41
-
42
- /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
43
- #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
44
-
45
- /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
46
- #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
47
-
48
- #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
49
- #cboxPrevious{position:absolute; bottom:0; left:0; background:url(../images/colorbox/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
50
- #cboxPrevious:hover{background-position:-75px -25px;}
51
- #cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/colorbox/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
52
- #cboxNext:hover{background-position:-50px -25px;}
53
- #cboxClose{position:absolute; bottom:0; right:0; background:url(../images/colorbox/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
54
- #cboxClose:hover{background-position:-25px -25px;}
55
 
56
  /*
57
  The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
58
- when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
59
- See: http://jacklmoore.com/notes/ie-transparency-problems/
60
  */
61
  .cboxIE #cboxTopLeft,
62
  .cboxIE #cboxTopCenter,
@@ -67,4 +164,27 @@
67
  .cboxIE #cboxMiddleLeft,
68
  .cboxIE #cboxMiddleRight {
69
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
1
  /*
2
+ ColorBox Core Style:
3
  The following CSS is consistent between example themes and should not be altered.
4
  */
5
+ #colorbox, #cboxOverlay, #cboxWrapper{position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ z-index: 9999;
9
+ overflow: hidden;
10
+ /* border-bottom: 21px white solid; */}
11
  #cboxOverlay{position:fixed; width:100%; height:100%;}
12
  #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
13
  #cboxContent{position:relative;}
14
+ #cboxLoadedContent{overflow:auto;}
15
  #cboxTitle{margin:0;}
16
+ #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
17
  #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
18
+ .cboxPhoto{float:left; margin:auto; border:0; display:block;}
19
  .cboxIframe{width:100%; height:100%; display:block; border:0;}
 
20
 
21
  /*
22
  User Style:
23
+ Change the following styles to modify the appearance of ColorBox. They are
24
  ordered & tabbed in a way that represents the nesting of the generated HTML.
25
  */
26
+
27
+ #cboxOverlay{background:#000;}
28
  #colorbox{outline:0;}
29
+ #cboxContent{margin-top: 40px;
30
+ background: white;
31
+ padding: 21px 0 0 0;}
32
+ .cboxIframe{background:#fff;}
33
+ #cboxError{padding:50px; border:1px solid #ccc;}
34
+ #cboxLoadedContent{ }
35
+ #cboxTitle{position: absolute;
36
+ top: -24px;
37
+ left: -11px;
38
+ color: #ccc;
39
+ font-size: 110%;
40
+ font-weight: bold;
41
+ }
42
+ #cboxCurrent{position: absolute;
43
+ top: -24px;
44
+ right: 11px;
45
+ color: #ccc;
46
+ font-size: 110%;
47
+ }
48
+ // #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
49
+
50
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
51
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
52
+
53
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
54
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
55
+ #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
56
+
57
+ #cboxPrevious, #cboxNext{
58
+ position:absolute;
59
+ margin-top: -30px;
60
+ top:50%;
61
+ width:16px;
62
+ height:100px;
63
+ padding: 10px;
64
+ color: #ccc;
65
+ outline: none;
66
+ overflow: hidden;
67
+ vertical-align: middle;
68
+ }
69
+ #cboxPrevious{
70
+ left: 5px;
71
+ }
72
+ #cboxPrevious:before{
73
+ font-size: 72px;
74
+ font-family: FontAwesome;
75
+ content: "\f104";
76
+ vertical-align: middle;
77
+ }
78
+ #cboxPrevious:hover{color: #fff;}
79
+ #cboxNext{
80
+ right: 15px;
81
+ }
82
+ #cboxNext:before{
83
+ font-size: 72px;
84
+ font-family: FontAwesome;
85
+ content: "\f105";
86
+ vertical-align: middle;
87
+ }
88
+ #cboxNext:hover{color: #fff;}
89
+ #cboxClose{
90
+ position:absolute;
91
+ top: -24px;
92
+ right: -21px;
93
+ display:block;
94
+ width: 24px;
95
+ height:24px;
96
+ color: #ccc;
97
+ outline: 0;
98
+ }
99
+ #cboxClose:before{
100
+ font-family: FontAwesome;
101
+ font-size: 24px;
102
+ content: "\f00d";
103
+ margin: 0 99999px 0 0;
104
+ }
105
+ #cboxClose:hover{
106
+ color: #fff;
107
+ }
108
+
109
+ #cboxTopLeft{/* width: 21px; */
110
+ /* height: 21px; */
111
+ /* background: white; */}
112
+ #cboxTopRight{/* width: 21px; */
113
+ /* height: 21px; */
114
+ /* background: white; */}
115
+ #cboxBottomLeft{width:21px; height:21px; background:white;}
116
+ #cboxBottomRight{width:21px; height:21px; background:white;}
117
+ #cboxMiddleLeft{width: 21px;
118
+ background: white;
119
+ margin-top: 40px;
120
+ padding-bottom: 21px;}
121
+ #cboxMiddleRight{width: 21px;
122
+ background: white;
123
+ margin-top: 40px;
124
+ padding-bottom: 21px;}
125
+ #cboxTopCenter{/* height: 21px; */
126
+ /* background: white; */}
127
+ #cboxBottomCenter{height:21px; background:white;}
128
+
129
+ /*#cboxOverlay{background:url(../images/colorbox/overlay.png) repeat 0 0;}
130
+ #colorbox{}
131
+ #cboxTopLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -100px 0;}
132
+ #cboxTopRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -129px 0;}
133
+ #cboxBottomLeft{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -100px -29px;}
134
+ #cboxBottomRight{width:21px; height:21px; background:url(../images/colorbox/controls.png) no-repeat -129px -29px;}
135
  #cboxMiddleLeft{width:21px; background:url(../images/colorbox/controls.png) left top repeat-y;}
136
  #cboxMiddleRight{width:21px; background:url(../images/colorbox/controls.png) right top repeat-y;}
137
  #cboxTopCenter{height:21px; background:url(../images/colorbox/border.png) 0 0 repeat-x;}
138
  #cboxBottomCenter{height:21px; background:url(../images/colorbox/border.png) 0 -29px repeat-x;}
139
  #cboxContent{background:#fff; overflow:hidden;}
140
+ #cboxError{padding:50px; border:1px solid #ccc;}
141
+ #cboxLoadedContent{margin-bottom:28px;}
142
+ #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
143
+ #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
144
+ #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
145
+ #cboxPrevious{position:absolute; bottom:0; left:0; background:url(../images/colorbox/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
146
+ #cboxPrevious.hover{background-position:-75px -25px;}
147
+ #cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/colorbox/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
148
+ #cboxNext.hover{background-position:-50px -25px;}
149
+ #cboxLoadingOverlay{background:url(../images/colorbox/loading_background.png) no-repeat center center;}
150
+ #cboxLoadingGraphic{background:url(../images/colorbox/loading.gif) no-repeat center center;}
151
+ #cboxClose{position:absolute; bottom:0; right:0; background:url(../images/colorbox/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
152
+ #cboxClose.hover{background-position:-25px -25px;}*/
 
 
 
 
 
 
 
 
153
 
154
  /*
155
  The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
156
+ when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to IE9.
 
157
  */
158
  .cboxIE #cboxTopLeft,
159
  .cboxIE #cboxTopCenter,
164
  .cboxIE #cboxMiddleLeft,
165
  .cboxIE #cboxMiddleRight {
166
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
167
+ }
168
+
169
+ /*
170
+ The following provides PNG transparency support for IE6
171
+ */
172
+ .cboxIE6 #cboxTopLeft{background:url(../images/colorbox/ie6/borderTopLeft.png);}
173
+ .cboxIE6 #cboxTopCenter{background:url(../images/colorbox/ie6/borderTopCenter.png);}
174
+ .cboxIE6 #cboxTopRight{background:url(../images/colorbox/ie6/borderTopRight.png);}
175
+ .cboxIE6 #cboxBottomLeft{background:url(../images/colorbox/ie6/borderBottomLeft.png);}
176
+ .cboxIE6 #cboxBottomCenter{background:url(../images/colorbox/ie6/borderBottomCenter.png);}
177
+ .cboxIE6 #cboxBottomRight{background:url(../images/colorbox/ie6/borderBottomRight.png);}
178
+ .cboxIE6 #cboxMiddleLeft{background:url(../images/colorbox/ie6/borderMiddleLeft.png);}
179
+ .cboxIE6 #cboxMiddleRight{background:url(../images/colorbox/ie6/borderMiddleRight.png);}
180
+
181
+ .cboxIE6 #cboxTopLeft,
182
+ .cboxIE6 #cboxTopCenter,
183
+ .cboxIE6 #cboxTopRight,
184
+ .cboxIE6 #cboxBottomLeft,
185
+ .cboxIE6 #cboxBottomCenter,
186
+ .cboxIE6 #cboxBottomRight,
187
+ .cboxIE6 #cboxMiddleLeft,
188
+ .cboxIE6 #cboxMiddleRight {
189
+ _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
190
  }
fonts/index.php DELETED
@@ -1 +0,0 @@
1
- <?php /* Silence, so that search engines don't index/crawl this folder and it's contents */ ?>
 
fonts/slideshow_dashicons.eot DELETED
Binary file
fonts/slideshow_dashicons.svg DELETED
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="slideshow_dashicons" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
- <glyph unicode="&#xf180;" d="M460.8 499.2v307.2h-307.2v-307.2h307.2zM870.4 499.2v307.2h-307.2v-307.2h307.2zM460.8 89.6v307.2h-307.2v-307.2h307.2zM870.4 89.6v307.2h-307.2v-307.2h307.2z" />
11
- <glyph unicode="&#xf223;" d="M870.4 448q0 97.28-48.128 179.968t-130.56 130.56-179.712 47.872q-73.216 0-139.52-28.416t-114.176-76.288-76.288-114.176-28.416-139.52 28.416-139.52 76.288-114.176 114.176-76.288 139.52-28.416q97.28 0 179.712 47.872t130.56 130.56 48.128 179.968zM547.84 372.224h-79.872v22.016q0 28.672 12.288 50.176 11.264 19.968 45.056 45.568 31.232 22.016 41.472 36.352 10.24 13.312 10.24 31.744 0 18.944-14.336 29.696-14.336 9.728-40.448 9.728-45.056 0-102.4-29.184l-32.768 65.536q67.072 37.888 141.824 37.888 61.44 0 98.304-29.696 36.352-29.696 36.352-79.36 0-33.792-14.848-56.832-13.824-23.040-56.832-54.272-28.16-20.48-36.352-32.256-7.68-11.264-7.68-29.184v-17.92zM472.576 231.936q-13.824 13.312-13.824 37.376 0 25.6 13.312 38.4t39.424 12.8q24.064 0 38.4-13.312 13.824-13.312 13.824-37.888 0-24.064-13.824-36.864-13.824-13.824-38.4-13.824t-38.912 13.312z" />
12
- <glyph unicode="&#xf228;" d="M153.6 755.2h716.8v-102.4h-716.8v102.4zM153.6 499.2h716.8v-102.4h-716.8v102.4zM153.6 243.2h716.8v-102.4h-716.8v102.4z" />
13
- <glyph unicode="&#xf233;" d="M256 806.4h716.8v-563.2h-102.4v-102.4h-102.4v-102.4h-716.8v563.2h102.4v102.4h102.4v102.4zM921.6 294.4v460.8h-614.4v-460.8h614.4zM768 499.2q-41.984 0-72.192 30.208t-30.208 72.192 30.208 72.192 72.192 30.208 72.192-30.208 30.208-72.192-30.208-72.192-72.192-30.208zM819.2 192v51.2h-563.2v409.6h-51.2v-460.8h614.4zM358.4 652.8l512-307.2h-512v307.2zM716.8 89.6v51.2h-563.2v409.6h-51.2v-460.8h614.4z" />
14
- </font></defs></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fonts/slideshow_dashicons.ttf DELETED
Binary file
fonts/slideshow_dashicons.woff DELETED
Binary file
helpers/db.php CHANGED
@@ -6,6 +6,17 @@ class GalleryDbHelper extends GalleryPlugin {
6
 
7
  var $name = 'Db';
8
 
 
 
 
 
 
 
 
 
 
 
 
9
  function find($conditions = array(), $fields = false, $order = array('id', "DESC"), $assign = true, $atts = array()) {
10
  global $wpdb;
11
 
@@ -152,20 +163,25 @@ class GalleryDbHelper extends GalleryPlugin {
152
  switch ($this -> model) {
153
  case 'Slide' :
154
  if ($this -> language_do()) {
155
- $this -> data -> title = qtrans_join($this -> data -> title);
156
- $this -> data -> description = qtrans_join($this -> data -> description);
 
157
  }
158
  break;
159
  case 'Gallery' :
160
  if ($this -> language_do()) {
161
- $this -> data -> title = qtrans_join($this -> data -> title);
162
  }
163
  break;
164
  }
165
 
166
  if ($validate == true) {
167
  if (method_exists($this, 'validate')) {
168
- $this -> validate((array) $this -> data);
 
 
 
 
169
  }
170
  }
171
 
6
 
7
  var $name = 'Db';
8
 
9
+ function count($conditions = array()) {
10
+ global $wpdb;
11
+
12
+ $query = "SELECT COUNT(*) FROM `" . $this -> table . "`";
13
+ if ($count = $wpdb -> get_var($query)) {
14
+ return $count;
15
+ }
16
+
17
+ return false;
18
+ }
19
+
20
  function find($conditions = array(), $fields = false, $order = array('id', "DESC"), $assign = true, $atts = array()) {
21
  global $wpdb;
22
 
163
  switch ($this -> model) {
164
  case 'Slide' :
165
  if ($this -> language_do()) {
166
+ $this -> data -> title = $this -> language_join($this -> data -> title);
167
+ $this -> data -> description = $this -> language_join($this -> data -> description);
168
+ $this -> data -> link = $this -> language_join($this -> data -> link);
169
  }
170
  break;
171
  case 'Gallery' :
172
  if ($this -> language_do()) {
173
+ $this -> data -> title = $this -> language_join($this -> data -> title);
174
  }
175
  break;
176
  }
177
 
178
  if ($validate == true) {
179
  if (method_exists($this, 'validate')) {
180
+ $errors = $this -> validate((array) $this -> data);
181
+
182
+ if (!empty($errors)) {
183
+ $this -> errors = array_merge($this -> errors, $errors);
184
+ }
185
  }
186
  }
187
 
helpers/html.php CHANGED
@@ -15,7 +15,7 @@ class GalleryHtmlHelper extends GalleryPlugin {
15
  ?>
16
 
17
  <span class="galleryhelp">
18
- <a href="" onclick="return false;" title="<?php echo esc_attr(stripslashes($help)); ?>"></a>
19
  </span>
20
 
21
  <?php
15
  ?>
16
 
17
  <span class="galleryhelp">
18
+ <a href="" onclick="return false;" title="<?php echo esc_attr(stripslashes($help)); ?>"><i class="fa fa-question-circle"></i></a>
19
  </span>
20
 
21
  <?php
images/logo.png ADDED
Binary file
includes/checkinit.php CHANGED
@@ -9,20 +9,18 @@ if (!class_exists('GalleryCheckinit')) {
9
  return true;
10
  }
11
 
12
- function ci_initialize() {
13
- return true;
14
-
15
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
16
 
17
  if (!is_plugin_active(plugin_basename($this -> plugin_file))) {
18
  return;
19
  }
20
 
21
- add_action('wp_ajax_wpmlserialkey', array($this, 'ajax_serialkey'));
22
 
23
  if (true || !is_admin() || (is_admin() && $this -> ci_serial_valid())) {
24
  $this -> ci_initialization();
25
- } else {
26
  $this -> add_action('admin_print_styles', 'ci_print_styles', 10, 1);
27
  $this -> add_action('admin_print_scripts', 'ci_print_scripts', 10, 1);
28
  $this -> add_action('admin_notices');
@@ -33,7 +31,15 @@ if (!class_exists('GalleryCheckinit')) {
33
  return false;
34
  }
35
 
36
- function ci_initialization() {
 
 
 
 
 
 
 
 
37
 
38
  return true;
39
  }
@@ -50,6 +56,9 @@ if (!class_exists('GalleryCheckinit')) {
50
  $host = $_SERVER['HTTP_HOST'];
51
  $result = false;
52
 
 
 
 
53
  if (preg_match("/^(www\.)(.*)/si", $host, $matches)) {
54
  $wwwhost = $host;
55
  $nonwwwhost = preg_replace("/^(www\.)?/si", "", $wwwhost);
@@ -62,7 +71,7 @@ if (!class_exists('GalleryCheckinit')) {
62
  $result = true;
63
  } else {
64
  if ($serial = $this -> ci_get_serial()) {
65
- if ($serial == strtoupper(md5($_SERVER['HTTP_HOST'] . "wpml" . "mymasesoetkoekiesisfokkenlekker"))) {
66
  $result = true;
67
  } elseif (strtoupper(md5($wwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial ||
68
  strtoupper(md5($nonwwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial) {
9
  return true;
10
  }
11
 
12
+ function ci_initialize() {
 
 
13
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
14
 
15
  if (!is_plugin_active(plugin_basename($this -> plugin_file))) {
16
  return;
17
  }
18
 
19
+ add_action('wp_ajax_slideshow_serialkey', array($this, 'ajax_serialkey'));
20
 
21
  if (true || !is_admin() || (is_admin() && $this -> ci_serial_valid())) {
22
  $this -> ci_initialization();
23
+ } else {
24
  $this -> add_action('admin_print_styles', 'ci_print_styles', 10, 1);
25
  $this -> add_action('admin_print_scripts', 'ci_print_scripts', 10, 1);
26
  $this -> add_action('admin_notices');
31
  return false;
32
  }
33
 
34
+ function ci_initialization() {
35
+
36
+ $this -> add_action('after_plugin_row_' . $this -> plugin_name . '/slideshow-gallery.php', 'after_plugin_row', 10, 2);
37
+
38
+ if ($this -> ci_serial_valid()) {
39
+ $this -> add_action('install_plugins_pre_plugin-information', 'display_changelog', 10, 1);
40
+ $this -> add_filter('transient_update_plugins', 'check_update', 10, 1);
41
+ $this -> add_filter('site_transient_update_plugins', 'check_update', 10, 1);
42
+ }
43
 
44
  return true;
45
  }
56
  $host = $_SERVER['HTTP_HOST'];
57
  $result = false;
58
 
59
+ $existing = $this -> get_option('existing');
60
+ //if (!empty($existing)) return true;
61
+
62
  if (preg_match("/^(www\.)(.*)/si", $host, $matches)) {
63
  $wwwhost = $host;
64
  $nonwwwhost = preg_replace("/^(www\.)?/si", "", $wwwhost);
71
  $result = true;
72
  } else {
73
  if ($serial = $this -> ci_get_serial()) {
74
+ if ($serial == strtoupper(md5($_SERVER['HTTP_HOST'] . "gallery" . "mymasesoetkoekiesisfokkenlekker"))) {
75
  $result = true;
76
  } elseif (strtoupper(md5($wwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial ||
77
  strtoupper(md5($nonwwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial) {
includes/constants.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('SLIDESHOW_MANAGER_URL')) { define('SLIDESHOW_MANAGER_URL', "http://tribulant.com/plugins/"); }
4
+
5
+ ?>
includes/messages.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $messages = array();
4
+
5
+ //messages go here...
6
+
7
+
8
+ $messages = apply_filters('slideshow_messages', $messages);
9
+
10
+ ?>
js/admin.js CHANGED
@@ -21,6 +21,26 @@ jQuery(document).ready(function(){
21
  });
22
  });
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  function jqCheckAll(checker, formid, name) {
25
  jQuery('input:checkbox[name="' + name + '[]"]').each(function() {
26
  jQuery(this).attr("checked", checker.checked);
21
  });
22
  });
23
 
24
+ function slideshow_submitserial(form) {
25
+ jQuery('#slideshow_submitserial_button').prop('disabled', true);
26
+ jQuery('#slideshow_submitserial_loading').show();
27
+ var formdata = jQuery(form).serialize();
28
+
29
+ jQuery.post(slideshowajax + '?action=slideshow_serialkey', formdata, function(response) {
30
+ jQuery('#slideshow_submitserial').html(response);
31
+ jQuery.colorbox.resize();
32
+ });
33
+ }
34
+
35
+ function slideshow_deleteserial() {
36
+ jQuery('#slideshow_submitserial_loading').show();
37
+ jQuery('#slideshow_deleteserial_button').prop('disabled', true);
38
+
39
+ jQuery.post(slideshowajax + '?action=slideshow_serialkey&delete=1', false, function(response) {
40
+ jQuery.colorbox.close(); parent.location.reload(1);
41
+ });
42
+ }
43
+
44
  function jqCheckAll(checker, formid, name) {
45
  jQuery('input:checkbox[name="' + name + '[]"]').each(function() {
46
  jQuery(this).attr("checked", checker.checked);
models/gallery.php CHANGED
@@ -86,8 +86,10 @@ class GalleryGallery extends GalleryDbHelper {
86
  $this -> errors[] = __('No data was posted', $this -> plugin_name);
87
  }
88
 
89
- return $this -> errors;
90
  }
91
  }
92
 
 
 
93
  ?>
86
  $this -> errors[] = __('No data was posted', $this -> plugin_name);
87
  }
88
 
89
+ return apply_filters('slideshow_gallery_validation', $this -> errors, $data);
90
  }
91
  }
92
 
93
+ include_once(dirname(__FILE__) . DS . 'slideshow.php');
94
+
95
  ?>
models/galleryslides.php CHANGED
@@ -80,4 +80,6 @@ class GalleryGallerySlides extends GalleryDbHelper {
80
  }
81
  }
82
 
 
 
83
  ?>
80
  }
81
  }
82
 
83
+ include_once(dirname(__FILE__) . DS . 'slideshow.php');
84
+
85
  ?>
models/index.php CHANGED
@@ -0,0 +1 @@
 
1
+ <?php /* Silence... */ ?>
models/slide.php CHANGED
@@ -199,8 +199,10 @@ class GallerySlide extends GalleryDbHelper {
199
  $this -> errors[] = __('No data was posted', $this -> plugin_name);
200
  }
201
 
202
- return $this -> errors;
203
  }
204
  }
205
 
 
 
206
  ?>
199
  $this -> errors[] = __('No data was posted', $this -> plugin_name);
200
  }
201
 
202
+ return apply_filters('slideshow_slide_validation', $this -> errors, $data);
203
  }
204
  }
205
 
206
+ include_once(dirname(__FILE__) . DS . 'slideshow.php');
207
+
208
  ?>
models/slideshow.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!class_exists('slideshow_lite')) {
4
+ class slideshow_lite extends GalleryPlugin {
5
+
6
+ function slideshow_lite() {
7
+ //if (empty($this -> plugin_file)) {
8
+ // $this -> plugin_file = plugin_basename(basename(dirname(dirname(__FILE__))) . DS . 'wp-mailinglist.php');
9
+ //}
10
+
11
+ $this -> initialize_classes();
12
+
13
+ if (!is_multisite() || (is_multisite() && $this -> is_plugin_active($this -> plugin_file))) {
14
+ if (!$this -> ci_serial_valid()) {
15
+ $this -> add_filter('slideshow_sections', 'lite_sections', 10, 1);
16
+ $this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
17
+ $this -> add_action('slideshow_admin_menu', 'lite_admin_menu', 10, 1);
18
+ $this -> add_action('admin_bar_menu', 'lite_admin_bar_menu', 999, 1);
19
+ $this -> add_filter('slideshow_gallery_validation', 'lite_gallery_validation', 10, 2);
20
+ $this -> add_filter('slideshow_slide_validation', 'lite_slide_validation', 10, 2);
21
+ }
22
+ }
23
+ }
24
+
25
+ function lite_sections($sections = null) {
26
+ $sections = (object) $sections;
27
+ $sections -> lite_upgrade = "slideshow-lite-upgrade";
28
+ return $sections;
29
+ }
30
+
31
+ function lite_admin_menu($menus = null) {
32
+ add_submenu_page($this -> sections -> welcome, __('Upgrade to PRO', $this -> plugin_name), __('Upgrade to PRO', $this -> plugin_name), 'slideshow_welcome', $this -> sections -> lite_upgrade, array($this, 'lite_upgrade'));
33
+ }
34
+
35
+ function lite_upgrade() {
36
+ $this -> render('lite-upgrade', false, true, 'admin');
37
+ }
38
+
39
+ function lite_admin_bar_menu($wp_admin_bar = null) {
40
+ global $wp_admin_bar, $blog_id;
41
+
42
+ if (is_multisite()) {
43
+ if (is_network_admin()) {
44
+ return;
45
+ }
46
+ }
47
+
48
+ if (!current_user_can('slideshow_welcome')) {
49
+ return;
50
+ }
51
+
52
+ $args = array(
53
+ 'id' => 'slideshowlite',
54
+ 'title' => '<i class="fa fa-picture-o fa-fw"></i> ' . __('Slideshow LITE', $this -> plugin_name),
55
+ 'href' => admin_url('admin.php?page=' . $this -> sections -> lite_upgrade),
56
+ 'meta' => array('class' => 'slideshow-lite'),
57
+ );
58
+
59
+ $wp_admin_bar -> add_node($args);
60
+
61
+ $galleries_count = $this -> Gallery -> count();
62
+ $galleries_percentage = (($galleries_count / 1) * 100);
63
+ $gallerieslimit_title = sprintf(__('%s of 1 (%s&#37;) galleries used', $this -> plugin_name), $galleries_count, $galleries_percentage);
64
+
65
+ $args = array(
66
+ 'id' => 'slideshowlite_gallerieslimit',
67
+ 'title' => $gallerieslimit_title,
68
+ 'parent' => 'slideshowlite',
69
+ 'href' => false,
70
+ 'meta' => array('class' => 'slideshow-lite-gallerieslimit'),
71
+ );
72
+
73
+ $wp_admin_bar -> add_node($args);
74
+
75
+ $slides_count = $this -> Slide -> count();
76
+ $slides_percentage = (($slides_count / 20) * 100);
77
+ $slideslimit_title = sprintf(__('%s of 20 (%s&#37;) slides used', $this -> plugin_name), $slides_count, $slides_percentage);
78
+
79
+ $args = array(
80
+ 'id' => 'slideshowlite_slideslimit',
81
+ 'title' => $slideslimit_title,
82
+ 'parent' => 'slideshowlite',
83
+ 'href' => false,
84
+ 'meta' => array('class' => 'slideshow-lite-slideslimit'),
85
+ );
86
+
87
+ $wp_admin_bar -> add_node($args);
88
+
89
+ $args = array(
90
+ 'id' => 'slideshowlite_submitserial',
91
+ 'title' => '<i class="fa fa-key"></i> ' . __('Submit Serial Key', $this -> plugin_name),
92
+ 'parent' => 'slideshowlite',
93
+ 'href' => admin_url('admin.php?page=' . $this -> sections -> submitserial),
94
+ 'meta' => array('class' => 'slideshow-lite-submitserial', 'onclick' => "jQuery.colorbox({href:ajaxurl + \"?action=slideshow_serialkey\"}); return false;"),
95
+ );
96
+
97
+ $wp_admin_bar -> add_node($args);
98
+
99
+ $args = array(
100
+ 'id' => 'slideshowlite_upgrade',
101
+ 'title' => '<i class="fa fa-check"></i> ' . __('Upgrade to PRO now!', $this -> plugin_name),
102
+ 'parent' => 'slideshowlite',
103
+ 'href' => admin_url('admin.php?page=' . $this -> sections -> lite_upgrade),
104
+ 'meta' => array('class' => 'slideshow-lite-upgrade'),
105
+ );
106
+
107
+ $wp_admin_bar -> add_node($args);
108
+ }
109
+
110
+ function lite_gallery_validation($errors = null, $data = null) {
111
+ $slideshow_lite_gallerylimit = 1;
112
+
113
+ if (!empty($slideshow_lite_gallerylimit) && $slideshow_lite_gallerylimit > 0) {
114
+ $galleries_count = $this -> Gallery -> count();
115
+
116
+ if (empty($data -> id) && $galleries_count >= $slideshow_lite_gallerylimit) {
117
+ $error = sprintf(__('Gallery limit of %s has been reached, you can %s for unlimited.', $this -> plugin_name), $slideshow_lite_gallerylimit, '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">Upgrade to PRO</a>');
118
+ $errors['limit'] = $error;
119
+ $this -> render_err($error, false, false);
120
+ }
121
+ }
122
+
123
+ return $errors;
124
+ }
125
+
126
+ function lite_slide_validation($errors = null, $data = null) {
127
+ $slideshow_lite_slidelimit = 20;
128
+
129
+ if (!empty($slideshow_lite_slidelimit) && $slideshow_lite_slidelimit > 0) {
130
+ $slides_count = $this -> Slide -> count();
131
+
132
+ if (empty($data -> id) && $slides_count >= $slideshow_lite_slidelimit) {
133
+ $error = sprintf(__('Slides limit of %s has been reached, you can %s for unlimited.', $this -> plugin_name), $slideshow_lite_slidelimit, '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">Upgrade to PRO</a>');
134
+ $errors['limit'] = $error;
135
+ $this -> render_err($error, false, false);
136
+ }
137
+ }
138
+
139
+ return $errors;
140
+ }
141
+ }
142
+
143
+ add_action('plugins_loaded', 'load_slideshow_lite');
144
+
145
+ function load_slideshow_lite() {
146
+ $slideshow_lite = new slideshow_lite();
147
+ return $slideshow_lite;
148
+ }
149
+ }
150
+
151
+ ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://tribulant.com/
4
  Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
5
  Requires at least: 3.1
6
  Tested up to: 4.3
7
- Stable tag: 1.5.3.2
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
@@ -175,6 +175,17 @@ There is an "Images Tester" utility under Slideshow > Configuration on the right
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
 
 
 
 
178
  = 1.5.3.2 =
179
  * IMPROVE: Prevent plugin files from being accessed directly for security
180
  * IMPROVE: Check file mime and type of image URL on slide for security
4
  Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
5
  Requires at least: 3.1
6
  Tested up to: 4.3
7
+ Stable tag: 1.5.3.3
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.5.3.3 =
179
+ * ADD: FontAwesome icons throughout
180
+ * ADD: WPML multilingual support
181
+ * ADD: qTranslate X multilingual support
182
+ * IMPROVE: Improved error handling on multiple slides adding
183
+ * IMPROVE: Minimalistic Colorbox design
184
+ * IMPROVE: Remove dashicons and fonts completely
185
+ * IMPROVE: New WordPress 4.3 check-column styling
186
+ * FIX: Some notices/errors showing raw HTML code
187
+ * FIX: Vulnerability/security issues
188
+
189
  = 1.5.3.2 =
190
  * IMPROVE: Prevent plugin files from being accessed directly for security
191
  * IMPROVE: Check file mime and type of image URL on slide for security
slideshow-gallery-plugin.php CHANGED
@@ -4,7 +4,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
 
5
  class GalleryPlugin extends GalleryCheckinit {
6
 
7
- var $version = '1.5.3.2';
8
  var $plugin_name;
9
  var $plugin_base;
10
  var $pre = 'Gallery';
@@ -12,6 +12,7 @@ class GalleryPlugin extends GalleryCheckinit {
12
  var $menus = array();
13
  var $sections = array(
14
  'welcome' => 'slideshow-slides',
 
15
  'about' => 'slideshow-gallery-about',
16
  'slides' => 'slideshow-slides',
17
  'galleries' => 'slideshow-galleries',
@@ -26,7 +27,8 @@ class GalleryPlugin extends GalleryCheckinit {
26
  function register_plugin($name, $base) {
27
  $this -> plugin_name = $name;
28
  $this -> plugin_base = rtrim(dirname($base), DS);
29
- $this -> sections = (object) $this -> sections;
 
30
  $this -> initialize_classes();
31
  //$this -> initialize_options();
32
 
@@ -47,11 +49,122 @@ class GalleryPlugin extends GalleryCheckinit {
47
  @ini_set('display_errors', 0);
48
  }
49
 
50
- $this -> ci_initialize();
51
-
52
  return true;
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  function ajax_slides_order() {
56
  if (!empty($_REQUEST['item'])) {
57
  foreach ($_REQUEST['item'] as $order => $slide_id) {
@@ -164,11 +277,11 @@ class GalleryPlugin extends GalleryCheckinit {
164
  $version = "1.5.3";
165
  }
166
 
167
- if (version_compare($cur_version, "1.5.3.2") < 0) {
168
 
169
  $this -> initialize_options();
170
 
171
- $version = "1.5.3.2";
172
  }
173
 
174
  //the current version is older.
@@ -195,7 +308,7 @@ class GalleryPlugin extends GalleryCheckinit {
195
  'resizeimages' => "Y",
196
  );
197
 
198
- $this -> add_option('existing', 1);
199
  $this -> add_option('resizeimagescrop', "Y");
200
  $this -> update_option('imagespath', $this -> Html -> uploads_url() . '/' . $this -> plugin_name . '/');
201
  $this -> add_option('styles', $styles);
@@ -304,14 +417,14 @@ class GalleryPlugin extends GalleryCheckinit {
304
  }
305
  }
306
 
307
- function render_msg($message = null) {
308
- $message = esc_html($message);
309
- $this -> render('msg-top', array('message' => $message), true, 'admin');
310
  }
311
 
312
- function render_err($message = null) {
313
- $message = esc_html($message);
314
- $this -> render('err-top', array('message' => $message), true, 'admin');
315
  }
316
 
317
  function redirect($location = null, $msgtype = null, $message = null, $action = null) {
@@ -435,6 +548,16 @@ class GalleryPlugin extends GalleryCheckinit {
435
  return false;
436
  }
437
 
 
 
 
 
 
 
 
 
 
 
438
  function print_scripts() {
439
  $this -> enqueue_scripts();
440
  }
@@ -512,6 +635,7 @@ class GalleryPlugin extends GalleryCheckinit {
512
  wp_enqueue_style('wp-color-picker');
513
  wp_enqueue_style('jquery-ui', $this -> render_url('css/jquery-ui.css', "admin"), null, "1.0", "all");
514
  wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "admin"), null, "1.3.19", "all");
 
515
  } else {
516
  wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "default"), null, "1.3.19", "all");
517
  }
@@ -730,48 +854,462 @@ class GalleryPlugin extends GalleryCheckinit {
730
  return false;
731
  }
732
 
733
- function language_do() {
 
734
 
735
- if ($this -> is_plugin_active('qtranslate')) {
736
- return true;
 
 
737
  }
738
 
739
- return false;
740
  }
741
 
742
- function language_getlanguages() {
743
- if ($this -> language_do()) {
744
- if (function_exists('qtrans_getSortedLanguages')) {
745
- if ($languages = qtrans_getSortedLanguages()) {
746
- return $languages;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
747
  }
 
 
 
748
  }
 
 
749
  }
750
 
751
  return false;
752
  }
753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754
  function language_flag($language = null) {
 
755
  $flag = false;
 
 
 
 
756
 
757
- if ($this -> language_do()) {
758
- global $q_config;
759
- $flag = '<img src="' . content_url() . '/' . $q_config['flag_location'] . '/' . $q_config['flag'][$language] . '" alt="' . $language . '" />';
 
 
 
 
 
 
 
 
 
760
  }
761
 
 
762
  return $flag;
763
  }
764
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
765
  function is_plugin_active($name = null, $orinactive = false) {
766
  if (!empty($name)) {
767
  require_once ABSPATH . 'wp-admin' . DS . 'includes' . DS . 'admin.php';
768
 
769
  if (empty($path)) {
770
  switch ($name) {
771
- case 'qtranslate' :
772
  $path = 'qtranslate' . DS . 'qtranslate.php';
773
  break;
774
- case 'captcha' :
 
 
 
 
 
 
775
  $path = 'really-simple-captcha' . DS . 'really-simple-captcha.php';
776
  break;
777
  default :
@@ -855,7 +1393,7 @@ class GalleryPlugin extends GalleryCheckinit {
855
  if (!empty($file)) {
856
  $this -> plugin_name = basename(dirname(__FILE__));
857
  $this -> plugin_base = rtrim(dirname(__FILE__), DS);
858
- $this -> sections = (object) $this -> sections;
859
 
860
  $theme_serve = false;
861
  $filename = $file . '.php';
4
 
5
  class GalleryPlugin extends GalleryCheckinit {
6
 
7
+ var $version = '1.5.3.3';
8
  var $plugin_name;
9
  var $plugin_base;
10
  var $pre = 'Gallery';
12
  var $menus = array();
13
  var $sections = array(
14
  'welcome' => 'slideshow-slides',
15
+ 'submitserial' => 'slideshow-submitserial',
16
  'about' => 'slideshow-gallery-about',
17
  'slides' => 'slideshow-slides',
18
  'galleries' => 'slideshow-galleries',
27
  function register_plugin($name, $base) {
28
  $this -> plugin_name = $name;
29
  $this -> plugin_base = rtrim(dirname($base), DS);
30
+ $this -> plugin_file = plugin_basename($base);
31
+ $this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
32
  $this -> initialize_classes();
33
  //$this -> initialize_options();
34
 
49
  @ini_set('display_errors', 0);
50
  }
51
 
 
 
52
  return true;
53
  }
54
 
55
+ function after_plugin_row($plugin_name = null) {
56
+ $key = $this -> get_option('serialkey');
57
+ $update = $this -> vendor('update');
58
+ $version_info = $update -> get_version_info();
59
+
60
+ if (!$this -> ci_serial_valid() && !empty($version_info) && $version_info['is_valid_key'] == "0") {
61
+ echo '<tr id="slideshow-plugin-update-tr" class="plugin-update-tr">';
62
+ echo '<td colspan="3" class="plugin-update">';
63
+ echo '<div class="update-message">';
64
+
65
+ if (!$this -> ci_serial_valid()) {
66
+ echo sprintf(__('You are running Slideshow Gallery LITE. To remove limits, you can submit a serial key or %s.', $this -> plugin_name), '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">' . __('Upgrade to PRO', $this -> plugin_name) . '</a>');
67
+ } else {
68
+ //echo sprintf('Your download for the Slideshow Gallery plugin has expired, please <a href="%s" target="_blank">renew it</a> for updates!', $version_info['url']);
69
+ }
70
+
71
+ echo '</div>';
72
+ echo '</td>';
73
+ echo '</tr>';
74
+
75
+ ?>
76
+
77
+ <script type="text/javascript">
78
+ jQuery(document).ready(function() {
79
+ var row = jQuery('#slideshow-plugin-update-tr').closest('tr').prev();
80
+ jQuery(row).addClass('update');
81
+ });
82
+ </script>
83
+
84
+ <?php
85
+ }
86
+ }
87
+
88
+ /**
89
+ * This function outputs the changelog on the 'Plugins' page when the "View Details" link is clicked.
90
+ */
91
+ function display_changelog() {
92
+ if (!empty($_GET['plugin']) && $_GET['plugin'] == $this -> plugin_name) {
93
+ $update = $this -> vendor('update');
94
+ if ($changelog = $update -> get_changelog()) {
95
+ $this -> render('changelog', array('changelog' => $changelog), true, 'admin');
96
+ }
97
+
98
+ exit();
99
+ }
100
+ }
101
+
102
+ function has_update($cache = true) {
103
+ $update = $this -> vendor('update');
104
+ $version_info = $update -> get_version_info($cache);
105
+ return version_compare($this -> version, $version_info["version"], '<');
106
+ }
107
+
108
+ function check_update($option, $cache = true) {
109
+ if ($update = $this -> vendor('update')) {
110
+ $version_info = $update -> get_version_info($cache);
111
+
112
+ if (!$version_info) { return $option; }
113
+ $plugin_path = $this -> plugin_file;
114
+
115
+ if(empty($option -> response[$plugin_path])) {
116
+ $option -> response[$plugin_path] = new stdClass();
117
+ }
118
+
119
+ //Empty response means that the key is invalid. Do not queue for upgrade
120
+ if(empty($version_info['is_valid_key']) || version_compare($this -> version, $version_info["version"], '>=')){
121
+ unset($option -> response[$plugin_path]);
122
+ } else {
123
+ $option -> response[$plugin_path] -> url = "http://tribulant.com";
124
+ $option -> response[$plugin_path] -> slug = $this -> plugin_name;
125
+ $option -> response[$plugin_path] -> package = $version_info['url'];
126
+ $option -> response[$plugin_path] -> new_version = $version_info["version"];
127
+ $option -> response[$plugin_path] -> id = "0";
128
+ }
129
+ }
130
+
131
+ return $option;
132
+ }
133
+
134
+ function ajax_serialkey() {
135
+ define('DOING_AJAX', true);
136
+ define('SHORTINIT', true);
137
+ $errors = array();
138
+ $success = false;
139
+
140
+ if (!empty($_GET['delete'])) {
141
+ $this -> delete_option('serialkey');
142
+ $errors[] = __('Serial key has been deleted.', $this -> plugin_name);
143
+ } else {
144
+ if (!empty($_POST)) {
145
+ if (empty($_REQUEST['serialkey'])) { $errors[] = __('Please fill in a serial key.', $this -> plugin_name); }
146
+ else {
147
+ $this -> update_option('serialkey', $_REQUEST['serialkey']); //update the DB option
148
+
149
+ if (!$this -> ci_serial_valid()) { $errors[] = __('Serial key is invalid, please try again.', $this -> plugin_name); }
150
+ else {
151
+ delete_transient($this -> pre . 'update_info');
152
+ $success = true;
153
+ }
154
+ }
155
+ }
156
+ }
157
+
158
+ delete_transient('slideshow_update_info');
159
+
160
+ if (empty($_POST)) { ?><div id="slideshow_submitserial"><?php }
161
+ $this -> render('submitserial', array('errors' => $errors, 'success' => $success), true, 'admin');
162
+ if (empty($_POST)) { ?></div><?php }
163
+
164
+ exit();
165
+ die();
166
+ }
167
+
168
  function ajax_slides_order() {
169
  if (!empty($_REQUEST['item'])) {
170
  foreach ($_REQUEST['item'] as $order => $slide_id) {
277
  $version = "1.5.3";
278
  }
279
 
280
+ if (version_compare($cur_version, "1.5.3.3") < 0) {
281
 
282
  $this -> initialize_options();
283
 
284
+ $version = "1.5.3.3";
285
  }
286
 
287
  //the current version is older.
308
  'resizeimages' => "Y",
309
  );
310
 
311
+ //$this -> add_option('existing', 1);
312
  $this -> add_option('resizeimagescrop', "Y");
313
  $this -> update_option('imagespath', $this -> Html -> uploads_url() . '/' . $this -> plugin_name . '/');
314
  $this -> add_option('styles', $styles);
417
  }
418
  }
419
 
420
+ function render_msg($message = null, $dismissable = null, $escape = true) {
421
+ if (!empty($escape)) $message = esc_html($message);
422
+ $this -> render('msg-top', array('message' => $message, 'dismissable' => $dismissable), true, 'admin');
423
  }
424
 
425
+ function render_err($message = null, $dismissable = null, $escape = true) {
426
+ if (!empty($escape)) $message = esc_html($message);
427
+ $this -> render('err-top', array('message' => $message, 'dismissable' => $dismissable), true, 'admin');
428
  }
429
 
430
  function redirect($location = null, $msgtype = null, $message = null, $action = null) {
548
  return false;
549
  }
550
 
551
+ function ci_print_styles() {
552
+ wp_enqueue_style('slideshow', $this -> render_url('css/admin.css'), null, $this -> version, "all");
553
+ wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css'), false, $this -> version, "all");
554
+ }
555
+
556
+ function ci_print_scripts() {
557
+ wp_enqueue_script('slideshow', $this -> render_url('js/admin.js'), array('jquery'), '1.0', true);
558
+ wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js'), array('jquery'), false, true);
559
+ }
560
+
561
  function print_scripts() {
562
  $this -> enqueue_scripts();
563
  }
635
  wp_enqueue_style('wp-color-picker');
636
  wp_enqueue_style('jquery-ui', $this -> render_url('css/jquery-ui.css', "admin"), null, "1.0", "all");
637
  wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "admin"), null, "1.3.19", "all");
638
+ wp_enqueue_style('fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', false, '4.4.0', "all");
639
  } else {
640
  wp_enqueue_style('colorbox', $this -> render_url('css/colorbox.css', "default"), null, "1.3.19", "all");
641
  }
854
  return false;
855
  }
856
 
857
+ function language_useordefault($content) {
858
+ $text = $content;
859
 
860
+ if (!empty($text)) {
861
+ $current_language = $this -> language_current();
862
+ $language = (empty($current_language)) ? $this -> language_default() : $current_language;
863
+ $text = $this -> language_use($language, $content, false);
864
  }
865
 
866
+ return $text;
867
  }
868
 
869
+ function language_use($lang = null, $text = null, $show_available = false) {
870
+
871
+ if (!$this -> language_isenabled($lang)) {
872
+ return $text;
873
+ }
874
+
875
+ if (is_array($text) || is_object($text)) {
876
+ // handle arrays recursively
877
+ if (is_array($text)) {
878
+ foreach($text as $key => $t) {
879
+ $text[$key] = $this -> language_use($lang, $text[$key], $show_available);
880
+ }
881
+ } elseif (is_object($text)) {
882
+ foreach($text as $key => $t) {
883
+ $text -> {$key} = $this -> language_use($lang, $text -> {$key}, $show_available);
884
+ }
885
+ }
886
+
887
+ return $text;
888
+ }
889
+
890
+ if(is_object($text) && get_class($text) == '__PHP_Incomplete_Class') {
891
+ foreach(get_object_vars($text) as $key => $t) {
892
+ $text->$key = $this -> language_use($lang,$text -> $key,$show_available);
893
+ }
894
+ return $text;
895
+ }
896
+
897
+ // prevent filtering weird data types and save some resources
898
+ if(!is_string($text) || $text == '') {
899
+ return $text;
900
+ }
901
+
902
+ // get content
903
+ $content = $this -> language_split($text);
904
+
905
+ if (!is_array($content)) {
906
+ return $content;
907
+ }
908
+
909
+ // find available languages
910
+ $available_languages = array();
911
+ foreach($content as $language => $lang_text) {
912
+ $lang_text = trim($lang_text);
913
+ if(!empty($lang_text)) $available_languages[] = $language;
914
+ }
915
+
916
+ // if no languages available show full text
917
+ if(sizeof($available_languages)==0) return $text;
918
+ // if content is available show the content in the requested language
919
+ if(!empty($content[$lang])) {
920
+ return $content[$lang];
921
+ }
922
+ // content not available in requested language (bad!!) what now?
923
+ if(!$show_available){
924
+ // check if content is available in default language, if not return first language found. (prevent empty result)
925
+ if($lang != $this -> language_default()) {
926
+ //if (!is_admin()) {
927
+ $str = $this -> language_use($this -> language_default(), $text, $show_available);
928
+ //}
929
+
930
+ if ($q_config['show_displayed_language_prefix'])
931
+ $str = "(". $this -> language_name($this -> language_default()) .") " . $str;
932
+ return $str;
933
+ }
934
+ foreach($content as $language => $lang_text) {
935
+ $lang_text = trim($lang_text);
936
+ if (!empty($lang_text)) {
937
+ $str = $lang_text;
938
+ if ($q_config['show_displayed_language_prefix'])
939
+ $str = "(". $this -> language_name($language) .") " . $str;
940
+ return $str;
941
+ }
942
+ }
943
+ }
944
+ // display selection for available languages
945
+ $available_languages = array_unique($available_languages);
946
+ $language_list = "";
947
+ if(preg_match('/%LANG:([^:]*):([^%]*)%/',$q_config['not_available'][$lang],$match)) {
948
+ $normal_seperator = $match[1];
949
+ $end_seperator = $match[2];
950
+ // build available languages string backward
951
+ $i = 0;
952
+ foreach($available_languages as $language) {
953
+ if($i==1) $language_list = $end_seperator.$language_list;
954
+ if($i>1) $language_list = $normal_seperator.$language_list;
955
+ $language_list = "<a href=\"". $this -> language_converturl('', $language)."\">". $this -> language_name($language) ."</a>".$language_list;
956
+ $i++;
957
+ }
958
+ }
959
+ return "<p>".preg_replace('/%LANG:([^:]*):([^%]*)%/', $language_list, $q_config['not_available'][$lang])."</p>";
960
+ }
961
+
962
+ function language_converturl($url = null, $language = null) {
963
+ global $slideshow_languageplugin;
964
+
965
+ if (!empty($url) && !empty($language)) {
966
+ switch ($slideshow_languageplugin) {
967
+ case 'qtranslate' :
968
+ $url = qtrans_convertURL($url, $language);
969
+ break;
970
+ case 'qtranslate-x' :
971
+ $url = qtranxf_convertURL($url, $language);
972
+ break;
973
+ case 'wpml' :
974
+ if (function_exists('icl_get_languages')) {
975
+ $languages = icl_get_languages();
976
+ $language = $this -> language_current();
977
+
978
+ if (!empty($languages[$language]['url'])) {
979
+ //$url = $languages[$language]['url'];
980
+ }
981
+ }
982
+ break;
983
+ }
984
+ }
985
+
986
+ return $url;
987
+ }
988
+
989
+ function language_default() {
990
+ global $slideshow_languageplugin, $slideshow_languagedefault;
991
+ $default = false;
992
+
993
+ if (!empty($slideshow_languagedefault)) {
994
+ return $slideshow_languagedefault;
995
+ }
996
+
997
+ switch ($slideshow_languageplugin) {
998
+ case 'qtranslate' :
999
+ case 'qtranslate-x' :
1000
+ global $q_config;
1001
+ $default = $q_config['default_language'];
1002
+ break;
1003
+ case 'wpml' :
1004
+ global $sitepress;
1005
+ $default = $sitepress -> get_default_language();
1006
+ break;
1007
+ }
1008
+
1009
+ $slideshow_languagedefault = $default;
1010
+ return $default;
1011
+ }
1012
+
1013
+ function language_name($language = null) {
1014
+ $name = false;
1015
+
1016
+ if (!empty($language)) {
1017
+ global $slideshow_languageplugin, ${'slideshow_languagename_' . $language};
1018
+
1019
+ if (!empty(${'slideshow_languagename_' . $language})) {
1020
+ return ${'slideshow_languagename_' . $language};
1021
+ }
1022
+
1023
+ switch ($slideshow_languageplugin) {
1024
+ case 'qtranslate' :
1025
+ case 'qtranslate-x' :
1026
+ global $q_config;
1027
+ $name = $q_config['language_name'][$language];
1028
+ break;
1029
+ case 'wpml' :
1030
+ if (function_exists('icl_get_languages')) {
1031
+ $languages = icl_get_languages();
1032
+ if (!empty($languages[$language]['translated_name'])) {
1033
+ $name = $languages[$language]['translated_name'];
1034
+ }
1035
+ }
1036
+ break;
1037
+ }
1038
+ }
1039
+
1040
+ ${'slideshow_languagename_' . $language} = $name;
1041
+ return $name;
1042
+ }
1043
+
1044
+ function language_do() {
1045
+ global $slideshow_languageplugin;
1046
+
1047
+ if (empty($slideshow_languageplugin)) {
1048
+ if ($this -> is_plugin_active('qtranslate')) {
1049
+ $slideshow_languageplugin = "qtranslate";
1050
+ return true;
1051
+ } elseif ($this -> is_plugin_active('qtranslate-x')) {
1052
+ $slideshow_languageplugin = 'qtranslate-x';
1053
+ return true;
1054
+ } elseif ($this -> is_plugin_active('wpml')) {
1055
+ if (!empty($_GET['lang']) && $_GET['lang'] == "all") {
1056
+ return false;
1057
  }
1058
+
1059
+ $slideshow_languageplugin = "wpml";
1060
+ return true;
1061
  }
1062
+ } else {
1063
+ return true;
1064
  }
1065
 
1066
  return false;
1067
  }
1068
 
1069
+ function language_current() {
1070
+ global $slideshow_languageplugin, $slideshow_languagecurrent;
1071
+ $current = false;
1072
+
1073
+ if (!empty($slideshow_languagecurrent)) {
1074
+ return $slideshow_languagecurrent;
1075
+ }
1076
+
1077
+ switch ($slideshow_languageplugin) {
1078
+ case 'qtranslate' :
1079
+ if (function_exists('qtrans_getLanguage')) {
1080
+ $current = qtrans_getLanguage();
1081
+ }
1082
+ break;
1083
+ case 'qtranslate-x' :
1084
+ if (function_exists('qtranxf_getLanguage')) {
1085
+ $current = qtranxf_getLanguage();
1086
+ }
1087
+ break;
1088
+ case 'wpml' :
1089
+ $current = ICL_LANGUAGE_CODE;
1090
+ break;
1091
+ }
1092
+
1093
+ $slideshow_languagecurrent = $current;
1094
+ return $current;
1095
+ }
1096
+
1097
  function language_flag($language = null) {
1098
+ global $slideshow_languageplugin, ${'slideshow_languageflag_' . $language};
1099
  $flag = false;
1100
+
1101
+ if (!empty(${'slideshow_languageflag_' . $language})) {
1102
+ return ${'slideshow_languageflag_' . $language};
1103
+ }
1104
 
1105
+ switch ($slideshow_languageplugin) {
1106
+ case 'qtranslate' :
1107
+ case 'qtranslate-x' :
1108
+ global $q_config;
1109
+ $flag = '<img src="' . content_url() . '/' . $q_config['flag_location'] . '/' . $q_config['flag'][$language] . '" alt="' . $language . '" />';
1110
+ break;
1111
+ case 'wpml' :
1112
+ if (function_exists('icl_get_languages')) {
1113
+ $languages = icl_get_languages();
1114
+ $flag = '<img src="' . $languages[$language]['country_flag_url'] . '" alt="' . $language . '" />';
1115
+ }
1116
+ break;
1117
  }
1118
 
1119
+ ${'slideshow_languageflag_' . $language} = $flag;
1120
  return $flag;
1121
  }
1122
 
1123
+ function language_isenabled($language = null) {
1124
+ $enabled = false;
1125
+
1126
+ if (!empty($language)) {
1127
+ global $slideshow_languageplugin, ${'slideshow_languageenabled_' . $language};
1128
+
1129
+ if (!empty(${'slideshow_languageenabled_' . $language})) {
1130
+ return ${'slideshow_languageenabled_' . $language};
1131
+ }
1132
+
1133
+ switch ($slideshow_languageplugin) {
1134
+ case 'qtranslate' :
1135
+ $enabled = qtrans_isEnabled($language);
1136
+ break;
1137
+ case 'qtranslate-x' :
1138
+ $enabled = qtranxf_isEnabled($language);
1139
+ break;
1140
+ case 'wpml' :
1141
+ if (function_exists('icl_get_languages')) {
1142
+ $languages = icl_get_languages();
1143
+ if (!empty($languages[$language])) {
1144
+ $enabled = true;
1145
+ }
1146
+ }
1147
+ break;
1148
+ }
1149
+ }
1150
+
1151
+ ${'slideshow_languageenabled_' . $language} = $enabled;
1152
+ return $enabled;
1153
+ }
1154
+
1155
+ function language_join($texts = array(), $tagTypeMap = array(), $strip_tags = false) {
1156
+ if(!is_array($texts)) $texts = $this -> language_split($texts, false);
1157
+ $split_regex = "#<!--more-->#ism";
1158
+ $max = 0;
1159
+ $text = "";
1160
+ $languages = $this -> language_getlanguages();
1161
+
1162
+ foreach ($languages as $language) {
1163
+ $tagTypeMap[$language] = true;
1164
+ }
1165
+
1166
+ foreach($languages as $language) {
1167
+ if (!empty($texts[$language])) {
1168
+ $texts[$language] = preg_split($split_regex, $texts[$language]);
1169
+ if(sizeof($texts[$language]) > $max) $max = sizeof($texts[$language]);
1170
+ }
1171
+ }
1172
+
1173
+ for ($i = 0; $i < $max; $i++) {
1174
+ if($i>=1) {
1175
+ $text .= '<!--more-->';
1176
+ }
1177
+ foreach($languages as $language) {
1178
+ if (isset($texts[$language][$i]) && $texts[$language][$i] !== '') {
1179
+
1180
+ if ($strip_tags) {
1181
+ $texts[$language][$i] = strip_tags($texts[$language][$i]);
1182
+ }
1183
+
1184
+ if (empty($tagTypeMap[$language])) {
1185
+ $text .= '<!--:'.$language.'-->'.$texts[$language][$i].'<!--:-->';
1186
+ } else {
1187
+ $text .= "[:{$language}]{$texts[$language][$i]}";
1188
+ }
1189
+ }
1190
+ }
1191
+ }
1192
+
1193
+ return $text;
1194
+ }
1195
+
1196
+ function language_split($text, $quicktags = true, array $languageMap = NULL) {
1197
+ $array = false;
1198
+
1199
+ if (!empty($text)) {
1200
+ //init vars
1201
+ $split_regex = "#(<!--[^-]*-->|\[:[a-z-]{2,10}\])#ism";
1202
+ $current_language = "";
1203
+ $result = array();
1204
+
1205
+ $languages = $this -> language_getlanguages();
1206
+ foreach ($languages as $language) {
1207
+ $result[$language] = "";
1208
+ }
1209
+
1210
+ // split text at all xml comments
1211
+ $blocks = preg_split($split_regex, $text, -1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE);
1212
+
1213
+ foreach($blocks as $block) {
1214
+ # detect language tags
1215
+ if(preg_match("#^<!--:([a-z-]{2,10})-->$#ism", $block, $matches)) {
1216
+ if($this -> language_isenabled($matches[1])) {
1217
+ $current_language = $matches[1];
1218
+ $languageMap[$current_language] = false;
1219
+ } else {
1220
+ $current_language = "invalid";
1221
+ }
1222
+ continue;
1223
+ // detect quicktags
1224
+ } elseif($quicktags && preg_match("#^\[:([a-z-]{2,10})\]$#ism", $block, $matches)) {
1225
+ if($this -> language_isenabled($matches[1])) {
1226
+ $current_language = $matches[1];
1227
+ $languageMap[$current_language] = true;
1228
+ } else {
1229
+ $current_language = "invalid";
1230
+ }
1231
+
1232
+ continue;
1233
+ } elseif(preg_match("#^<!--:-->$#ism", $block, $matches)) {
1234
+ $current_language = "";
1235
+ continue;
1236
+ } elseif(preg_match("#^<!--more-->$#ism", $block, $matches)) {
1237
+ foreach($languages as $language) {
1238
+ $result[$language] .= $block;
1239
+ }
1240
+
1241
+ continue;
1242
+ }
1243
+
1244
+ if($current_language == "") {
1245
+ foreach($languages as $language) {
1246
+ $result[$language] .= $block;
1247
+ }
1248
+ } elseif($current_language != "invalid") {
1249
+ $result[$current_language] .= $block;
1250
+ }
1251
+ }
1252
+
1253
+ foreach($result as $lang => $lang_content) {
1254
+ $result[$lang] = str_replace('[:]', '', preg_replace("#(<!--more-->|<!--nextpage-->)+$#ism", "", $lang_content));
1255
+ }
1256
+
1257
+ return $result;
1258
+ }
1259
+
1260
+ return $array;
1261
+ }
1262
+
1263
+ function language_getlanguages() {
1264
+ global $slideshow_languageplugin, $slideshow_languagelanguages;
1265
+ $languages = false;
1266
+
1267
+ if (!empty($slideshow_languagelanguages)) {
1268
+ return $slideshow_languagelanguages;
1269
+ }
1270
+
1271
+ switch ($slideshow_languageplugin) {
1272
+ case 'qtranslate' :
1273
+ if (function_exists('qtrans_getSortedLanguages')) {
1274
+ $languages = qtrans_getSortedLanguages();
1275
+ }
1276
+ break;
1277
+ case 'qtranslate-x' :
1278
+ if (function_exists('qtranxf_getSortedLanguages')) {
1279
+ $languages = qtranxf_getSortedLanguages();
1280
+ }
1281
+ break;
1282
+ case 'wpml' :
1283
+ if (function_exists('icl_get_languages')) {
1284
+ $icl_languages = icl_get_languages();
1285
+ $languages = array();
1286
+ foreach ($icl_languages as $lang => $icl_language) {
1287
+ $languages[] = $lang;
1288
+ }
1289
+ }
1290
+ break;
1291
+ }
1292
+
1293
+ $slideshow_languagelanguages = $languages;
1294
+ return $languages;
1295
+ }
1296
+
1297
  function is_plugin_active($name = null, $orinactive = false) {
1298
  if (!empty($name)) {
1299
  require_once ABSPATH . 'wp-admin' . DS . 'includes' . DS . 'admin.php';
1300
 
1301
  if (empty($path)) {
1302
  switch ($name) {
1303
+ case 'qtranslate' :
1304
  $path = 'qtranslate' . DS . 'qtranslate.php';
1305
  break;
1306
+ case 'qtranslate-x' :
1307
+ $path = 'qtranslate-x' . DS . 'qtranslate.php';
1308
+ break;
1309
+ case 'wpml' :
1310
+ $path = 'sitepress-multilingual-cms' . DS . 'sitepress.php';
1311
+ break;
1312
+ case 'captcha' :
1313
  $path = 'really-simple-captcha' . DS . 'really-simple-captcha.php';
1314
  break;
1315
  default :
1393
  if (!empty($file)) {
1394
  $this -> plugin_name = basename(dirname(__FILE__));
1395
  $this -> plugin_base = rtrim(dirname(__FILE__), DS);
1396
+ $this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
1397
 
1398
  $theme_serve = false;
1399
  $filename = $file . '.php';
slideshow-gallery.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://tribulant.com/plugins/view/13/wordpress-slideshow-gallery
6
  Author: Tribulant Software
7
  Author URI: http://tribulant.com
8
  Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[tribulant_slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code>&lt;?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?&gt;</code>.
9
- Version: 1.5.3.2
10
  License: GNU General Public License v2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  Tags: slideshow gallery, slideshow, gallery, slider, jquery, bfithumb, galleries, photos, images
@@ -21,6 +21,7 @@ if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); }
21
  $path = dirname(__FILE__) . DS . 'slideshow-gallery-plugin.php';
22
  if (file_exists($path)) {
23
  require_once(dirname(__FILE__) . DS . 'includes' . DS . 'checkinit.php');
 
24
  require_once($path);
25
  }
26
 
@@ -32,10 +33,11 @@ if (!class_exists('Gallery')) {
32
  $this -> url = $url[0];
33
  $this -> referer = (empty($_SERVER['HTTP_REFERER'])) ? $this -> url : $_SERVER['HTTP_REFERER'];
34
  $this -> plugin_name = basename(dirname(__FILE__));
35
- $this -> plugin_file = plugin_basename(__FILE__);
36
  $this -> register_plugin($this -> plugin_name, __FILE__);
37
 
38
  //WordPress action hooks
 
39
  $this -> add_action('wp_head');
40
  $this -> add_action('wp_footer');
41
  $this -> add_action('admin_menu');
@@ -55,7 +57,7 @@ if (!class_exists('Gallery')) {
55
  //WordPress filter hooks
56
  $this -> add_filter('mce_buttons');
57
  $this -> add_filter('mce_external_plugins');
58
- $this -> add_filter("plugin_action_links_" . $this -> plugin_file, 'plugin_settings_link', 10, 1);
59
 
60
  $this -> add_action('slideshow_ratereviewhook', 'ratereview_hook');
61
 
@@ -67,10 +69,20 @@ if (!class_exists('Gallery')) {
67
  $this -> updating_plugin();
68
  }
69
 
70
- function plugin_settings_link($links) {
71
- $settings_link = '<a href="' . admin_url('admin.php') . '?page=' . $this -> sections -> settings . '">' . __('Settings', $this -> plugin_name) . '</a>';
72
- array_unshift($links, $settings_link);
73
- return $links;
 
 
 
 
 
 
 
 
 
 
74
  }
75
 
76
  function init_textdomain() {
@@ -96,6 +108,14 @@ if (!class_exists('Gallery')) {
96
  }
97
  }
98
 
 
 
 
 
 
 
 
 
99
  function wp_head() {
100
  global $slideshow_javascript, $slideshow_css;
101
  $slideshow_javascript = array();
@@ -146,6 +166,8 @@ if (!class_exists('Gallery')) {
146
  $this -> menus['slideshow-galleries'] = add_submenu_page($this -> sections -> slides, __('Manage Galleries', $this -> plugin_name), __('Manage Galleries', $this -> plugin_name), 'slideshow_galleries', $this -> sections -> galleries, array($this, 'admin_galleries'));
147
  $this -> menus['slideshow-settings'] = add_submenu_page($this -> sections -> slides, __('Configuration', $this -> plugin_name), __('Configuration', $this -> plugin_name), 'slideshow_settings', $this -> sections -> settings, array($this, 'admin_settings'));
148
 
 
 
149
  add_action('admin_head-' . $this -> menus['slideshow-settings'], array($this, 'admin_head_gallery_settings'));
150
 
151
  add_dashboard_page(sprintf('Slideshow Gallery %s', $this -> version), sprintf('Slideshow Gallery %s', $this -> version), 'read', $this -> sections -> about, array($this, 'slideshow_gallery_about'));
@@ -175,51 +197,79 @@ if (!class_exists('Gallery')) {
175
  }
176
 
177
  function admin_notices() {
178
- $this -> check_uploaddir();
179
-
180
- if (!empty($_GET[$this -> pre . 'message'])) {
181
- $msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
182
- call_user_func(array($this, 'render_' . $msg_type), $_GET[$this -> pre . 'message']);
183
- }
184
 
185
- $showmessage_ratereview = $this -> get_option('showmessage_ratereview');
186
- if (!empty($showmessage_ratereview)) {
187
- $message = sprintf(__('You have been using the %s for %s days or more. Please consider to %s it or say it %s on %s.', $this -> plugin_name),
188
- '<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">Tribulant Slideshow Gallery plugin</a>',
189
- $showmessage_ratereview,
190
- '<a class="button" href="https://wordpress.org/support/view/plugin-reviews/slideshow-gallery?rate=5#postform" target="_blank">Rate</a>',
191
- '<a class="button" href="https://wordpress.org/plugins/slideshow-gallery/?compatibility[version]=' . get_bloginfo('version') . '&compatibility[topic_version]=' . $this -> version . '&compatibility[compatible]=1" target="_blank">Works</a>',
192
- '<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">WordPress.org</a>');
193
-
194
- $message .= '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=ratereview') . '" class="slideshow-icon-delete"></a>';
195
-
196
- $this -> render_msg($message);
197
- }
198
 
199
- /* Check if wp_head and wp_footer functions exist */
200
- $url = add_query_arg(array('test-head' => 1, 'test-footer' => 1), home_url());
201
- if ($response = wp_remote_request($url)) {
202
- if (!is_wp_error($response)) {
203
- $html = $response['body'];
204
- $showmessage_wphead = $this -> get_option('showmessage_wphead');
205
- $showmessage_wpfoot = $this -> get_option('showmessage_wpfoot');
 
 
 
 
 
 
206
 
207
- if (!strstr($html, '<!-- wp_head -->')) {
208
- if (empty($showmessage_wphead) || (!empty($showmessage_wphead) && $showmessage_wphead != "hidden")) {
209
- $this -> update_option('showmessage_wphead', 1);
210
- $this -> render_err(sprintf(__('Slideshow Gallery: It seems like your theme is missing the wp_head() function. See %s. %s', $this -> plugin_name), '<a href="http://codex.wordpress.org/Function_Reference/wp_head" target="_blank">' . __('documentation', $this -> plugin_name) . '</a>', '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=wphead') . '" class="slideshow-icon-delete"></a>'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  }
212
- }
213
-
214
- if (!strstr($html, '<!-- wp_footer -->')) {
215
- if (empty($showmessage_wpfoot) || (!empty($showmessage_wpfoot) && $showmessage_wpfoot != "hidden")) {
216
- $this -> update_option('showmessage_wpfoot', 1);
217
- $this -> render_err(sprintf(__('Slideshow Gallery: It seems like your theme is missing the wp_footer() function. See %s . %s', $this -> plugin_name), '<a href="http://codex.wordpress.org/Function_Reference/wp_footer" target="_blank">' . __('documentation', $this -> plugin_name) . '</a>', '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=wpfoot') . '" class="slideshow-icon-delete"></a>'));
 
218
  }
219
  }
220
- } else {
221
- $error_string = $response -> get_error_message();
222
- $this -> render_err($error_string);
223
  }
224
  }
225
 
@@ -520,8 +570,8 @@ if (!class_exists('Gallery')) {
520
  'galleries' => $galleries,
521
  );
522
 
523
- if (!$this -> Slide -> save($slide_data)) {
524
- $errors = array_merge($errors, $this -> Slide -> errors);
525
  }
526
  }
527
 
@@ -804,6 +854,9 @@ if (!class_exists('Gallery')) {
804
  case 'hidemessage' :
805
  if (!empty($_GET['message'])) {
806
  switch ($_GET['message']) {
 
 
 
807
  case 'ratereview' :
808
  $this -> delete_option('showmessage_ratereview');
809
  $this -> redirect($this -> referer);
6
  Author: Tribulant Software
7
  Author URI: http://tribulant.com
8
  Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[tribulant_slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code>&lt;?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?&gt;</code>.
9
+ Version: 1.5.3.3
10
  License: GNU General Public License v2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  Tags: slideshow gallery, slideshow, gallery, slider, jquery, bfithumb, galleries, photos, images
21
  $path = dirname(__FILE__) . DS . 'slideshow-gallery-plugin.php';
22
  if (file_exists($path)) {
23
  require_once(dirname(__FILE__) . DS . 'includes' . DS . 'checkinit.php');
24
+ require_once(dirname(__FILE__) . DS . 'includes' . DS . 'constants.php');
25
  require_once($path);
26
  }
27
 
33
  $this -> url = $url[0];
34
  $this -> referer = (empty($_SERVER['HTTP_REFERER'])) ? $this -> url : $_SERVER['HTTP_REFERER'];
35
  $this -> plugin_name = basename(dirname(__FILE__));
36
+ $this -> plugin_file = plugin_basename(__FILE__);
37
  $this -> register_plugin($this -> plugin_name, __FILE__);
38
 
39
  //WordPress action hooks
40
+ $this -> add_action('plugins_loaded');
41
  $this -> add_action('wp_head');
42
  $this -> add_action('wp_footer');
43
  $this -> add_action('admin_menu');
57
  //WordPress filter hooks
58
  $this -> add_filter('mce_buttons');
59
  $this -> add_filter('mce_external_plugins');
60
+ $this -> add_filter("plugin_action_links_" . $this -> plugin_file, 'plugin_action_links', 10, 4);
61
 
62
  $this -> add_action('slideshow_ratereviewhook', 'ratereview_hook');
63
 
69
  $this -> updating_plugin();
70
  }
71
 
72
+ function plugin_action_links($actions = null, $plugin_file = null, $plugin_data = null, $context = null) {
73
+ $this_plugin = plugin_basename(__FILE__);
74
+
75
+ if (!empty($plugin_file) && $plugin_file == $this_plugin) {
76
+ $actions[] = '<a href="" onclick="jQuery.colorbox({href:ajaxurl + \'?action=slideshow_serialkey\'}); return false;" id="slideshow_submitseriallink">' . __('Serial Key', $this -> plugin_name) . '</a>';
77
+ $actions[] = '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings) . '">' . __('Settings', $this -> plugin_name) . '</a>';
78
+ }
79
+
80
+ return $actions;
81
+ }
82
+
83
+ function init() {
84
+
85
+
86
  }
87
 
88
  function init_textdomain() {
108
  }
109
  }
110
 
111
+ function plugins_loaded() {
112
+ $this -> ci_initialize();
113
+
114
+ if ($this -> language_do()) {
115
+ add_filter('gettext', array($this, 'language_useordefault'), 0);
116
+ }
117
+ }
118
+
119
  function wp_head() {
120
  global $slideshow_javascript, $slideshow_css;
121
  $slideshow_javascript = array();
166
  $this -> menus['slideshow-galleries'] = add_submenu_page($this -> sections -> slides, __('Manage Galleries', $this -> plugin_name), __('Manage Galleries', $this -> plugin_name), 'slideshow_galleries', $this -> sections -> galleries, array($this, 'admin_galleries'));
167
  $this -> menus['slideshow-settings'] = add_submenu_page($this -> sections -> slides, __('Configuration', $this -> plugin_name), __('Configuration', $this -> plugin_name), 'slideshow_settings', $this -> sections -> settings, array($this, 'admin_settings'));
168
 
169
+ do_action('slideshow_admin_menu', $this -> menus);
170
+
171
  add_action('admin_head-' . $this -> menus['slideshow-settings'], array($this, 'admin_head_gallery_settings'));
172
 
173
  add_dashboard_page(sprintf('Slideshow Gallery %s', $this -> version), sprintf('Slideshow Gallery %s', $this -> version), 'read', $this -> sections -> about, array($this, 'slideshow_gallery_about'));
197
  }
198
 
199
  function admin_notices() {
 
 
 
 
 
 
200
 
201
+ if (is_admin()) {
202
+
203
+ $this -> check_uploaddir();
 
 
 
 
 
 
 
 
 
 
204
 
205
+ if (!empty($_GET[$this -> pre . 'message'])) {
206
+ $msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
207
+ call_user_func(array($this, 'render_' . $msg_type), $_GET[$this -> pre . 'message']);
208
+ }
209
+
210
+ $showmessage_ratereview = $this -> get_option('showmessage_ratereview');
211
+ if (!empty($showmessage_ratereview)) {
212
+ $message = sprintf(__('You have been using the %s for %s days or more. Please consider to %s it or say it %s on %s.', $this -> plugin_name),
213
+ '<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">Tribulant Slideshow Gallery plugin</a>',
214
+ $showmessage_ratereview,
215
+ '<a class="button" href="https://wordpress.org/support/view/plugin-reviews/slideshow-gallery?rate=5#postform" target="_blank"><i class="fa fa-star"></i> Rate</a>',
216
+ '<a class="button" href="https://wordpress.org/plugins/slideshow-gallery/?compatibility[version]=' . get_bloginfo('version') . '&compatibility[topic_version]=' . $this -> version . '&compatibility[compatible]=1" target="_blank"><i class="fa fa-check"></i> Works</a>',
217
+ '<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">WordPress.org</a>');
218
 
219
+ $dismissable = admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=ratereview');
220
+ $this -> render_msg($message, $dismissable, false);
221
+ }
222
+
223
+ /* Serial key submission message */
224
+ if (!$this -> ci_serial_valid() && (empty($_GET['page']) || $_GET['page'] != $this -> sections -> submitserial)) {
225
+ $hidemessage_submitserial = $this -> get_option('hidemessage_submitserial');
226
+
227
+ if (empty($hidemessage_submitserial)) {
228
+ $message = sprintf(__('To activate Slideshow Gallery PRO, please submit a serial key, else %s', $this -> plugin_name), '<a href="' . admin_url('admin.php?page=' . $this -> sections -> welcome . '&slideshow_method=hidemessage&message=submitserial') . '">' . __('continue using Slideshow Gallery LITE', $this -> plugin_name) . '</a>');
229
+ $message .= ' <a class="button button-primary" id="' . $this -> pre . 'submitseriallink" href="' . admin_url('admin.php') . '?page=' . $this -> sections -> submitserial . '"><i class="fa fa-key"></i> ' . __('Submit Serial Key', $this -> plugin_name) . '</a>';
230
+ $message .= ' <a class="button button-secondary" href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '"><i class="fa fa-check"></i> ' . __('Upgrade to PRO', $this -> plugin_name) . '</a>';
231
+ $dismissable = admin_url('admin.php?page=' . $this -> sections -> welcome . '&slideshow_method=hidemessage&message=submitserial');
232
+ $this -> render_msg($message, $dismissable, false);
233
+
234
+ ?>
235
+
236
+ <script type="text/javascript">
237
+ jQuery(document).ready(function(e) {
238
+ jQuery('#<?php echo $this -> pre; ?>submitseriallink').click(function() {
239
+ jQuery.colorbox({href:ajaxurl + "?action=slideshow_serialkey"});
240
+ return false;
241
+ });
242
+ });
243
+ </script>
244
+
245
+ <?php
246
+ }
247
+ }
248
+
249
+ /* Check if wp_head and wp_footer functions exist */
250
+ $url = add_query_arg(array('test-head' => 1, 'test-footer' => 1), home_url());
251
+ if ($response = wp_remote_request($url)) {
252
+ if (!is_wp_error($response)) {
253
+ $html = $response['body'];
254
+ $showmessage_wphead = $this -> get_option('showmessage_wphead');
255
+ $showmessage_wpfoot = $this -> get_option('showmessage_wpfoot');
256
+
257
+ if (!strstr($html, '<!-- wp_head -->')) {
258
+ if (empty($showmessage_wphead) || (!empty($showmessage_wphead) && $showmessage_wphead != "hidden")) {
259
+ $this -> update_option('showmessage_wphead', 1);
260
+ $dismissable = admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=wphead');
261
+ $this -> render_err(sprintf(__('Slideshow Gallery: It seems like your theme is missing the wp_head() function.', $this -> plugin_name)), $dismissable);
262
+ }
263
  }
264
+
265
+ if (!strstr($html, '<!-- wp_footer -->')) {
266
+ if (empty($showmessage_wpfoot) || (!empty($showmessage_wpfoot) && $showmessage_wpfoot != "hidden")) {
267
+ $this -> update_option('showmessage_wpfoot', 1);
268
+ $dismissable = admin_url('admin.php?page=' . $this -> sections -> settings . '&slideshow_method=hidemessage&message=wpfoot');
269
+ $this -> render_err(sprintf(__('Slideshow Gallery: It seems like your theme is missing the wp_footer() function.', $this -> plugin_name)), $dismissable);
270
+ }
271
  }
272
  }
 
 
 
273
  }
274
  }
275
 
570
  'galleries' => $galleries,
571
  );
572
 
573
+ if (!$this -> Slide -> save($slide_data)) {
574
+ $errors = array_merge($errors, $this -> Slide -> errors);
575
  }
576
  }
577
 
854
  case 'hidemessage' :
855
  if (!empty($_GET['message'])) {
856
  switch ($_GET['message']) {
857
+ case 'submitserial' :
858
+ $this -> update_option('hidemessage_submitserial', true);
859
+ break;
860
  case 'ratereview' :
861
  $this -> delete_option('showmessage_ratereview');
862
  $this -> redirect($this -> referer);
vendors/class.paginate.php CHANGED
@@ -193,7 +193,7 @@ class GalleryPaginate extends GalleryPlugin {
193
  $this -> pagination .= '<a href="?page=' . $this -> url_page . '&amp;' . $this -> pre . 'page=1' . $search . $orderby . $order . $this -> after . '" class="first-page' . (($this -> page == 1) ? ' disabled" onclick="return false;' : '') . '">&laquo;</a>';
194
  $this -> pagination .= '<a class="prev-page' . (($this -> page == 1) ? ' disabled" onclick="return false;' : '') . '" href="?page=' . $this -> url_page . '&amp;' . $this -> pre . 'page=' . ($this -> page - 1) . $search . $orderby . $order . $this -> after . '" title="' . __('Previous Page', $this -> plugin_name) . '">&#8249;</a>';
195
  $this -> pagination .= '<span class="paging-input">';
196
- $this -> pagination .= '<input class="newsletters-paged-input current-page" type="text" name="paged" id="paged-input" value="' . $this -> page . '" size="1"> ';
197
  $this -> pagination .= __('of', $this -> plugin_name);
198
  $this -> pagination .= ' <span class="total-pages">' . $totalpagescount . '</span>';
199
  $this -> pagination .= '</span>';
@@ -207,7 +207,7 @@ class GalleryPaginate extends GalleryPlugin {
207
 
208
  <script type="text/javascript">
209
  jQuery(document).ready(function() {
210
- jQuery('.newsletters-paged-input').keypress(function(e) {
211
  code = (e.keyCode ? e.keyCode : e.which);
212
  if (code == 13) {
213
  window.location = '?page=<?php echo $this -> url_page; ?>&<?php echo $this -> pre; ?>page=' + jQuery(this).val() + '<?php echo $search . $orderby . $order . $this -> after; ?>';
193
  $this -> pagination .= '<a href="?page=' . $this -> url_page . '&amp;' . $this -> pre . 'page=1' . $search . $orderby . $order . $this -> after . '" class="first-page' . (($this -> page == 1) ? ' disabled" onclick="return false;' : '') . '">&laquo;</a>';
194
  $this -> pagination .= '<a class="prev-page' . (($this -> page == 1) ? ' disabled" onclick="return false;' : '') . '" href="?page=' . $this -> url_page . '&amp;' . $this -> pre . 'page=' . ($this -> page - 1) . $search . $orderby . $order . $this -> after . '" title="' . __('Previous Page', $this -> plugin_name) . '">&#8249;</a>';
195
  $this -> pagination .= '<span class="paging-input">';
196
+ $this -> pagination .= '<input class="slideshow-paged-input current-page" type="text" name="paged" id="paged-input" value="' . $this -> page . '" size="1"> ';
197
  $this -> pagination .= __('of', $this -> plugin_name);
198
  $this -> pagination .= ' <span class="total-pages">' . $totalpagescount . '</span>';
199
  $this -> pagination .= '</span>';
207
 
208
  <script type="text/javascript">
209
  jQuery(document).ready(function() {
210
+ jQuery('.slideshow-paged-input').keypress(function(e) {
211
  code = (e.keyCode ? e.keyCode : e.which);
212
  if (code == 13) {
213
  window.location = '?page=<?php echo $this -> url_page; ?>&<?php echo $this -> pre; ?>page=' + jQuery(this).val() + '<?php echo $search . $orderby . $order . $this -> after; ?>';
vendors/class.update.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!class_exists('Galleryupdate')) {
4
+ class Galleryupdate extends GalleryPlugin {
5
+
6
+ function get_changelog(){
7
+
8
+ $options = array('method' => 'POST', 'timeout' => 20);
9
+ $options['headers'] = array(
10
+ 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'),
11
+ 'User-Agent' => 'WordPress/' . get_bloginfo("version"),
12
+ 'Referer' => home_url()
13
+ );
14
+
15
+ $request_url = SLIDESHOW_MANAGER_URL . 'changelog/13/' . $this -> get_remote_request_params();
16
+ $raw_response = wp_remote_request($request_url, $options);
17
+
18
+ if (is_wp_error($raw_response) || 200 != $raw_response['response']['code']) {
19
+ $text = __('Something went wrong!', $this -> plugin_name);
20
+ $text .= __('Please try again or <a href="http://tribulant.com/support/" target="_blank">contact us</a>.', $this -> plugin_name);
21
+ return $text;
22
+ } else {
23
+ $changelog = $raw_response['body'];
24
+ return stripslashes($changelog);
25
+ }
26
+ }
27
+
28
+ function get_version_info($cache = true) {
29
+ $raw_response = get_transient('slideshow_update_info');
30
+ if (!$cache) { $raw_response = false; }
31
+
32
+ if (!$raw_response) {
33
+ $options = array('method' => 'POST', 'timeout' => 20);
34
+ $options['headers'] = array(
35
+ 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'),
36
+ 'User-Agent' => 'WordPress/' . get_bloginfo("version"),
37
+ 'Referer' => home_url()
38
+ );
39
+
40
+ $request_url = SLIDESHOW_MANAGER_URL . 'updates/13/' . $this -> get_remote_request_params();
41
+ $raw_response = wp_remote_request($request_url, $options);
42
+
43
+ set_transient('slideshow_update_info', $raw_response, 43200);
44
+ }
45
+
46
+ if (is_wp_error($raw_response) || 200 != $raw_response['response']['code']) {
47
+ return array("is_valid_key" => "1", "version" => "", "url" => "");
48
+ } else {
49
+ $array = explode("||", $raw_response['body']);
50
+ $url = $array[2];
51
+ //$url = "https://downloads.wordpress.org/plugin/slideshow-gallery.latest-stable.zip";
52
+ $info = array("is_valid_key" => $array[0], "version" => $array[1], "url" => $url, "item_id" => $array[4]);
53
+
54
+ if(count($array) == 4) {
55
+ $info["expiration_time"] = $array[3];
56
+ }
57
+
58
+ return $info;
59
+ }
60
+ }
61
+
62
+ function get_remote_request_params(){
63
+ global $wpdb;
64
+ return sprintf("p:%s/key:%s/v:%s/wp:%s/php:%s/mysql:%s", urlencode('13'), urlencode(apply_filters('slideshow_get_option', $this -> get_option('serialkey'), 'serialkey')), urlencode($this -> version), urlencode(get_bloginfo("version")), urlencode(phpversion()), urlencode($wpdb -> db_version()));
65
+ }
66
+ }
67
+ }
68
+
69
+ ?>
views/admin/about.php CHANGED
@@ -26,7 +26,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
26
  <div class="col-2">
27
  <img src="<?php echo $this -> url(); ?>/images/about/feature-2.jpg">
28
  <h4><?php echo 'Multilingual'; ?></h4>
29
- <p><?php echo 'This version of the Slideshow Gallery plugin is fully integrated with (m)qTranslate. It now supports internationalization and multilanguage through (m)qTranslate.'; ?></p>
30
  </div>
31
  <div class="col-3 last-feature">
32
  <img src="<?php echo $this -> url(); ?>/images/about/feature-3.jpg">
26
  <div class="col-2">
27
  <img src="<?php echo $this -> url(); ?>/images/about/feature-2.jpg">
28
  <h4><?php echo 'Multilingual'; ?></h4>
29
+ <p><?php echo 'This version of the Slideshow Gallery plugin is fully integrated with qTranslate-X and WPML. It now supports internationalization and multilanguage.'; ?></p>
30
  </div>
31
  <div class="col-3 last-feature">
32
  <img src="<?php echo $this -> url(); ?>/images/about/feature-3.jpg">
views/admin/err-top.php CHANGED
@@ -5,7 +5,10 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
5
  ?>
6
 
7
  <?php if (!empty($message)) : ?>
8
- <div class="error fade">
9
  <p><?php echo $message; ?></p>
 
 
 
10
  </div>
11
  <?php endif; ?>
5
  ?>
6
 
7
  <?php if (!empty($message)) : ?>
8
+ <div id="message" class="slideshow notice error">
9
  <p><?php echo $message; ?></p>
10
+ <?php if (!empty($dismissable)) : ?>
11
+ <a href="<?php echo $dismissable; ?>" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', $this -> plugin_name); ?></span></a>
12
+ <?php endif; ?>
13
  </div>
14
  <?php endif; ?>
views/admin/error.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php if (!empty($errors) && is_array($errors)) : ?>
2
+ <ul class="slideshow_error">
3
+ <?php foreach ($errors as $err) : ?>
4
+ <li><?php echo stripslashes($err); ?></li>
5
+ <?php endforeach; ?>
6
+ </ul>
7
+ <?php endif; ?>
views/admin/galleries/index.php CHANGED
@@ -40,7 +40,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
40
  <table class="widefat">
41
  <thead>
42
  <tr>
43
- <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
44
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
45
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
46
  <span><?php _e('ID', $this -> plugin_name); ?></span>
@@ -65,7 +65,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
65
  </thead>
66
  <tfoot>
67
  <tr>
68
- <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
69
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
70
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
71
  <span><?php _e('ID', $this -> plugin_name); ?></span>
40
  <table class="widefat">
41
  <thead>
42
  <tr>
43
+ <td class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></td>
44
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
45
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
46
  <span><?php _e('ID', $this -> plugin_name); ?></span>
65
  </thead>
66
  <tfoot>
67
  <tr>
68
+ <td class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></td>
69
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
70
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
71
  <span><?php _e('ID', $this -> plugin_name); ?></span>
views/admin/galleries/save.php CHANGED
@@ -21,7 +21,7 @@ $languages = $this -> language_getlanguages();
21
  <?php echo $this -> Html -> help(__('Give this gallery a title/name for your own reference.', $this -> plugin_name)); ?></th>
22
  <td>
23
  <?php if ($this -> language_do()) : ?>
24
- <?php $titles = qtrans_split($this -> Gallery -> data -> title); ?>
25
  <div id="gallery-title-tabs">
26
  <ul>
27
  <?php foreach ($languages as $language) : ?>
@@ -44,7 +44,7 @@ $languages = $this -> language_getlanguages();
44
  <input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(stripslashes($this -> Gallery -> data -> title)); ?>" id="Gallery_title" />
45
  <?php endif; ?>
46
  <span class="howto"><?php _e('Title of this gallery for identification purposes.', $this -> plugin_name); ?></span>
47
- <?php echo (!empty($this -> Gallery -> errors['title'])) ? '<span class="error">' . $this -> Gallery -> errors['title'] . '</span>' : ''; ?>
48
  </td>
49
  </tr>
50
  </tbody>
21
  <?php echo $this -> Html -> help(__('Give this gallery a title/name for your own reference.', $this -> plugin_name)); ?></th>
22
  <td>
23
  <?php if ($this -> language_do()) : ?>
24
+ <?php $titles = $this -> language_split($this -> Gallery -> data -> title); ?>
25
  <div id="gallery-title-tabs">
26
  <ul>
27
  <?php foreach ($languages as $language) : ?>
44
  <input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(stripslashes($this -> Gallery -> data -> title)); ?>" id="Gallery_title" />
45
  <?php endif; ?>
46
  <span class="howto"><?php _e('Title of this gallery for identification purposes.', $this -> plugin_name); ?></span>
47
+ <?php echo (!empty($this -> Gallery -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery -> errors['title'] . '</span>' : ''; ?>
48
  </td>
49
  </tr>
50
  </tbody>
views/admin/lite-upgrade.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- LITE Upgrade -->
2
+
3
+ <?php
4
+
5
+ $plugin_link = "http://tribulant.com/plugins/view/13/wordpress-slideshow-gallery";
6
+
7
+ $galleries_count = $this -> Gallery -> count();
8
+ $galleries_percentage = (($galleries_count / 1) * 100);
9
+
10
+ $slides_count = $this -> Slide -> count();
11
+ $slides_percentage = (($slides_count / 20) * 100);
12
+
13
+ /**
14
+ * About This Version administration panel.
15
+ *
16
+ * @package WordPress
17
+ * @subpackage Administration
18
+ */
19
+
20
+ ?>
21
+
22
+ <div class="wrap slideshow about-wrap">
23
+ <h1>Upgrade to Slideshow Gallery PRO</h1>
24
+
25
+ <div class="about-text">
26
+ <?php echo sprintf(__('Thank you for installing the %s. You are using the Slideshow Gallery LITE plugin which contains all of the powerful features of the PRO plugin but with some limits. You can upgrade to Slideshow Gallery PRO by submitting a serial key. If you do not have a serial key, you can buy one now.', $this -> plugin_name), '<a href="' . $plugin_link . '" target="_blank">' . __('Slideshow Gallery plugin', $this -> plugin_name) . '</a>', $this -> version); ?>
27
+ </div>
28
+
29
+ <div class="slideshow-badge">
30
+ <div>
31
+ <i class="fa fa-picture-o fa-fw" style="font-size: 72px !important; color: white;"></i>
32
+ </div>
33
+ <?php echo sprintf('Version %s', $this -> version); ?>
34
+ </div>
35
+
36
+ <div class="changelog slideshow-changelog">
37
+ <div class="feature-section three-col">
38
+ <div class="col">
39
+ <h4><?php _e('Current Limits', $this -> plugin_name); ?></h4>
40
+ <p><?php _e('Your current limits in Slideshow Gallery LITE:', $this -> plugin_name); ?></p>
41
+ <ul>
42
+ <li><?php echo sprintf(__('<strong>%s of 1</strong> (%s&#37;) galleries used', $this -> plugin_name), $galleries_count, $galleries_percentage); ?></li>
43
+ <li><?php echo sprintf(__('<strong>%s of 20</strong> (%s&#37;) slides used', $this -> plugin_name), $slides_count, $slides_percentage); ?></li>
44
+ </ul>
45
+ </div>
46
+ <div class="col">
47
+ <h4><?php _e('Benefits of PRO', $this -> plugin_name); ?></h4>
48
+ <p><?php _e('Slideshow Gallery PRO gives these benefits:', $this -> plugin_name); ?></p>
49
+ <ul>
50
+ <li><?php echo sprintf(__('PRO, %s', $this -> plugin_name), '<a href="http://tribulant.com/support/" target="_blank">' . __('priority support', $this -> plugin_name) . '</a>'); ?></li>
51
+ <li><?php _e('Unlimited galleries', $this -> plugin_name); ?></li>
52
+ <li><?php _e('Unlimited slides', $this -> plugin_name); ?></li>
53
+ </ul>
54
+ </div>
55
+ <div class="col">
56
+ <h4><?php _e('Upgrade to PRO', $this -> plugin_name); ?></h4>
57
+ <p><?php _e('Upgrading to Slideshow Gallery PRO is quick and easy by clicking the button below:', $this -> plugin_name); ?></p>
58
+ <p><a href="<?php echo $plugin_link; ?>" class="button button-primary button-hero" target="_blank"><i class="fa fa-mouse-pointer"></i> <?php _e('Buy PRO Now (only $19.99)', $this -> plugin_name); ?></a></p>
59
+ <p><?php _e('Once you have purchased a serial key, simply submit it to activate Slideshow Gallery PRO:', $this -> plugin_name); ?></p>
60
+ <p><a class="button button-secondary button-large" href="<?php echo admin_url('admin.php?page=' . $this -> sections -> submitserial); ?>" onclick="jQuery.colorbox({href:ajaxurl + '?action=slideshow_serialkey'}); return false;"><i class="fa fa-key"></i> <?php _e('Submit Serial', $this -> plugin_name); ?></a></p>
61
+ </div>
62
+ </div>
63
+ </div>
64
+
65
+ <div class="changelog slideshow-changelog">
66
+ <h3><?php _e('About Tribulant Software', $this -> plugin_name); ?></h3>
67
+ <p><a href="http://tribulant.com" target="_blank"><img src="<?php echo $this -> url(); ?>/images/logo.png" alt="tribulant" /></a></p>
68
+ <p><?php _e('At Tribulant Software, we strive to provide the best WordPress plugins on the market.', $this -> plugin_name); ?><br/>
69
+ <?php _e('We are a full-time business developing, promoting and supporting WordPress plugins to the community.', $this -> plugin_name); ?></p>
70
+ <p>
71
+ <a class="button button-primary button-large" target="_blank" href="http://tribulant.com"><?php _e('Visit Our Site', $this -> plugin_name); ?></a>
72
+ </p>
73
+
74
+ <h3><?php _e('Find Us On Social Networks', $this -> plugin_name); ?></h3>
75
+ <p>
76
+ <!-- Facebook Like -->
77
+ <div id="fb-root"></div>
78
+ <script>(function(d, s, id) {
79
+ var js, fjs = d.getElementsByTagName(s)[0];
80
+ if (d.getElementById(id)) return;
81
+ js = d.createElement(s); js.id = id;
82
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=229106274013";
83
+ fjs.parentNode.insertBefore(js, fjs);
84
+ }(document, 'script', 'facebook-jssdk'));</script>
85
+
86
+ <div class="fb-like" data-href="https://www.facebook.com/tribulantsoftware" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
87
+
88
+ <!-- Twitter Follow -->
89
+ <a href="https://twitter.com/tribulant" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @tribulant</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
90
+
91
+ <!-- Google+ Follow -->
92
+ <!-- Place this tag in your head or just before your close body tag. -->
93
+ <script src="https://apis.google.com/js/platform.js" async defer></script>
94
+
95
+ <!-- Place this tag where you want the widget to render. -->
96
+ <div class="g-follow" data-annotation="none" data-height="20" data-href="//plus.google.com/u/0/116807944061700692613" data-rel="publisher"></div>
97
+ </p>
98
+ </div>
99
+ </div>
views/admin/msg-top.php CHANGED
@@ -5,7 +5,10 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
5
  ?>
6
 
7
  <?php if (!empty($message)) : ?>
8
- <div class="updated fade">
9
  <p><?php echo $message; ?></p>
 
 
 
10
  </div>
11
  <?php endif; ?>
5
  ?>
6
 
7
  <?php if (!empty($message)) : ?>
8
+ <div id="message" class="slideshow updated notice">
9
  <p><?php echo $message; ?></p>
10
+ <?php if (!empty($dismissable)) : ?>
11
+ <a href="<?php echo $dismissable; ?>" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', $this -> plugin_name); ?></span></a>
12
+ <?php endif; ?>
13
  </div>
14
  <?php endif; ?>
views/admin/slides/loop.php CHANGED
@@ -38,7 +38,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
38
  <table class="widefat">
39
  <thead>
40
  <tr>
41
- <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
42
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
43
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
44
  <span><?php _e('ID', $this -> plugin_name); ?></span>
@@ -80,7 +80,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
80
  </thead>
81
  <tfoot>
82
  <tr>
83
- <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
84
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
85
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
86
  <span><?php _e('ID', $this -> plugin_name); ?></span>
@@ -124,10 +124,10 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
124
  <?php foreach ($slides as $slide) : ?>
125
  <tr class="<?php echo $class = (empty($class)) ? 'alternate' : ''; ?>">
126
  <th class="check-column"><input type="checkbox" name="Slide[checklist][]" value="<?php echo $slide -> id; ?>" id="checklist<?php echo $slide -> id; ?>" /></th>
127
- <td><?php echo $slide -> id; ?></td>
128
  <td style="width:75px;">
129
  <?php $image = $slide -> image; ?>
130
- <a href="<?php echo $slide -> image_path; ?>" title="<?php echo __($slide -> title); ?>" class="colorbox" rel="slides"><img class="dropshadow" src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, 50, 50, 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
131
  </td>
132
  <td>
133
  <a class="row-title" href="<?php echo $this -> url; ?>&amp;method=save&amp;id=<?php echo $slide -> id; ?>" title=""><?php echo __($slide -> title); ?></a>
@@ -153,7 +153,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
153
  <span style="color:green;"><?php _e('Yes', $this -> plugin_name); ?></span>
154
  <small>(<a href="<?php echo $slide -> link; ?>" title="" target="_blank"><?php _e('Open', $this -> plugin_name); ?></a>)</small>
155
  <?php else : ?>
156
- <span style="color:red;"><?php _e('No', $this -> plugin_name); ?></span>
157
  <?php endif; ?>
158
  </td>
159
  <td><abbr title="<?php echo $slide -> modified; ?>"><?php echo date("Y-m-d", strtotime($slide -> modified)); ?></abbr></td>
38
  <table class="widefat">
39
  <thead>
40
  <tr>
41
+ <td class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></td>
42
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
43
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
44
  <span><?php _e('ID', $this -> plugin_name); ?></span>
80
  </thead>
81
  <tfoot>
82
  <tr>
83
+ <td class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></td>
84
  <th class="column-id <?php echo ($orderby == "id") ? 'sorted ' . $order : 'sortable desc'; ?>">
85
  <a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' . (($orderby == "id") ? $otherorder : "asc")); ?>">
86
  <span><?php _e('ID', $this -> plugin_name); ?></span>
124
  <?php foreach ($slides as $slide) : ?>
125
  <tr class="<?php echo $class = (empty($class)) ? 'alternate' : ''; ?>">
126
  <th class="check-column"><input type="checkbox" name="Slide[checklist][]" value="<?php echo $slide -> id; ?>" id="checklist<?php echo $slide -> id; ?>" /></th>
127
+ <td><label for="checklist<?php echo $slide -> id; ?>"><?php echo $slide -> id; ?></label></td>
128
  <td style="width:75px;">
129
  <?php $image = $slide -> image; ?>
130
+ <a href="<?php echo $slide -> image_path; ?>" title="<?php echo __($slide -> title); ?>" class="colorbox" rel="slides"><img class="img-rounded" src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, 50, 50, 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
131
  </td>
132
  <td>
133
  <a class="row-title" href="<?php echo $this -> url; ?>&amp;method=save&amp;id=<?php echo $slide -> id; ?>" title=""><?php echo __($slide -> title); ?></a>
153
  <span style="color:green;"><?php _e('Yes', $this -> plugin_name); ?></span>
154
  <small>(<a href="<?php echo $slide -> link; ?>" title="" target="_blank"><?php _e('Open', $this -> plugin_name); ?></a>)</small>
155
  <?php else : ?>
156
+ <span class="slideshow_error"><?php _e('No', $this -> plugin_name); ?></span>
157
  <?php endif; ?>
158
  </td>
159
  <td><abbr title="<?php echo $slide -> modified; ?>"><?php echo date("Y-m-d", strtotime($slide -> modified)); ?></abbr></td>
views/admin/slides/order.php CHANGED
@@ -17,8 +17,8 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
17
  <?php if (!empty($slides)) : ?>
18
  <div id="slidemessage" class="updated fade" style="display:none; width:31%;"><!-- message will go here --></div>
19
  <div class="gallery_slides_list">
20
- <span class="gallery_slides_convert_list"><a href="#" id="gallery_convert_list"></a></span>
21
- <span class="gallery_slides_convert_grid"><a href="#" id="gallery_convert_grid"></a></span>
22
  <br class="clear" />
23
  <ul id="slidelist">
24
  <?php foreach ($slides as $slide) : ?>
@@ -62,6 +62,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
62
  });
63
  </script>
64
  <?php else : ?>
65
- <p style="color:red;"><?php _e('No slides found', $this -> plugin_name); ?></p>
66
  <?php endif; ?>
67
  </div>
17
  <?php if (!empty($slides)) : ?>
18
  <div id="slidemessage" class="updated fade" style="display:none; width:31%;"><!-- message will go here --></div>
19
  <div class="gallery_slides_list">
20
+ <span class="gallery_slides_convert_list"><a href="#" id="gallery_convert_list"><i class="fa fa-reorder fa-fw"></i></a></span>
21
+ <span class="gallery_slides_convert_grid"><a href="#" id="gallery_convert_grid"><i class="fa fa-th-large fa-fw"></i></a></span>
22
  <br class="clear" />
23
  <ul id="slidelist">
24
  <?php foreach ($slides as $slide) : ?>
62
  });
63
  </script>
64
  <?php else : ?>
65
+ <p class="slideshow_error"><?php _e('No slides found', $this -> plugin_name); ?></p>
66
  <?php endif; ?>
67
  </div>
views/admin/slides/save-multiple.php CHANGED
@@ -29,11 +29,28 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
29
  <input class="button button-secondary" type="button" name="Slide_mediaupload" value="<?php _e('Choose Files', $this -> plugin_name); ?>" id="Slide_mediaupload" />
30
  <span class="howto"><?php _e('Upload/choose images from the media gallery. Ctrl/Shift + Click to choose multiple.', $this -> plugin_name); ?></span>
31
 
32
- <div id="Slide_mediaslides" style="display:none;">
33
  <!-- Slides go here -->
34
  <table class="form-table" id="Slide_mediaslides_table">
35
  <tbody>
36
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  </tbody>
38
  </table>
39
  </div>
@@ -45,7 +62,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
45
  <?php if ($galleries = $this -> Gallery -> select()) : ?>
46
  <label style="font-weight:bold"><input onclick="jqCheckAll(this,'','Slide[galleries]');" type="checkbox" name="checkboxall" value="checkboxall" id="checkboxall" /> <?php _e('Select All', $this -> plugin_name); ?></label><br/>
47
  <?php foreach ($galleries as $gallery_id => $gallery_title) : ?>
48
- <label><input type="checkbox" name="Slide[galleries][]" value="<?php echo $gallery_id; ?>" id="Slide_galleries_<?php echo $gallery_id; ?>" /> <?php echo __($gallery_title); ?></label><br/>
49
  <?php endforeach; ?>
50
  <?php else : ?>
51
  <span class="error"><?php _e('No galleries are available.', $this -> plugin_name); ?></span>
@@ -93,10 +110,10 @@ jQuery(document).ready(function() {
93
  attachment = attachment.toJSON();
94
 
95
  var attachment_html = '<tr id="Slide_mediaupload_row_' + attachment.id + '">';
96
- attachment_html += '<th style="width:100px; vertical-align:top;"><a href="" class="colorbox" onclick="jQuery.colorbox({href:\'' + attachment.url + '\'}); return false;"><img style="width:100px;" class="dropshadow" src="' + attachment.sizes.thumbnail.url + '" /></th>';
97
  attachment_html += '<td>';
98
  attachment_html += '<label><?php _e('Title:', $this -> plugin_name); ?> <input class="widefat" type="text" value="' + attachment.title + '" name="Slide[slides][' + attachment.id + '][title]" /></label>';
99
- attachment_html += '<label><?php _e('Description:', $this -> plugin_name); ?> <textarea class="widefat" rows="3" cols="100%" name="Slide[slides][' + attachment.id + '][description]" /></label>';
100
  attachment_html += '<input class="widefat" readonly="readonly" type="text" value="' + attachment.url + '" name="Slide[slides][' + attachment.id + '][url]" />';
101
  attachment_html += '<input type="hidden" value="' + attachment.id + '" name="Slide[slides][' + attachment.id + '][attachment_id]" />';
102
  attachment_html += '</td>';
29
  <input class="button button-secondary" type="button" name="Slide_mediaupload" value="<?php _e('Choose Files', $this -> plugin_name); ?>" id="Slide_mediaupload" />
30
  <span class="howto"><?php _e('Upload/choose images from the media gallery. Ctrl/Shift + Click to choose multiple.', $this -> plugin_name); ?></span>
31
 
32
+ <div id="Slide_mediaslides" style="display:<?php echo (!empty($_POST['Slide']['slides'])) ? 'block' : 'none'; ?>;">
33
  <!-- Slides go here -->
34
  <table class="form-table" id="Slide_mediaslides_table">
35
  <tbody>
36
+ <?php if (!empty($_POST['Slide']['slides'])) : ?>
37
+ <?php foreach ($_POST['Slide']['slides'] as $attachment_id => $slide) : ?>
38
+ <tr id="Slide_mediaupload_row_<?php echo $slide['attachment_id']; ?>">
39
+ <th style="width:100px; vertical-align:top;">
40
+ <a href="" class="colorbox" onclick="jQuery.colorbox({href:'<?php echo esc_attr($slide['url']); ?>'}); return false;"><img style="width:100px;" class="img-rounded" src="<?php echo esc_attr($slide['url']); ?>" />
41
+ </th>
42
+ <td>
43
+ <label><?php _e('Title:', $this -> plugin_name); ?> <input class="widefat" type="text" value="<?php echo esc_attr(stripslashes($slide['title'])); ?>" name="Slide[slides][<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>][title]" /></label>
44
+ <label><?php _e('Description:', $this -> plugin_name); ?> <textarea class="widefat" rows="3" cols="100%" name="Slide[slides][<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>][description]"><?php echo esc_attr(stripslashes($slide['description'])); ?></textarea></label>
45
+ <input class="widefat" readonly="readonly" type="text" value="<?php echo esc_attr(stripslashes($slide['url'])); ?>" name="Slide[slides][<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>][url]" />
46
+ <input type="hidden" value="<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>" name="Slide[slides][<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>][attachment_id]" />
47
+ </td>
48
+ <td style="vertical-align:bottom;">
49
+ <input onclick="if (confirm('<?php echo __('Are you sure you want to remove this slide?', $this -> plugin_name); ?>')) { jQuery('#Slide_mediaupload_row_<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>').remove(); } return false;" class="button button-secondary button-small" type="button" name="remove" value="<?php echo __('Remove', $this -> plugin_name); ?>" id="remove<?php echo esc_attr(stripslashes($slide['attachment_id'])); ?>" />
50
+ </td>
51
+ </tr>
52
+ <?php endforeach; ?>
53
+ <?php endif; ?>
54
  </tbody>
55
  </table>
56
  </div>
62
  <?php if ($galleries = $this -> Gallery -> select()) : ?>
63
  <label style="font-weight:bold"><input onclick="jqCheckAll(this,'','Slide[galleries]');" type="checkbox" name="checkboxall" value="checkboxall" id="checkboxall" /> <?php _e('Select All', $this -> plugin_name); ?></label><br/>
64
  <?php foreach ($galleries as $gallery_id => $gallery_title) : ?>
65
+ <label><input <?php echo (!empty($_POST['Slide']['galleries']) && in_array($gallery_id, $_POST['Slide']['galleries'])) ? 'checked="checked"' : ''; ?> type="checkbox" name="Slide[galleries][]" value="<?php echo $gallery_id; ?>" id="Slide_galleries_<?php echo $gallery_id; ?>" /> <?php echo __($gallery_title); ?></label><br/>
66
  <?php endforeach; ?>
67
  <?php else : ?>
68
  <span class="error"><?php _e('No galleries are available.', $this -> plugin_name); ?></span>
110
  attachment = attachment.toJSON();
111
 
112
  var attachment_html = '<tr id="Slide_mediaupload_row_' + attachment.id + '">';
113
+ attachment_html += '<th style="width:100px; vertical-align:top;"><a href="" class="colorbox" onclick="jQuery.colorbox({href:\'' + attachment.url + '\'}); return false;"><img style="width:100px;" class="img-rounded" src="' + attachment.sizes.thumbnail.url + '" /></th>';
114
  attachment_html += '<td>';
115
  attachment_html += '<label><?php _e('Title:', $this -> plugin_name); ?> <input class="widefat" type="text" value="' + attachment.title + '" name="Slide[slides][' + attachment.id + '][title]" /></label>';
116
+ attachment_html += '<label><?php _e('Description:', $this -> plugin_name); ?> <textarea class="widefat" rows="3" cols="100%" name="Slide[slides][' + attachment.id + '][description]"></textarea></label>';
117
  attachment_html += '<input class="widefat" readonly="readonly" type="text" value="' + attachment.url + '" name="Slide[slides][' + attachment.id + '][url]" />';
118
  attachment_html += '<input type="hidden" value="' + attachment.id + '" name="Slide[slides][' + attachment.id + '][attachment_id]" />';
119
  attachment_html += '</td>';
views/admin/slides/save.php CHANGED
@@ -5,7 +5,10 @@
5
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
6
 
7
  $showinfo = $this -> Slide -> data -> showinfo;
8
- $languages = $this -> language_getlanguages();
 
 
 
9
 
10
  ?>
11
 
@@ -26,7 +29,7 @@ $languages = $this -> language_getlanguages();
26
  <?php echo $this -> Html -> help(__('This title is for your reference in management and it will also be used to display the title of the slide in the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
27
  <td>
28
  <?php if ($this -> language_do()) : ?>
29
- <?php $titles = qtrans_split($this -> Slide -> data -> title); ?>
30
  <div id="slide-title-tabs">
31
  <ul>
32
  <?php foreach ($languages as $language) : ?>
@@ -49,7 +52,7 @@ $languages = $this -> language_getlanguages();
49
  <input class="widefat" type="text" name="Slide[title]" value="<?php echo esc_attr($this -> Slide -> data -> title); ?>" id="Slide.title" />
50
  <?php endif; ?>
51
  <span class="howto"><?php _e('Title/name of your slide as it will be displayed to your users.', $this -> plugin_name); ?></span>
52
- <?php echo (!empty($this -> Slide -> errors['title'])) ? '<div style="color:red;">' . $this -> Slide -> errors['title'] . '</div>' : ''; ?>
53
  </td>
54
  </tr>
55
  <tr>
@@ -57,7 +60,7 @@ $languages = $this -> language_getlanguages();
57
  <?php echo $this -> Html -> help(__('The description is specifically used for the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
58
  <td>
59
  <?php if ($this -> language_do()) : ?>
60
- <?php $descriptions = qtrans_split($this -> Slide -> data -> description); ?>
61
  <div id="slide-description-tabs">
62
  <ul>
63
  <?php foreach ($languages as $language) : ?>
@@ -80,7 +83,7 @@ $languages = $this -> language_getlanguages();
80
  <textarea class="widefat" rows="5" cols="100%" name="Slide[description]"><?php echo esc_attr($this -> Slide -> data -> description); ?></textarea>
81
  <?php endif; ?>
82
  <span class="howto"><?php _e('Description of your slide as it will be displayed to your users below the title.', $this -> plugin_name); ?></span>
83
- <?php echo (!empty($this -> Slide -> errors['description'])) ? '<div style="color:red;">' . $this -> Slide -> errors['description'] . '</div>' : ''; ?>
84
  </td>
85
  </tr>
86
  <tr>
@@ -136,7 +139,7 @@ $languages = $this -> language_getlanguages();
136
  <label><input onclick="jQuery('#typediv_media').show(); jQuery('#typediv_file').hide(); jQuery('#typediv_url').hide();" <?php echo (empty($this -> Slide -> data -> type) || $this -> Slide -> data -> type == "media") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="media" id="Slide.type.media" /> <?php _e('Media Upload', $this -> plugin_name); ?></label>
137
  <label><input onclick="jQuery('#typediv_file').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_url').hide();" <?php echo ($this -> Slide -> data -> type == "file") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="file" id="Slide.type.file" /> <?php _e('Upload File', $this -> plugin_name); ?></label>
138
  <label><input onclick="jQuery('#typediv_url').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_file').hide();" <?php echo ($this -> Slide -> data -> type == "url") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="url" id="Slide.type.url" /> <?php _e('Specify URL', $this -> plugin_name); ?></label>
139
- <?php echo (!empty($this -> Slide -> errors['type'])) ? '<div style="color:red;">' . $this -> Slide -> errors['type'] . '</div>' : ''; ?>
140
  <span class="howto"><?php _e('Do you want to upload an image or specify a local/remote image URL?', $this -> plugin_name); ?></span>
141
  </td>
142
  </tr>
@@ -153,7 +156,7 @@ $languages = $this -> language_getlanguages();
153
  <div id="Slide_mediaupload_image">
154
  <!-- image goes here -->
155
  <?php if (!empty($this -> Slide -> data -> image_url)) : ?>
156
- <a href="<?php echo $this -> Slide -> data -> image_url; ?>" title="<?php echo __($this -> Slide -> data -> title); ?>" class="colorbox"><img class="slideshow_dropshadow" src="<?php echo $this -> Html -> bfithumb_image_src($this -> Slide -> data -> image_url, 100, 100, 100); ?>" /></a>
157
  <?php endif; ?>
158
  </div>
159
 
@@ -194,7 +197,7 @@ $languages = $this -> language_getlanguages();
194
 
195
  jQuery('#Slide_attachment_id').val(attachment.id);
196
  jQuery('#Slide_image_file').val(attachment.url);
197
- jQuery('#Slide_mediaupload_image').html('<a href="' + attachment.url + '" class="colorbox" onclick="jQuery.colorbox({href:\'' + attachment.url + '\'}); return false;"><img class="slideshow_dropshadow" style="width:100px;" src="' + attachment.sizes.thumbnail.url + '" /></a>');
198
  });
199
 
200
  // Finally, open the modal
@@ -217,7 +220,7 @@ $languages = $this -> language_getlanguages();
217
  <td>
218
  <input type="file" name="image_file" value="" id="Slide.image_file" />
219
  <span class="howto"><?php _e('Choose your image file from your computer. JPG, PNG, GIF are supported.', $this -> plugin_name); ?></span>
220
- <?php echo (!empty($this -> Slide -> errors['image_file'])) ? '<div style="color:red;">' . $this -> Slide -> errors['image_file'] . '</div>' : ''; ?>
221
 
222
  <?php
223
 
@@ -259,7 +262,7 @@ $languages = $this -> language_getlanguages();
259
  <td>
260
  <input class="widefat" type="text" name="Slide[image_url]" value="<?php echo esc_attr($this -> Slide -> data -> image_url); ?>" id="Slide.image_url" />
261
  <span class="howto"><?php _e('Local or remote image location eg. http://domain.com/path/to/image.jpg', $this -> plugin_name); ?></span>
262
- <?php echo (!empty($this -> Slide -> errors['image_url'])) ? '<div style="color:red;">' . $this -> Slide -> errors['image_url'] . '</div>' : ''; ?>
263
  </td>
264
  </tr>
265
  </tbody>
@@ -287,7 +290,30 @@ $languages = $this -> language_getlanguages();
287
  <th><label for="Slide.link"><?php _e('Link To', $this -> plugin_name); ?></label>
288
  <?php echo $this -> Html -> help(__('The absolute URL to take the user to when the slide is clicked.', $this -> plugin_name)); ?></th>
289
  <td>
290
- <input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($this -> Slide -> data -> link); ?>" id="Slide.link" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  <span class="howto"><?php _e('Link/URL to go to when a user clicks the slide eg. http://www.domain.com/mypage/', $this -> plugin_name); ?></span>
292
  </td>
293
  </tr>
5
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
6
 
7
  $showinfo = $this -> Slide -> data -> showinfo;
8
+
9
+ if ($this -> language_do()) {
10
+ $languages = $this -> language_getlanguages();
11
+ }
12
 
13
  ?>
14
 
29
  <?php echo $this -> Html -> help(__('This title is for your reference in management and it will also be used to display the title of the slide in the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
30
  <td>
31
  <?php if ($this -> language_do()) : ?>
32
+ <?php $titles = $this -> language_split($this -> Slide -> data -> title); ?>
33
  <div id="slide-title-tabs">
34
  <ul>
35
  <?php foreach ($languages as $language) : ?>
52
  <input class="widefat" type="text" name="Slide[title]" value="<?php echo esc_attr($this -> Slide -> data -> title); ?>" id="Slide.title" />
53
  <?php endif; ?>
54
  <span class="howto"><?php _e('Title/name of your slide as it will be displayed to your users.', $this -> plugin_name); ?></span>
55
+ <?php echo (!empty($this -> Slide -> errors['title'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['title'] . '</div>' : ''; ?>
56
  </td>
57
  </tr>
58
  <tr>
60
  <?php echo $this -> Html -> help(__('The description is specifically used for the information bar if you have that turned on.', $this -> plugin_name)); ?></th>
61
  <td>
62
  <?php if ($this -> language_do()) : ?>
63
+ <?php $descriptions = $this -> language_split($this -> Slide -> data -> description); ?>
64
  <div id="slide-description-tabs">
65
  <ul>
66
  <?php foreach ($languages as $language) : ?>
83
  <textarea class="widefat" rows="5" cols="100%" name="Slide[description]"><?php echo esc_attr($this -> Slide -> data -> description); ?></textarea>
84
  <?php endif; ?>
85
  <span class="howto"><?php _e('Description of your slide as it will be displayed to your users below the title.', $this -> plugin_name); ?></span>
86
+ <?php echo (!empty($this -> Slide -> errors['description'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['description'] . '</div>' : ''; ?>
87
  </td>
88
  </tr>
89
  <tr>
139
  <label><input onclick="jQuery('#typediv_media').show(); jQuery('#typediv_file').hide(); jQuery('#typediv_url').hide();" <?php echo (empty($this -> Slide -> data -> type) || $this -> Slide -> data -> type == "media") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="media" id="Slide.type.media" /> <?php _e('Media Upload', $this -> plugin_name); ?></label>
140
  <label><input onclick="jQuery('#typediv_file').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_url').hide();" <?php echo ($this -> Slide -> data -> type == "file") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="file" id="Slide.type.file" /> <?php _e('Upload File', $this -> plugin_name); ?></label>
141
  <label><input onclick="jQuery('#typediv_url').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_file').hide();" <?php echo ($this -> Slide -> data -> type == "url") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="url" id="Slide.type.url" /> <?php _e('Specify URL', $this -> plugin_name); ?></label>
142
+ <?php echo (!empty($this -> Slide -> errors['type'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['type'] . '</div>' : ''; ?>
143
  <span class="howto"><?php _e('Do you want to upload an image or specify a local/remote image URL?', $this -> plugin_name); ?></span>
144
  </td>
145
  </tr>
156
  <div id="Slide_mediaupload_image">
157
  <!-- image goes here -->
158
  <?php if (!empty($this -> Slide -> data -> image_url)) : ?>
159
+ <a href="<?php echo $this -> Slide -> data -> image_url; ?>" title="<?php echo __($this -> Slide -> data -> title); ?>" class="colorbox"><img class="img-rounded" src="<?php echo $this -> Html -> bfithumb_image_src($this -> Slide -> data -> image_url, 100, 100, 100); ?>" /></a>
160
  <?php endif; ?>
161
  </div>
162
 
197
 
198
  jQuery('#Slide_attachment_id').val(attachment.id);
199
  jQuery('#Slide_image_file').val(attachment.url);
200
+ jQuery('#Slide_mediaupload_image').html('<a href="' + attachment.url + '" class="colorbox" onclick="jQuery.colorbox({href:\'' + attachment.url + '\'}); return false;"><img class="img-rounded" style="width:100px;" src="' + attachment.sizes.thumbnail.url + '" /></a>');
201
  });
202
 
203
  // Finally, open the modal
220
  <td>
221
  <input type="file" name="image_file" value="" id="Slide.image_file" />
222
  <span class="howto"><?php _e('Choose your image file from your computer. JPG, PNG, GIF are supported.', $this -> plugin_name); ?></span>
223
+ <?php echo (!empty($this -> Slide -> errors['image_file'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['image_file'] . '</div>' : ''; ?>
224
 
225
  <?php
226
 
262
  <td>
263
  <input class="widefat" type="text" name="Slide[image_url]" value="<?php echo esc_attr($this -> Slide -> data -> image_url); ?>" id="Slide.image_url" />
264
  <span class="howto"><?php _e('Local or remote image location eg. http://domain.com/path/to/image.jpg', $this -> plugin_name); ?></span>
265
+ <?php echo (!empty($this -> Slide -> errors['image_url'])) ? '<div class="slideshow_error">' . $this -> Slide -> errors['image_url'] . '</div>' : ''; ?>
266
  </td>
267
  </tr>
268
  </tbody>
290
  <th><label for="Slide.link"><?php _e('Link To', $this -> plugin_name); ?></label>
291
  <?php echo $this -> Html -> help(__('The absolute URL to take the user to when the slide is clicked.', $this -> plugin_name)); ?></th>
292
  <td>
293
+ <?php if ($this -> language_do()) : ?>
294
+ <?php $links = $this -> language_split($this -> Slide -> data -> link); ?>
295
+ <div id="slide-link-tabs">
296
+ <ul>
297
+ <?php foreach ($languages as $language) : ?>
298
+ <li><a href="#slide-link-tabs-<?php echo $language; ?>"><?php echo $this -> language_flag($language); ?></a></li>
299
+ <?php endforeach; ?>
300
+ </ul>
301
+ <?php foreach ($languages as $language) : ?>
302
+ <div id="slide-link-tabs-<?php echo $language; ?>">
303
+ <input type="text" name="Slide[link][<?php echo $language; ?>]" id="Slide_link_<?php echo $language; ?>" value="<?php echo esc_attr(stripslashes($links[$language])); ?>" class="widefat" />
304
+ </div>
305
+ <?php endforeach; ?>
306
+ </div>
307
+
308
+ <script type="text/javascript">
309
+ jQuery(document).ready(function() {
310
+ jQuery('#slide-link-tabs').tabs();
311
+ });
312
+ </script>
313
+ <?php else : ?>
314
+ <input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($this -> Slide -> data -> link); ?>" id="Slide.link" />
315
+ <?php endif; ?>
316
+
317
  <span class="howto"><?php _e('Link/URL to go to when a user clicks the slide eg. http://www.domain.com/mypage/', $this -> plugin_name); ?></span>
318
  </td>
319
  </tr>
views/admin/submitserial.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h3><?php _e('Slideshow Gallery Serial Key', $this -> plugin_name); ?></h3>
2
+
3
+ <?php if (empty($success) || $success == false) : ?>
4
+ <?php if (!$this -> ci_serial_valid()) : ?>
5
+ <p style="width:400px;">
6
+ <?php _e('You are running Slideshow Gallery LITE.', $this -> plugin_name); ?>
7
+ <?php echo sprintf(__('To remove limits, you can submit a serial key or %s.'), '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">' . __('Upgrade to PRO', $this -> plugin_name) . '</a>'); ?>
8
+ </p>
9
+ <p style="width:400px;">
10
+ <?php _e('Please obtain a serial key from the downloads section in your Tribulant Software account.', $this -> plugin_name); ?>
11
+ <?php _e('Once in the downloads section, click the KEY icon to request a serial key.', $this -> plugin_name); ?>
12
+ <a href="http://tribulant.com/downloads/" title="Tribulant Software Downloads" target="_blank"><?php _e('Downloads Section', $this -> plugin_name); ?></a>
13
+ </p>
14
+
15
+ <div class="slideshow_error">
16
+ <?php $this -> render('error', array('errors' => $errors), true, 'admin'); ?>
17
+ </div>
18
+
19
+ <form onsubmit="slideshow_submitserial(this); return false;" action="<?php echo admin_url('admin.php?page=' . $this -> sections -> submitserial); ?>" method="post">
20
+ <p>
21
+ <input type="text" class="widefat" style="width:400px;" name="serialkey" value="<?php echo esc_attr(stripslashes($_POST['serialkey'])); ?>" /><br/>
22
+ </p>
23
+ <p class="submit">
24
+ <input type="button" class="button-secondary" name="close" onclick="jQuery.colorbox.close();" value="<?php _e('Cancel', $this -> plugin_name); ?>" />
25
+ <input id="slideshow_submitserial_button" type="submit" class="button-primary" name="submit" value="<?php _e('Submit Serial Key', $this -> plugin_name); ?>" />
26
+ <span style="display:none;" id="slideshow_submitserial_loading"><i class="fa fa-refresh fa-spin fa-fw"></i></span>
27
+ </p>
28
+ </form>
29
+ <?php else : ?>
30
+ <p><?php _e('Serial Key:', $this -> plugin_name); ?> <strong><?php echo $this -> get_option('serialkey'); ?></strong></p>
31
+ <p><?php _e('Your current serial is valid and working.', $this -> plugin_name); ?></p>
32
+ <p>
33
+ <input type="button" onclick="jQuery.colorbox.close();" name="close" class="button-primary" value="<?php _e('Close', $this -> plugin_name); ?>" />
34
+ <input id="slideshow_deleteserial_button" type="button" onclick="if (confirm('<?php _e('Are you sure you want to delete your serial key?', $this -> plugin_name); ?>')) { slideshow_deleteserial(); } return false;" name="delete" class="button-secondary" value="<?php _e('Delete Serial', $this -> plugin_name); ?>" />
35
+ <span style="display:none;" id="slideshow_submitserial_loading"><i class="fa fa-refresh fa-spin fa-fw"></i></span>
36
+ </p>
37
+ <?php endif; ?>
38
+ <?php else : ?>
39
+ <p><?php _e('The serial key is valid and you can now continue using the Slideshow Gallery plugin. Thank you for your business and support!', $this -> plugin_name); ?></p>
40
+ <p><input type="button" onclick="jQuery.colorbox.close(); parent.location = '<?php echo rtrim(get_admin_url(), '/'); ?>/admin.php?page=<?php echo $this -> sections -> slides; ?>';" class="button-primary" name="close" value="<?php _e('Apply Serial and Close Window', $this -> plugin_name); ?>" /></p>
41
+ <?php endif; ?>
views/default/gallery.php CHANGED
@@ -105,7 +105,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
105
  <p><?php echo (!empty($slide -> showinfo) && ($slide -> showinfo == "both" || $slide -> showinfo == "description")) ? __($slide -> description) : ''; ?></p>
106
  <?php if ($options['showthumbs'] == "true") : ?>
107
  <?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
108
- <a href="<?php echo $slide -> link; ?>" title="<?php echo esc_attr(__($slide -> title)); ?>" target="_<?php echo $slide -> linktarget; ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
109
  <?php elseif ($options['imagesoverlay'] == "true") : ?>
110
  <a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="slideshow<?php echo $unique; ?>overlay"<?php endif; ?> target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
111
  <?php else : ?>
@@ -113,7 +113,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
113
  <?php endif; ?>
114
  <?php else : ?>
115
  <?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
116
- <a href="<?php echo $slide -> link; ?>" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
117
  <?php elseif ($options['imagesoverlay'] == "true") : ?>
118
  <a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="slideshow<?php echo $unique; ?>overlay"<?php endif; ?> rel="slideshow<?php echo $unique; ?>overlay" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
119
  <?php else : ?>
105
  <p><?php echo (!empty($slide -> showinfo) && ($slide -> showinfo == "both" || $slide -> showinfo == "description")) ? __($slide -> description) : ''; ?></p>
106
  <?php if ($options['showthumbs'] == "true") : ?>
107
  <?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
108
+ <a href="<?php echo __($slide -> link); ?>" title="<?php echo esc_attr(__($slide -> title)); ?>" target="_<?php echo $slide -> linktarget; ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
109
  <?php elseif ($options['imagesoverlay'] == "true") : ?>
110
  <a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="slideshow<?php echo $unique; ?>overlay"<?php endif; ?> target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"><img src="<?php echo $this -> Html -> bfithumb_image_src($slide -> image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
111
  <?php else : ?>
113
  <?php endif; ?>
114
  <?php else : ?>
115
  <?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
116
+ <a href="<?php echo __($slide -> link); ?>" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
117
  <?php elseif ($options['imagesoverlay'] == "true") : ?>
118
  <a href="<?php echo $slide -> image_path; ?>" id="<?php echo $unique; ?>imglink<?php echo $slide -> id; ?>" <?php if ($this -> Html -> is_image($slide -> image_path)) : ?>class="colorboxslideshow<?php echo $unique; ?>" rel="slideshow<?php echo $unique; ?>overlay"<?php endif; ?> rel="slideshow<?php echo $unique; ?>overlay" target="_<?php echo $slide -> linktarget; ?>" title="<?php echo __($slide -> title); ?>"></a>
119
  <?php else : ?>