Logo Slider - Version 1.4.8

Version Description

  • Adds support for multiple sliders (merging pro features)
  • Images are now stored in media library
  • Fix for filepaths on https
  • Fix for when plugin directory name has been modified
  • CSS precedence improvements
  • jQuery Cycle logging issue fixed
Download this release

Release Info

Developer EnigmaWeb
Plugin Icon 128x128 Logo Slider
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.7 to 1.4.8

includes/css/lsp_style.css ADDED
@@ -0,0 +1,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*=====> Logo slider Pro: Stylesheet <*=====*/
2
+
3
+ .lsp_main_body{
4
+ float: left;
5
+ width: 100%;
6
+ height: auto;
7
+ margin-top: 18px;
8
+ }
9
+ .lsp_left_body{
10
+ float: left;
11
+ width: 82%;
12
+ height: auto;
13
+ }
14
+ .lsp_body_heading{
15
+ background-color: #F1F1F1;
16
+ background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC);
17
+ border-color: #DFDFDF;
18
+ border-style: solid;
19
+ border-top-left-radius: 3px;
20
+ border-top-right-radius: 3px;
21
+ border-width: 1px;
22
+ box-shadow: 0 1px 0 #FFFFFF inset;
23
+ color: #464646;
24
+ cursor: pointer;
25
+ font-size: 13px;
26
+ text-shadow: 0 1px 0 #FFFFFF;
27
+ }
28
+ .lsp_body_heading h3{
29
+ font-family: Arial;
30
+ font-size: 17px;
31
+ font-weight: normal;
32
+ margin: 0;
33
+ overflow: hidden;
34
+ padding: 10px 10px;
35
+ white-space: nowrap;
36
+ cursor: default;
37
+ font-weight:bold;
38
+ }
39
+ .lsp_plugin_body{
40
+ float: left;
41
+ width: 100%;
42
+ height: auto;
43
+ padding-top: 16px;
44
+ background-color: #FFF;
45
+ }
46
+ .lsp_plugin_div{
47
+ float: left;
48
+ width: 97.6%;
49
+ height: auto;
50
+ margin-left: 12px;
51
+ margin-bottom: 12px;
52
+ }
53
+ .lsp_plugin_div label{
54
+ display: inline-block;
55
+ font-family: Arial;
56
+ font-size: 14px;
57
+ font-weight: bold;
58
+ text-align: left;
59
+ cursor: default;
60
+ color:#000;
61
+ }
62
+ .lsp_plugin_div span{
63
+ margin: 0 0 8px;
64
+ font-weight: bold;
65
+ }
66
+ .lsp_settings_div{
67
+ float: left;
68
+ width: 100%;
69
+ height: auto;
70
+ margin-bottom: 14px;
71
+ border-bottom: 1px solid #E8E7E7;
72
+ padding-bottom: 6px;
73
+ }
74
+ .lsp_settings_left{
75
+ float: left;
76
+ width: 30%;
77
+ margin-top: 4px;
78
+ }
79
+ .lsp_settings_left label{
80
+ display: inline-block;
81
+ font-family: Arial;
82
+ font-size: 14px;
83
+ font-weight: bold;
84
+ text-align: left;
85
+ cursor: default;
86
+ color:#000;
87
+ }
88
+ .lsp_settings_right .small_label{
89
+ display: inline-block;
90
+ font-family: Arial;
91
+ font-size: 12px;
92
+ text-align: left;
93
+ cursor: default;
94
+ color:#000;
95
+ letter-spacing: 1px;
96
+ }
97
+ .lsp_left_body .lsp_settings_right .lsp_small_input{
98
+ border: 1px solid #CCC;
99
+ border-radius: 4px;
100
+ -moz-border-radius: 4px;
101
+ -o-border-radius: 4px;
102
+ -web-border-radius: 4px;
103
+ -msie-border-radius: 4px;
104
+ padding-left: 5px;
105
+ margin-right: 2px;
106
+ width: 16%;
107
+ height: 27px;
108
+ font-size: 14px;
109
+ }
110
+ .lsp_settings_right p{
111
+ font-family: Arial;
112
+ font-size: 11px;
113
+ text-align: left;
114
+ cursor: default;
115
+ font-style: italic;
116
+ color:#000;
117
+ margin: 0;
118
+ padding: 0;
119
+ display: inline-block;
120
+ }
121
+ .lsp_settings_right table{
122
+ margin-left: -18px;
123
+ }
124
+ .lsp_settings_right textarea{
125
+ border: 1px solid #CCC;
126
+ border-radius: 4px;
127
+ -moz-border-radius: 4px;
128
+ -o-border-radius: 4px;
129
+ -web-border-radius: 4px;
130
+ -msie-border-radius: 4px;
131
+ padding-left: 5px;
132
+ resize: none;
133
+ width: 94%;
134
+ height: 150px;
135
+ }
136
+ .lsp_left_body .lsp_settings_right select{
137
+ width: 20%;
138
+ height: 29px;
139
+ border: 1px solid #CCC;
140
+ border-radius: 4px;
141
+ -moz-border-radius: 4px;
142
+ -o-border-radius: 4px;
143
+ -web-border-radius: 4px;
144
+ -msie-border-radius: 4px;
145
+ }
146
+ .lsp_left_body input[type="submit"]{
147
+ background: none repeat scroll 0 0 #2EA2CC;
148
+ border: 1px solid #0074A2;
149
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
150
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
151
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
152
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
153
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
154
+ color: #FFFFFF;
155
+ text-decoration: none;
156
+ color: #FFF;
157
+ font-weight: bold;
158
+ padding: 4px 10px;
159
+ border-radius: 5px;
160
+ -moz-border-radius: 5px;
161
+ -web-border-radius: 5px;
162
+ -o-border-radius: 5px;
163
+ -msie-border-radius: 5px;
164
+ font-family: Arial;
165
+ font-size: 13px;
166
+ cursor: pointer;
167
+ float: right;
168
+ }
169
+ .lsp_left_body input[type="submit"]:hover{
170
+ background: none repeat scroll 0 0 #0380AE;
171
+ border: 1px solid #0074A2;
172
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
173
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
174
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
175
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
176
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
177
+ color: #FFFFFF;
178
+ text-decoration: none;
179
+ color: #FFF;
180
+ font-weight: bold;
181
+ padding: 4px 10px;
182
+ border-radius: 5px;
183
+ -moz-border-radius: 5px;
184
+ -web-border-radius: 5px;
185
+ -o-border-radius: 5px;
186
+ -msie-border-radius: 5px;
187
+ font-family: Arial;
188
+ font-size: 13px;
189
+ cursor: pointer;
190
+ float: right;
191
+ }
192
+ .lsp_left_body input[type="text"]{
193
+ border: 1px solid #CCC;
194
+ border-radius: 4px;
195
+ -moz-border-radius: 4px;
196
+ -o-border-radius: 4px;
197
+ -web-border-radius: 4px;
198
+ -msie-border-radius: 4px;
199
+ padding-left: 5px;
200
+ margin-right: 2px;
201
+ width: 100%;
202
+ height: 27px;
203
+ font-size: 14px;
204
+ }
205
+ .lsp_data_body input[type="text"]{
206
+ border: 1px solid #CCC;
207
+ border-radius: 4px;
208
+ -moz-border-radius: 4px;
209
+ -o-border-radius: 4px;
210
+ -web-border-radius: 4px;
211
+ -msie-border-radius: 4px;
212
+ padding-left: 5px;
213
+ margin-right: 2px;
214
+ width: 90%;
215
+ height: 27px;
216
+ font-size: 14px;
217
+ }
218
+ .lsp_left_body select{
219
+ width: 60%;
220
+ height: 29px;
221
+ border: 1px solid #CCC;
222
+ border-radius: 4px;
223
+ -moz-border-radius: 4px;
224
+ -o-border-radius: 4px;
225
+ -web-border-radius: 4px;
226
+ -msie-border-radius: 4px;
227
+ }
228
+ .lsp_settings_right{
229
+ float: right;
230
+ width:68%;
231
+ }
232
+ .lsp_data_body{
233
+ float: left;
234
+ width: 100%;
235
+ height: auto;
236
+ margin-top: 32px;
237
+ }
238
+ .lsp_data_body table{
239
+ background-color: #FFF;
240
+ }
241
+ .lsp_data_body span{
242
+ font-family: Arial;
243
+ font-size: 15px;
244
+ text-align: left;
245
+ font-weight: bold;
246
+ cursor: default;
247
+ color:#000;
248
+ display: inline-block;
249
+ border: 1px solid #CCC;
250
+ border-radius: 4px;
251
+ -moz-border-radius: 4px;
252
+ -o-border-radius: 4px;
253
+ -web-border-radius: 4px;
254
+ -msie-border-radius: 4px;
255
+ width: 98.8%;
256
+ padding: 12px 0 12px 12px;
257
+ }
258
+ .lsp_data_heading{
259
+ border-bottom: 1px solid #d6d5d5;
260
+ color: #222;
261
+ font-size: 15px;
262
+ font-weight: bold;
263
+ padding: 10px 0 10px 6px;
264
+ }
265
+ .lsp_data_footer{
266
+ border-top: 1px solid #d6d5d5;
267
+ color: #222;
268
+ font-size: 15px;
269
+ font-weight: bold;
270
+ padding: 10px 0 10px 6px;
271
+ }
272
+ .lsp_data_text{
273
+ font-size: 13px;
274
+ font-weight: bold;
275
+ color: #222222;
276
+ }
277
+ .lsp_data_text span{
278
+ color: #0380AE;
279
+ font-size: 13px;
280
+ font-weight: bold;
281
+ border: 0px;
282
+ padding: 0px;
283
+ }
284
+ .lsp_readonly{
285
+ width: 94%;
286
+ height: 26px;
287
+ }
288
+
289
+ .lsp_right_body{
290
+ float: right;
291
+ width: 30%;
292
+ height: auto;
293
+ }
294
+
295
+ .lsp_upload_button{
296
+ background: none repeat scroll 0 0 #2EA2CC;
297
+ border: 1px solid #0074A2;
298
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
299
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
300
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
301
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
302
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
303
+ color: #FFFFFF;
304
+ text-decoration: none;
305
+ color: #FFF;
306
+ font-weight: bold;
307
+ padding: 4px 10px;
308
+ border-radius: 5px;
309
+ -moz-border-radius: 5px;
310
+ -web-border-radius: 5px;
311
+ -o-border-radius: 5px;
312
+ -msie-border-radius: 5px;
313
+ font-family: Arial;
314
+ font-size: 13px;
315
+ cursor: pointer;
316
+ }
317
+ .lsp_data_body a img {
318
+ border: 0 none;
319
+ }
320
+ .lsp_data_body a{
321
+ text-decoration: none;
322
+ }
323
+ .lsp_data_body img {
324
+ border: 1px solid #CCC;
325
+ border-radius: 6px;
326
+ padding: 6px;
327
+ }
328
+ .lsp_admin_notification{
329
+ color: #9C9C9C;
330
+ font-size: 12px;
331
+ font-style: italic;
332
+ font-weight: normal !important;
333
+ padding-left: 162px;
334
+ }
335
+ a.lsp_admin_btn{
336
+ background: none repeat scroll 0 0 #2EA2CC;
337
+ border: 1px solid #0074A2;
338
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
339
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
340
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
341
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
342
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
343
+ color: #FFFFFF;
344
+ text-decoration: none;
345
+ color: #FFF;
346
+ font-weight: bold;
347
+ padding: 4px 10px;
348
+ border-radius: 5px;
349
+ -moz-border-radius: 5px;
350
+ -web-border-radius: 5px;
351
+ -o-border-radius: 5px;
352
+ -msie-border-radius: 5px;
353
+ font-family: Arial;
354
+ font-size: 13px;
355
+ }
356
+ a.lsp_admin_btn:hover{
357
+ background: none repeat scroll 0 0 #0380AE;
358
+ border: 1px solid #0074A2;
359
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
360
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
361
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
362
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
363
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
364
+ color: #FFFFFF;
365
+ text-decoration: none;
366
+ color: #FFF;
367
+ font-weight: bold;
368
+ padding: 4px 10px;
369
+ border-radius: 5px;
370
+ -moz-border-radius: 5px;
371
+ -web-border-radius: 5px;
372
+ -o-border-radius: 5px;
373
+ -msie-border-radius: 5px;
374
+ font-family: Arial;
375
+ font-size: 13px;
376
+ }
377
+ a.lsp_admin_del_btn{
378
+ background: none repeat scroll 0 0 #f7f7f7;
379
+ border-color: #ccc;
380
+ box-shadow: 0 1px 0 #fff inset, 0 1px 0 rgba(0, 0, 0, 0.08);
381
+ color: #555;
382
+ vertical-align: top;
383
+ border-radius: 3px;
384
+ border-style: solid;
385
+ border-width: 1px;
386
+ box-sizing: border-box;
387
+ cursor: pointer;
388
+ display: inline-block;
389
+ font-size: 13px;
390
+ height: 28px;
391
+ line-height: 26px;
392
+ margin: 0;
393
+ padding: 0 10px 1px;
394
+ text-decoration: none;
395
+ white-space: nowrap;
396
+ }
397
+ a.lsp_admin_del_btn:hover{
398
+ background: none repeat scroll 0 0 #fafafa;
399
+ border-color: #999;
400
+ color: #222;
401
+ vertical-align: top;
402
+ border-radius: 3px;
403
+ border-style: solid;
404
+ border-width: 1px;
405
+ box-sizing: border-box;
406
+ cursor: pointer;
407
+ display: inline-block;
408
+ font-size: 13px;
409
+ height: 28px;
410
+ line-height: 26px;
411
+ margin: 0;
412
+ padding: 0 10px 1px;
413
+ text-decoration: none;
414
+ white-space: nowrap;
415
+ }
416
+ #lsp_sort_image input[type="submit"]{
417
+ background: none repeat scroll 0 0 #2EA2CC;
418
+ border: 1px solid #0074A2;
419
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
420
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
421
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
422
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
423
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
424
+ color: #FFFFFF;
425
+ text-decoration: none;
426
+ color: #FFF;
427
+ font-weight: bold;
428
+ padding: 4px 10px;
429
+ border-radius: 5px;
430
+ -moz-border-radius: 5px;
431
+ -web-border-radius: 5px;
432
+ -o-border-radius: 5px;
433
+ -msie-border-radius: 5px;
434
+ font-family: Arial;
435
+ font-size: 13px;
436
+ cursor: pointer;
437
+ }
438
+ #lsp_sort_image input[type="submit"]:hover{
439
+ background: none repeat scroll 0 0 #0380AE;
440
+ border: 1px solid #0074A2;
441
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
442
+ -moz-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
443
+ -web-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
444
+ -o-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
445
+ -msie-box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
446
+ color: #FFFFFF;
447
+ text-decoration: none;
448
+ color: #FFF;
449
+ font-weight: bold;
450
+ padding: 4px 10px;
451
+ border-radius: 5px;
452
+ -moz-border-radius: 5px;
453
+ -web-border-radius: 5px;
454
+ -o-border-radius: 5px;
455
+ -msie-border-radius: 5px;
456
+ font-family: Arial;
457
+ font-size: 13px;
458
+ cursor: pointer;
459
+ }
includes/images/icon_delete.png ADDED
Binary file
includes/images/icon_edit.png ADDED
Binary file
includes/images/icon_save.png ADDED
Binary file
includes/images/icon_view.png ADDED
Binary file
includes/images/lsp_icon.png ADDED
Binary file
includes/js/effect.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function ($) {
2
+
3
+
4
+ $(".lsp_next_btn").click(function () {
5
+
6
+ $(".cycle-slideshow").effect("fade", '', 500, callback);
7
+
8
+ function callback() {
9
+
10
+ setTimeout(function(){
11
+ $(".cycle-slideshow").removeAttr("style").hide().fadeIn();
12
+ }, 200);
13
+
14
+ }
15
+
16
+ })
17
+
18
+ });
includes/js/jquery.cycle.all.min.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Logo Slider Plugin (with Transition Definitions)
3
+ * Examples and documentation at: http://jquery.malsup.com/cycle/
4
+ * Copyright (c) 2007-2010 M. Alsup
5
+ * Version: 2.99 (12-MAR-2011)
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://jquery.malsup.com/license.html
8
+ * Requires: jQuery v1.3.2 or later
9
+ */
10
+ (function($){var ver="2.99";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){$.fn.cycle.debug&&log(s);}function log(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "));}$.expr[":"].paused=function(el){return el.cyclePause;};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="none"?0:opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length){opts.after[0].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=0;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing("+fx+"); currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!="none"&&(t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v&&v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=="undefined"){opts.cssBefore.opacity=1;}opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb();});};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,autostop:0,autostopCount:0,backwards:false,before:null,cleartype:!$.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null};})(jQuery);
11
+ /*
12
+ * jQuery Cycle Plugin Transition Definitions
13
+ * This script is a plugin for the jQuery Cycle Plugin
14
+ * Examples and documentation at: http://malsup.com/jquery/cycle/
15
+ * Copyright (c) 2007-2010 M. Alsup
16
+ * Version: 2.73
17
+ * Dual licensed under the MIT and GPL licenses:
18
+ * http://www.opensource.org/licenses/mit-license.php
19
+ * http://www.gnu.org/licenses/gpl.html
20
+ */
21
+ (function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css({display:"block",opacity:1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css("zIndex",opts.slideCount+(!rev===true?1:0));$(next).css("zIndex",opts.slideCount+(!rev===true?0:1));});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display="block";opts.cssAfter.zIndex=0;};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h;};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w;};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0;};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0;};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width="show";opts.animOut.width=0;};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height="show";opts.animOut.height=0;};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev){fwd=!fwd;}var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.height=0;opts.animIn.top=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});$.extend(opts.cssBefore,{top:0,left:0,width:0});opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});$.extend(opts.animOut,{width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2});});opts.cssFirst.top=0;opts.cssFirst.left=0;opts.cssBefore.width=0;opts.cssBefore.height=0;};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});});opts.cssBefore.width=0;opts.cssBefore.height=0;opts.animOut.opacity=0;};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=w;opts.animIn.top=0;opts.animIn.left=0;opts.animOut.top=h;opts.animOut.left=w;};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn.top=0;opts.animIn.height=this.cycleH;opts.animOut.top=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=curr.cycleW/2;opts.animOut.width=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn.top=0;opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH/2;opts.animOut.height=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){$.extend(opts.animOut,{left:w*2,top:-h/2,opacity:0});}else{opts.animOut.opacity=0;}});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.animIn.left=0;};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
includes/js/lsp_colorpicker.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+
2
+ //+++++++++++++_ Color Picker
3
+ jQuery(document).ready(function($){
4
+ $('.cp-field').wpColorPicker();
5
+ });
includes/js/lsp_jquery.cycle2.carousel.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140114 */
2
+ (function(e){"use strict";e(document).on("cycle-bootstrap",function(e,t,i){"carousel"===t.fx&&(i.getSlideIndex=function(e){var t=this.opts()._carouselWrap.children(),i=t.index(e);return i%t.length},i.next=function(){var e=t.reverse?-1:1;t.allowWrap===!1&&t.currSlide+e>t.slideCount-t.carouselVisible||(t.API.advanceSlide(e),t.API.trigger("cycle-next",[t]).log("cycle-next"))})}),e.fn.cycle.transitions.carousel={preInit:function(t){t.hideNonActive=!1,t.container.on("cycle-destroyed",e.proxy(this.onDestroy,t.API)),t.API.stopTransition=this.stopTransition;for(var i=0;t.startingSlide>i;i++)t.container.append(t.slides[0])},postInit:function(t){var i,n,s,o,r=t.carouselVertical;t.carouselVisible&&t.carouselVisible>t.slideCount&&(t.carouselVisible=t.slideCount-1);var l=t.carouselVisible||t.slides.length,c={display:r?"block":"inline-block",position:"static"};if(t.container.css({position:"relative",overflow:"hidden"}),t.slides.css(c),t._currSlide=t.currSlide,o=e('<div class="cycle-carousel-wrap"></div>').prependTo(t.container).css({margin:0,padding:0,top:0,left:0,position:"absolute"}).append(t.slides),t._carouselWrap=o,r||o.css("white-space","normal"),t.allowWrap!==!1){for(n=0;(void 0===t.carouselVisible?2:1)>n;n++){for(i=0;t.slideCount>i;i++)o.append(t.slides[i].cloneNode(!0));for(i=t.slideCount;i--;)o.prepend(t.slides[i].cloneNode(!0))}o.find(".cycle-slide-active").removeClass("cycle-slide-active"),t.slides.eq(t.startingSlide).addClass("cycle-slide-active")}t.pager&&t.allowWrap===!1&&(s=t.slideCount-l,e(t.pager).children().filter(":gt("+s+")").hide()),t._nextBoundry=t.slideCount-t.carouselVisible,this.prepareDimensions(t)},prepareDimensions:function(t){var i,n,s,o,r=t.carouselVertical,l=t.carouselVisible||t.slides.length;if(t.carouselFluid&&t.carouselVisible?t._carouselResizeThrottle||this.fluidSlides(t):t.carouselVisible&&t.carouselSlideDimension?(i=l*t.carouselSlideDimension,t.container[r?"height":"width"](i)):t.carouselVisible&&(i=l*e(t.slides[0])[r?"outerHeight":"outerWidth"](!0),t.container[r?"height":"width"](i)),n=t.carouselOffset||0,t.allowWrap!==!1)if(t.carouselSlideDimension)n-=(t.slideCount+t.currSlide)*t.carouselSlideDimension;else for(s=t._carouselWrap.children(),o=0;t.slideCount+t.currSlide>o;o++)n-=e(s[o])[r?"outerHeight":"outerWidth"](!0);t._carouselWrap.css(r?"top":"left",n)},fluidSlides:function(t){function i(){clearTimeout(s),s=setTimeout(n,20)}function n(){t._carouselWrap.stop(!1,!0);var e=t.container.width()/t.carouselVisible;e=Math.ceil(e-r),t._carouselWrap.children().width(e),t._sentinel&&t._sentinel.width(e),l(t)}var s,o=t.slides.eq(0),r=o.outerWidth()-o.width(),l=this.prepareDimensions;e(window).on("resize",i),t._carouselResizeThrottle=i,n()},transition:function(t,i,n,s,o){var r,l={},c=t.nextSlide-t.currSlide,a=t.carouselVertical,d=t.speed;if(t.allowWrap===!1){s=c>0;var u=t._currSlide,p=t.slideCount-t.carouselVisible;c>0&&t.nextSlide>p&&u==p?c=0:c>0&&t.nextSlide>p?c=t.nextSlide-u-(t.nextSlide-p):0>c&&t.currSlide>p&&t.nextSlide>p?c=0:0>c&&t.currSlide>p?c+=t.currSlide-p:u=t.currSlide,r=this.getScroll(t,a,u,c),t.API.opts()._currSlide=t.nextSlide>p?p:t.nextSlide}else s&&0===t.nextSlide?(r=this.getDim(t,t.currSlide,a),o=this.genCallback(t,s,a,o)):s||t.nextSlide!=t.slideCount-1?r=this.getScroll(t,a,t.currSlide,c):(r=this.getDim(t,t.currSlide,a),o=this.genCallback(t,s,a,o));l[a?"top":"left"]=s?"-="+r:"+="+r,t.throttleSpeed&&(d=r/e(t.slides[0])[a?"height":"width"]()*t.speed),t._carouselWrap.animate(l,d,t.easing,o)},getDim:function(t,i,n){var s=e(t.slides[i]);return s[n?"outerHeight":"outerWidth"](!0)},getScroll:function(e,t,i,n){var s,o=0;if(n>0)for(s=i;i+n>s;s++)o+=this.getDim(e,s,t);else for(s=i;s>i+n;s--)o+=this.getDim(e,s,t);return o},genCallback:function(t,i,n,s){return function(){var i=e(t.slides[t.nextSlide]).position(),o=0-i[n?"top":"left"]+(t.carouselOffset||0);t._carouselWrap.css(t.carouselVertical?"top":"left",o),s()}},stopTransition:function(){var e=this.opts();e.slides.stop(!1,!0),e._carouselWrap.stop(!1,!0)},onDestroy:function(){var t=this.opts();t._carouselResizeThrottle&&e(window).off("resize",t._carouselResizeThrottle),t.slides.prependTo(t.container),t._carouselWrap.remove()}}})(jQuery);
includes/js/lsp_jquery.cycle2.js ADDED
@@ -0,0 +1,1534 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Cycle2; version: 2.1.2 build: 20140216
3
+ * http://jquery.malsup.com/cycle2/
4
+ * Copyright (c) 2014 M. Alsup; Dual licensed: MIT/GPL
5
+ */
6
+
7
+ /* Cycle2 core engine */
8
+ ;(function($) {
9
+ "use strict";
10
+
11
+ var version = '2.1.2';
12
+
13
+ $.fn.cycle = function( options ) {
14
+ // fix mistakes with the ready state
15
+ var o;
16
+ if ( this.length === 0 && !$.isReady ) {
17
+ o = { s: this.selector, c: this.context };
18
+ $.fn.cycle.log('requeuing slideshow (dom not ready)');
19
+ $(function() {
20
+ $( o.s, o.c ).cycle(options);
21
+ });
22
+ return this;
23
+ }
24
+
25
+ return this.each(function() {
26
+ var data, opts, shortName, val;
27
+ var container = $(this);
28
+ var log = $.fn.cycle.log;
29
+
30
+ if ( container.data('cycle.opts') )
31
+ return; // already initialized
32
+
33
+ if ( container.data('cycle-log') === false ||
34
+ ( options && options.log === false ) ||
35
+ ( opts && opts.log === false) ) {
36
+ log = $.noop;
37
+ }
38
+
39
+ //log('--c2 init--');
40
+ data = container.data();
41
+ for (var p in data) {
42
+ // allow props to be accessed sans 'cycle' prefix and log the overrides
43
+ if (data.hasOwnProperty(p) && /^cycle[A-Z]+/.test(p) ) {
44
+ val = data[p];
45
+ shortName = p.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, lowerCase);
46
+ //log(shortName+':', val, '('+typeof val +')');
47
+ data[shortName] = val;
48
+ }
49
+ }
50
+
51
+ opts = $.extend( {}, $.fn.cycle.defaults, data, options || {});
52
+
53
+ opts.timeoutId = 0;
54
+ opts.paused = opts.paused || false; // #57
55
+ opts.container = container;
56
+ opts._maxZ = opts.maxZ;
57
+
58
+ opts.API = $.extend ( { _container: container }, $.fn.cycle.API );
59
+ opts.API.log = log;
60
+ opts.API.trigger = function( eventName, args ) {
61
+ opts.container.trigger( eventName, args );
62
+ return opts.API;
63
+ };
64
+
65
+ container.data( 'cycle.opts', opts );
66
+ container.data( 'cycle.API', opts.API );
67
+
68
+ // opportunity for plugins to modify opts and API
69
+ opts.API.trigger('cycle-bootstrap', [ opts, opts.API ]);
70
+
71
+ opts.API.addInitialSlides();
72
+ opts.API.preInitSlideshow();
73
+
74
+ if ( opts.slides.length )
75
+ opts.API.initSlideshow();
76
+ });
77
+ };
78
+
79
+ $.fn.cycle.API = {
80
+ opts: function() {
81
+ return this._container.data( 'cycle.opts' );
82
+ },
83
+ addInitialSlides: function() {
84
+ var opts = this.opts();
85
+ var slides = opts.slides;
86
+ opts.slideCount = 0;
87
+ opts.slides = $(); // empty set
88
+
89
+ // add slides that already exist
90
+ slides = slides.jquery ? slides : opts.container.find( slides );
91
+
92
+ if ( opts.random ) {
93
+ slides.sort(function() {return Math.random() - 0.5;});
94
+ }
95
+
96
+ opts.API.add( slides );
97
+ },
98
+
99
+ preInitSlideshow: function() {
100
+ var opts = this.opts();
101
+ opts.API.trigger('cycle-pre-initialize', [ opts ]);
102
+ var tx = $.fn.cycle.transitions[opts.fx];
103
+ if (tx && $.isFunction(tx.preInit))
104
+ tx.preInit( opts );
105
+ opts._preInitialized = true;
106
+ },
107
+
108
+ postInitSlideshow: function() {
109
+ var opts = this.opts();
110
+ opts.API.trigger('cycle-post-initialize', [ opts ]);
111
+ var tx = $.fn.cycle.transitions[opts.fx];
112
+ if (tx && $.isFunction(tx.postInit))
113
+ tx.postInit( opts );
114
+ },
115
+
116
+ initSlideshow: function() {
117
+ var opts = this.opts();
118
+ var pauseObj = opts.container;
119
+ var slideOpts;
120
+ opts.API.calcFirstSlide();
121
+
122
+ if ( opts.container.css('position') == 'static' )
123
+ opts.container.css('position', 'relative');
124
+
125
+ $(opts.slides[opts.currSlide]).css({
126
+ opacity: 1,
127
+ display: 'block',
128
+ visibility: 'visible'
129
+ });
130
+ opts.API.stackSlides( opts.slides[opts.currSlide], opts.slides[opts.nextSlide], !opts.reverse );
131
+
132
+ if ( opts.pauseOnHover ) {
133
+ // allow pauseOnHover to specify an element
134
+ if ( opts.pauseOnHover !== true )
135
+ pauseObj = $( opts.pauseOnHover );
136
+
137
+ pauseObj.hover(
138
+ function(){ opts.API.pause( true ); },
139
+ function(){ opts.API.resume( true ); }
140
+ );
141
+ }
142
+
143
+ // stage initial transition
144
+ if ( opts.timeout ) {
145
+ slideOpts = opts.API.getSlideOpts( opts.currSlide );
146
+ opts.API.queueTransition( slideOpts, slideOpts.timeout + opts.delay );
147
+ }
148
+
149
+ opts._initialized = true;
150
+ opts.API.updateView( true );
151
+ opts.API.trigger('cycle-initialized', [ opts ]);
152
+ opts.API.postInitSlideshow();
153
+ },
154
+
155
+ pause: function( hover ) {
156
+ var opts = this.opts(),
157
+ slideOpts = opts.API.getSlideOpts(),
158
+ alreadyPaused = opts.hoverPaused || opts.paused;
159
+
160
+ if ( hover )
161
+ opts.hoverPaused = true;
162
+ else
163
+ opts.paused = true;
164
+
165
+ if ( ! alreadyPaused ) {
166
+ opts.container.addClass('cycle-paused');
167
+ opts.API.trigger('cycle-paused', [ opts ]).log('cycle-paused');
168
+
169
+ if ( slideOpts.timeout ) {
170
+ clearTimeout( opts.timeoutId );
171
+ opts.timeoutId = 0;
172
+
173
+ // determine how much time is left for the current slide
174
+ opts._remainingTimeout -= ( $.now() - opts._lastQueue );
175
+ if ( opts._remainingTimeout < 0 || isNaN(opts._remainingTimeout) )
176
+ opts._remainingTimeout = undefined;
177
+ }
178
+ }
179
+ },
180
+
181
+ resume: function( hover ) {
182
+ var opts = this.opts(),
183
+ alreadyResumed = !opts.hoverPaused && !opts.paused,
184
+ remaining;
185
+
186
+ if ( hover )
187
+ opts.hoverPaused = false;
188
+ else
189
+ opts.paused = false;
190
+
191
+
192
+ if ( ! alreadyResumed ) {
193
+ opts.container.removeClass('cycle-paused');
194
+ // #gh-230; if an animation is in progress then don't queue a new transition; it will
195
+ // happen naturally
196
+ if ( opts.slides.filter(':animated').length === 0 )
197
+ opts.API.queueTransition( opts.API.getSlideOpts(), opts._remainingTimeout );
198
+ opts.API.trigger('cycle-resumed', [ opts, opts._remainingTimeout ] ).log('cycle-resumed');
199
+ }
200
+ },
201
+
202
+ add: function( slides, prepend ) {
203
+ var opts = this.opts();
204
+ var oldSlideCount = opts.slideCount;
205
+ var startSlideshow = false;
206
+ var len;
207
+
208
+ if ( $.type(slides) == 'string')
209
+ slides = $.trim( slides );
210
+
211
+ $( slides ).each(function(i) {
212
+ var slideOpts;
213
+ var slide = $(this);
214
+
215
+ if ( prepend )
216
+ opts.container.prepend( slide );
217
+ else
218
+ opts.container.append( slide );
219
+
220
+ opts.slideCount++;
221
+ slideOpts = opts.API.buildSlideOpts( slide );
222
+
223
+ if ( prepend )
224
+ opts.slides = $( slide ).add( opts.slides );
225
+ else
226
+ opts.slides = opts.slides.add( slide );
227
+
228
+ opts.API.initSlide( slideOpts, slide, --opts._maxZ );
229
+
230
+ slide.data('cycle.opts', slideOpts);
231
+ opts.API.trigger('cycle-slide-added', [ opts, slideOpts, slide ]);
232
+ });
233
+
234
+ opts.API.updateView( true );
235
+
236
+ startSlideshow = opts._preInitialized && (oldSlideCount < 2 && opts.slideCount >= 1);
237
+ if ( startSlideshow ) {
238
+ if ( !opts._initialized )
239
+ opts.API.initSlideshow();
240
+ else if ( opts.timeout ) {
241
+ len = opts.slides.length;
242
+ opts.nextSlide = opts.reverse ? len - 1 : 1;
243
+ if ( !opts.timeoutId ) {
244
+ opts.API.queueTransition( opts );
245
+ }
246
+ }
247
+ }
248
+ },
249
+
250
+ calcFirstSlide: function() {
251
+ var opts = this.opts();
252
+ var firstSlideIndex;
253
+ firstSlideIndex = parseInt( opts.startingSlide || 0, 10 );
254
+ if (firstSlideIndex >= opts.slides.length || firstSlideIndex < 0)
255
+ firstSlideIndex = 0;
256
+
257
+ opts.currSlide = firstSlideIndex;
258
+ if ( opts.reverse ) {
259
+ opts.nextSlide = firstSlideIndex - 1;
260
+ if (opts.nextSlide < 0)
261
+ opts.nextSlide = opts.slides.length - 1;
262
+ }
263
+ else {
264
+ opts.nextSlide = firstSlideIndex + 1;
265
+ if (opts.nextSlide == opts.slides.length)
266
+ opts.nextSlide = 0;
267
+ }
268
+ },
269
+
270
+ calcNextSlide: function() {
271
+ var opts = this.opts();
272
+ var roll;
273
+ if ( opts.reverse ) {
274
+ roll = (opts.nextSlide - 1) < 0;
275
+ opts.nextSlide = roll ? opts.slideCount - 1 : opts.nextSlide-1;
276
+ opts.currSlide = roll ? 0 : opts.nextSlide+1;
277
+ }
278
+ else {
279
+ roll = (opts.nextSlide + 1) == opts.slides.length;
280
+ opts.nextSlide = roll ? 0 : opts.nextSlide+1;
281
+ opts.currSlide = roll ? opts.slides.length-1 : opts.nextSlide-1;
282
+ }
283
+ },
284
+
285
+ calcTx: function( slideOpts, manual ) {
286
+ var opts = slideOpts;
287
+ var tx;
288
+ if ( manual && opts.manualFx )
289
+ tx = $.fn.cycle.transitions[opts.manualFx];
290
+ if ( !tx )
291
+ tx = $.fn.cycle.transitions[opts.fx];
292
+
293
+ if (!tx) {
294
+ tx = $.fn.cycle.transitions.fade;
295
+ opts.API.log('Transition "' + opts.fx + '" not found. Using fade.');
296
+ }
297
+ return tx;
298
+ },
299
+
300
+ prepareTx: function( manual, fwd ) {
301
+ var opts = this.opts();
302
+ var after, curr, next, slideOpts, tx;
303
+
304
+ if ( opts.slideCount < 2 ) {
305
+ opts.timeoutId = 0;
306
+ return;
307
+ }
308
+ if ( manual && ( !opts.busy || opts.manualTrump ) ) {
309
+ opts.API.stopTransition();
310
+ opts.busy = false;
311
+ clearTimeout(opts.timeoutId);
312
+ opts.timeoutId = 0;
313
+ }
314
+ if ( opts.busy )
315
+ return;
316
+ if ( opts.timeoutId === 0 && !manual )
317
+ return;
318
+
319
+ curr = opts.slides[opts.currSlide];
320
+ next = opts.slides[opts.nextSlide];
321
+ slideOpts = opts.API.getSlideOpts( opts.nextSlide );
322
+ tx = opts.API.calcTx( slideOpts, manual );
323
+
324
+ opts._tx = tx;
325
+
326
+ if ( manual && slideOpts.manualSpeed !== undefined )
327
+ slideOpts.speed = slideOpts.manualSpeed;
328
+
329
+ // if ( opts.nextSlide === opts.currSlide )
330
+ // opts.API.calcNextSlide();
331
+
332
+ // ensure that:
333
+ // 1. advancing to a different slide
334
+ // 2. this is either a manual event (prev/next, pager, cmd) or
335
+ // a timer event and slideshow is not paused
336
+ if ( opts.nextSlide != opts.currSlide &&
337
+ (manual || (!opts.paused && !opts.hoverPaused && opts.timeout) )) { // #62
338
+
339
+ opts.API.trigger('cycle-before', [ slideOpts, curr, next, fwd ]);
340
+ if ( tx.before )
341
+ tx.before( slideOpts, curr, next, fwd );
342
+
343
+ after = function() {
344
+ opts.busy = false;
345
+ // #76; bail if slideshow has been destroyed
346
+ if (! opts.container.data( 'cycle.opts' ) )
347
+ return;
348
+
349
+ if (tx.after)
350
+ tx.after( slideOpts, curr, next, fwd );
351
+ opts.API.trigger('cycle-after', [ slideOpts, curr, next, fwd ]);
352
+ opts.API.queueTransition( slideOpts);
353
+ opts.API.updateView( true );
354
+ };
355
+
356
+ opts.busy = true;
357
+ if (tx.transition)
358
+ tx.transition(slideOpts, curr, next, fwd, after);
359
+ else
360
+ opts.API.doTransition( slideOpts, curr, next, fwd, after);
361
+
362
+ opts.API.calcNextSlide();
363
+ opts.API.updateView();
364
+ } else {
365
+ opts.API.queueTransition( slideOpts );
366
+ }
367
+ },
368
+
369
+ // perform the actual animation
370
+ doTransition: function( slideOpts, currEl, nextEl, fwd, callback) {
371
+ var opts = slideOpts;
372
+ var curr = $(currEl), next = $(nextEl);
373
+ var fn = function() {
374
+ // make sure animIn has something so that callback doesn't trigger immediately
375
+ next.animate(opts.animIn || { opacity: 1}, opts.speed, opts.easeIn || opts.easing, callback);
376
+ };
377
+
378
+ next.css(opts.cssBefore || {});
379
+ curr.animate(opts.animOut || {}, opts.speed, opts.easeOut || opts.easing, function() {
380
+ curr.css(opts.cssAfter || {});
381
+ if (!opts.sync) {
382
+ fn();
383
+ }
384
+ });
385
+ if (opts.sync) {
386
+ fn();
387
+ }
388
+ },
389
+
390
+ queueTransition: function( slideOpts, specificTimeout ) {
391
+ var opts = this.opts();
392
+ var timeout = specificTimeout !== undefined ? specificTimeout : slideOpts.timeout;
393
+ if (opts.nextSlide === 0 && --opts.loop === 0) {
394
+ opts.API.log('terminating; loop=0');
395
+ opts.timeout = 0;
396
+ if ( timeout ) {
397
+ setTimeout(function() {
398
+ opts.API.trigger('cycle-finished', [ opts ]);
399
+ }, timeout);
400
+ }
401
+ else {
402
+ opts.API.trigger('cycle-finished', [ opts ]);
403
+ }
404
+ // reset nextSlide
405
+ opts.nextSlide = opts.currSlide;
406
+ return;
407
+ }
408
+ if ( opts.continueAuto !== undefined ) {
409
+ if ( opts.continueAuto === false ||
410
+ ($.isFunction(opts.continueAuto) && opts.continueAuto() === false )) {
411
+ opts.API.log('terminating automatic transitions');
412
+ opts.timeout = 0;
413
+ if ( opts.timeoutId )
414
+ clearTimeout(opts.timeoutId);
415
+ return;
416
+ }
417
+ }
418
+ if ( timeout ) {
419
+ opts._lastQueue = $.now();
420
+ if ( specificTimeout === undefined )
421
+ opts._remainingTimeout = slideOpts.timeout;
422
+
423
+ if ( !opts.paused && ! opts.hoverPaused ) {
424
+ opts.timeoutId = setTimeout(function() {
425
+ opts.API.prepareTx( false, !opts.reverse );
426
+ }, timeout );
427
+ }
428
+ }
429
+ },
430
+
431
+ stopTransition: function() {
432
+ var opts = this.opts();
433
+ if ( opts.slides.filter(':animated').length ) {
434
+ opts.slides.stop(false, true);
435
+ opts.API.trigger('cycle-transition-stopped', [ opts ]);
436
+ }
437
+
438
+ if ( opts._tx && opts._tx.stopTransition )
439
+ opts._tx.stopTransition( opts );
440
+ },
441
+
442
+ // advance slide forward or back
443
+ advanceSlide: function( val ) {
444
+ var opts = this.opts();
445
+ clearTimeout(opts.timeoutId);
446
+ opts.timeoutId = 0;
447
+ opts.nextSlide = opts.currSlide + val;
448
+
449
+ if (opts.nextSlide < 0)
450
+ opts.nextSlide = opts.slides.length - 1;
451
+ else if (opts.nextSlide >= opts.slides.length)
452
+ opts.nextSlide = 0;
453
+
454
+ opts.API.prepareTx( true, val >= 0 );
455
+ return false;
456
+ },
457
+
458
+ buildSlideOpts: function( slide ) {
459
+ var opts = this.opts();
460
+ var val, shortName;
461
+ var slideOpts = slide.data() || {};
462
+ for (var p in slideOpts) {
463
+ // allow props to be accessed sans 'cycle' prefix and log the overrides
464
+ if (slideOpts.hasOwnProperty(p) && /^cycle[A-Z]+/.test(p) ) {
465
+ val = slideOpts[p];
466
+ shortName = p.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, lowerCase);
467
+ opts.API.log('['+(opts.slideCount-1)+']', shortName+':', val, '('+typeof val +')');
468
+ slideOpts[shortName] = val;
469
+ }
470
+ }
471
+
472
+ slideOpts = $.extend( {}, $.fn.cycle.defaults, opts, slideOpts );
473
+ slideOpts.slideNum = opts.slideCount;
474
+
475
+ try {
476
+ // these props should always be read from the master state object
477
+ delete slideOpts.API;
478
+ delete slideOpts.slideCount;
479
+
480
+ delete slideOpts.currSlide;
481
+ delete slideOpts.nextSlide;
482
+ delete slideOpts.slides;
483
+ } catch(e) {
484
+ // no op
485
+ }
486
+ return slideOpts;
487
+ },
488
+
489
+ getSlideOpts: function( index ) {
490
+ var opts = this.opts();
491
+ if ( index === undefined )
492
+ index = opts.currSlide;
493
+
494
+ var slide = opts.slides[index];
495
+ var slideOpts = $(slide).data('cycle.opts');
496
+ return $.extend( {}, opts, slideOpts );
497
+ },
498
+
499
+ initSlide: function( slideOpts, slide, suggestedZindex ) {
500
+ var opts = this.opts();
501
+ slide.css( slideOpts.slideCss || {} );
502
+ if ( suggestedZindex > 0 )
503
+ slide.css( 'zIndex', suggestedZindex );
504
+
505
+ // ensure that speed settings are sane
506
+ if ( isNaN( slideOpts.speed ) )
507
+ slideOpts.speed = $.fx.speeds[slideOpts.speed] || $.fx.speeds._default;
508
+ if ( !slideOpts.sync )
509
+ slideOpts.speed = slideOpts.speed / 2;
510
+
511
+ slide.addClass( opts.slideClass );
512
+ },
513
+
514
+ updateView: function( isAfter, isDuring, forceEvent ) {
515
+ var opts = this.opts();
516
+ if ( !opts._initialized )
517
+ return;
518
+ var slideOpts = opts.API.getSlideOpts();
519
+ var currSlide = opts.slides[ opts.currSlide ];
520
+
521
+ if ( ! isAfter && isDuring !== true ) {
522
+ opts.API.trigger('cycle-update-view-before', [ opts, slideOpts, currSlide ]);
523
+ if ( opts.updateView < 0 )
524
+ return;
525
+ }
526
+
527
+ if ( opts.slideActiveClass ) {
528
+ opts.slides.removeClass( opts.slideActiveClass )
529
+ .eq( opts.currSlide ).addClass( opts.slideActiveClass );
530
+ }
531
+
532
+ if ( isAfter && opts.hideNonActive )
533
+ opts.slides.filter( ':not(.' + opts.slideActiveClass + ')' ).css('visibility', 'hidden');
534
+
535
+ if ( opts.updateView === 0 ) {
536
+ setTimeout(function() {
537
+ opts.API.trigger('cycle-update-view', [ opts, slideOpts, currSlide, isAfter ]);
538
+ }, slideOpts.speed / (opts.sync ? 2 : 1) );
539
+ }
540
+
541
+ if ( opts.updateView !== 0 )
542
+ opts.API.trigger('cycle-update-view', [ opts, slideOpts, currSlide, isAfter ]);
543
+
544
+ if ( isAfter )
545
+ opts.API.trigger('cycle-update-view-after', [ opts, slideOpts, currSlide ]);
546
+ },
547
+
548
+ getComponent: function( name ) {
549
+ var opts = this.opts();
550
+ var selector = opts[name];
551
+ if (typeof selector === 'string') {
552
+ // if selector is a child, sibling combinator, adjancent selector then use find, otherwise query full dom
553
+ return (/^\s*[\>|\+|~]/).test( selector ) ? opts.container.find( selector ) : $( selector );
554
+ }
555
+ if (selector.jquery)
556
+ return selector;
557
+
558
+ return $(selector);
559
+ },
560
+
561
+ stackSlides: function( curr, next, fwd ) {
562
+ var opts = this.opts();
563
+ if ( !curr ) {
564
+ curr = opts.slides[opts.currSlide];
565
+ next = opts.slides[opts.nextSlide];
566
+ fwd = !opts.reverse;
567
+ }
568
+
569
+ // reset the zIndex for the common case:
570
+ // curr slide on top, next slide beneath, and the rest in order to be shown
571
+ $(curr).css('zIndex', opts.maxZ);
572
+
573
+ var i;
574
+ var z = opts.maxZ - 2;
575
+ var len = opts.slideCount;
576
+ if (fwd) {
577
+ for ( i = opts.currSlide + 1; i < len; i++ )
578
+ $( opts.slides[i] ).css( 'zIndex', z-- );
579
+ for ( i = 0; i < opts.currSlide; i++ )
580
+ $( opts.slides[i] ).css( 'zIndex', z-- );
581
+ }
582
+ else {
583
+ for ( i = opts.currSlide - 1; i >= 0; i-- )
584
+ $( opts.slides[i] ).css( 'zIndex', z-- );
585
+ for ( i = len - 1; i > opts.currSlide; i-- )
586
+ $( opts.slides[i] ).css( 'zIndex', z-- );
587
+ }
588
+
589
+ $(next).css('zIndex', opts.maxZ - 1);
590
+ },
591
+
592
+ getSlideIndex: function( el ) {
593
+ return this.opts().slides.index( el );
594
+ }
595
+
596
+ }; // API
597
+
598
+ // default logger
599
+ // $.fn.cycle.log = function log() {
600
+ // /*global console:true */
601
+ // if (window.console && console.log)
602
+ // console.log('[cycle2] ' + Array.prototype.join.call(arguments, ' ') );
603
+ // };
604
+
605
+ $.fn.cycle.version = function() { return 'Cycle2: ' + version; };
606
+
607
+ // helper functions
608
+
609
+ function lowerCase(s) {
610
+ return (s || '').toLowerCase();
611
+ }
612
+
613
+ // expose transition object
614
+ $.fn.cycle.transitions = {
615
+ custom: {
616
+ },
617
+ none: {
618
+ before: function( opts, curr, next, fwd ) {
619
+ opts.API.stackSlides( next, curr, fwd );
620
+ opts.cssBefore = { opacity: 1, visibility: 'visible', display: 'block' };
621
+ }
622
+ },
623
+ fade: {
624
+ before: function( opts, curr, next, fwd ) {
625
+ var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {};
626
+ opts.API.stackSlides( curr, next, fwd );
627
+ opts.cssBefore = $.extend(css, { opacity: 0, visibility: 'visible', display: 'block' });
628
+ opts.animIn = { opacity: 1 };
629
+ opts.animOut = { opacity: 0 };
630
+ }
631
+ },
632
+ fadeout: {
633
+ before: function( opts , curr, next, fwd ) {
634
+ var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {};
635
+ opts.API.stackSlides( curr, next, fwd );
636
+ opts.cssBefore = $.extend(css, { opacity: 1, visibility: 'visible', display: 'block' });
637
+ opts.animOut = { opacity: 0 };
638
+ }
639
+ },
640
+ scrollHorz: {
641
+ before: function( opts, curr, next, fwd ) {
642
+ opts.API.stackSlides( curr, next, fwd );
643
+ var w = opts.container.css('overflow','hidden').width();
644
+ opts.cssBefore = { left: fwd ? w : - w, top: 0, opacity: 1, visibility: 'visible', display: 'block' };
645
+ opts.cssAfter = { zIndex: opts._maxZ - 2, left: 0 };
646
+ opts.animIn = { left: 0 };
647
+ opts.animOut = { left: fwd ? -w : w };
648
+ }
649
+ }
650
+ };
651
+
652
+ // @see: http://jquery.malsup.com/cycle2/api
653
+ $.fn.cycle.defaults = {
654
+ allowWrap: true,
655
+ autoSelector: '.cycle-slideshow[data-cycle-auto-init!=false]',
656
+ delay: 0,
657
+ easing: null,
658
+ fx: 'fade',
659
+ hideNonActive: true,
660
+ loop: 0,
661
+ manualFx: undefined,
662
+ manualSpeed: undefined,
663
+ manualTrump: true,
664
+ maxZ: 100,
665
+ pauseOnHover: false,
666
+ reverse: false,
667
+ slideActiveClass: 'cycle-slide-active',
668
+ slideClass: 'cycle-slide',
669
+ slideCss: { position: 'absolute', top: 0, left: 0 },
670
+ slides: '> img',
671
+ speed: 500,
672
+ startingSlide: 0,
673
+ sync: true,
674
+ timeout: 4000,
675
+ updateView: 0
676
+ };
677
+
678
+ // automatically find and run slideshows
679
+ $(document).ready(function() {
680
+ $( $.fn.cycle.defaults.autoSelector ).cycle();
681
+ });
682
+
683
+ })(jQuery);
684
+
685
+ /*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130913 */
686
+ (function($) {
687
+ "use strict";
688
+
689
+ $.extend($.fn.cycle.defaults, {
690
+ autoHeight: 0, // setting this option to false disables autoHeight logic
691
+ autoHeightSpeed: 250,
692
+ autoHeightEasing: null
693
+ });
694
+
695
+ $(document).on( 'cycle-initialized', function( e, opts ) {
696
+ var autoHeight = opts.autoHeight;
697
+ var t = $.type( autoHeight );
698
+ var resizeThrottle = null;
699
+ var ratio;
700
+
701
+ if ( t !== 'string' && t !== 'number' )
702
+ return;
703
+
704
+ // bind events
705
+ opts.container.on( 'cycle-slide-added cycle-slide-removed', initAutoHeight );
706
+ opts.container.on( 'cycle-destroyed', onDestroy );
707
+
708
+ if ( autoHeight == 'container' ) {
709
+ opts.container.on( 'cycle-before', onBefore );
710
+ }
711
+ else if ( t === 'string' && /\d+\:\d+/.test( autoHeight ) ) {
712
+ // use ratio
713
+ ratio = autoHeight.match(/(\d+)\:(\d+)/);
714
+ ratio = ratio[1] / ratio[2];
715
+ opts._autoHeightRatio = ratio;
716
+ }
717
+
718
+ // if autoHeight is a number then we don't need to recalculate the sentinel
719
+ // index on resize
720
+ if ( t !== 'number' ) {
721
+ // bind unique resize handler per slideshow (so it can be 'off-ed' in onDestroy)
722
+ opts._autoHeightOnResize = function () {
723
+ clearTimeout( resizeThrottle );
724
+ resizeThrottle = setTimeout( onResize, 50 );
725
+ };
726
+
727
+ $(window).on( 'resize orientationchange', opts._autoHeightOnResize );
728
+ }
729
+
730
+ setTimeout( onResize, 30 );
731
+
732
+ function onResize() {
733
+ initAutoHeight( e, opts );
734
+ }
735
+ });
736
+
737
+ function initAutoHeight( e, opts ) {
738
+ var clone, height, sentinelIndex;
739
+ var autoHeight = opts.autoHeight;
740
+
741
+ if ( autoHeight == 'container' ) {
742
+ height = $( opts.slides[ opts.currSlide ] ).outerHeight();
743
+ opts.container.height( height );
744
+ }
745
+ else if ( opts._autoHeightRatio ) {
746
+ opts.container.height( opts.container.width() / opts._autoHeightRatio );
747
+ }
748
+ else if ( autoHeight === 'calc' || ( $.type( autoHeight ) == 'number' && autoHeight >= 0 ) ) {
749
+ if ( autoHeight === 'calc' )
750
+ sentinelIndex = calcSentinelIndex( e, opts );
751
+ else if ( autoHeight >= opts.slides.length )
752
+ sentinelIndex = 0;
753
+ else
754
+ sentinelIndex = autoHeight;
755
+
756
+ // only recreate sentinel if index is different
757
+ if ( sentinelIndex == opts._sentinelIndex )
758
+ return;
759
+
760
+ opts._sentinelIndex = sentinelIndex;
761
+ if ( opts._sentinel )
762
+ opts._sentinel.remove();
763
+
764
+ // clone existing slide as sentinel
765
+ clone = $( opts.slides[ sentinelIndex ].cloneNode(true) );
766
+
767
+ // #50; remove special attributes from cloned content
768
+ clone.removeAttr( 'id name rel' ).find( '[id],[name],[rel]' ).removeAttr( 'id name rel' );
769
+
770
+ clone.css({
771
+ position: 'static',
772
+ visibility: 'hidden',
773
+ display: 'block'
774
+ }).prependTo( opts.container ).addClass('cycle-sentinel cycle-slide').removeClass('cycle-slide-active');
775
+ clone.find( '*' ).css( 'visibility', 'hidden' );
776
+
777
+ opts._sentinel = clone;
778
+ }
779
+ }
780
+
781
+ function calcSentinelIndex( e, opts ) {
782
+ var index = 0, max = -1;
783
+
784
+ // calculate tallest slide index
785
+ opts.slides.each(function(i) {
786
+ var h = $(this).height();
787
+ if ( h > max ) {
788
+ max = h;
789
+ index = i;
790
+ }
791
+ });
792
+ return index;
793
+ }
794
+
795
+ function onBefore( e, opts, outgoing, incoming, forward ) {
796
+ var h = $(incoming).outerHeight();
797
+ opts.container.animate( { height: h }, opts.autoHeightSpeed, opts.autoHeightEasing );
798
+ }
799
+
800
+ function onDestroy( e, opts ) {
801
+ if ( opts._autoHeightOnResize ) {
802
+ $(window).off( 'resize orientationchange', opts._autoHeightOnResize );
803
+ opts._autoHeightOnResize = null;
804
+ }
805
+ opts.container.off( 'cycle-slide-added cycle-slide-removed', initAutoHeight );
806
+ opts.container.off( 'cycle-destroyed', onDestroy );
807
+ opts.container.off( 'cycle-before', onBefore );
808
+
809
+ if ( opts._sentinel ) {
810
+ opts._sentinel.remove();
811
+ opts._sentinel = null;
812
+ }
813
+ }
814
+
815
+ })(jQuery);
816
+
817
+ /*! caption plugin for Cycle2; version: 20130306 */
818
+ (function($) {
819
+ "use strict";
820
+
821
+ $.extend($.fn.cycle.defaults, {
822
+ caption: '> .cycle-caption',
823
+ captionTemplate: '{{slideNum}} / {{slideCount}}',
824
+ overlay: '> .cycle-overlay',
825
+ overlayTemplate: '<div>{{title}}</div><div>{{desc}}</div>',
826
+ captionModule: 'caption'
827
+ });
828
+
829
+ $(document).on( 'cycle-update-view', function( e, opts, slideOpts, currSlide ) {
830
+ if ( opts.captionModule !== 'caption' )
831
+ return;
832
+ var el;
833
+ $.each(['caption','overlay'], function() {
834
+ var name = this;
835
+ var template = slideOpts[name+'Template'];
836
+ var el = opts.API.getComponent( name );
837
+ if( el.length && template ) {
838
+ el.html( opts.API.tmpl( template, slideOpts, opts, currSlide ) );
839
+ el.show();
840
+ }
841
+ else {
842
+ el.hide();
843
+ }
844
+ });
845
+ });
846
+
847
+ $(document).on( 'cycle-destroyed', function( e, opts ) {
848
+ var el;
849
+ $.each(['caption','overlay'], function() {
850
+ var name = this, template = opts[name+'Template'];
851
+ if ( opts[name] && template ) {
852
+ el = opts.API.getComponent( 'caption' );
853
+ el.empty();
854
+ }
855
+ });
856
+ });
857
+
858
+ })(jQuery);
859
+
860
+ /*! command plugin for Cycle2; version: 20130707 */
861
+ (function($) {
862
+ "use strict";
863
+
864
+ var c2 = $.fn.cycle;
865
+
866
+ $.fn.cycle = function( options ) {
867
+ var cmd, cmdFn, opts;
868
+ var args = $.makeArray( arguments );
869
+
870
+ if ( $.type( options ) == 'number' ) {
871
+ return this.cycle( 'goto', options );
872
+ }
873
+
874
+ if ( $.type( options ) == 'string' ) {
875
+ return this.each(function() {
876
+ var cmdArgs;
877
+ cmd = options;
878
+ opts = $(this).data('cycle.opts');
879
+
880
+ if ( opts === undefined ) {
881
+ c2.log('slideshow must be initialized before sending commands; "' + cmd + '" ignored');
882
+ return;
883
+ }
884
+ else {
885
+ cmd = cmd == 'goto' ? 'jump' : cmd; // issue #3; change 'goto' to 'jump' internally
886
+ cmdFn = opts.API[ cmd ];
887
+ if ( $.isFunction( cmdFn )) {
888
+ cmdArgs = $.makeArray( args );
889
+ cmdArgs.shift();
890
+ return cmdFn.apply( opts.API, cmdArgs );
891
+ }
892
+ else {
893
+ c2.log( 'unknown command: ', cmd );
894
+ }
895
+ }
896
+ });
897
+ }
898
+ else {
899
+ return c2.apply( this, arguments );
900
+ }
901
+ };
902
+
903
+ // copy props
904
+ $.extend( $.fn.cycle, c2 );
905
+
906
+ $.extend( c2.API, {
907
+ next: function() {
908
+ var opts = this.opts();
909
+ if ( opts.busy && ! opts.manualTrump )
910
+ return;
911
+
912
+ var count = opts.reverse ? -1 : 1;
913
+ if ( opts.allowWrap === false && ( opts.currSlide + count ) >= opts.slideCount )
914
+ return;
915
+
916
+ opts.API.advanceSlide( count );
917
+ //opts.API.trigger('cycle-next', [ opts ]).log('cycle-next');
918
+ },
919
+
920
+ prev: function() {
921
+ var opts = this.opts();
922
+ if ( opts.busy && ! opts.manualTrump )
923
+ return;
924
+ var count = opts.reverse ? 1 : -1;
925
+ if ( opts.allowWrap === false && ( opts.currSlide + count ) < 0 )
926
+ return;
927
+
928
+ opts.API.advanceSlide( count );
929
+ //opts.API.trigger('cycle-prev', [ opts ]).log('cycle-prev');
930
+ },
931
+
932
+ destroy: function() {
933
+ this.stop(); //#204
934
+
935
+ var opts = this.opts();
936
+ var clean = $.isFunction( $._data ) ? $._data : $.noop; // hack for #184 and #201
937
+ clearTimeout(opts.timeoutId);
938
+ opts.timeoutId = 0;
939
+ opts.API.stop();
940
+ opts.API.trigger( 'cycle-destroyed', [ opts ] ).log('cycle-destroyed');
941
+ opts.container.removeData();
942
+ clean( opts.container[0], 'parsedAttrs', false );
943
+
944
+ // #75; remove inline styles
945
+ if ( ! opts.retainStylesOnDestroy ) {
946
+ opts.container.removeAttr( 'style' );
947
+ opts.slides.removeAttr( 'style' );
948
+ opts.slides.removeClass( opts.slideActiveClass );
949
+ }
950
+ opts.slides.each(function() {
951
+ $(this).removeData();
952
+ clean( this, 'parsedAttrs', false );
953
+ });
954
+ },
955
+
956
+ jump: function( index ) {
957
+ // go to the requested slide
958
+ var fwd;
959
+ var opts = this.opts();
960
+ if ( opts.busy && ! opts.manualTrump )
961
+ return;
962
+ var num = parseInt( index, 10 );
963
+ if (isNaN(num) || num < 0 || num >= opts.slides.length) {
964
+ opts.API.log('goto: invalid slide index: ' + num);
965
+ return;
966
+ }
967
+ if (num == opts.currSlide) {
968
+ opts.API.log('goto: skipping, already on slide', num);
969
+ return;
970
+ }
971
+ opts.nextSlide = num;
972
+ clearTimeout(opts.timeoutId);
973
+ opts.timeoutId = 0;
974
+ opts.API.log('goto: ', num, ' (zero-index)');
975
+ fwd = opts.currSlide < opts.nextSlide;
976
+ opts.API.prepareTx( true, fwd );
977
+ },
978
+
979
+ stop: function() {
980
+ var opts = this.opts();
981
+ var pauseObj = opts.container;
982
+ clearTimeout(opts.timeoutId);
983
+ opts.timeoutId = 0;
984
+ opts.API.stopTransition();
985
+ if ( opts.pauseOnHover ) {
986
+ if ( opts.pauseOnHover !== true )
987
+ pauseObj = $( opts.pauseOnHover );
988
+ pauseObj.off('mouseenter mouseleave');
989
+ }
990
+ opts.API.trigger('cycle-stopped', [ opts ]).log('cycle-stopped');
991
+ },
992
+
993
+ reinit: function() {
994
+ var opts = this.opts();
995
+ opts.API.destroy();
996
+ opts.container.cycle();
997
+ },
998
+
999
+ remove: function( index ) {
1000
+ var opts = this.opts();
1001
+ var slide, slideToRemove, slides = [], slideNum = 1;
1002
+ for ( var i=0; i < opts.slides.length; i++ ) {
1003
+ slide = opts.slides[i];
1004
+ if ( i == index ) {
1005
+ slideToRemove = slide;
1006
+ }
1007
+ else {
1008
+ slides.push( slide );
1009
+ $( slide ).data('cycle.opts').slideNum = slideNum;
1010
+ slideNum++;
1011
+ }
1012
+ }
1013
+ if ( slideToRemove ) {
1014
+ opts.slides = $( slides );
1015
+ opts.slideCount--;
1016
+ $( slideToRemove ).remove();
1017
+ if (index == opts.currSlide)
1018
+ opts.API.advanceSlide( 1 );
1019
+ else if ( index < opts.currSlide )
1020
+ opts.currSlide--;
1021
+ else
1022
+ opts.currSlide++;
1023
+
1024
+ opts.API.trigger('cycle-slide-removed', [ opts, index, slideToRemove ]).log('cycle-slide-removed');
1025
+ opts.API.updateView();
1026
+ }
1027
+ }
1028
+
1029
+ });
1030
+
1031
+ // listen for clicks on elements with data-cycle-cmd attribute
1032
+ $(document).on('click.cycle', '[data-cycle-cmd]', function(e) {
1033
+ // issue cycle command
1034
+ e.preventDefault();
1035
+ var el = $(this);
1036
+ var command = el.data('cycle-cmd');
1037
+ var context = el.data('cycle-context') || '.cycle-slideshow';
1038
+ $(context).cycle(command, el.data('cycle-arg'));
1039
+ });
1040
+
1041
+
1042
+ })(jQuery);
1043
+
1044
+ /*! hash plugin for Cycle2; version: 20130905 */
1045
+ (function($) {
1046
+ "use strict";
1047
+
1048
+ $(document).on( 'cycle-pre-initialize', function( e, opts ) {
1049
+ onHashChange( opts, true );
1050
+
1051
+ opts._onHashChange = function() {
1052
+ onHashChange( opts, false );
1053
+ };
1054
+
1055
+ $( window ).on( 'hashchange', opts._onHashChange);
1056
+ });
1057
+
1058
+ $(document).on( 'cycle-update-view', function( e, opts, slideOpts ) {
1059
+ if ( slideOpts.hash && ( '#' + slideOpts.hash ) != window.location.hash ) {
1060
+ opts._hashFence = true;
1061
+ window.location.hash = slideOpts.hash;
1062
+ }
1063
+ });
1064
+
1065
+ $(document).on( 'cycle-destroyed', function( e, opts) {
1066
+ if ( opts._onHashChange ) {
1067
+ $( window ).off( 'hashchange', opts._onHashChange );
1068
+ }
1069
+ });
1070
+
1071
+ function onHashChange( opts, setStartingSlide ) {
1072
+ var hash;
1073
+ if ( opts._hashFence ) {
1074
+ opts._hashFence = false;
1075
+ return;
1076
+ }
1077
+
1078
+ hash = window.location.hash.substring(1);
1079
+
1080
+ opts.slides.each(function(i) {
1081
+ if ( $(this).data( 'cycle-hash' ) == hash ) {
1082
+ if ( setStartingSlide === true ) {
1083
+ opts.startingSlide = i;
1084
+ }
1085
+ else {
1086
+ var fwd = opts.currSlide < i;
1087
+ opts.nextSlide = i;
1088
+ opts.API.prepareTx( true, fwd );
1089
+ }
1090
+ return false;
1091
+ }
1092
+ });
1093
+ }
1094
+
1095
+ })(jQuery);
1096
+
1097
+ /*! loader plugin for Cycle2; version: 20131121 */
1098
+ (function($) {
1099
+ "use strict";
1100
+
1101
+ $.extend($.fn.cycle.defaults, {
1102
+ loader: false
1103
+ });
1104
+
1105
+ $(document).on( 'cycle-bootstrap', function( e, opts ) {
1106
+ var addFn;
1107
+
1108
+ if ( !opts.loader )
1109
+ return;
1110
+
1111
+ // override API.add for this slideshow
1112
+ addFn = opts.API.add;
1113
+ opts.API.add = add;
1114
+
1115
+ function add( slides, prepend ) {
1116
+ var slideArr = [];
1117
+ if ( $.type( slides ) == 'string' )
1118
+ slides = $.trim( slides );
1119
+ else if ( $.type( slides) === 'array' ) {
1120
+ for (var i=0; i < slides.length; i++ )
1121
+ slides[i] = $(slides[i])[0];
1122
+ }
1123
+
1124
+ slides = $( slides );
1125
+ var slideCount = slides.length;
1126
+
1127
+ if ( ! slideCount )
1128
+ return;
1129
+
1130
+ slides.css('visibility','hidden').appendTo('body').each(function(i) { // appendTo fixes #56
1131
+ var count = 0;
1132
+ var slide = $(this);
1133
+ var images = slide.is('img') ? slide : slide.find('img');
1134
+ slide.data('index', i);
1135
+ // allow some images to be marked as unimportant (and filter out images w/o src value)
1136
+ images = images.filter(':not(.cycle-loader-ignore)').filter(':not([src=""])');
1137
+ if ( ! images.length ) {
1138
+ --slideCount;
1139
+ slideArr.push( slide );
1140
+ return;
1141
+ }
1142
+
1143
+ count = images.length;
1144
+ images.each(function() {
1145
+ // add images that are already loaded
1146
+ if ( this.complete ) {
1147
+ imageLoaded();
1148
+ }
1149
+ else {
1150
+ $(this).load(function() {
1151
+ imageLoaded();
1152
+ }).on("error", function() {
1153
+ if ( --count === 0 ) {
1154
+ // ignore this slide
1155
+ opts.API.log('slide skipped; img not loaded:', this.src);
1156
+ if ( --slideCount === 0 && opts.loader == 'wait') {
1157
+ addFn.apply( opts.API, [ slideArr, prepend ] );
1158
+ }
1159
+ }
1160
+ });
1161
+ }
1162
+ });
1163
+
1164
+ function imageLoaded() {
1165
+ if ( --count === 0 ) {
1166
+ --slideCount;
1167
+ addSlide( slide );
1168
+ }
1169
+ }
1170
+ });
1171
+
1172
+ if ( slideCount )
1173
+ opts.container.addClass('cycle-loading');
1174
+
1175
+
1176
+ function addSlide( slide ) {
1177
+ var curr;
1178
+ if ( opts.loader == 'wait' ) {
1179
+ slideArr.push( slide );
1180
+ if ( slideCount === 0 ) {
1181
+ // #59; sort slides into original markup order
1182
+ slideArr.sort( sorter );
1183
+ addFn.apply( opts.API, [ slideArr, prepend ] );
1184
+ opts.container.removeClass('cycle-loading');
1185
+ }
1186
+ }
1187
+ else {
1188
+ curr = $(opts.slides[opts.currSlide]);
1189
+ addFn.apply( opts.API, [ slide, prepend ] );
1190
+ curr.show();
1191
+ opts.container.removeClass('cycle-loading');
1192
+ }
1193
+ }
1194
+
1195
+ function sorter(a, b) {
1196
+ return a.data('index') - b.data('index');
1197
+ }
1198
+ }
1199
+ });
1200
+
1201
+ })(jQuery);
1202
+
1203
+ /*! pager plugin for Cycle2; version: 20130525 */
1204
+ (function($) {
1205
+ "use strict";
1206
+
1207
+ $.extend($.fn.cycle.defaults, {
1208
+ pager: '> .cycle-pager',
1209
+ pagerActiveClass: 'cycle-pager-active',
1210
+ pagerEvent: 'click.cycle',
1211
+ pagerTemplate: '<span>&bull;</span>'
1212
+ });
1213
+
1214
+ $(document).on( 'cycle-bootstrap', function( e, opts, API ) {
1215
+ // add method to API
1216
+ API.buildPagerLink = buildPagerLink;
1217
+ });
1218
+
1219
+ $(document).on( 'cycle-slide-added', function( e, opts, slideOpts, slideAdded ) {
1220
+ if ( opts.pager ) {
1221
+ opts.API.buildPagerLink ( opts, slideOpts, slideAdded );
1222
+ opts.API.page = page;
1223
+ }
1224
+ });
1225
+
1226
+ $(document).on( 'cycle-slide-removed', function( e, opts, index, slideRemoved ) {
1227
+ if ( opts.pager ) {
1228
+ var pagers = opts.API.getComponent( 'pager' );
1229
+ pagers.each(function() {
1230
+ var pager = $(this);
1231
+ $( pager.children()[index] ).remove();
1232
+ });
1233
+ }
1234
+ });
1235
+
1236
+ $(document).on( 'cycle-update-view', function( e, opts, slideOpts ) {
1237
+ var pagers;
1238
+
1239
+ if ( opts.pager ) {
1240
+ pagers = opts.API.getComponent( 'pager' );
1241
+ pagers.each(function() {
1242
+ $(this).children().removeClass( opts.pagerActiveClass )
1243
+ .eq( opts.currSlide ).addClass( opts.pagerActiveClass );
1244
+ });
1245
+ }
1246
+ });
1247
+
1248
+ $(document).on( 'cycle-destroyed', function( e, opts ) {
1249
+ var pager = opts.API.getComponent( 'pager' );
1250
+
1251
+ if ( pager ) {
1252
+ pager.children().off( opts.pagerEvent ); // #202
1253
+ if ( opts.pagerTemplate )
1254
+ pager.empty();
1255
+ }
1256
+ });
1257
+
1258
+ function buildPagerLink( opts, slideOpts, slide ) {
1259
+ var pagerLink;
1260
+ var pagers = opts.API.getComponent( 'pager' );
1261
+ pagers.each(function() {
1262
+ var pager = $(this);
1263
+ if ( slideOpts.pagerTemplate ) {
1264
+ var markup = opts.API.tmpl( slideOpts.pagerTemplate, slideOpts, opts, slide[0] );
1265
+ pagerLink = $( markup ).appendTo( pager );
1266
+ }
1267
+ else {
1268
+ pagerLink = pager.children().eq( opts.slideCount - 1 );
1269
+ }
1270
+ pagerLink.on( opts.pagerEvent, function(e) {
1271
+ e.preventDefault();
1272
+ opts.API.page( pager, e.currentTarget);
1273
+ });
1274
+ });
1275
+ }
1276
+
1277
+ function page( pager, target ) {
1278
+ /*jshint validthis:true */
1279
+ var opts = this.opts();
1280
+ if ( opts.busy && ! opts.manualTrump )
1281
+ return;
1282
+
1283
+ var index = pager.children().index( target );
1284
+ var nextSlide = index;
1285
+ var fwd = opts.currSlide < nextSlide;
1286
+ if (opts.currSlide == nextSlide) {
1287
+ return; // no op, clicked pager for the currently displayed slide
1288
+ }
1289
+ opts.nextSlide = nextSlide;
1290
+ opts.API.prepareTx( true, fwd );
1291
+ opts.API.trigger('cycle-pager-activated', [opts, pager, target ]);
1292
+ }
1293
+
1294
+ })(jQuery);
1295
+
1296
+
1297
+ /*! prevnext plugin for Cycle2; version: 20130709 */
1298
+ (function($) {
1299
+ "use strict";
1300
+
1301
+ $.extend($.fn.cycle.defaults, {
1302
+ next: '> .cycle-next',
1303
+ nextEvent: 'click.cycle',
1304
+ disabledClass: 'disabled',
1305
+ prev: '> .cycle-prev',
1306
+ prevEvent: 'click.cycle',
1307
+ swipe: false
1308
+ });
1309
+
1310
+ $(document).on( 'cycle-initialized', function( e, opts ) {
1311
+ opts.API.getComponent( 'next' ).on( opts.nextEvent, function(e) {
1312
+ e.preventDefault();
1313
+ opts.API.next();
1314
+ });
1315
+
1316
+ opts.API.getComponent( 'prev' ).on( opts.prevEvent, function(e) {
1317
+ e.preventDefault();
1318
+ opts.API.prev();
1319
+ });
1320
+
1321
+ if ( opts.swipe ) {
1322
+ var nextEvent = opts.swipeVert ? 'swipeUp.cycle' : 'swipeLeft.cycle swipeleft.cycle';
1323
+ var prevEvent = opts.swipeVert ? 'swipeDown.cycle' : 'swipeRight.cycle swiperight.cycle';
1324
+ opts.container.on( nextEvent, function(e) {
1325
+ opts.API.next();
1326
+ });
1327
+ opts.container.on( prevEvent, function() {
1328
+ opts.API.prev();
1329
+ });
1330
+ }
1331
+ });
1332
+
1333
+ $(document).on( 'cycle-update-view', function( e, opts, slideOpts, currSlide ) {
1334
+ if ( opts.allowWrap )
1335
+ return;
1336
+
1337
+ var cls = opts.disabledClass;
1338
+ var next = opts.API.getComponent( 'next' );
1339
+ var prev = opts.API.getComponent( 'prev' );
1340
+ var prevBoundry = opts._prevBoundry || 0;
1341
+ var nextBoundry = (opts._nextBoundry !== undefined)?opts._nextBoundry:opts.slideCount - 1;
1342
+
1343
+ if ( opts.currSlide == nextBoundry )
1344
+ next.addClass( cls ).prop( 'disabled', true );
1345
+ else
1346
+ next.removeClass( cls ).prop( 'disabled', false );
1347
+
1348
+ if ( opts.currSlide === prevBoundry )
1349
+ prev.addClass( cls ).prop( 'disabled', true );
1350
+ else
1351
+ prev.removeClass( cls ).prop( 'disabled', false );
1352
+ });
1353
+
1354
+
1355
+ $(document).on( 'cycle-destroyed', function( e, opts ) {
1356
+ opts.API.getComponent( 'prev' ).off( opts.nextEvent );
1357
+ opts.API.getComponent( 'next' ).off( opts.prevEvent );
1358
+ opts.container.off( 'swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle' );
1359
+ });
1360
+
1361
+ })(jQuery);
1362
+
1363
+ /*! progressive loader plugin for Cycle2; version: 20130315 */
1364
+ (function($) {
1365
+ "use strict";
1366
+
1367
+ $.extend($.fn.cycle.defaults, {
1368
+ progressive: false
1369
+ });
1370
+
1371
+ $(document).on( 'cycle-pre-initialize', function( e, opts ) {
1372
+ if ( !opts.progressive )
1373
+ return;
1374
+
1375
+ var API = opts.API;
1376
+ var nextFn = API.next;
1377
+ var prevFn = API.prev;
1378
+ var prepareTxFn = API.prepareTx;
1379
+ var type = $.type( opts.progressive );
1380
+ var slides, scriptEl;
1381
+
1382
+ if ( type == 'array' ) {
1383
+ slides = opts.progressive;
1384
+ }
1385
+ else if ($.isFunction( opts.progressive ) ) {
1386
+ slides = opts.progressive( opts );
1387
+ }
1388
+ else if ( type == 'string' ) {
1389
+ scriptEl = $( opts.progressive );
1390
+ slides = $.trim( scriptEl.html() );
1391
+ if ( !slides )
1392
+ return;
1393
+ // is it json array?
1394
+ if ( /^(\[)/.test( slides ) ) {
1395
+ try {
1396
+ slides = $.parseJSON( slides );
1397
+ }
1398
+ catch(err) {
1399
+ API.log( 'error parsing progressive slides', err );
1400
+ return;
1401
+ }
1402
+ }
1403
+ else {
1404
+ // plain text, split on delimeter
1405
+ slides = slides.split( new RegExp( scriptEl.data('cycle-split') || '\n') );
1406
+
1407
+ // #95; look for empty slide
1408
+ if ( ! slides[ slides.length - 1 ] )
1409
+ slides.pop();
1410
+ }
1411
+ }
1412
+
1413
+
1414
+
1415
+ if ( prepareTxFn ) {
1416
+ API.prepareTx = function( manual, fwd ) {
1417
+ var index, slide;
1418
+
1419
+ if ( manual || slides.length === 0 ) {
1420
+ prepareTxFn.apply( opts.API, [ manual, fwd ] );
1421
+ return;
1422
+ }
1423
+
1424
+ if ( fwd && opts.currSlide == ( opts.slideCount-1) ) {
1425
+ slide = slides[ 0 ];
1426
+ slides = slides.slice( 1 );
1427
+ opts.container.one('cycle-slide-added', function(e, opts ) {
1428
+ setTimeout(function() {
1429
+ opts.API.advanceSlide( 1 );
1430
+ },50);
1431
+ });
1432
+ opts.API.add( slide );
1433
+ }
1434
+ else if ( !fwd && opts.currSlide === 0 ) {
1435
+ index = slides.length-1;
1436
+ slide = slides[ index ];
1437
+ slides = slides.slice( 0, index );
1438
+ opts.container.one('cycle-slide-added', function(e, opts ) {
1439
+ setTimeout(function() {
1440
+ opts.currSlide = 1;
1441
+ opts.API.advanceSlide( -1 );
1442
+ },50);
1443
+ });
1444
+ opts.API.add( slide, true );
1445
+ }
1446
+ else {
1447
+ prepareTxFn.apply( opts.API, [ manual, fwd ] );
1448
+ }
1449
+ };
1450
+ }
1451
+
1452
+ if ( nextFn ) {
1453
+ API.next = function() {
1454
+ var opts = this.opts();
1455
+ if ( slides.length && opts.currSlide == ( opts.slideCount - 1 ) ) {
1456
+ var slide = slides[ 0 ];
1457
+ slides = slides.slice( 1 );
1458
+ opts.container.one('cycle-slide-added', function(e, opts ) {
1459
+ nextFn.apply( opts.API );
1460
+ opts.container.removeClass('cycle-loading');
1461
+ });
1462
+ opts.container.addClass('cycle-loading');
1463
+ opts.API.add( slide );
1464
+ }
1465
+ else {
1466
+ nextFn.apply( opts.API );
1467
+ }
1468
+ };
1469
+ }
1470
+
1471
+ if ( prevFn ) {
1472
+ API.prev = function() {
1473
+ var opts = this.opts();
1474
+ if ( slides.length && opts.currSlide === 0 ) {
1475
+ var index = slides.length-1;
1476
+ var slide = slides[ index ];
1477
+ slides = slides.slice( 0, index );
1478
+ opts.container.one('cycle-slide-added', function(e, opts ) {
1479
+ opts.currSlide = 1;
1480
+ opts.API.advanceSlide( -1 );
1481
+ opts.container.removeClass('cycle-loading');
1482
+ });
1483
+ opts.container.addClass('cycle-loading');
1484
+ opts.API.add( slide, true );
1485
+ }
1486
+ else {
1487
+ prevFn.apply( opts.API );
1488
+ }
1489
+ };
1490
+ }
1491
+ });
1492
+
1493
+ })(jQuery);
1494
+
1495
+ /*! tmpl plugin for Cycle2; version: 20121227 */
1496
+ (function($) {
1497
+ "use strict";
1498
+
1499
+ $.extend($.fn.cycle.defaults, {
1500
+ tmplRegex: '{{((.)?.*?)}}'
1501
+ });
1502
+
1503
+ $.extend($.fn.cycle.API, {
1504
+ tmpl: function( str, opts /*, ... */) {
1505
+ var regex = new RegExp( opts.tmplRegex || $.fn.cycle.defaults.tmplRegex, 'g' );
1506
+ var args = $.makeArray( arguments );
1507
+ args.shift();
1508
+ return str.replace(regex, function(_, str) {
1509
+ var i, j, obj, prop, names = str.split('.');
1510
+ for (i=0; i < args.length; i++) {
1511
+ obj = args[i];
1512
+ if ( ! obj )
1513
+ continue;
1514
+ if (names.length > 1) {
1515
+ prop = obj;
1516
+ for (j=0; j < names.length; j++) {
1517
+ obj = prop;
1518
+ prop = prop[ names[j] ] || str;
1519
+ }
1520
+ } else {
1521
+ prop = obj[str];
1522
+ }
1523
+
1524
+ if ($.isFunction(prop))
1525
+ return prop.apply(obj, args);
1526
+ if (prop !== undefined && prop !== null && prop != str)
1527
+ return prop;
1528
+ }
1529
+ return str;
1530
+ });
1531
+ }
1532
+ });
1533
+
1534
+ })(jQuery);
includes/js/lsp_jquery.easing.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built in easing capabilities added In jQuery 1.1
5
+ * to offer multiple easing options
6
+ *
7
+ * TERMS OF USE - jQuery Easing
8
+ *
9
+ * Open source under the BSD License.
10
+ *
11
+ * Copyright © 2008 George McGinley Smith
12
+ * All rights reserved.
13
+ *
14
+ * Redistribution and use in source and binary forms, with or without modification,
15
+ * are permitted provided that the following conditions are met:
16
+ *
17
+ * Redistributions of source code must retain the above copyright notice, this list of
18
+ * conditions and the following disclaimer.
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list
20
+ * of conditions and the following disclaimer in the documentation and/or other materials
21
+ * provided with the distribution.
22
+ *
23
+ * Neither the name of the author nor the names of contributors may be used to endorse
24
+ * or promote products derived from this software without specific prior written permission.
25
+ *
26
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ *
36
+ */
37
+
38
+ // t: current time, b: begInnIng value, c: change In value, d: duration
39
+ jQuery.easing['jswing'] = jQuery.easing['swing'];
40
+
41
+ jQuery.extend( jQuery.easing,
42
+ {
43
+ def: 'easeOutQuad',
44
+ swing: function (x, t, b, c, d) {
45
+ //alert(jQuery.easing.default);
46
+ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
+ },
48
+ easeInQuad: function (x, t, b, c, d) {
49
+ return c*(t/=d)*t + b;
50
+ },
51
+ easeOutQuad: function (x, t, b, c, d) {
52
+ return -c *(t/=d)*(t-2) + b;
53
+ },
54
+ easeInOutQuad: function (x, t, b, c, d) {
55
+ if ((t/=d/2) < 1) return c/2*t*t + b;
56
+ return -c/2 * ((--t)*(t-2) - 1) + b;
57
+ },
58
+ easeInCubic: function (x, t, b, c, d) {
59
+ return c*(t/=d)*t*t + b;
60
+ },
61
+ easeOutCubic: function (x, t, b, c, d) {
62
+ return c*((t=t/d-1)*t*t + 1) + b;
63
+ },
64
+ easeInOutCubic: function (x, t, b, c, d) {
65
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
+ return c/2*((t-=2)*t*t + 2) + b;
67
+ },
68
+ easeInQuart: function (x, t, b, c, d) {
69
+ return c*(t/=d)*t*t*t + b;
70
+ },
71
+ easeOutQuart: function (x, t, b, c, d) {
72
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
+ },
74
+ easeInOutQuart: function (x, t, b, c, d) {
75
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
+ },
78
+ easeInQuint: function (x, t, b, c, d) {
79
+ return c*(t/=d)*t*t*t*t + b;
80
+ },
81
+ easeOutQuint: function (x, t, b, c, d) {
82
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
+ },
84
+ easeInOutQuint: function (x, t, b, c, d) {
85
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
87
+ },
88
+ easeInSine: function (x, t, b, c, d) {
89
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
+ },
91
+ easeOutSine: function (x, t, b, c, d) {
92
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
93
+ },
94
+ easeInOutSine: function (x, t, b, c, d) {
95
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
+ },
97
+ easeInExpo: function (x, t, b, c, d) {
98
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
+ },
100
+ easeOutExpo: function (x, t, b, c, d) {
101
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
+ },
103
+ easeInOutExpo: function (x, t, b, c, d) {
104
+ if (t==0) return b;
105
+ if (t==d) return b+c;
106
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
+ },
109
+ easeInCirc: function (x, t, b, c, d) {
110
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
+ },
112
+ easeOutCirc: function (x, t, b, c, d) {
113
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
+ },
115
+ easeInOutCirc: function (x, t, b, c, d) {
116
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
+ },
119
+ easeInElastic: function (x, t, b, c, d) {
120
+ var s=1.70158;var p=0;var a=c;
121
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
123
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
124
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
+ },
126
+ easeOutElastic: function (x, t, b, c, d) {
127
+ var s=1.70158;var p=0;var a=c;
128
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
130
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
131
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
+ },
133
+ easeInOutElastic: function (x, t, b, c, d) {
134
+ var s=1.70158;var p=0;var a=c;
135
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
137
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
138
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
+ },
141
+ easeInBack: function (x, t, b, c, d, s) {
142
+ if (s == undefined) s = 1.70158;
143
+ return c*(t/=d)*t*((s+1)*t - s) + b;
144
+ },
145
+ easeOutBack: function (x, t, b, c, d, s) {
146
+ if (s == undefined) s = 1.70158;
147
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
+ },
149
+ easeInOutBack: function (x, t, b, c, d, s) {
150
+ if (s == undefined) s = 1.70158;
151
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
+ },
154
+ easeInBounce: function (x, t, b, c, d) {
155
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
+ },
157
+ easeOutBounce: function (x, t, b, c, d) {
158
+ if ((t/=d) < (1/2.75)) {
159
+ return c*(7.5625*t*t) + b;
160
+ } else if (t < (2/2.75)) {
161
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
+ } else if (t < (2.5/2.75)) {
163
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
+ } else {
165
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
+ }
167
+ },
168
+ easeInOutBounce: function (x, t, b, c, d) {
169
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
+ }
172
+ });
173
+
174
+ /*
175
+ *
176
+ * TERMS OF USE - EASING EQUATIONS
177
+ *
178
+ * Open source under the BSD License.
179
+ *
180
+ * Copyright © 2001 Robert Penner
181
+ * All rights reserved.
182
+ *
183
+ * Redistribution and use in source and binary forms, with or without modification,
184
+ * are permitted provided that the following conditions are met:
185
+ *
186
+ * Redistributions of source code must retain the above copyright notice, this list of
187
+ * conditions and the following disclaimer.
188
+ * Redistributions in binary form must reproduce the above copyright notice, this list
189
+ * of conditions and the following disclaimer in the documentation and/or other materials
190
+ * provided with the distribution.
191
+ *
192
+ * Neither the name of the author nor the names of contributors may be used to endorse
193
+ * or promote products derived from this software without specific prior written permission.
194
+ *
195
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
204
+ *
205
+ */
includes/js/lsp_jquery_shuffle.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! shuffle transition plugin for Cycle2; version: 20140128 */
2
+ (function($) {
3
+ "use strict";
4
+
5
+ $.fn.cycle.transitions.shuffle = {
6
+
7
+ transition: function( opts, currEl, nextEl, fwd, callback ) {
8
+ $( nextEl ).css({
9
+ display: 'block',
10
+ visibility: 'visible'
11
+ });
12
+ var width = opts.container.css( 'overflow', 'visible' ).width();
13
+ var speed = opts.speed / 2; // shuffle has 2 transitions
14
+ var element = fwd ? currEl : nextEl;
15
+
16
+ opts = opts.API.getSlideOpts( fwd ? opts.currSlide : opts.nextSlide );
17
+ var props1 = { left:-width, top:15 };
18
+ var props2 = opts.slideCss || { left:0, top:0 };
19
+
20
+ if ( opts.shuffleLeft !== undefined ) {
21
+ props1.left = props1.left + parseInt(opts.shuffleLeft, 10) || 0;
22
+ }
23
+ else if ( opts.shuffleRight !== undefined ) {
24
+ props1.left = width + parseInt(opts.shuffleRight, 10) || 0;
25
+ }
26
+ if ( opts.shuffleTop ) {
27
+ props1.top = opts.shuffleTop;
28
+ }
29
+
30
+ // transition slide in 3 steps: move, re-zindex, move
31
+ $( element )
32
+ .animate( props1, speed, opts.easeIn || opts.easing )
33
+ .queue( 'fx', $.proxy(reIndex, this))
34
+ .animate( props2, speed, opts.easeOut || opts.easing, callback );
35
+
36
+ function reIndex(nextFn) {
37
+ /*jshint validthis:true */
38
+ this.stack(opts, currEl, nextEl, fwd);
39
+ nextFn();
40
+ }
41
+ },
42
+
43
+ stack: function( opts, currEl, nextEl, fwd ) {
44
+ var i, z;
45
+
46
+ if (fwd) {
47
+ opts.API.stackSlides( nextEl, currEl, fwd );
48
+ // force curr slide to bottom of the stack
49
+ $(currEl).css( 'zIndex', 1 );
50
+ }
51
+ else {
52
+ z = 1;
53
+ for (i = opts.nextSlide - 1; i >= 0; i--) {
54
+ $(opts.slides[i]).css('zIndex', z++);
55
+ }
56
+ for (i = opts.slideCount - 1; i > opts.nextSlide; i--) {
57
+ $(opts.slides[i]).css('zIndex', z++);
58
+ }
59
+ $(nextEl).css( 'zIndex', opts.maxZ );
60
+ $(currEl).css( 'zIndex', opts.maxZ - 1 );
61
+ }
62
+ }
63
+ };
64
+
65
+ })(jQuery);
includes/js/lsp_jquery_tile.js ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! tile transition plugin for Cycle2; version: 20140128 */
2
+ (function ($) {
3
+ "use strict";
4
+
5
+ $.fn.cycle.transitions.tileSlide =
6
+ $.fn.cycle.transitions.tileBlind = {
7
+
8
+ before: function( opts, curr, next, fwd ) {
9
+ opts.API.stackSlides( curr, next, fwd );
10
+ $(curr).css({
11
+ display: 'block',
12
+ visibility: 'visible'
13
+ });
14
+ opts.container.css('overflow', 'hidden');
15
+ // set defaults
16
+ opts.tileDelay = opts.tileDelay || opts.fx == 'tileSlide' ? 100 : 125;
17
+ opts.tileCount = opts.tileCount || 7;
18
+ opts.tileVertical = opts.tileVertical !== false;
19
+
20
+ if (!opts.container.data('cycleTileInitialized')) {
21
+ opts.container.on('cycle-destroyed', $.proxy(this.onDestroy, opts.API));
22
+ opts.container.data('cycleTileInitialized', true);
23
+ }
24
+ },
25
+
26
+ transition: function( opts, curr, next, fwd, callback ) {
27
+ opts.slides.not(curr).not(next).css('visibility','hidden');
28
+
29
+ var tiles = $();
30
+ var $curr = $(curr), $next = $(next);
31
+ var tile, tileWidth, tileHeight, lastTileWidth, lastTileHeight,
32
+ num = opts.tileCount,
33
+ vert = opts.tileVertical,
34
+ height = opts.container.height(),
35
+ width = opts.container.width();
36
+
37
+ if ( vert ) {
38
+ tileWidth = Math.floor(width / num);
39
+ lastTileWidth = width - (tileWidth * (num - 1));
40
+ tileHeight = lastTileHeight = height;
41
+ }
42
+ else {
43
+ tileWidth = lastTileWidth = width;
44
+ tileHeight = Math.floor(height / num);
45
+ lastTileHeight = height - (tileHeight * (num - 1));
46
+ }
47
+
48
+ // opts.speed = opts.speed / 2;
49
+ opts.container.find('.cycle-tiles-container').remove();
50
+
51
+ var animCSS;
52
+ var tileCSS = { left: 0, top: 0, overflow: 'hidden', position: 'absolute', margin: 0, padding: 0 };
53
+ if ( vert ) {
54
+ animCSS = opts.fx == 'tileSlide' ? { top: height } : { width: 0 };
55
+ }
56
+ else {
57
+ animCSS = opts.fx == 'tileSlide' ? { left: width } : { height: 0 };
58
+ }
59
+
60
+ var tilesContainer = $('<div class="cycle-tiles-container"></div>');
61
+ tilesContainer.css({
62
+ zIndex: $curr.css('z-index'),
63
+ overflow: 'visible',
64
+ position: 'absolute',
65
+ top: 0,
66
+ left: 0,
67
+ direction: 'ltr' // #250
68
+ });
69
+ tilesContainer.insertBefore( next );
70
+
71
+ for (var i = 0; i < num; i++) {
72
+ tile = $('<div></div>')
73
+ .css( tileCSS )
74
+ .css({
75
+ width: ((num - 1 === i) ? lastTileWidth : tileWidth),
76
+ height: ((num - 1 === i) ? lastTileHeight : tileHeight),
77
+ marginLeft: vert ? ((i * tileWidth)) : 0,
78
+ marginTop: vert ? 0 : (i * tileHeight)
79
+ })
80
+ .append($curr.clone().css({
81
+ position: 'relative',
82
+ maxWidth: 'none',
83
+ width: $curr.width(),
84
+ margin: 0, padding: 0,
85
+ marginLeft: vert ? -(i * tileWidth) : 0,
86
+ marginTop: vert ? 0 : -(i * tileHeight)
87
+ }));
88
+ tiles = tiles.add(tile);
89
+ }
90
+
91
+ tilesContainer.append(tiles);
92
+ $curr.css('visibility','hidden');
93
+ $next.css({
94
+ opacity: 1,
95
+ display: 'block',
96
+ visibility: 'visible'
97
+ });
98
+ animateTile(fwd ? 0 : num - 1);
99
+
100
+ opts._tileAniCallback = function() {
101
+ $next.css({
102
+ display: 'block',
103
+ visibility: 'visible'
104
+ });
105
+ $curr.css('visibility','hidden');
106
+ tilesContainer.remove();
107
+ callback();
108
+ };
109
+
110
+ function animateTile(i) {
111
+ tiles.eq(i).animate( animCSS, {
112
+ duration: opts.speed,
113
+ easing: opts.easing,
114
+ complete: function () {
115
+ if (fwd ? (num - 1 === i) : (0 === i)) {
116
+ opts._tileAniCallback();
117
+ }
118
+ }
119
+ });
120
+
121
+ setTimeout(function () {
122
+ if (fwd ? (num - 1 !== i) : (0 !== i)) {
123
+ animateTile(fwd ? (i + 1) : (i - 1));
124
+ }
125
+ }, opts.tileDelay);
126
+ }
127
+ },
128
+
129
+ // tx API impl
130
+ stopTransition: function( opts ) {
131
+ opts.container.find('*').stop( true, true );
132
+ if (opts._tileAniCallback)
133
+ opts._tileAniCallback();
134
+ },
135
+
136
+ // core API supplement
137
+ onDestroy: function( e ) {
138
+ var opts = this.opts();
139
+ opts.container.find('.cycle-tiles-container').remove();
140
+ }
141
+ };
142
+
143
+ })(jQuery);
includes/js/lsp_media_box.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function ($) {
2
+ // Uploading files
3
+ var file_frame;
4
+
5
+ $('.lsp_upload_button').on('click', function (event) {
6
+
7
+ event.preventDefault();
8
+
9
+ // If the media frame already exists, reopen it.
10
+ if (file_frame) {
11
+ file_frame.open();
12
+ return;
13
+ }
14
+
15
+
16
+ // Create the media frame.
17
+ file_frame = wp.media.frames.file_frame = wp.media({
18
+ title: $(this).data('uploader_title'),
19
+ button: {
20
+ text: $(this).data('uploader_button_text'),
21
+ },
22
+ multiple: false // Set to true to allow multiple files to be selected
23
+ });
24
+
25
+ // When an image is selected, run a callback.
26
+ file_frame.on('select', function () {
27
+ // We set multiple to false so only get one image from the uploader
28
+ attachment = file_frame.state().get('selection').first().toJSON();
29
+ // Send the attachment URL to our custom image input field.
30
+ jQuery(".lsp_upload_url").val(attachment.url);
31
+
32
+ // Do something with attachment.id and/or attachment.url here
33
+ });
34
+
35
+ // Finally, open the modal
36
+ file_frame.open();
37
+ });
38
+
39
+ });
includes/ls_database.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Logo Slider Pro database:
4
+ Create two tables 1)lsp_slider, 2)lsp_iamges
5
+ */
6
+
7
+ //++++++++++++++_ Create Table: lsp_sliders
8
+ global $lsp_table_sliders_version;
9
+ $lsp_table_sliders_version = "1.0";
10
+
11
+ add_action('plugins_loaded', 'ls_create_table_sliders');
12
+
13
+ function ls_create_table_sliders() {
14
+ global $wpdb;
15
+ global $lsp_table_sliders_version;
16
+
17
+ $table_sliders = $wpdb->prefix . "lsp_sliders";
18
+ $slider_ver = get_option( "lsp_table_sliders_version" );
19
+
20
+ $check_table_slider = $wpdb->get_var( "SHOW TABLES LIKE '$table_sliders'" );
21
+
22
+ if ( $check_table_slider != $table_sliders || $slider_ver != $lsp_table_sliders_version ) {
23
+ $lsp_slider_sql = "CREATE TABLE " . $table_sliders . " (
24
+ `slider_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
25
+ `slider_name` VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci',
26
+ `slider_shortcode` VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci',
27
+ `slider_shortname` VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci',
28
+ PRIMARY KEY (slider_id)
29
+ )COLLATE='utf8_general_ci', ENGINE = 'InnoDB';";
30
+
31
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
32
+ dbDelta( $lsp_slider_sql );
33
+
34
+ update_option( "lsp_table_sliders_version", $lsp_table_sliders_version );
35
+ } else {
36
+ add_option( "lsp_table_sliders_version", $lsp_table_sliders_version );
37
+ }
38
+
39
+ // Add data from Logo Slider Free Version
40
+ $lsp_prefix = $wpdb->prefix;
41
+
42
+ $lsp_option_images = get_option( 'wp_logo_slider_images' );
43
+ $lsp_option_settings = get_option( 'wp_logo_slider_settings' );
44
+
45
+ if ( ( $lsp_option_settings ) && ( $lsp_option_images ) ) {
46
+
47
+ $lsp_option_insert_slider = "insert into " . $lsp_prefix . "lsp_sliders (`slider_name`,`slider_shortcode`,`slider_shortname`) value ('First Slider','[lsp_slider slider=first_slider]','first_slider')";
48
+ $wpdb->query( $lsp_option_insert_slider );
49
+ }
50
+ }
51
+
52
+
53
+ //++++++++++++++_ Create Table: lsp_images
54
+ global $lsp_table_images_version;
55
+ $lsp_table_images_version = "1.0";
56
+
57
+ add_action('plugins_loaded', 'ls_create_table_images');
58
+
59
+ function ls_create_table_images() {
60
+ global $wpdb;
61
+ global $lsp_table_images_version;
62
+
63
+ $table_images = $wpdb->prefix . "lsp_images";
64
+ $table_sliders = $wpdb->prefix . "lsp_sliders";
65
+ $images_ver = get_option( "lsp_table_images_version" );
66
+
67
+ $check_table_images = $wpdb->get_var( "SHOW TABLES LIKE '$table_images'" );
68
+
69
+ if ( $check_table_images != $table_images || $images_ver != $lsp_table_images_version ) {
70
+ $lsp_image_sql = "CREATE TABLE " . $table_images . " (
71
+ `image_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
72
+ `slider_id` INT(11) UNSIGNED NOT NULL,
73
+ `image_order` INT(4) NOT NULL,
74
+ `image_name` VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci',
75
+ `image_path` VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci',
76
+ `image_link_to` VARCHAR(255) NULL COLLATE 'utf8_general_ci',
77
+ PRIMARY KEY (image_id),
78
+ INDEX slider_id (slider_id),
79
+ FOREIGN KEY (slider_id)
80
+ REFERENCES $table_sliders(slider_id)
81
+ ON UPDATE CASCADE ON DELETE CASCADE
82
+ )COLLATE='utf8_general_ci', ENGINE = 'InnoDB';";
83
+
84
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
85
+ dbDelta( $lsp_image_sql );
86
+
87
+ update_option( "lsp_table_images_version", $lsp_table_images_version );
88
+ } else {
89
+ add_option( "lsp_table_images_version", $lsp_table_images_version );
90
+ }
91
+
92
+ // Add data from Logo Slider Free Version
93
+ $lsp_prefix = $wpdb->prefix;
94
+
95
+ $lsp_option_images = get_option( 'wp_logo_slider_images' );
96
+ $lsp_option_settings = get_option( 'wp_logo_slider_settings' );
97
+
98
+ if ( ( $lsp_option_settings ) || ( $lsp_option_images ) ) {
99
+ $lsp_opt_img_count = 1;
100
+ foreach ( (array) $lsp_option_images as $option_imags => $option_image ) {
101
+ $lsp_image_opt_url = $option_image['file_url'];
102
+ $lsp_get_opt_path = pathinfo( $lsp_image_opt_url );
103
+
104
+ $lsp_opt_img_order = $lsp_opt_img_count ++;
105
+ $lsp_image_dir = $lsp_get_opt_path['dirname'] . "/";
106
+ $lsp_opti_image_name = $lsp_get_opt_path['basename'];
107
+ $lsp_image_opt_link = $option_image['image_links_to'];
108
+
109
+ $lsp_option_insert_img = "insert into " . $lsp_prefix . "lsp_images (slider_id,image_order,image_name,image_path,image_link_to) value ('1','$lsp_opt_img_order','$lsp_opti_image_name','$lsp_image_dir','$lsp_image_opt_link')";
110
+ $wpdb->query( $lsp_option_insert_img );
111
+ }
112
+
113
+ $lsp_slider_width_opt = $lsp_option_settings['slider_width'];
114
+ $lsp_slider_height_opt = $lsp_option_settings['slider_height'];
115
+ $lsp_image_per_slide_opt = $lsp_option_settings['num_img'];
116
+ $lsp_link_new_window_opt = $lsp_option_settings['new_window'];
117
+ $lsp_slider_effect_opt = $lsp_option_settings['select_slider'];
118
+ $lsp_auto_slide_opt = $lsp_option_settings['auto_slide'];
119
+ $lsp_auto_slide_time_opt = $lsp_option_settings['auto_slide_time'];
120
+ $lsp_slider_arrow_opt = $lsp_option_settings['arrow'];
121
+ $lsp_slider_bgcolor_opt = $lsp_option_settings['bgcolour'];
122
+ $lsp_slider_css_opt = $lsp_option_settings['custom_css'];
123
+
124
+ add_option( 'lsp_slider_width', $lsp_slider_width_opt, 'yes' );
125
+ add_option( 'lsp_slider_height', $lsp_slider_height_opt, 'yes' );
126
+ add_option( 'lsp_image_per_slide', $lsp_image_per_slide_opt, 'yes' );
127
+ add_option( 'lsp_link_new_window', $lsp_link_new_window_opt, 'yes' );
128
+ add_option( 'lsp_slider_effect', $lsp_slider_effect_opt, 'yes' );
129
+ add_option( 'lsp_auto_slide', $lsp_auto_slide_opt, 'yes' );
130
+ add_option( 'lsp_auto_slide_time', $lsp_auto_slide_time_opt, 'yes' );
131
+ add_option( 'lsp_slider_arrow', $lsp_slider_arrow_opt, 'yes' );
132
+ add_option( 'lsp_slider_bgcolor', $lsp_slider_bgcolor_opt, 'yes' );
133
+ add_option( 'lsp_slider_css', $lsp_slider_css_opt, 'yes' );
134
+
135
+ delete_option( 'wp_logo_slider_images' );
136
+ delete_option( 'wp_logo_slider_settings' );
137
+ }
138
+ }
languages/lsp.pot ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WordPress Blank Pot
2
+ # Copyright (C) 2014 ...
3
+ # This file is distrubuted under the GPL-2.0+
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: Logo Slider Pro\n"
7
+ "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
8
+ "POT-Creation-Date: 2014-09-02 12:59+0800\n"
9
+ "PO-Revision-Date: \n"
10
+ "Last-Translator: Maeve Lander <maeve@enigmaplugins.com>\n"
11
+ "Language-Team: Enigma Plugins <maeve@enigmaplugins.com>\n"
12
+ "Language: en_US\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+ "X-Poedit-KeywordsList: __;_e;_x;esc_html_e;esc_html__;esc_attr_e;esc_attr__;"
20
+ "_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;"
21
+ "__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
22
+ "X-Poedit-Basepath: ../\n"
23
+ "X-Generator: Poedit 1.5.7\n"
24
+ "X-Poedit-SearchPath-0: .\n"
25
+
26
+ #: index.php:172
27
+ msgid "valid"
28
+ msgstr ""
29
+
30
+ #: index.php:176
31
+ msgid "invalid"
32
+ msgstr ""
33
+
34
+ #: lsp_license.php:13
35
+ msgid "Logo Slider Pro Activate License"
36
+ msgstr ""
37
+
38
+ #: lsp_license.php:19
39
+ msgid "License Key update successfully"
40
+ msgstr ""
41
+
42
+ #: lsp_license.php:29
43
+ msgid "Activate License Key"
44
+ msgstr ""
45
+
46
+ #: lsp_license.php:34
47
+ msgid ""
48
+ "Please enter and activate your license key in order to receive automatic "
49
+ "updates and support for this plugin"
50
+ msgstr ""
51
+
52
+ #: lsp_license.php:42
53
+ msgid "License Key"
54
+ msgstr ""
55
+
56
+ #: lsp_license.php:54
57
+ msgid "active"
58
+ msgstr ""
59
+
60
+ #: lsp_license.php:57
61
+ msgid "Deactivate License"
62
+ msgstr ""
63
+
64
+ #: lsp_license.php:63
65
+ msgid "Activate License"
66
+ msgstr ""
67
+
68
+ #: lsp_settings.php:7
69
+ msgid "Logo Slider Pro Settings"
70
+ msgstr ""
71
+
72
+ #: lsp_settings.php:13
73
+ msgid "Settings updated successfully"
74
+ msgstr ""
75
+
76
+ #: lsp_settings.php:23
77
+ msgid "Plugin Settings"
78
+ msgstr ""
79
+
80
+ #: lsp_settings.php:34
81
+ msgid "Size"
82
+ msgstr ""
83
+
84
+ #: lsp_settings.php:39
85
+ msgid "Width: "
86
+ msgstr ""
87
+
88
+ #: lsp_settings.php:45
89
+ msgid "Height: "
90
+ msgstr ""
91
+
92
+ #: lsp_settings.php:55
93
+ msgid "Background Color"
94
+ msgstr ""
95
+
96
+ #: lsp_settings.php:60
97
+ msgid "Format: "
98
+ msgstr ""
99
+
100
+ #: lsp_settings.php:67
101
+ msgid "Select Slider Effect"
102
+ msgstr ""
103
+
104
+ #: lsp_settings.php:73
105
+ msgid "Slide"
106
+ msgstr ""
107
+
108
+ #: lsp_settings.php:76
109
+ msgid "Fade"
110
+ msgstr ""
111
+
112
+ #: lsp_settings.php:79
113
+ msgid "Tile Slide"
114
+ msgstr ""
115
+
116
+ #: lsp_settings.php:82
117
+ msgid "Tile Blind"
118
+ msgstr ""
119
+
120
+ #: lsp_settings.php:85
121
+ msgid "Carousel"
122
+ msgstr ""
123
+
124
+ #: lsp_settings.php:94
125
+ msgid "Images Per Slide"
126
+ msgstr ""
127
+
128
+ #: lsp_settings.php:100
129
+ msgid "1"
130
+ msgstr ""
131
+
132
+ #: lsp_settings.php:103
133
+ msgid "2"
134
+ msgstr ""
135
+
136
+ #: lsp_settings.php:106
137
+ msgid "3"
138
+ msgstr ""
139
+
140
+ #: lsp_settings.php:109
141
+ msgid "4"
142
+ msgstr ""
143
+
144
+ #: lsp_settings.php:112
145
+ msgid "5"
146
+ msgstr ""
147
+
148
+ #: lsp_settings.php:115
149
+ msgid "6"
150
+ msgstr ""
151
+
152
+ #: lsp_settings.php:118
153
+ msgid "7"
154
+ msgstr ""
155
+
156
+ #: lsp_settings.php:121
157
+ msgid "8"
158
+ msgstr ""
159
+
160
+ #: lsp_settings.php:124
161
+ msgid "Number of logos per slide"
162
+ msgstr ""
163
+
164
+ #: lsp_settings.php:131
165
+ msgid "Open Logo Links in New Window"
166
+ msgstr ""
167
+
168
+ #: lsp_settings.php:142
169
+ msgid "Auto Slide"
170
+ msgstr ""
171
+
172
+ #: lsp_settings.php:146
173
+ msgid "ON"
174
+ msgstr ""
175
+
176
+ #: lsp_settings.php:149
177
+ msgid "OFF"
178
+ msgstr ""
179
+
180
+ #: lsp_settings.php:157
181
+ msgid "Auto Slide Time"
182
+ msgstr ""
183
+
184
+ #: lsp_settings.php:162
185
+ msgid "Set auto slide duration in seconds"
186
+ msgstr ""
187
+
188
+ #: lsp_settings.php:169
189
+ msgid "Arrow Style"
190
+ msgstr ""
191
+
192
+ #: lsp_settings.php:233
193
+ msgid "Custom CSS"
194
+ msgstr ""
195
+
196
+ #: lsp_logoslider/lsp_manage_images.php:7
197
+ msgid "Manage Slider Images"
198
+ msgstr ""
199
+
200
+ #: lsp_logoslider/lsp_manage_images.php:24
201
+ msgid "Image save successfully."
202
+ msgstr ""
203
+
204
+ #: lsp_logoslider/lsp_manage_images.php:42
205
+ msgid "Image and Slider Required."
206
+ msgstr ""
207
+
208
+ #: lsp_logoslider/lsp_manage_images.php:60
209
+ msgid "Link for Image save successfully."
210
+ msgstr ""
211
+
212
+ #: lsp_logoslider/lsp_manage_images.php:77
213
+ msgid "Image Delete successfully."
214
+ msgstr ""
215
+
216
+ #: lsp_logoslider/lsp_manage_images.php:88
217
+ msgid "Add Slider Images"
218
+ msgstr ""
219
+
220
+ #: lsp_logoslider/lsp_manage_images.php:97
221
+ #: lsp_logoslider/lsp_manage_images.php:105
222
+ msgid "Select Slider"
223
+ msgstr ""
224
+
225
+ #: lsp_logoslider/lsp_manage_images.php:131
226
+ msgid "Upload New Image"
227
+ msgstr ""
228
+
229
+ #: lsp_logoslider/lsp_manage_images.php:138
230
+ msgid "Browse Image"
231
+ msgstr ""
232
+
233
+ #: lsp_logoslider/lsp_manage_images.php:141
234
+ msgid "Upload Image"
235
+ msgstr ""
236
+
237
+ #: lsp_logoslider/lsp_manage_images.php:165
238
+ #: lsp_logoslider/lsp_manage_images.php:212
239
+ msgid "Slider Image"
240
+ msgstr ""
241
+
242
+ #: lsp_logoslider/lsp_manage_images.php:166
243
+ #: lsp_logoslider/lsp_manage_images.php:213
244
+ msgid "Image Links To"
245
+ msgstr ""
246
+
247
+ #: lsp_logoslider/lsp_manage_images.php:167
248
+ #: lsp_logoslider/lsp_manage_images.php:214
249
+ #: lsp_logoslider/lsp_manage_sliders.php:69
250
+ #: lsp_logoslider/lsp_manage_sliders.php:76
251
+ #: lsp_logoslider/lsp_manage_sliders.php:212
252
+ #: lsp_logoslider/lsp_manage_sliders.php:220
253
+ msgid "Action"
254
+ msgstr ""
255
+
256
+ #: lsp_logoslider/lsp_manage_images.php:222
257
+ msgid "There are no Images for slider"
258
+ msgstr ""
259
+
260
+ #: lsp_logoslider/lsp_manage_sliders.php:7
261
+ msgid "Manage Sliders"
262
+ msgstr ""
263
+
264
+ #: lsp_logoslider/lsp_manage_sliders.php:17
265
+ msgid "Slider save successfully"
266
+ msgstr ""
267
+
268
+ #: lsp_logoslider/lsp_manage_sliders.php:24
269
+ #: lsp_logoslider/lsp_manage_sliders.php:38
270
+ msgid "Slider name required"
271
+ msgstr ""
272
+
273
+ #: lsp_logoslider/lsp_manage_sliders.php:31
274
+ msgid "Slider update successfully"
275
+ msgstr ""
276
+
277
+ #: lsp_logoslider/lsp_manage_sliders.php:45
278
+ msgid "Slider deleted successfully"
279
+ msgstr ""
280
+
281
+ #: lsp_logoslider/lsp_manage_sliders.php:67
282
+ #: lsp_logoslider/lsp_manage_sliders.php:74
283
+ #: lsp_logoslider/lsp_manage_sliders.php:130
284
+ #: lsp_logoslider/lsp_manage_sliders.php:172
285
+ #: lsp_logoslider/lsp_manage_sliders.php:210
286
+ #: lsp_logoslider/lsp_manage_sliders.php:218
287
+ msgid "Slider Name"
288
+ msgstr ""
289
+
290
+ #: lsp_logoslider/lsp_manage_sliders.php:68
291
+ #: lsp_logoslider/lsp_manage_sliders.php:75
292
+ #: lsp_logoslider/lsp_manage_sliders.php:211
293
+ #: lsp_logoslider/lsp_manage_sliders.php:219
294
+ msgid "Slider Shortcode"
295
+ msgstr ""
296
+
297
+ #: lsp_logoslider/lsp_manage_sliders.php:91
298
+ msgid "Edit"
299
+ msgstr ""
300
+
301
+ #: lsp_logoslider/lsp_manage_sliders.php:96
302
+ #: lsp_logoslider/lsp_manage_sliders.php:252
303
+ msgid "Delete"
304
+ msgstr ""
305
+
306
+ #: lsp_logoslider/lsp_manage_sliders.php:121
307
+ msgid "Edit Slider"
308
+ msgstr ""
309
+
310
+ #: lsp_logoslider/lsp_manage_sliders.php:163
311
+ msgid "Add Slider"
312
+ msgstr ""
313
+
314
+ #: lsp_logoslider/lsp_manage_sliders.php:242
315
+ msgid "Manage Images"
316
+ msgstr ""
317
+
318
+ #: lsp_logoslider/lsp_manage_sliders.php:247
319
+ msgid "Edit Title"
320
+ msgstr ""
321
+
322
+ #: lsp_logoslider/lsp_manage_sliders.php:266
323
+ msgid "There are no sliders"
324
+ msgstr ""
logo-slider.php CHANGED
@@ -1,938 +1,601 @@
1
  <?php
2
  /*
3
- Plugin Name: Logo Slider
4
- Plugin URI: http://www.wordpress.org/extend/plugins/logo-slider
5
- Description: Add a logo slideshow carousel to your site quicky and easily.
6
- Version: 1.4.7
7
- Author: Enigma Plugins
8
- Author URI: http://www.enigmaplugins.com
9
- Text Domain: logo-slider
10
- Domain Path: /languages
11
- */
12
 
13
- /*
14
- ///////////////////////////////////////////////
15
- This section defines the variables that
16
- will be used throughout the plugin
17
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
18
- */
19
- error_reporting(0);
20
-
21
- // define our defaults (filterable)
22
- $wp_logo_defaults = apply_filters('wp_logo_defaults', array(
23
- 'custom_css' => 'You can write your custom CSS here.',
24
- 'arrow' => 1,
25
- 'bgcolour' => '#FFFFFF',
26
- 'slider_width' => 450,
27
- 'slider_height' => 198,
28
- 'num_img' => 2,
29
- 'auto_slide' => 1,
30
- 'auto_slide_time' => '',
31
- ));
32
-
33
- // pull the settings from the db
34
- $wp_logo_slider_settings = get_option('wp_logo_slider_settings');
35
- $wp_logo_slider_images = get_option('wp_logo_slider_images');
36
-
37
- // fallback
38
- $wp_logo_slider_settings = wp_parse_args($wp_logo_slider_settings, $wp_logo_defaults);
39
 
 
40
 
41
- /*
42
- ///////////////////////////////////////////////
43
- This section hooks the proper functions
44
- to the proper actions in WordPress
45
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
46
- */
47
-
48
- // this function registers our settings in the db
49
- add_action('admin_init', 'wp_logo_register_settings');
50
- function wp_logo_register_settings() {
51
- register_setting('wp_logo_slider_images', 'wp_logo_slider_images', 'wp_logo_images_validate');
52
- register_setting('wp_logo_slider_settings', 'wp_logo_slider_settings', 'wp_logo_settings_validate');
53
- }
54
- // this function adds the settings page to the Appearance tab
55
- add_action('admin_menu', 'wp_logo_slider_menu');
56
- function wp_logo_slider_menu() {
57
- $page_title = 'Logo Slider';
58
- $menu_title = 'Logo Slider';
59
- $capability = 'manage_options';
60
- $menu_slug = 'wp_logo_slider';
61
- $function = 'wp_logo_slider';
62
- $icon = plugin_dir_url( __FILE__ ).'icon.png';
63
- add_menu_page($page_title,$menu_title,$capability,$menu_slug,$function,$icon);
64
- }
65
 
66
- // add "Settings" link to plugin page
67
- add_filter('plugin_action_links_' . plugin_basename(__FILE__) , 'wp_logo_plugin_action_links');
68
- function wp_logo_plugin_action_links($links) {
69
- $wp_logo_settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'upload.php?page=wp_logo_slider' ), __('Settings') );
70
- array_unshift($links, $wp_logo_settings_link);
71
- return $links;
72
- }
73
 
74
- /*
75
- ///////////////////////////////////////////////
76
- this function is the code that gets loaded when the
77
- settings page gets loaded by the browser. It calls
78
- functions that handle image uploads and image settings
79
- changes, as well as producing the visible page output.
80
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
81
- */
82
- function wp_logo_slider() {
83
- echo '<div class="wrap">';
84
- // handle image upload, if necessary
85
- if($_REQUEST['action'] == 'wp_handle_upload')
86
- wp_logo_handle_upload();
87
-
88
- // delete an image, if necessary
89
- if(isset($_REQUEST['delete']))
90
- wp_logo_delete_upload($_REQUEST['delete']);
91
-
92
- // the image management form
93
- wp_logo_images_admin();
94
-
95
- // the settings management form
96
- wp_logo_settings_admin();
97
- echo '</div>';
 
 
 
 
 
 
 
98
  }
99
 
100
- /*
101
- ///////////////////////////////////////////////
102
- this section handles uploading images, adding
103
- the image data to the database, deleting images,
104
- and deleting image data from the database.
105
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
106
- */
107
- // this function handles the file upload,
108
- // resize/crop, and adds the image data to the db
109
- function wp_logo_handle_upload() {
110
- global $wp_logo_slider_settings, $wp_logo_slider_images;
111
-
112
- // upload the image
113
- $upload = wp_handle_upload($_FILES['logo_images'], 0);
114
-
115
- // extract the $upload array
116
- extract($upload);
117
-
118
- // the URL of the directory the file was loaded in
119
- $upload_dir_url = str_replace(basename($file), '', $url);
120
-
121
- // get the image dimensions
122
- list($width, $height) = getimagesize($file);
123
-
124
- // if the uploaded file is NOT an image
125
- if(strpos($type, 'image') === FALSE) {
126
- unlink($file); // delete the file
127
- echo '<div class="error" id="message"><p>'.__('Sorry, but the file you uploaded does not seem to be a valid image. Please try again.','logo-slider').'</p></div>';
128
- return;
129
- }
130
-
131
- // if the image is larger than the width/height requirements, then scale it down.
132
- if($width > $wp_logo_slider_settings['slider_width'] || $height > $wp_logo_slider_settings['slider_height']) {
133
- // resize the image
134
- $width = $wp_logo_slider_settings['slider_width'];
135
- $height = $wp_logo_slider_settings['slider_height'];
136
- $image = wp_get_image_editor($file);
137
- if(is_wp_error($image)){
138
- return $image;
139
- }
140
- $resized = $image->resize($width, $height, TRUE);
141
- $destFile = $image->generate_filename(NULL, NULL);
142
- $saved = $image->save($destFile);
143
 
144
- if(is_wp_error($saved)){
145
- return $saved;
146
- }
147
- $newImgPath = $destFile;
148
- }
149
-
150
- // make the thumbnail
151
- $thumb_height = round((100 * $wp_logo_slider_settings['slider_height']) / $wp_logo_slider_settings['slider_width']);
152
- if(isset($upload['file'])) {
153
- $thumbnail = image_resize($file, 100, $thumb_height, true, 'thumb');
154
- $thumbnail_url = $upload_dir_url . basename($thumbnail);
155
- }
156
-
157
- $row = 1;
158
- foreach((array)$wp_logo_slider_images as $image => $data) :
159
- $row++;
160
- endforeach;
161
-
162
- // use the timestamp as the array key and id
163
- $time = date('YmdHis');
164
-
165
- // add the image data to the array
166
- $wp_logo_slider_images[$time] = array(
167
- 'id' => $time,
168
- 'file' => $file,
169
- 'file_url' => $url,
170
- 'thumbnail' => $thumbnail,
171
- 'thumbnail_url' => $thumbnail_url,
172
- 'slide_title' => '',
173
- 'slide_desc' => '',
174
- 'image_links_to' => ''
175
- );
176
-
177
- // add the image information to the database
178
- $wp_logo_slider_images['update'] = 'Added';
179
- update_option('wp_logo_slider_images', $wp_logo_slider_images);
180
  }
181
 
182
- // this function deletes the image,
183
- // and removes the image data from the db
184
- function wp_logo_delete_upload($id) {
185
- global $wp_logo_slider_images;
 
 
 
 
 
 
 
186
 
187
- // if the ID passed to this function is invalid,
188
- // halt the process, and don't try to delete.
189
- if(!isset($wp_logo_slider_images[$id])) return;
 
190
 
191
- // delete the image and thumbnail
192
- unlink($wp_logo_slider_images[$id]['file']);
193
- unlink($wp_logo_slider_images[$id]['thumbnail']);
194
 
195
- // indicate that the image was deleted
196
- $wp_logo_slider_images['update'] = 'Deleted';
197
 
198
- // remove the image data from the db
199
- unset($wp_logo_slider_images[$id]);
200
- update_option('wp_logo_slider_images', $wp_logo_slider_images);
201
  }
202
 
203
- /*
204
- ///////////////////////////////////////////////
205
- these two functions check to see if an update
206
- to the data just occurred. if it did, then they
207
- will display a notice, and reset the update option.
208
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
209
- */
210
- // this function checks to see if we just updated the settings
211
- // if so, it displays the "updated" message.
212
- function wp_logo_slider_settings_update_check() {
213
- global $wp_logo_slider_settings;
214
- if(isset($wp_logo_slider_settings['update'])) {
215
- echo '<div class="updated fade" id="message">
216
- <p>'.__('Wordpress Logo Slider Settings <strong>'.$wp_logo_slider_settings['update'],'logo-slider').'</strong>
217
- </p>
218
- </div>';
219
-
220
- unset($wp_logo_slider_settings['update']);
221
- update_option('wp_logo_slider_settings', $wp_logo_slider_settings);
222
- }
223
  }
224
 
225
- // this function checks to see if we just added a new image
226
- // if so, it displays the "updated" message.
227
- function wp_logo_slider_images_update_check() {
228
- global $wp_logo_slider_images;
229
- if($wp_logo_slider_images['update'] == 'Added' || $wp_logo_slider_images['update'] == 'Deleted' || $wp_logo_slider_images['update'] == 'Updated') {
230
- echo '<div class="updated fade" id="message"><p>'.__('Image(s) '.$wp_logo_slider_images['update'].' Successfully','logo-slider').'</p></div>';
231
- unset($wp_logo_slider_images['update']);
232
- update_option('wp_logo_slider_images', $wp_logo_slider_images);
233
- }
234
  }
235
 
236
- /*
237
- ///////////////////////////////////////////////
238
- these two functions display the front-end code
239
- on the admin page. it's mostly form markup.
240
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
241
- */
242
- // display the images administration code
243
- function wp_logo_images_admin() { ?>
244
- <?php global $wp_logo_slider_images; ?>
245
- <?php wp_logo_slider_images_update_check(); ?>
246
- <h2><?php _e('Wordpress LogoSlider Images','logo-slider'); ?></h2>
247
-
248
- <table class="form-table">
249
- <tr valign="top"><th scope="row"><?php _e('Upload New Image','logo-slider') ?></th>
250
- <td>
251
- <form enctype="multipart/form-data" method="post" action="?page=wp_logo_slider">
252
- <input type="hidden" name="post_id" id="post_id" value="0" />
253
- <input type="hidden" name="action" id="action" value="wp_handle_upload" />
254
-
255
- <label for="logo_images"><?php _e('Select a File: ','logo-slider') ?></label>
256
- <input type="file" name="logo_images" id="logo_images" />
257
- <input type="submit" class="button-primary" name="html-upload" value="Upload" />
258
- </form>
259
- </td>
260
- </tr>
261
- </table>
262
- <br />
263
-
264
- <p style="border:2px solid #999; border-radius: 10px; font-size: 12px; padding: 6px 10px; width: 24%;">
265
- <strong><?php _e('Note:', 'hmpf') ?> </strong><?php _e('Drag &amp; Drop is auto save.','hmpf') ?>
266
- </p>
267
-
268
- <?php
269
- if(!empty($wp_logo_slider_images)) :
270
- ?>
271
- <table class="widefat fixed" cellspacing="0" id="image_sort" style="width:100%; table-layout:inherit;">
272
- <thead>
273
- <tr>
274
- <th scope="col" class="column-slug"><?php _e('Image','logo-slider') ?></th>
275
- <th scope="col"><?php _e('Image Links To','logo-slider') ?></th>
276
- <th scope="col" class="column-slug"><?php _e('Actions','logo-slider') ?></th>
277
- </tr>
278
- </thead>
279
- <tfoot>
280
- <tr>
281
- <th scope="col" class="column-slug"><?php _e('Image','logo-slider') ?></th>
282
- <th scope="col"><?php _e('Image Links To','logo-slider') ?></th>
283
- <th scope="col" class="column-slug"><?php _e('Actions','logo-slider') ?></th>
284
- </tr>
285
- </tfoot>
286
- <tbody>
287
- <form method="post" action="options.php">
288
- <?php settings_fields('wp_logo_slider_images'); ?>
289
- <?php foreach((array)$wp_logo_slider_images as $image => $data) : ?>
290
- <tr id="list_item_<?php echo $image ?>" class="list_item">
291
- <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][id]" value="<?php echo $data['id']; ?>" />
292
- <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][file]" value="<?php echo $data['file']; ?>" />
293
- <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][file_url]" value="<?php echo $data['file_url']; ?>" />
294
- <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][thumbnail]" value="<?php //echo $data['thumbnail']; ?>" />
295
- <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][thumbnail_url]" value="<?php echo $data['thumbnail_url']; ?>" />
296
- <th scope="row" class="column-slug"><img src="<?php echo $data['thumbnail_url']; ?>" /></th>
297
- <td>
298
- <?php //echo $image; ?>
299
- <input type="text" name="wp_logo_slider_images[<?php echo $image; ?>][image_links_to]" value="<?php echo $data['image_links_to']; ?>" size="30" />
300
- </td>
301
- <td class="column-slug">
302
- <input type="submit" class="button-primary" value="Update" />
303
- <a href="?page=wp_logo_slider&amp;delete=<?php echo $image; ?>" class="button">Delete</a>
304
- </td>
305
- </tr>
306
- <?php endforeach; ?>
307
- <input type="hidden" name="wp_logo_slider_images[update]" value="Updated" />
308
- </form>
309
- </tbody>
310
- </table>
311
- <?php
312
- endif;
313
  }
314
 
315
- /*
316
- ///////////////////////////////////////////////
317
- SORTABLE FUNCTION.
318
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
319
- */
320
-
321
- function image_sort(){
322
- wp_enqueue_script('jquery');
323
- wp_enqueue_script('jquery-ui-sortable');
324
- ?>
325
  <script type="text/javascript">
326
- jQuery(document).ready( function(e) {
327
- jQuery('#image_sort').sortable({
328
- items: '.list_item',
 
329
  opacity: 0.5,
330
  cursor: 'pointer',
331
  axis: 'y',
332
- update: function() {
333
- var ordr = jQuery(this).sortable('serialize') + '&action=list_update_order';
334
- jQuery.post(ajaxurl, ordr, function(response){
335
- //alert(response);
 
 
 
 
 
 
 
 
336
  });
337
  }
338
  });
339
  });
 
340
  </script>
341
- <?php
342
  }
343
- add_action('admin_head','image_sort');
344
-
345
- function order_list(){
346
- global $wp_logo_slider_images;
347
-
348
- $list = $wp_logo_slider_images;
349
- $new_order = $_POST['list_item'];
350
- $new_list = array();
351
-
352
- foreach($new_order as $v){
353
- if(isset($list[$v])){
354
- $new_list[$v] = $list[$v];
355
- }
356
- }
357
- update_option('wp_logo_slider_images',$new_list);
358
- }
359
- add_action('wp_ajax_list_update_order','order_list');
360
-
361
- /*============================================================================================*/
362
-
363
- // display the settings administration code
364
- function wp_logo_settings_admin() {
365
- wp_logo_slider_settings_update_check();
366
- ?>
367
- <h2><?php _e('Wordpress Logo Slider Settings','logo-slider'); ?></h2>
368
- <form method="post" action="options.php">
369
- <?php
370
- settings_fields('wp_logo_slider_settings');
371
- global $wp_logo_slider_settings; $options = $wp_logo_slider_settings;
372
- ?>
373
- <table class="form-table">
374
- <tr>
375
- <th scope="row"><?php _e('Size','logo-slider') ?></th>
376
- <td>
377
- <?php _e('Width: ','logo-slider') ?>
378
- <input type="text" name="wp_logo_slider_settings[slider_width]" value="<?php echo $options['slider_width'] ?>" size="4" />
379
- <?php _e('Height: ','logo-slider') ?>
380
- <input type="text" name="wp_logo_slider_settings[slider_height]" value="<?php echo $options['slider_height'] ?>" size="4" />
381
- </td>
382
- </tr>
383
- <tr>
384
- <th scope="row"><?php _e('Images Per Slide','logo-slider') ?></th>
385
- <td>
386
- <select name="wp_logo_slider_settings[num_img]">
387
- <option value="1" <?php echo ($options['num_img'] == '1' ? 'selected="selected"' : '') ?>>
388
- <?php _e('1','logo-slider') ?>
389
- </option>
390
- <option value="2" <?php echo ($options['num_img'] == '2' ? 'selected="selected"' : '') ?>>
391
- <?php _e('2','logo-slider') ?>
392
- </option>
393
- <option value="3" <?php echo ($options['num_img'] == '3' ? 'selected="selected"' : '') ?>>
394
- <?php _e('3','logo-slider') ?>
395
- </option>
396
- <option value="4" <?php echo ($options['num_img'] == '4' ? 'selected="selected"' : '') ?>>
397
- <?php _e('4','logo-slider') ?>
398
- </option>
399
- <option value="5" <?php echo ($options['num_img'] == '5' ? 'selected="selected"' : '') ?>>
400
- <?php _e('5','logo-slider') ?>
401
- </option>
402
- <option value="6" <?php echo ($options['num_img'] == '6' ? 'selected="selected"' : '') ?>>
403
- <?php _e('6','logo-slider') ?>
404
- </option>
405
- <option value="7" <?php echo ($options['num_img'] == '7' ? 'selected="selected"' : '') ?>>
406
- <?php _e('7','logo-slider') ?>
407
- </option>
408
- <option value="8" <?php echo ($options['num_img'] == '8' ? 'selected="selected"' : '') ?>>
409
- <?php _e('8','logo-slider') ?>
410
- </option>
411
- </select>
412
- <small><?php _e('Number of logos per slide','logo-slider') ?></small>
413
- </td>
414
- </tr>
415
- <tr>
416
- <th scope="row"><?php _e('Background Colour','logo-slider') ?></th>
417
- <td>
418
- <input type="text" name="wp_logo_slider_settings[bgcolour]" value="<?php echo $options['bgcolour'] ?>" />
419
- <small><?php _e('Format: ','logo-slider') ?>#FFFFFF</small>
420
- </td>
421
- </tr>
422
- <tr>
423
- <th scope="row"><?php _e('Open logo links in New Window','logo-slider') ?></th>
424
- <td>
425
- <input type="checkbox" name="wp_logo_slider_settings[new_window]" <?php echo ($options['new_window'] == 'on' ? 'checked="checked"' : '' ) ?> />
426
- </td>
427
- </tr>
428
- <tr>
429
- <th scope="row"><?php _e('Select Slider','logo-slider') ?></th>
430
- <td>
431
- <select name="wp_logo_slider_settings[select_slider]">
432
- <option value="slide" <?php echo ($options['select_slider'] == 'slide' ? 'selected="selected"' : '' ) ?>>
433
- <?php _e('Slide','logo-slider') ?>
434
- </option>
435
- <option value="fade" <?php echo ($options['select_slider'] == 'fade' ? 'selected="selected"' : '' ) ?>>
436
- <?php _e('Fade','logo-slider') ?>
437
- </option>
438
- </select>
439
- </td>
440
- </tr>
441
- <tr>
442
- <th scope="row"><?php _e('Auto Slide','logo-slider') ?></th>
443
- <td id="arrow-style">
444
- <?php _e('ON','logo-slider') ?>
445
- <input type="radio" name="wp_logo_slider_settings[auto_slide]" value="1" <?php if($options['auto_slide']==1){echo 'checked="checked"';}?> />&nbsp; &nbsp;
446
- <?php _e('OFF','logo-slider') ?>
447
- <input type="radio" name="wp_logo_slider_settings[auto_slide]" value="2" <?php if($options['auto_slide']==2){echo 'checked="checked"';}?>/>
448
- </td>
449
- </tr>
450
- <tr>
451
- <th scope="row"><?php _e('Auto Slide Time','logo-slider') ?></th>
452
- <td>
453
- <input type="text" name="wp_logo_slider_settings[auto_slide_time]" value="<?php echo $options['auto_slide_time'] ?>" size="4" />
454
- <small><?php _e('Set auto slide duration in seconds','logo-slider') ?></small>
455
- </td>
456
- </tr>
457
- <tr>
458
- <th scope="row"><?php _e('Arrow Style','logo-slider') ?></th>
459
- <td id="arrow-style">
460
- <p>
461
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/off.png" width="28" height="40" alt="" />
462
- <br />
463
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="0" <?php if($options['arrow']==0){echo 'checked="checked"';}?> />
464
- </p>
465
- <p>
466
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow1.png" width="28" height="40" alt="" />
467
- <br />
468
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="1" <?php if($options['arrow']==1){echo 'checked="checked"';}?> />
469
- </p>
470
- <p>
471
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow2.png" width="31" height="40" alt="" />
472
- <br />
473
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="2" <?php if($options['arrow']==2){echo 'checked="checked"';}?>/>
474
- </p>
475
- <p>
476
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow3.png" width="34" height="40" alt="" />
477
- <br />
478
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="3" <?php if($options['arrow']==3){echo 'checked="checked"';}?>/>
479
- </p>
480
- <p>
481
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow4.png" width="34" height="40" alt="" />
482
- <br />
483
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="4" <?php if($options['arrow']==4){echo 'checked="checked"';}?>/>
484
- </p>
485
- <p>
486
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow5.png" width="24" height="40" alt="" />
487
- <br />
488
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="5" <?php if($options['arrow']==5){echo 'checked="checked"';}?>/>
489
- </p>
490
- <p>
491
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow6.png" width="36" height="40" alt="" />
492
- <br />
493
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="6" <?php if($options['arrow']==6){echo 'checked="checked"';}?>/>
494
- </p>
495
- <p>
496
- <img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow7.png" width="38" height="40" alt="" />
497
- <br />
498
- <input type="radio" name="wp_logo_slider_settings[arrow]" value="7" <?php if($options['arrow']==7){echo 'checked="checked"';}?>/>
499
- </p>
500
- </td>
501
- </tr>
502
- <tr valign="top">
503
- <th scope="row"><?php _e('Custom CSS','logo-slider') ?></th>
504
- <td>
505
- <textarea name="wp_logo_slider_settings[custom_css]" rows="6" cols="70"><?php echo $options['custom_css']; ?></textarea>
506
- </td>
507
- </tr>
508
- <input type="hidden" name="wp_logo_slider_settings[update]" value="<?php _e('UPDATED','logo-slider'); ?>" />
509
- </table>
510
-
511
- <p class="submit">
512
- <input type="submit" class="button-primary" value="<?php _e('Save Settings','logo-slider') ?>" />
513
- </p>
514
- </form>
515
-
516
- <!-- The Reset Option -->
517
- <form method="post" action="options.php">
518
- <?php
519
- settings_fields('wp_logo_slider_settings');
520
- global $wp_logo_defaults; // use the defaults
521
-
522
- foreach((array)$wp_logo_defaults as $key => $value) : ?>
523
- <input type="hidden" name="wp_logo_slider_settings[<?php echo $key; ?>]" value="<?php echo $value; ?>" />
524
- <?php
525
- endforeach;
526
- ?>
527
- <input type="hidden" name="wp_logo_slider_settings[update]" value="<?php _e('RESET','logo-slider'); ?>" />
528
- <input type="submit" class="button" value="<?php _e('Reset Settings','logo-slider') ?>" />
529
- </form>
530
- <!-- End Reset Option -->
531
 
532
- <?php
533
- }
534
 
535
- /*
536
- ///////////////////////////////////////////////
537
- these two functions sanitize the data before it
538
- gets stored in the database via options.php
539
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
540
- */
541
- // this function sanitizes our settings data for storage
542
- function wp_logo_settings_validate($input) {
543
- $input['slider_width'] = intval($input['slider_width']);
544
- $input['slider_height'] = intval($input['slider_height']);
545
- $input['num_img'] = intval($input['num_img']);
546
- $input['arrow'] = intval($input['arrow']);
547
- $input['custom_css'] = wp_filter_nohtml_kses($input['custom_css']);
548
- $input['bgcolour'] = wp_filter_nohtml_kses($input['bgcolour']);
549
- $input['auto_slide'] = intval($input['auto_slide']);
550
- $input['auto_slide_time'] = intval($input['auto_slide_time']);
551
-
552
- return $input;
 
 
 
 
 
 
 
 
 
 
553
  }
554
 
555
- // this function sanitizes our image data for storage
556
- function wp_logo_images_validate($input) {
557
- foreach((array)$input as $key => $value) {
558
- if($key != 'update') {
559
- $input[$key]['file_url'] = clean_url($value['file_url']);
560
- $input[$key]['thumbnail_url'] = clean_url($value['thumbnail_url']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
 
562
- if($value['image_links_to'])
563
- $input[$key]['image_links_to'] = clean_url($value['image_links_to']);
 
 
 
 
 
 
 
 
 
 
564
  }
565
- }
566
- return $input;
567
- }
568
 
569
- /*
570
- ///////////////////////////////////////////////
571
- this final section generates all the code that
572
- is displayed on the front-end of the WP Theme
573
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
574
- */
575
- function logo_slider($args = array(), $content = null) {
576
- global $wp_logo_slider_settings, $wp_logo_slider_images;
577
-
578
- // possible future use
579
- $args = wp_parse_args($args, $wp_logo_slider_settings);
580
- $newline = "\n"; // line break
581
-
582
- echo '<div id="logo-slider-wraper">';
583
- $check = $wp_logo_slider_settings['new_window'];
584
- $new_window = '';
585
-
586
- if(isset($check)) {
587
- $new_window = 'target="_blank"';
588
- } else {
589
- $new_window = 'target="_parent"';
590
- }
591
 
592
- $img_num1 = 1;
593
- $img_num2 = 2;
594
- $img_num3 = 3;
595
- $img_num4 = 4;
596
-
597
- $num_img = $wp_logo_slider_settings['num_img'];
598
-
599
- // Get web and other device engins for Responsive
600
- $iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
601
- $iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
602
- $iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
603
- $Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
604
- $webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
605
- $mobile = stripos($_SERVER['HTTP_USER_AGENT'],"mobile");
606
- $BlackBerry = stripos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
607
- $RimTablet= stripos($_SERVER['HTTP_USER_AGENT'],"RIM Tablet");
608
-
609
- $msie = strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE');
610
- $firefox = strpos($_SERVER["HTTP_USER_AGENT"], 'Firefox');
611
- $safari = strpos($_SERVER["HTTP_USER_AGENT"], 'Safari');
612
- $chrome = strpos($_SERVER["HTTP_USER_AGENT"], 'Chrome');
613
- $Opera = strpos($_SERVER["HTTP_USER_AGENT"], 'OPR');
614
- $IE11 = strpos($_SERVER["HTTP_USER_AGENT"], 'rv:11.0');
615
-
616
- if( $iPod || $iPhone ){
617
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
618
- }else if($iPad){
619
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num4);
620
- }else if($Android){
621
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
622
- }else if($webOS){
623
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
624
- }else if($mobile){
625
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
626
- }else if($BlackBerry){
627
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
628
- }else if($RimTablet){
629
- $data_chunks = array_chunk($wp_logo_slider_images, $img_num4);
630
- }else if(($msie) || ($firefox) || ($safari) || ($chrome) || ($IE11)){
631
- $data_chunks = array_chunk($wp_logo_slider_images, $num_img);
632
- }
633
 
634
- $slid = $wp_logo_slider_settings['select_slider'];
635
- $lgs_slide_effect = '';
 
 
 
 
 
 
 
636
 
637
- if($slid == 'slide') {
638
- $lgs_slide_effect = 'scrollHorz';
639
- } elseif($slid == 'fade') {
640
- $lgs_slide_effect = 'fade';
641
- } else {
642
- $lgs_slide_effect = 'scrollHorz';
 
 
 
 
 
643
  }
 
 
 
644
 
645
- $lgs_auto_slide = $wp_logo_slider_settings['auto_slide'];
646
- $lgs_slide_time = $wp_logo_slider_settings['auto_slide_time'];
647
-
648
- // Logo Image Slider
649
- ?>
650
- <ul id="logo-slider" class="cycle-slideshow"
651
- data-cycle-fx="<?php echo $lgs_slide_effect ?>"
652
- data-cycle-timeout="<?php echo (($lgs_auto_slide == 1 ) ? $lgs_slide_time * 1000 : 0) ?>"
653
- data-cycle-next="#prev"
654
- data-cycle-prev="#next"
655
- data-cycle-speed="600"
656
- data-cycle-slides="> li"
657
- >
658
  <?php
659
- foreach ($data_chunks as $data_chunk) {
660
- echo '<li class="slide">';
661
- foreach($data_chunk as $data) {
662
- if($data['image_links_to'])
663
- echo '<a href="'.$data['image_links_to'].'" '.$new_window.'>';
664
- echo '<img src="'.$data['file_url'].'" class="logo-img" alt="" />';
665
- if($data['image_links_to'])
666
- echo '</a>';
667
- }
668
- echo '</li>';
669
- }
670
- ?>
671
- </ul>
672
- <?php
673
- if($wp_logo_slider_settings['arrow'] != 0) {
674
- echo '<div class="slider-controls"><a href="#" id="prev">&lt;</a> <a href="#" id="next">&gt;</a></div>';
675
  }
 
 
 
676
 
677
- echo '</div>';
678
- }
 
 
679
 
680
- // create the shortcode [wp_LogoSlider]
681
- add_shortcode('logo-slider', 'wp_slider_shortcode');
682
- function wp_slider_shortcode($atts) {
683
- // Temp solution, output buffer the echo function.
684
- ob_start();
685
- logo_slider();
686
- $output = ob_get_clean();
687
 
688
- return $output;
689
- }
 
690
 
691
- add_action('wp_print_scripts', 'wp_LogoSlider_scripts');
692
- function wp_LogoSlider_scripts() {
693
- if(!is_admin())
694
- wp_enqueue_script('cycle', WP_CONTENT_URL.'/plugins/logo-slider/lgs_jquery.cycle2.js', array('jquery'), '', true);
695
- }
696
 
697
- add_action( 'wp_head', 'wp_logo_slider_style' );
698
- function wp_logo_slider_style() {
699
- global $wp_logo_slider_settings;
700
- global $options;
701
- ?>
702
- <style type="text/css" media="screen">
703
- <?php
704
- echo $wp_logo_slider_settings['custom_css'];
705
- ?>
706
- #logo-slider-wraper {
707
- position:relative;
708
- }
709
- .slider-controls {
710
- position:absolute;
711
- width:<?php echo $wp_logo_slider_settings['slider_width']; ?>px;
712
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px !important;
713
- }
714
- #logo-slider {
715
- position: relative;
716
- width: <?php echo $wp_logo_slider_settings['slider_width']; ?>px;
717
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
718
- margin: 0; padding: 0;
719
- overflow: hidden;
720
- list-style:none;
721
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
722
- text-align:center;
723
- }
724
- .slide {
725
- list-style:none;
726
- margin:0 !important;
727
- width:<?php echo $wp_logo_slider_settings['slider_width']; ?>px !important;
728
- }
729
- .slider-controls a {
730
- height:40px;
731
- width:40px;
732
- display:inline-block;
733
- text-indent:-9000px;
734
- }
735
- #prev{
736
- background:url(<?php echo WP_CONTENT_URL.'/plugins/logo-slider/arrows/arrow'. $wp_logo_slider_settings['arrow'].'.png'; ?>) no-repeat center;
737
- float:right;
738
- margin-right:-50px;
739
- }
740
- #next{
741
- background:url(<?php echo WP_CONTENT_URL.'/plugins/logo-slider/arrows/arrow'. $wp_logo_slider_settings['arrow'].'-prev.png'; ?>) no-repeat center;
742
- float:left;
743
- margin-left:-50px
744
- }
745
- /*
746
- ===============================================================
747
- --------------------_ Responsive _--------------------
748
- ===============================================================
749
- */
750
- @media screen and (max-width:320px) {
751
- #logo-slider-wraper{
752
- position:relative !important;
753
- width:52% !important;
754
- left:42px;
755
  }
756
- .slider-controls {
757
- position: absolute;
758
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
759
- left:30px;
760
- width: 100% !important;
761
  }
762
- #logo-slider {
763
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
764
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
765
- list-style: none outside none;
766
- margin: 0;
767
- overflow: hidden;
768
- padding: 0;
769
  position: relative;
770
- width: 110% !important;
771
- }
772
- .slide {
773
- list-style: none outside none;
774
- margin: 0 !important;
775
- width: 100% !important;
776
- }
777
- #next{
778
- background:url(<?php echo WP_CONTENT_URL.'/plugins/logo-slider/arrows/arrow'. $wp_logo_slider_settings['arrow'].'-prev.png'; ?>) no-repeat center;
779
- float:left;
780
- margin-left:-66px !important;
781
- }
782
- .logo-img {
783
- margin-left:32px;
784
- }
785
- }
786
- @media screen and (min-width:321px) and (max-width:480px){
787
- #logo-slider-wraper{
788
- position:relative;
789
- width:35% !important;
790
- left:55px !important;
791
  }
792
- .slider-controls {
793
- position: absolute;
794
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
795
- width: 100% !important;
 
 
 
 
 
 
 
 
 
 
 
 
796
  }
 
797
  #logo-slider {
798
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
799
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
800
- list-style: none outside none;
801
- margin: 0;
802
  overflow: hidden;
803
- padding: 0;
804
- position: relative;
805
- width: 102% !important;
806
- }
807
- .slide {
808
- list-style: none outside none;
809
- margin: 0 !important;
810
- width: 100% !important;
811
- }
812
- }
813
- @media screen and (min-width:321px) and (max-width:360px){
814
- #logo-slider-wraper{
815
- position:relative;
816
- width:50% !important;
817
- }
818
- .slider-controls {
819
  position: absolute;
820
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
821
- width: 100% !important;
 
 
 
 
 
 
 
822
  }
823
- #logo-slider {
824
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
825
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
826
- list-style: none outside none;
827
- margin: 0;
828
- overflow: hidden;
829
- padding: 0;
830
- position: relative;
831
- width: 100% !important;
832
  }
833
- .slide {
834
- list-style: none outside none;
835
- margin: 0 !important;
836
- width: 100% !important;
837
  }
838
- }
839
- @media screen and (min-width:481px) and (max-width:640px){
840
- #logo-slider-wraper{
841
- position:relative;
842
- width:28% !important;
843
- left:34px !important;
 
 
844
  }
845
- .slider-controls {
846
- position: absolute;
847
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
848
- width: 100% !important;
 
 
 
 
 
 
 
 
 
 
 
 
849
  }
 
850
  #logo-slider {
851
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
852
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
853
- list-style: none outside none;
854
- margin: 0;
855
  overflow: hidden;
856
- padding: 0;
857
- position: relative;
858
- width: 100% !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
859
  }
860
- .slide {
861
- list-style: none outside none;
862
- margin: 0 !important;
863
- width: 100% !important;
864
  }
865
- }
866
- @media only screen and (min-width:641px) and (max-width:768px){
867
- #logo-slider-wraper{
868
- position:relative;
869
- width:78% !important;
870
- left:34px !important
 
 
871
  }
872
- .slider-controls {
 
 
 
 
 
873
  position: absolute;
874
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
875
- width: 100% !important;
 
 
 
 
 
 
 
876
  }
 
877
  #logo-slider {
878
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
879
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
880
- list-style: none outside none;
881
- margin: 0;
882
  overflow: hidden;
883
- padding: 0;
884
- position: relative;
885
- width: 100% !important;
886
- left:-12px;
 
 
 
 
 
 
887
  }
888
- .slide {
889
- list-style: none outside none;
890
- margin: 0 !important;
891
- width: 100% !important;
 
 
 
 
892
  }
893
- }
894
- @media only screen and (min-width:770px){
895
- #logo-slider-wraper{
896
- position:relative;
897
- width:<?php echo $wp_logo_slider_settings['slider_width']; ?>px !important;
898
- left:34px !important;
899
  }
900
- .slider-controls {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
901
  position: absolute;
902
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
903
- width: 100% !important;
 
 
 
 
 
 
 
904
  }
 
905
  #logo-slider {
906
- background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
907
- height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
908
- list-style: none outside none;
909
- margin: 0;
910
  overflow: hidden;
911
- padding: 0;
912
- position: relative;
913
- width: 100% !important;
914
- }
915
- .slide {
916
- list-style: none outside none;
917
- margin: 0 !important;
918
- width: <?php echo $wp_logo_slider_settings['slider_width']; ?>px !important;
 
 
919
  }
920
- }
921
- </style>
922
- <?php
923
- }
924
 
925
- add_action( 'admin_enqueue_scripts', 'wp_logo_slider_admin_styles' );
926
- function wp_logo_slider_admin_styles(){ ?>
927
- <style type="text/css" media="screen">
928
- #arrow-style p {
929
- float:left;
930
- height:60px;
931
- width:40px;
932
- text-align:center;
933
- margin-right:16px;
934
  }
935
  </style>
936
- <?php
937
  }
 
938
  ?>
1
  <?php
2
  /*
3
+ * Plugin Name: Logo Slider
4
+ * Plugin URI: http://www.wordpress.org/extend/plugins/logo-slider
5
+ * Description: Add a logo slideshow carousel to your site quickly and easily.
6
+ * Version: 1.4.8
7
+ * Author: Maeve Lander
8
+ * Author URI: https://profiles.wordpress.org/enigmaweb/
9
+ * Text Domain: logo-slider
10
+ * Domain Path: /languages
11
+ */
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
15
 
16
+ define( 'LOGO_SLIDER', plugin_dir_url( __FILE__ ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ define( 'LS_SITE_URL', site_url() );
 
 
 
 
 
 
19
 
20
+
21
+ //++++++++++++++_ Register Admin Scripts
22
+ add_action( 'admin_enqueue_scripts', 'wp_lsp_scripts' );
23
+ function wp_lsp_scripts() {
24
+ wp_enqueue_script( 'jquery' );
25
+
26
+ wp_enqueue_script( 'jquery-ui-sortable' );
27
+
28
+ wp_register_style( 'lsp_admin_css', LOGO_SLIDER . 'includes/css/lsp_style.css' );
29
+ wp_enqueue_style( 'lsp_admin_css' );
30
+
31
+ wp_enqueue_style( 'wp-color-picker' );
32
+ wp_enqueue_script( 'cp-script-handle', LOGO_SLIDER . 'includes/js/lsp_colorpicker.js', array( 'wp-color-picker' ), false, true );
33
+
34
+ wp_enqueue_media();
35
+
36
+ wp_enqueue_script( 'media-upload' );
37
+ wp_enqueue_script( 'thickbox' );
38
+
39
+ wp_enqueue_style( 'thickbox' );
40
+
41
+ wp_register_script( 'lsp_media_box', LOGO_SLIDER . 'includes/js/lsp_media_box.js' );
42
+
43
+ if ( isset( $_GET["page"] ) ) {
44
+
45
+ $page = $_GET["page"];
46
+ if ( $page == "manage_images" ) {
47
+ wp_enqueue_script( 'lsp_media_box' );
48
+ }
49
+
50
+ }
51
  }
52
 
53
+ //++++++++++++++_ Call jQuery Cycle2
54
+ add_action( 'wp_footer', 'ls_logoslider_scripts' );
55
+ function ls_logoslider_scripts() {
56
+ if ( ! is_admin() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
+ wp_enqueue_script('jquery');
59
+
60
+ wp_register_script( 'jquery_cycle2', LOGO_SLIDER . "includes/js/lsp_jquery.cycle2.js", 'jquery', '2.1.2', true );
61
+ }
62
+ wp_enqueue_script( 'jquery_cycle2' );
63
+ /*------------------------------------------------------------------------------------------------------------------*/
64
+
65
+ wp_register_script( 'jquery_cycle2_carousel_min', LOGO_SLIDER . 'includes/js/lsp_jquery.cycle2.carousel.min.js', 'jquery', true );
66
+ wp_enqueue_script( 'jquery_cycle2_carousel_min' );
67
+
68
+ wp_register_script( 'jquery_cycle2_shuffle', LOGO_SLIDER . 'includes/js/lsp_jquery_shuffle.js', 'jquery', true );
69
+ wp_enqueue_script( 'jquery_cycle2_shuffle' );
70
+
71
+ wp_register_script( 'jquery_cycle2_easing', LOGO_SLIDER . 'includes/js/lsp_jquery.easing.js', 'jquery', true );
72
+ wp_enqueue_script( 'jquery_cycle2_easing' );
73
+
74
+ wp_register_script( 'jquery_cycle2_tile', LOGO_SLIDER . 'includes/js/lsp_jquery_tile.js', 'jquery', true );
75
+ wp_enqueue_script( 'jquery_cycle2_tile' );
76
+
77
+ }
78
+
79
+ //++++++++++++++_ Register Settings for Logo Slider Pro
80
+ add_action( 'admin_init', 'ls_register_settings' );
81
+ function ls_register_settings() {
82
+ register_setting( 'lsp_settings_group', 'lsp_slider_width' );
83
+ register_setting( 'lsp_settings_group', 'lsp_slider_height' );
84
+ register_setting( 'lsp_settings_group', 'lsp_image_per_slide' );
85
+ register_setting( 'lsp_settings_group', 'lsp_link_new_window' );
86
+ register_setting( 'lsp_settings_group', 'lsp_slider_effect' );
87
+ register_setting( 'lsp_settings_group', 'lsp_auto_slide' );
88
+ register_setting( 'lsp_settings_group', 'lsp_auto_slide_time' );
89
+ register_setting( 'lsp_settings_group', 'lsp_slider_arrow' );
90
+ register_setting( 'lsp_settings_group', 'lsp_slider_bgcolor' );
91
+ register_setting( 'lsp_settings_group', 'lsp_slider_css' );
92
+ register_setting( 'lsp_settings_group', 'lsp_pro_license' );
 
93
  }
94
 
95
+ //++++++++++++++_ Define Logo Slider Options
96
+ define( 'LS_SLIDER_WIDTH', get_option( 'lsp_slider_width' ) );
97
+ define( 'LS_SLIDER_HEIGHT', get_option( 'lsp_slider_height' ) );
98
+ define( 'LS_SLIDER_PER_SLIDE', get_option( 'lsp_image_per_slide' ) );
99
+ define( 'LS_SLIDER_NEW_WINDOW', get_option( 'lsp_link_new_window' ) );
100
+ define( 'LS_SLIDER_EFFECT', get_option( 'lsp_slider_effect' ) );
101
+ define( 'LS_SLIDER_AUTO', get_option( 'lsp_auto_slide' ) );
102
+ define( 'LS_SLIDER_TIME', get_option( 'lsp_auto_slide_time' ) );
103
+ define( 'LS_SLIDER_ARROW', get_option( 'lsp_slider_arrow' ) );
104
+ define( 'LS_SLIDER_BGCOLOR', get_option( 'lsp_slider_bgcolor' ) );
105
+ define( 'LS_SLIDER_CSS', get_option( 'lsp_slider_css' ) ? get_option('lsp_slider_css') : "Your custom css goes here." );
106
 
107
+ //++++++++++++++_ Plugin Menu
108
+ add_action( 'admin_menu', 'ls_plugin_menu' );
109
+ function ls_plugin_menu() {
110
+ add_menu_page( 'Logo Slider', 'Logo Slider', 'manage_options', 'ls_options', 'wp_ls_options', LOGO_SLIDER . "/includes/images/lsp_icon.png", 66 );
111
 
112
+ add_submenu_page( 'ls_options', 'Manage Logo Sliders', 'Manage Sliders', 'manage_options', 'manage_sliders', 'manage_logo_sliders' );
 
 
113
 
114
+ add_submenu_page( 'ls_options', 'Plugin Settings', 'Settings', 'manage_options', 'ls_settings', 'wp_ls_options' );
 
115
 
116
+ add_submenu_page( 'ls_options', '', '', 'manage_options', 'manage_images', 'manage_logo_images' );
117
+
118
+ remove_submenu_page('ls_options', 'ls_options');
119
  }
120
 
121
+ //++++++++++++++_ Require Files
122
+
123
+ require "includes/ls_database.php";
124
+
125
+ require "ls_logoslider.php";
126
+
127
+ function wp_ls_options() {
128
+ require "ls_settings.php";
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
+ function manage_logo_sliders() {
132
+ require "ls_manage_sliders.php";
 
 
 
 
 
 
 
133
  }
134
 
135
+ function manage_logo_images() {
136
+ require "ls_manage_images.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  }
138
 
139
+ //++++++++++++++_ Re-Order Images
140
+ function ls_image_sorting() {
141
+ ?>
 
 
 
 
 
 
 
142
  <script type="text/javascript">
143
+
144
+ jQuery(document).ready(function () {
145
+ jQuery('#lsp_sort_image').sortable({
146
+ items: '.lsp_image_item',
147
  opacity: 0.5,
148
  cursor: 'pointer',
149
  axis: 'y',
150
+ update: function () {
151
+ var lsp_order = '&action=lsp_update_order&lsp_img=' + jQuery(this).sortable("toArray") + '&db_action=lsp_order_img_list';
152
+ //alert(lsp_order);
153
+ jQuery.ajax({
154
+ type: 'POST',
155
+ url: ajaxurl,
156
+ cache: false,
157
+ data: lsp_order,
158
+ beforeSend: function () {
159
+ },
160
+ success: function (res) {
161
+ }
162
  });
163
  }
164
  });
165
  });
166
+
167
  </script>
168
+ <?php
169
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
+ add_action( 'admin_head', 'ls_image_sorting' );
 
172
 
173
+ function ls_image_order_list() {
174
+ global $wpdb;
175
+ $order_tbl = $wpdb->prefix . "lsp_images";
176
+
177
+ $lsp_img = stripslashes( strip_tags( $_POST['lsp_img'] ) );
178
+ $lsp_img = stripslashes( str_replace( "lsp_list_", "", $lsp_img ) );
179
+
180
+ $lsp_reorder_img = explode( ',', $lsp_img );
181
+
182
+ $lsp_dbaction = stripslashes( strip_tags( $_POST['db_action'] ) );
183
+
184
+ if ( $lsp_dbaction == "lsp_order_img_list" ) {
185
+ $lsp_count = 1;
186
+
187
+ foreach ( $lsp_reorder_img as $reorder_img ) {
188
+ $order_data = array(
189
+ "image_order" => $lsp_count
190
+ );
191
+
192
+ $order_where = array(
193
+ "image_id" => $reorder_img
194
+ );
195
+
196
+ $wpdb->update( $order_tbl, $order_data, $order_where );
197
+
198
+ $lsp_count = $lsp_count + 1;
199
+ }
200
+ }
201
  }
202
 
203
+ add_action( 'wp_ajax_lsp_update_order', 'ls_image_order_list' );
204
+
205
+ //++++++++++++++_ Define Devices
206
+ $iPod = stripos( $_SERVER['HTTP_USER_AGENT'], "iPod" );
207
+ $iPhone = stripos( $_SERVER['HTTP_USER_AGENT'], "iPhone" );
208
+ $iPad = stripos( $_SERVER['HTTP_USER_AGENT'], "iPad" );
209
+ $Android = stripos( $_SERVER['HTTP_USER_AGENT'], "Android" );
210
+ $webOS = stripos( $_SERVER['HTTP_USER_AGENT'], "webOS" );
211
+ $mobile = stripos( $_SERVER['HTTP_USER_AGENT'], "mobile" );
212
+ $BlackBerry = stripos( $_SERVER['HTTP_USER_AGENT'], "BlackBerry" );
213
+ $RimTablet = stripos( $_SERVER['HTTP_USER_AGENT'], "RIM Tablet" );
214
+
215
+ $msie = strpos( $_SERVER["HTTP_USER_AGENT"], 'MSIE' );
216
+ $firefox = strpos( $_SERVER["HTTP_USER_AGENT"], 'Firefox' );
217
+ $safari = strpos( $_SERVER["HTTP_USER_AGENT"], 'Safari' );
218
+ $chrome = strpos( $_SERVER["HTTP_USER_AGENT"], 'Chrome' );
219
+ $Opera = strpos( $_SERVER["HTTP_USER_AGENT"], 'OPR' );
220
+ $IE11 = strpos( $_SERVER["HTTP_USER_AGENT"], 'rv:11.0' );
221
+
222
+ define( 'LSP_IPOD', $iPod );
223
+ define( 'LSP_IPHONE', $iPhone );
224
+ define( 'LSP_IPAD', $iPad );
225
+ define( 'LSP_ANDROID', $Android );
226
+ define( 'LSP_WEBOS', $webOS );
227
+ define( 'LSP_MOBILE', $mobile );
228
+ define( 'LSP_BLACKBERRY', $BlackBerry );
229
+ define( 'LSP_RIMTABLET', $RimTablet );
230
+ define( 'LSP_MSIE', $msie );
231
+ define( 'LSP_FIREFOX', $firefox );
232
+ define( 'LSP_SAFARI', $safari );
233
+ define( 'LSP_CHROME', $chrome );
234
+ define( 'LSP_OPERA', $Opera );
235
+ define( 'LSP_IE11', $IE11 );
236
+
237
+ //++++++++++++++_ CSS Start
238
+ add_action( 'wp_head', 'lsp_css_style' );
239
+ function lsp_css_style() {
240
+ $ls_arrows = get_option( 'lsp_slider_arrow' );
241
+
242
+ $lsp_arraow_img_next = '';
243
+ $lsp_arraow_img_prev = '';
244
+
245
+ switch ( $ls_arrows ) {
246
+ case '1':
247
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow1_next.png";
248
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow1_prev.png";
249
+ break;
250
+ case '2':
251
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow2_next.png";
252
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow2_prev.png";
253
+ break;
254
+ case '3':
255
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow3_next.png";
256
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow3_prev.png";
257
+ break;
258
+ case '4':
259
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow4_next.png";
260
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow4_prev.png";
261
+ break;
262
+ case '5':
263
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow5_next.png";
264
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow5_prev.png";
265
+ break;
266
+ case '6':
267
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow6_next.png";
268
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow6_prev.png";
269
+ break;
270
+ case '7':
271
+ $lsp_arraow_img_next = LOGO_SLIDER . "ls_arrows/lsp_arrow7_next.png";
272
+ $lsp_arraow_img_prev = LOGO_SLIDER . "ls_arrows/lsp_arrow7_prev.png";
273
+ break;
274
+ }
275
 
276
+ $sp = LS_SLIDER_WIDTH / 2;
277
+ $sp1 = $sp - 45;
278
+ ?>
279
+ <style type="text/css">
280
+ <?php echo get_option('lsp_slider_css'); ?>
281
+ .lsp_main_slider {
282
+ background-color: <?php echo LS_SLIDER_BGCOLOR; ?>;
283
+ width: <?php echo LS_SLIDER_WIDTH; ?>px;
284
+ height: <?php echo LS_SLIDER_HEIGHT; ?>px;
285
+ padding: 8px;
286
+ position: relative;
287
+ margin-bottom: 24px;
288
  }
 
 
 
289
 
290
+ .lsp_slider_controls {
291
+ position: relative;
292
+ top: 50%;
293
+ margin-top: -20px;
294
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
 
296
+ .lsp_next_btn {
297
+ background: url(<?php echo $lsp_arraow_img_next; ?>) no-repeat center;
298
+ float: right;
299
+ width: 40px;
300
+ height: 40px;
301
+ display: inline-block;
302
+ text-indent: -9000px;
303
+ cursor: pointer;
304
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
 
306
+ .lsp_prev_btn {
307
+ background: url(<?php echo $lsp_arraow_img_prev; ?>) no-repeat center;
308
+ float: float;
309
+ width: 40px;
310
+ height: 40px;
311
+ display: inline-block;
312
+ text-indent: -9000px;
313
+ cursor: pointer;
314
+ }
315
 
316
+ .lsp_slider_img {
317
+ height: auto;
318
+ margin-top: -<?php echo LS_SLIDER_HEIGHT / 2; ?>px;
319
+ overflow: hidden;
320
+ position: absolute;
321
+ top: 50%;
322
+ left: 6%;
323
+ <?php
324
+ if(LS_SLIDER_EFFECT != 'carousel'){
325
+ ?> text-align: center;
326
+ <?php
327
  }
328
+ ?> width: <?php echo LS_SLIDER_WIDTH - 90; ?>px;
329
+ /* margin-left: -*/<?php //echo $sp1; ?>/*px;*/
330
+ }
331
 
332
+ #logo-slider {
333
+ height: auto;
334
+ margin-top: -<?php echo LS_SLIDER_HEIGHT / 2; ?>px;
335
+ overflow: hidden;
336
+ position: absolute;
337
+ top: 50%;
338
+ left: 6%;
339
+ <?php
340
+ if(LS_SLIDER_EFFECT != 'carousel'){
341
+ ?> text-align: center;
 
 
 
342
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  }
344
+ ?>width: <?php echo LS_SLIDER_WIDTH - 90; ?>px;
345
+ /* margin-left: -*/<?php //echo $sp1; ?>/*px;*/
346
+ }
347
 
348
+ .lsp_img_div {
349
+ width: 100%;
350
+ height: auto;
351
+ }
352
 
353
+ /* Visibilties */
354
+ .visible_phone {
355
+ visibility: hidden;
356
+ display: none;
357
+ }
 
 
358
 
359
+ .visible_desktop {
360
+ visibility: visible;
361
+ }
362
 
363
+ /* ============================= */
364
+ /* ! Layout for phone version */
365
+ /* ============================= */
 
 
366
 
367
+ /*Rsponsive layout 1024*/
368
+ @media screen and (min-width: 801px) and (max-width: 1024px) {
369
+
370
+ .visible_phone {
371
+ visibility: visible;
372
+ display: inherit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  }
374
+
375
+ .visible_desktop {
376
+ visibility: hidden;
377
+ display: none;
 
378
  }
379
+
380
+ .lsp_main_slider {
381
+ background-color: <?php echo LS_SLIDER_BGCOLOR; ?>;
382
+ height: <?php echo LS_SLIDER_HEIGHT; ?>px;
383
+ padding: 8px;
 
 
384
  position: relative;
385
+ width: 100%;
386
+ margin-bottom: 24px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  }
388
+
389
+ .lsp_slider_img {
390
+ height: auto;
391
+ margin-left: -334px;
392
+ margin-top: -65px;
393
+ overflow: hidden;
394
+ position: absolute;
395
+ top: 50%;
396
+ left: 50%;
397
+ width: 668px;
398
+ <?php
399
+ if(LS_SLIDER_EFFECT != 'carousel'){
400
+ ?> text-align: center;
401
+ <?php
402
+ }
403
+ ?>
404
  }
405
+
406
  #logo-slider {
407
+ height: auto;
408
+ margin-left: -334px;
409
+ margin-top: -65px;
 
410
  overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  position: absolute;
412
+ top: 50%;
413
+ left: 50%;
414
+ width: 668px;
415
+ <?php
416
+ if(LS_SLIDER_EFFECT != 'carousel'){
417
+ ?> text-align: center;
418
+ <?php
419
+ }
420
+ ?>
421
  }
422
+
423
+ }
424
+
425
+ /*Rsponsive layout 768*/
426
+ @media screen and (min-width: 641px) and (max-width: 800px) {
427
+
428
+ .visible_phone {
429
+ visibility: visible;
430
+ display: inherit;
431
  }
432
+
433
+ .visible_desktop {
434
+ visibility: hidden;
435
+ display: none;
436
  }
437
+
438
+ .lsp_main_slider {
439
+ background-color: <?php echo LS_SLIDER_BGCOLOR; ?>;
440
+ height: <?php echo LS_SLIDER_HEIGHT; ?>px;
441
+ padding: 8px;
442
+ position: relative;
443
+ width: 100%;
444
+ margin-bottom: 24px;
445
  }
446
+
447
+ .lsp_slider_img {
448
+ height: auto;
449
+ margin-left: -256px;
450
+ margin-top: -65px;
451
+ overflow: hidden;
452
+ position: absolute;
453
+ top: 50%;
454
+ left: 50%;
455
+ width: 512px;
456
+ <?php
457
+ if(LS_SLIDER_EFFECT != 'carousel'){
458
+ ?> text-align: center;
459
+ <?php
460
+ }
461
+ ?>
462
  }
463
+
464
  #logo-slider {
465
+ height: auto;
466
+ margin-left: -256px;
467
+ margin-top: -65px;
 
468
  overflow: hidden;
469
+ position: absolute;
470
+ top: 50%;
471
+ left: 50%;
472
+ width: 512px;
473
+ <?php
474
+ if(LS_SLIDER_EFFECT != 'carousel'){
475
+ ?> text-align: center;
476
+ <?php
477
+ }
478
+ ?>
479
+ }
480
+
481
+ }
482
+
483
+ /*Rsponsive layout 640*/
484
+ @media screen and (min-width: 481px) and (max-width: 640px) {
485
+
486
+ .visible_phone {
487
+ visibility: visible;
488
+ display: inherit;
489
  }
490
+
491
+ .visible_desktop {
492
+ visibility: hidden;
493
+ display: none;
494
  }
495
+
496
+ .lsp_main_slider {
497
+ background-color: <?php echo LS_SLIDER_BGCOLOR; ?>;
498
+ height: <?php echo LS_SLIDER_HEIGHT; ?>px;
499
+ padding: 8px;
500
+ position: relative;
501
+ width: 100%;
502
+ margin-bottom: 24px;
503
  }
504
+
505
+ .lsp_slider_img {
506
+ height: auto;
507
+ margin-left: -176px;
508
+ margin-top: -65px;
509
+ overflow: hidden;
510
  position: absolute;
511
+ top: 50%;
512
+ left: 50%;
513
+ width: 346px;
514
+ <?php
515
+ if(LS_SLIDER_EFFECT != 'carousel'){
516
+ ?> text-align: center;
517
+ <?php
518
+ }
519
+ ?>
520
  }
521
+
522
  #logo-slider {
523
+ height: auto;
524
+ margin-left: -176px;
525
+ margin-top: -65px;
 
526
  overflow: hidden;
527
+ position: absolute;
528
+ top: 50%;
529
+ left: 50%;
530
+ width: 346px;
531
+ <?php
532
+ if(LS_SLIDER_EFFECT != 'carousel'){
533
+ ?> text-align: center;
534
+ <?php
535
+ }
536
+ ?>
537
  }
538
+
539
+ }
540
+
541
+ /*Rsponsive layout 480*/
542
+ @media screen and (min-width: 320px) and (max-width: 480px) {
543
+ .visible_phone {
544
+ visibility: visible;
545
+ display: inherit;
546
  }
547
+
548
+ .visible_desktop {
549
+ visibility: hidden;
550
+ display: none;
 
 
551
  }
552
+
553
+ .lsp_main_slider {
554
+ background-color: <?php echo LS_SLIDER_BGCOLOR; ?>;
555
+ height: <?php echo LS_SLIDER_HEIGHT; ?>px;
556
+ padding: 8px;
557
+ position: relative;
558
+ width: 100%;
559
+ margin-bottom: 24px;
560
+ }
561
+
562
+ .lsp_slider_img {
563
+ height: auto;
564
+ margin-left: -91px;
565
+ margin-top: -65px;
566
+ overflow: hidden;
567
  position: absolute;
568
+ top: 50%;
569
+ left: 50%;
570
+ width: 185px;
571
+ <?php
572
+ if(LS_SLIDER_EFFECT != 'carousel'){
573
+ ?>text-align: center;
574
+ <?php
575
+ }
576
+ ?>
577
  }
578
+
579
  #logo-slider {
580
+ height: auto;
581
+ margin-left: -91px;
582
+ margin-top: -65px;
 
583
  overflow: hidden;
584
+ position: absolute;
585
+ top: 50%;
586
+ left: 50%;
587
+ width: 185px;
588
+ <?php
589
+ if(LS_SLIDER_EFFECT != 'carousel'){
590
+ ?> text-align: center;
591
+ <?php
592
+ }
593
+ ?>
594
  }
 
 
 
 
595
 
 
 
 
 
 
 
 
 
 
596
  }
597
  </style>
598
+ <?php
599
  }
600
+
601
  ?>
ls_arrows/lsp_arrow1_next.png ADDED
Binary file
ls_arrows/lsp_arrow1_prev.png ADDED
Binary file
ls_arrows/lsp_arrow2_next.png ADDED
Binary file
ls_arrows/lsp_arrow2_prev.png ADDED
Binary file
ls_arrows/lsp_arrow3_next.png ADDED
Binary file
ls_arrows/lsp_arrow3_prev.png ADDED
Binary file
ls_arrows/lsp_arrow4_next.png ADDED
Binary file
ls_arrows/lsp_arrow4_prev.png ADDED
Binary file
ls_arrows/lsp_arrow5_next.png ADDED
Binary file
ls_arrows/lsp_arrow5_prev.png ADDED
Binary file
ls_arrows/lsp_arrow6_next.png ADDED
Binary file
ls_arrows/lsp_arrow6_prev.png ADDED
Binary file
ls_arrows/lsp_arrow7_next.png ADDED
Binary file
ls_arrows/lsp_arrow7_prev.png ADDED
Binary file
ls_arrows/lsp_off.png ADDED
Binary file
ls_logoslider.php ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Shortcode New
5
+ */
6
+ function wp_lsp_sliders( $atts ) {
7
+ global $wpdb;
8
+ $tbl_sliders = $wpdb->prefix . "lsp_sliders";
9
+
10
+ ob_start();
11
+ extract( shortcode_atts( array(
12
+ 'slider' => '',
13
+ ), $atts ) );
14
+
15
+ $get_sliders = $wpdb->get_results( "Select * From $tbl_sliders Where slider_shortname = '$slider'" );
16
+ ?>
17
+ <div class="lsp_main_slider" style="height: <?php echo get_option('lsp_slider_height') ?>px">
18
+ <?php
19
+ foreach ( $get_sliders as $get_slider ) {
20
+ $slider_id = $get_slider->slider_id;
21
+
22
+ if ( LS_SLIDER_ARROW != 0 ) {
23
+ ?>
24
+ <div class="lsp_slider_controls">
25
+ <div id="lsp_next_btn_<?php echo $slider_id; ?>" class="lsp_next_btn">next</div>
26
+ <div id="lsp_prev_btn_<?php echo $slider_id; ?>" class="lsp_prev_btn">prev</div>
27
+ </div>
28
+ <?php
29
+ }
30
+ ?>
31
+ <div id="logo-slider">
32
+ <?php
33
+ $get_slider_image = $wpdb->get_results( "Select * From " . $wpdb->prefix . "lsp_images Where slider_id = $slider_id Order By image_order ASC" );
34
+
35
+ $target = '';
36
+ if ( LS_SLIDER_NEW_WINDOW == 'on' ) {
37
+ $target = 'target="_blank"';
38
+ } else {
39
+ $target = 'target="_parent"';
40
+ }
41
+ ?>
42
+
43
+ <div class="cycle-slideshow" id="lsp_slideshow_<?php echo $slider_id; ?>"
44
+ data-cycle-fx="<?php echo LS_SLIDER_EFFECT; ?>"
45
+ data-cycle-timeout="<?php echo( ( LS_SLIDER_AUTO == 1 ) ? LS_SLIDER_TIME * 1000 : 0 ); ?>"
46
+ <?php
47
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
48
+ ?>
49
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE + 2; ?>"
50
+ <?php
51
+ } else {
52
+ ?>
53
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE; ?>"
54
+ <?php
55
+ }
56
+ ?>
57
+ data-cycle-next="#lsp_next_btn_<?php echo $slider_id; ?>"
58
+ data-cycle-prev="#lsp_prev_btn_<?php echo $slider_id; ?>"
59
+ data-cycle-speed="800"
60
+ data-cycle-slides="> div"
61
+ >
62
+ <?php
63
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
64
+ foreach ( $get_slider_image as $lsp_img ) {
65
+ ?>
66
+ <div>
67
+ <?php if ( ! empty( $lsp_img->image_link_to ) ) { ?>
68
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
69
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
70
+ </a>
71
+ <?php
72
+ } else {
73
+ ?>
74
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
75
+ <?php
76
+ }
77
+ ?>
78
+ </div>
79
+ <?php
80
+ }
81
+ } else {
82
+ if ( LSP_IPOD || LSP_IPHONE ) {
83
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
84
+ } else if ( LSP_IPAD ) {
85
+ $lsp_data_chunk = array_chunk( $get_slider_image, LS_SLIDER_PER_SLIDE );
86
+ } else if ( LSP_ANDROID ) {
87
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
88
+ } else if ( LSP_WEBOS ) {
89
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
90
+ } else if ( LSP_MOBILE ) {
91
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
92
+ } else if ( LSP_BLACKBERRY ) {
93
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
94
+ } else if ( LSP_RIMTABLET ) {
95
+ $lsp_data_chunk = array_chunk( $get_slider_image, 3 );
96
+ } else if ( ( LSP_MSIE ) || ( LSP_FIREFOX ) || ( LSP_SAFARI ) || ( LSP_CHROME ) || ( LSP_IE11 ) ) {
97
+ $lsp_data_chunk = array_chunk( $get_slider_image, (int) LS_SLIDER_PER_SLIDE );
98
+ }
99
+
100
+ if ( isset ( $lsp_data_chunk ) ) {
101
+
102
+ foreach ( $lsp_data_chunk as $lsp_data_chunk_img ) {
103
+ ?>
104
+ <div style="width: 100%; hight: auto;">
105
+ <?php
106
+ foreach ( $lsp_data_chunk_img as $lsp_img ) {
107
+ if ( ! empty( $lsp_img->image_link_to ) ) { ?>
108
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
109
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>"
110
+ alt="">
111
+ </a>
112
+ <?php
113
+ } else {
114
+ ?>
115
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
116
+ <?php
117
+ }
118
+ }
119
+ ?>
120
+ </div>
121
+ <?php
122
+ }
123
+ }
124
+ } ?>
125
+ </div>
126
+ <?php ?>
127
+ </div>
128
+ </div>
129
+
130
+ <?php
131
+ }
132
+
133
+ return ob_get_clean();
134
+ }
135
+
136
+ add_shortcode( "lsp_slider", "wp_lsp_sliders" );
137
+
138
+
139
+ function lsp_logo_slider( $lsp_short_name ) {
140
+ global $wpdb;
141
+ $tbl_sliders = $wpdb->prefix . "lsp_sliders";
142
+
143
+ $get_sliders = $wpdb->get_results( "Select * From $tbl_sliders Where slider_shortname = '$lsp_short_name'" );
144
+ ?>
145
+ <div class="lsp_main_slider">
146
+ <?php
147
+ foreach ( $get_sliders as $get_slider ) {
148
+ $slider_id = $get_slider->slider_id;
149
+ if ( LS_SLIDER_ARROW != 0 ) {
150
+ ?>
151
+ <div class="lsp_slider_controls">
152
+ <div id="lsp_next_btn_<?php echo $slider_id; ?>" class="lsp_next_btn">next</div>
153
+ <div id="lsp_prev_btn_<?php echo $slider_id; ?>" class="lsp_prev_btn">prev</div>
154
+ </div>
155
+ <?php
156
+ }
157
+ ?>
158
+ <div id="logo-slider">
159
+ <?php
160
+ $get_slider_image = $wpdb->get_results( "Select * From " . $wpdb->prefix . "lsp_images Where slider_id = $slider_id Order By image_order ASC" );
161
+
162
+ $target = '';
163
+ if ( LS_SLIDER_NEW_WINDOW == 'on' ) {
164
+ $target = 'target="_blank"';
165
+ } else {
166
+ $target = 'target="_parent"';
167
+ }
168
+ ?>
169
+
170
+ <div class="cycle-slideshow" id="lsp_slideshow_<?php echo $slider_id; ?>"
171
+ data-cycle-fx="<?php echo LS_SLIDER_EFFECT; ?>"
172
+ data-cycle-timeout="<?php echo( ( LS_SLIDER_AUTO == 1 ) ? LS_SLIDER_TIME * 1000 : 0 ); ?>"
173
+ <?php
174
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
175
+ ?>
176
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE + 2; ?>"
177
+ <?php
178
+ } else {
179
+ ?>
180
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE; ?>"
181
+ <?php
182
+ }
183
+ ?>
184
+ data-cycle-next="#lsp_next_btn_<?php echo $slider_id; ?>"
185
+ data-cycle-prev="#lsp_prev_btn_<?php echo $slider_id; ?>"
186
+ data-cycle-speed="800"
187
+ data-cycle-slides="> div"
188
+ >
189
+ <?php
190
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
191
+ foreach ( $get_slider_image as $lsp_img ) {
192
+ ?>
193
+ <div>
194
+ <?php if ( ! empty( $lsp_img->image_link_to ) ) { ?>
195
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
196
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
197
+ </a>
198
+ <?php
199
+ } else {
200
+ ?>
201
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
202
+ <?php
203
+ }
204
+ ?>
205
+ </div>
206
+ <?php
207
+ }
208
+ } else {
209
+ if ( LSP_IPOD || LSP_IPHONE ) {
210
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
211
+ } else if ( LSP_IPAD ) {
212
+ $lsp_data_chunk = array_chunk( $get_slider_image, LS_SLIDER_PER_SLIDE );
213
+ } else if ( LSP_ANDROID ) {
214
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
215
+ } else if ( LSP_WEBOS ) {
216
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
217
+ } else if ( LSP_MOBILE ) {
218
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
219
+ } else if ( LSP_BLACKBERRY ) {
220
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
221
+ } else if ( LSP_RIMTABLET ) {
222
+ $lsp_data_chunk = array_chunk( $get_slider_image, 3 );
223
+ } else if ( ( LSP_MSIE ) || ( LSP_FIREFOX ) || ( LSP_SAFARI ) || ( LSP_CHROME ) || ( LSP_IE11 ) ) {
224
+ $lsp_data_chunk = array_chunk( $get_slider_image, LS_SLIDER_PER_SLIDE );
225
+ }
226
+
227
+ foreach ( $lsp_data_chunk as $lsp_data_chunk_img ) {
228
+ ?>
229
+ <div style="width: 100%; hight: auto;">
230
+ <?php
231
+ foreach ( $lsp_data_chunk_img as $lsp_img ) {
232
+ if ( ! empty( $lsp_img->image_link_to ) ) { ?>
233
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
234
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
235
+ </a>
236
+ <?php
237
+ } else {
238
+ ?>
239
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
240
+ <?php
241
+ }
242
+ }
243
+ ?>
244
+ </div>
245
+ <?php }
246
+ } ?>
247
+ </div>
248
+
249
+ </div>
250
+ </div>
251
+ <?php
252
+ }
253
+
254
+ ob_start();
255
+
256
+ return $lsp_short_name;
257
+
258
+ return ob_get_clean();
259
+ }
260
+
261
+ /*
262
+ * Backward compatibility with old logo-slider shortcode.
263
+ */
264
+
265
+ function ls_old_shortcode( $atts ) {
266
+
267
+ global $wpdb;
268
+ $tbl_sliders = $wpdb->prefix . "lsp_sliders";
269
+
270
+ ob_start();
271
+ extract( shortcode_atts( array(
272
+ 'slider' => '',
273
+ ), $atts ) );
274
+
275
+ $get_sliders = $wpdb->get_results( "Select * From $tbl_sliders Where slider_shortname = 'first_slider'" );
276
+ ?>
277
+ <div class="lsp_main_slider" style="height: <?php echo get_option('lsp_slider_height') ?>px">
278
+ <?php
279
+ foreach ( $get_sliders as $get_slider ) {
280
+ $slider_id = $get_slider->slider_id;
281
+
282
+ if ( LS_SLIDER_ARROW != 0 ) {
283
+ ?>
284
+ <div class="lsp_slider_controls">
285
+ <div id="lsp_next_btn_<?php echo $slider_id; ?>" class="lsp_next_btn">next</div>
286
+ <div id="lsp_prev_btn_<?php echo $slider_id; ?>" class="lsp_prev_btn">prev</div>
287
+ </div>
288
+ <?php
289
+ }
290
+ ?>
291
+ <div id="logo-slider">
292
+ <?php
293
+ $get_slider_image = $wpdb->get_results( "Select * From " . $wpdb->prefix . "lsp_images Where slider_id = $slider_id Order By image_order ASC" );
294
+
295
+ $target = '';
296
+ if ( LS_SLIDER_NEW_WINDOW == 'on' ) {
297
+ $target = 'target="_blank"';
298
+ } else {
299
+ $target = 'target="_parent"';
300
+ }
301
+ ?>
302
+
303
+ <div class="cycle-slideshow" id="lsp_slideshow_<?php echo $slider_id; ?>"
304
+ data-cycle-fx="<?php echo LS_SLIDER_EFFECT; ?>"
305
+ data-cycle-timeout="<?php echo( ( LS_SLIDER_AUTO == 1 ) ? LS_SLIDER_TIME * 1000 : 0 ); ?>"
306
+ <?php
307
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
308
+ ?>
309
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE + 2; ?>"
310
+ <?php
311
+ } else {
312
+ ?>
313
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE; ?>"
314
+ <?php
315
+ }
316
+ ?>
317
+ data-cycle-next="#lsp_next_btn_<?php echo $slider_id; ?>"
318
+ data-cycle-prev="#lsp_prev_btn_<?php echo $slider_id; ?>"
319
+ data-cycle-speed="800"
320
+ data-cycle-slides="> div"
321
+ >
322
+ <?php
323
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
324
+ foreach ( $get_slider_image as $lsp_img ) {
325
+ ?>
326
+ <div>
327
+ <?php if ( ! empty( $lsp_img->image_link_to ) ) { ?>
328
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
329
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
330
+ </a>
331
+ <?php
332
+ } else {
333
+ ?>
334
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
335
+ <?php
336
+ }
337
+ ?>
338
+ </div>
339
+ <?php
340
+ }
341
+ } else {
342
+ if ( LSP_IPOD || LSP_IPHONE ) {
343
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
344
+ } else if ( LSP_IPAD ) {
345
+ $lsp_data_chunk = array_chunk( $get_slider_image, LS_SLIDER_PER_SLIDE );
346
+ } else if ( LSP_ANDROID ) {
347
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
348
+ } else if ( LSP_WEBOS ) {
349
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
350
+ } else if ( LSP_MOBILE ) {
351
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
352
+ } else if ( LSP_BLACKBERRY ) {
353
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
354
+ } else if ( LSP_RIMTABLET ) {
355
+ $lsp_data_chunk = array_chunk( $get_slider_image, 3 );
356
+ } else if ( ( LSP_MSIE ) || ( LSP_FIREFOX ) || ( LSP_SAFARI ) || ( LSP_CHROME ) || ( LSP_IE11 ) ) {
357
+ $lsp_data_chunk = array_chunk( $get_slider_image, (int) LS_SLIDER_PER_SLIDE );
358
+ }
359
+
360
+ if ( isset ( $lsp_data_chunk ) ) {
361
+
362
+ foreach ( $lsp_data_chunk as $lsp_data_chunk_img ) {
363
+ ?>
364
+ <div style="width: 100%; hight: auto;">
365
+ <?php
366
+ foreach ( $lsp_data_chunk_img as $lsp_img ) {
367
+ if ( ! empty( $lsp_img->image_link_to ) ) { ?>
368
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
369
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>"
370
+ alt="">
371
+ </a>
372
+ <?php
373
+ } else {
374
+ ?>
375
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
376
+ <?php
377
+ }
378
+ }
379
+ ?>
380
+ </div>
381
+ <?php
382
+ }
383
+ }
384
+ } ?>
385
+ </div>
386
+ <?php ?>
387
+ </div>
388
+ </div>
389
+
390
+ <?php
391
+ }
392
+
393
+ return ob_get_clean();
394
+
395
+ }
396
+
397
+ add_shortcode( 'logo-slider', 'ls_old_shortcode' );
398
+
399
+ function logo_slider() {
400
+ global $wpdb;
401
+ $tbl_sliders = $wpdb->prefix . "lsp_sliders";
402
+ $lsp_short_name = 'first_slider';
403
+
404
+ $get_sliders = $wpdb->get_results( "Select * From $tbl_sliders Where slider_shortname = '$lsp_short_name'" );
405
+ ?>
406
+ <div class="lsp_main_slider">
407
+ <?php
408
+ foreach ( $get_sliders as $get_slider ) {
409
+ $slider_id = $get_slider->slider_id;
410
+ if ( LS_SLIDER_ARROW != 0 ) {
411
+ ?>
412
+ <div class="lsp_slider_controls">
413
+ <div id="lsp_next_btn_<?php echo $slider_id; ?>" class="lsp_next_btn">next</div>
414
+ <div id="lsp_prev_btn_<?php echo $slider_id; ?>" class="lsp_prev_btn">prev</div>
415
+ </div>
416
+ <?php
417
+ }
418
+ ?>
419
+ <div id="logo-slider">
420
+ <?php
421
+ $get_slider_image = $wpdb->get_results( "Select * From " . $wpdb->prefix . "lsp_images Where slider_id = $slider_id Order By image_order ASC" );
422
+
423
+ $target = '';
424
+ if ( LS_SLIDER_NEW_WINDOW == 'on' ) {
425
+ $target = 'target="_blank"';
426
+ } else {
427
+ $target = 'target="_parent"';
428
+ }
429
+ ?>
430
+
431
+ <div class="cycle-slideshow" id="lsp_slideshow_<?php echo $slider_id; ?>"
432
+ data-cycle-fx="<?php echo LS_SLIDER_EFFECT; ?>"
433
+ data-cycle-timeout="<?php echo( ( LS_SLIDER_AUTO == 1 ) ? LS_SLIDER_TIME * 1000 : 0 ); ?>"
434
+ <?php
435
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
436
+ ?>
437
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE + 2; ?>"
438
+ <?php
439
+ } else {
440
+ ?>
441
+ data-cycle-carousel-visible="<?php echo LS_SLIDER_PER_SLIDE; ?>"
442
+ <?php
443
+ }
444
+ ?>
445
+ data-cycle-next="#lsp_next_btn_<?php echo $slider_id; ?>"
446
+ data-cycle-prev="#lsp_prev_btn_<?php echo $slider_id; ?>"
447
+ data-cycle-speed="800"
448
+ data-cycle-slides="> div"
449
+ >
450
+ <?php
451
+ if ( LS_SLIDER_EFFECT == 'carousel' ) {
452
+ foreach ( $get_slider_image as $lsp_img ) {
453
+ ?>
454
+ <div>
455
+ <?php if ( ! empty( $lsp_img->image_link_to ) ) { ?>
456
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
457
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
458
+ </a>
459
+ <?php
460
+ } else {
461
+ ?>
462
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
463
+ <?php
464
+ }
465
+ ?>
466
+ </div>
467
+ <?php
468
+ }
469
+ } else {
470
+ if ( LSP_IPOD || LSP_IPHONE ) {
471
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
472
+ } else if ( LSP_IPAD ) {
473
+ $lsp_data_chunk = array_chunk( $get_slider_image, LS_SLIDER_PER_SLIDE );
474
+ } else if ( LSP_ANDROID ) {
475
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
476
+ } else if ( LSP_WEBOS ) {
477
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
478
+ } else if ( LSP_MOBILE ) {
479
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
480
+ } else if ( LSP_BLACKBERRY ) {
481
+ $lsp_data_chunk = array_chunk( $get_slider_image, 1 );
482
+ } else if ( LSP_RIMTABLET ) {
483
+ $lsp_data_chunk = array_chunk( $get_slider_image, 3 );
484
+ } else if ( ( LSP_MSIE ) || ( LSP_FIREFOX ) || ( LSP_SAFARI ) || ( LSP_CHROME ) || ( LSP_IE11 ) ) {
485
+ $lsp_data_chunk = array_chunk( $get_slider_image, LS_SLIDER_PER_SLIDE );
486
+ }
487
+
488
+ foreach ( $lsp_data_chunk as $lsp_data_chunk_img ) {
489
+ ?>
490
+ <div style="width: 100%; hight: auto;">
491
+ <?php
492
+ foreach ( $lsp_data_chunk_img as $lsp_img ) {
493
+ if ( ! empty( $lsp_img->image_link_to ) ) { ?>
494
+ <a href="<?php echo $lsp_img->image_link_to; ?>" <?php echo $target; ?>>
495
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
496
+ </a>
497
+ <?php
498
+ } else {
499
+ ?>
500
+ <img src="<?php echo $lsp_img->image_path . $lsp_img->image_name; ?>" alt="">
501
+ <?php
502
+ }
503
+ }
504
+ ?>
505
+ </div>
506
+ <?php }
507
+ } ?>
508
+ </div>
509
+
510
+ </div>
511
+ </div>
512
+ <?php
513
+ }
514
+
515
+ ob_start();
516
+
517
+ return $lsp_short_name;
518
+
519
+ return ob_get_clean();
520
+ }
521
+
522
+ ?>
ls_manage_images.php ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--==============
2
+ >> Logo Slider Pro: Manage Images
3
+ ==============-->
4
+ <div id="wpbody">
5
+ <div id="wpbody-content">
6
+ <div class="wrap">
7
+ <h2><?php _e( 'Manage Slider Images', 'logo-slider' ) ?></h2>
8
+
9
+ <?php
10
+ global $wpdb;
11
+ $lsp_slider_id = $_GET['lsp_slider_id'];
12
+
13
+ if ( isset( $_REQUEST['lsp_msg'] ) ) {
14
+ $lsp_msg = $_REQUEST['lsp_msg'];
15
+ } else {
16
+ $lsp_msg = '';
17
+ }
18
+
19
+ $slider_table = $wpdb->prefix . "lsp_sliders";
20
+
21
+ $lspSlider = $wpdb->get_results( "Select slider_id From $slider_table Where slider_id = $lsp_slider_id" );
22
+
23
+ switch ( $lsp_msg ) {
24
+ case "add_image_success":
25
+ ?>
26
+ <div class='updated' style='margin-top:10px;'>
27
+ <p>
28
+ <?php _e( 'Image save successfully.', 'logo-slider' ) ?>
29
+ <?php
30
+ foreach ( $lspSlider as $lspDliderID ) {
31
+ ?>
32
+ <a href="admin.php?page=manage_sliders&lsp_action=lsp_get_shortcode&lsp_slider_id=<?php echo $lspDliderID->slider_id; ?>">
33
+ Get Shortcode here
34
+ </a>
35
+ <?php
36
+ }
37
+ ?>
38
+ </p>
39
+ </div>
40
+ <?php
41
+ break;
42
+ case "add_image_error":
43
+ ?>
44
+ <div class='error' style='margin-top:10px;'>
45
+ <p>
46
+ <?php _e( 'Image and Slider Required.', 'logo-slider' ) ?>
47
+ <?php
48
+ foreach ( $lspSlider as $lspDliderID ) {
49
+ ?>
50
+ <a href="admin.php?page=manage_sliders&lsp_action=lsp_get_shortcode&lsp_slider_id=<?php echo $lspDliderID->slider_id; ?>">
51
+ Get Shortcode here
52
+ </a>
53
+ <?php
54
+ }
55
+ ?>
56
+ </p>
57
+ </div>
58
+ <?php
59
+ break;
60
+ case "image_link_success":
61
+ ?>
62
+ <div class='updated' style='margin-top:10px;'>
63
+ <p>
64
+ <?php _e( 'Link for Image save successfully.', 'logo-slider' ) ?>
65
+ <?php
66
+ foreach ( $lspSlider as $lspDliderID ) {
67
+ ?>
68
+ <a href="admin.php?page=manage_sliders&lsp_action=lsp_get_shortcode&lsp_slider_id=<?php echo $lspDliderID->slider_id; ?>">
69
+ Get Shortcode here
70
+ </a>
71
+ <?php
72
+ }
73
+ ?>
74
+ </p>
75
+ </div>
76
+ <?php
77
+ break;
78
+ case "image_del_success":
79
+ ?>
80
+ <div class='updated' style='margin-top:10px;'>
81
+ <p><?php _e( 'Image Delete successfully.', 'logo-slider' ) ?>&nbsp; <a href="">Get Shortcode
82
+ here</a></p>
83
+ </div>
84
+ <?php
85
+ break;
86
+ }
87
+ ?>
88
+
89
+ <div class="lsp_main_body">
90
+ <div class="lsp_left_body">
91
+
92
+ <div class="lsp_body_heading">
93
+ <h3><?php _e( 'Add Slider Images', 'logo-slider' ) ?></h3>
94
+ </div>
95
+ <div class="lsp_plugin_body">
96
+ <div class="lsp_plugin_div">
97
+ <form action="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=add_image"
98
+ method="post" enctype="multipart/form-data">
99
+ <table width="100%" border="0" cellspacing="4" cellpadding="0">
100
+ <tr>
101
+ <td width="22%">
102
+ <label>
103
+ <?php _e( "Select Slider", "lsp" ) ?>
104
+ </label>
105
+ </td>
106
+ <td width="70%">
107
+ <?php
108
+ $get_sliders = $wpdb->get_results( "Select * From $slider_table" );
109
+ ?>
110
+ <select name="lsp_sliders">
111
+ <option value=""
112
+ selected="selected"><?php _e( 'Select Slider', 'logo-slider' ); ?></option>
113
+ <?php
114
+ foreach ( $get_sliders as $get_slider ) {
115
+ if ( $get_slider->slider_id == $lsp_slider_id ) {
116
+ ?>
117
+ <option selected="selected"
118
+ value="<?php echo $get_slider->slider_id; ?>">
119
+ <?php echo $get_slider->slider_name; ?>
120
+ </option>
121
+ <?php
122
+ } else {
123
+ ?>
124
+ <option value="<?php echo $get_slider->slider_id; ?>">
125
+ <?php echo $get_slider->slider_name; ?>
126
+ </option>
127
+ <?php
128
+ }
129
+ }
130
+ ?>
131
+ </select>
132
+ </td>
133
+ <td colspan="2">&nbsp;</td>
134
+ </tr>
135
+ <tr>
136
+ <td>
137
+ <label>
138
+ <?php _e( "Upload New Image", "lsp" ); ?>
139
+ </label>
140
+ </td>
141
+ <td>
142
+ <input type="text" size="50" name="lsp_slide_image" id="lsp_slide_image"
143
+ class="lsp_upload_url"/>
144
+ </td>
145
+ <td>
146
+ <input id="lsp_upload_button" class="lsp_upload_button" type="button"
147
+ name="upload_button"
148
+ value="<?php _e( 'Choose Image', 'logo-slider' ); ?>">
149
+ </td>
150
+ <td>
151
+ <input type="submit" name="lsp_save_images"
152
+ value="<?php _e( 'Upload Image', 'logo-slider' ); ?>">
153
+ </td>
154
+ </tr>
155
+ </table>
156
+ </form>
157
+ </div>
158
+ </div>
159
+
160
+ </div>
161
+
162
+ <div class="lsp_data_body">
163
+ <?php
164
+ $table_images = $wpdb->prefix . "lsp_images";
165
+
166
+ $images_results = $wpdb->get_results( "SELECT * FROM $table_images Where slider_id = $lsp_slider_id Order By image_order ASC" );
167
+
168
+ if ( ! empty( $images_results ) ) {
169
+ ?>
170
+ <p style="border:2px solid #999; border-radius: 10px; font-size: 12px; padding: 6px 10px; width: 24%;">
171
+ <strong>Note: </strong>Drag &amp; Drop is auto save.
172
+ </p>
173
+ <table width="100%" border="0" cellspacing="1" cellpadding="5">
174
+ <tr>
175
+ <td width="4%" class="lsp_data_heading" align="center">#</td>
176
+ <td width="15%" class="lsp_data_heading"><?php _e( "Slider Image", "lsp" ); ?></td>
177
+ <td width="68%" class="lsp_data_heading"><?php _e( "Image Links To", "lsp" ); ?></td>
178
+ <td width="14%" class="lsp_data_heading"><?php _e( "Action", "lsp" ); ?></td>
179
+ </tr>
180
+ </table>
181
+
182
+ <div id="lsp_sort_image">
183
+ <?php
184
+ $image_count = 0;
185
+
186
+ foreach ( $images_results as $lsp_image ) {
187
+ $image_count = $image_count + 1;
188
+ ( $image_count % 2 == 0 ? $row_class = "lsp_data_row2" : $row_class = "lsp_data_row1" );
189
+ ?>
190
+ <form action="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=add_link"
191
+ method="post">
192
+ <table width="100%" border="0" cellspacing="1" cellpadding="5"
193
+ id="lsp_list_<?php echo $lsp_image->image_id; ?>" class="lsp_image_item">
194
+ <tr class="<?php echo $row_class; ?>">
195
+ <td width="4%" align="center" class="lsp_data_text">
196
+ <?php echo $image_count; ?>
197
+ </td>
198
+ <td width="15%">
199
+ <input type="hidden" name="lsp_image_id"
200
+ value="<?php echo $lsp_image->image_id; ?>">
201
+ <input type="hidden" name="lsp_slide_id"
202
+ value="<?php echo $lsp_image->slider_id; ?>">
203
+ <img src="<?php echo $lsp_image->image_path . $lsp_image->image_name; ?>"
204
+ width="80" height="80">
205
+ </td>
206
+ <td width="68%">
207
+ <input type="text" name="lsp_image_link"
208
+ value="<?php echo $lsp_image->image_link_to; ?>">
209
+ </td>
210
+ <td width="7%" align="center">
211
+ <input type="submit" value="Update"
212
+ title="Update <?php echo $lsp_image->image_name; ?> Link">
213
+ </td>
214
+ <td width="7%" align="center">
215
+ <a href="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=del_link&lsp_image=<?php echo $lsp_image->image_id; ?>&lsp_slide=<?php echo $lsp_image->slider_id; ?>"
216
+ class="lsp_admin_del_btn">
217
+ Delete
218
+ </a>
219
+ </td>
220
+ </tr>
221
+ </table>
222
+ </form>
223
+ <?php
224
+ }
225
+ ?>
226
+ </div>
227
+
228
+ <table width="100%" border="0" cellspacing="1" cellpadding="5">
229
+ <tr>
230
+ <td width="4%" class="lsp_data_footer" align="center">#</td>
231
+ <td width="15%" class="lsp_data_footer"><?php _e( "Slider Image", "lsp" ); ?></td>
232
+ <td width="68%" class="lsp_data_footer"><?php _e( "Image Links To", "lsp" ); ?></td>
233
+ <td width="14%" class="lsp_data_footer"><?php _e( "Action", "lsp" ); ?></td>
234
+ </tr>
235
+ </table>
236
+ <?php
237
+ } else {
238
+ ?>
239
+ <span>
240
+ <?php _e( "There are no Images for slider", "lsp" ); ?>
241
+ </span>
242
+ <?php
243
+ }
244
+ ?>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
ls_manage_process.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once( str_replace('//','/',dirname(__FILE__).'/') .'../../../wp-config.php');
3
+ global $wpdb;
4
+ $lsp_action = $_REQUEST['lsp_action'];
5
+
6
+ switch ($lsp_action){
7
+ /*_++++++++++^^^^^^^^=============== <Slider Proccess> ===============^^^^^^^^++++++++++_*/
8
+ case "add_slider":
9
+ $slider_add = $wpdb->prefix."lsp_sliders";
10
+
11
+ $lsp_slider_name = stripslashes(strip_tags($_POST['lsp_add_slider']));
12
+
13
+ $slider_shortname = str_replace(" ", "_", $lsp_slider_name);
14
+ $slider_shortname = strtolower($slider_shortname);
15
+ $slider_shortcode = "[lsp_slider slider=$slider_shortname]";
16
+
17
+ $slider_data = array(
18
+ 'slider_name' => $lsp_slider_name,
19
+ 'slider_shortcode' => $slider_shortcode,
20
+ 'slider_shortname' => $slider_shortname
21
+ );
22
+
23
+ if(!empty($lsp_slider_name)){
24
+
25
+ $slider_insert = $wpdb->insert($slider_add,$slider_data);
26
+
27
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_sliders&lsp_msg=add_slider_success");
28
+ }
29
+ else{
30
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_sliders&lsp_msg=add_slider_error");
31
+ }
32
+ break;
33
+
34
+ case "edit_slider":
35
+ $slider_edit = $wpdb->prefix."lsp_sliders";
36
+
37
+ $lsp_slider_id = $_POST['lsp_slider_id'];
38
+
39
+ $lsp_edit_slider = stripslashes(strip_tags($_POST['lsp_edit_slider']));
40
+
41
+ $slider_edit_shortname = str_replace(" ", "_", $lsp_edit_slider);
42
+ $slider_edit_shortname = strtolower($slider_edit_shortname);
43
+ $slider_edit_shortcode = "[lsp_slider slider=$slider_edit_shortname]";
44
+
45
+ $slider_edit_data = array(
46
+ 'slider_name' => $lsp_edit_slider,
47
+ 'slider_shortcode' => $slider_edit_shortcode,
48
+ 'slider_shortname' => $slider_edit_shortname
49
+ );
50
+
51
+ $slider_where = array(
52
+ 'slider_id' => $lsp_slider_id
53
+ );
54
+
55
+ if(!empty($lsp_edit_slider)){
56
+
57
+ $slider_update = $wpdb->update($slider_edit, $slider_edit_data, $slider_where);
58
+
59
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_sliders&lsp_msg=edit_slider_success");
60
+ }
61
+ else{
62
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_sliders&lsp_msg=edit_slider_error");
63
+ }
64
+ break;
65
+
66
+ case "del_slider":
67
+ $slider_del = $wpdb->prefix."lsp_sliders";
68
+
69
+ $lsp_slider_id = $_GET['lsp_slider'];
70
+
71
+ $slider_where = array(
72
+ 'slider_id' => $lsp_slider_id
73
+ );
74
+
75
+ $slider_delete = $wpdb->delete($slider_del, $slider_where);
76
+
77
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_sliders&lsp_msg=delete_slider_success");
78
+ break;
79
+
80
+ /*_++++++++++^^^^^^^^=============== <Images Proccess> ===============^^^^^^^^++++++++++_*/
81
+ case "add_image":
82
+ $image_add = $wpdb->prefix."lsp_images";
83
+
84
+ $lsp_sliders = $_POST['lsp_sliders'];
85
+ $lsp_slide_image = strip_tags($_POST['lsp_slide_image']);
86
+
87
+ $lsp_image_ext = pathinfo($lsp_slide_image, PATHINFO_EXTENSION);
88
+ $lsp_image_name = pathinfo($lsp_slide_image, PATHINFO_BASENAME);
89
+ $split_img_name = explode(".", $lsp_image_name);
90
+ $split_img_name = $split_img_name[0];
91
+ $lsp_image_path = pathinfo($lsp_slide_image, PATHINFO_DIRNAME)."/";
92
+
93
+ $image_add_data = array(
94
+ 'slider_id' => $lsp_sliders,
95
+ 'image_name' => $split_img_name.".".$lsp_image_ext,
96
+ 'image_path' => $lsp_image_path,
97
+ 'image_link_to' => ''
98
+ );
99
+
100
+ if((!empty($lsp_sliders)) && (!empty($lsp_slide_image))){
101
+ $image_save = $wpdb->insert($image_add, $image_add_data);
102
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_images&lsp_msg=add_image_success&lsp_slider_id=$lsp_sliders");
103
+ }
104
+ else{
105
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_images&lsp_msg=add_image_error&lsp_slider_id=$lsp_sliders");
106
+ }
107
+ break;
108
+
109
+ case "add_link":
110
+ $link_add = $wpdb->prefix."lsp_images";
111
+
112
+ $lsp_image_id = $_REQUEST['lsp_image_id'];
113
+ $lsp_slide_id = $_REQUEST['lsp_slide_id'];
114
+
115
+ $lsp_image_link = strip_tags($_POST['lsp_image_link']);
116
+
117
+ $image_link_data = array(
118
+ 'image_link_to' => $lsp_image_link
119
+ );
120
+
121
+ $image_link_where = array(
122
+ 'image_id' => $lsp_image_id
123
+ );
124
+
125
+ $link_update = $wpdb->update($link_add, $image_link_data, $image_link_where);
126
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_images&lsp_slider_id=$lsp_slide_id&lsp_msg=image_link_success");
127
+ break;
128
+
129
+ case "del_link":
130
+ $image_dell = $wpdb->prefix."lsp_images";
131
+
132
+ $lsp_image_id = $_REQUEST['lsp_image'];
133
+ $lsp_slide = $_REQUEST['lsp_slide'];
134
+
135
+ $image_where = array(
136
+ 'image_id' => $lsp_image_id
137
+ );
138
+
139
+ $image_delete = $wpdb->delete($image_dell, $image_where);
140
+
141
+ header( "Location: " . LS_SITE_URL . "/wp-admin/admin.php?page=manage_images&lsp_slider_id=$lsp_slide&lsp_msg=image_del_success");
142
+ break;
143
+ }
ls_manage_sliders.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--==============
2
+ >> Logo Slider Pro: Manage Sliders
3
+ ==============-->
4
+ <div id="wpbody">
5
+ <div id="wpbody-content">
6
+ <div class="wrap">
7
+ <h2><?php _e( 'Manage Sliders', 'logo-slider' ) ?></h2>
8
+
9
+ <?php
10
+ global $wpdb;
11
+
12
+ if ( isset ( $_REQUEST['lsp_msg'] ) ) {
13
+
14
+ $lsp_msg = $_REQUEST['lsp_msg'];
15
+
16
+ switch ( $lsp_msg ) {
17
+ case "add_slider_success":
18
+ ?>
19
+ <div class='updated' style='margin-top:10px;'>
20
+ <p><?php _e( 'Slider save successfully', 'logo-slider' ) ?></p>
21
+ </div>
22
+ <?php
23
+ break;
24
+ case "add_slider_error":
25
+ ?>
26
+ <div class='error' style='margin-top:10px;'>
27
+ <p><?php _e( 'Slider name required', 'logo-slider' ) ?></p>
28
+ </div>
29
+ <?php
30
+ break;
31
+ case "edit_slider_success";
32
+ ?>
33
+ <div class='updated' style='margin-top:10px;'>
34
+ <p><?php _e( 'Slider update successfully', 'logo-slider' ) ?></p>
35
+ </div>
36
+ <?php
37
+ break;
38
+ case "edit_slider_error";
39
+ ?>
40
+ <div class='error' style='margin-top:10px;'>
41
+ <p><?php _e( 'Slider name required', 'logo-slider' ) ?></p>
42
+ </div>
43
+ <?php
44
+ break;
45
+ case "delete_slider_success";
46
+ ?>
47
+ <div class='updated' style='margin-top:10px;'>
48
+ <p><?php _e( 'Slider deleted successfully', 'logo-slider' ) ?></p>
49
+ </div>
50
+ <?php
51
+ break;
52
+ }
53
+
54
+ }
55
+ ?>
56
+
57
+ <div class="lsp_main_body">
58
+ <?php
59
+
60
+ if ( isset ( $_GET['lsp_action'] ) ) {
61
+ $lsp_action = $_GET['lsp_action'];
62
+ } else {
63
+ $lsp_action = '';
64
+ }
65
+
66
+ if ( isset ( $_REQUEST['lsp_slider_id'] ) ) {
67
+ $lsp_slider_id = $_REQUEST['lsp_slider_id'];
68
+ }
69
+
70
+ switch ( $lsp_action ) {
71
+ case "lsp_get_shortcode":
72
+ ?>
73
+ <a href="admin.php?page=manage_sliders" class="lsp_admin_btn">
74
+ Add New
75
+ </a>
76
+ <div class="lsp_data_body">
77
+ <table width="100%" border="0" cellspacing="1" cellpadding="5">
78
+ <thead>
79
+ <tr>
80
+ <td width="20%" class="lsp_data_heading"><?php _e( "Slider Name", "lsp" ); ?></td>
81
+ <td width="30%"
82
+ class="lsp_data_heading"><?php _e( "Slider Shortcode", "lsp" ); ?></td>
83
+ <td colspan="2" class="lsp_data_heading"><?php _e( "Action", "lsp" ); ?></td>
84
+ </tr>
85
+ </thead>
86
+ <tfoot>
87
+ <tr>
88
+ <td class="lsp_data_footer"><?php _e( "Slider Name", "lsp" ); ?></td>
89
+ <td class="lsp_data_footer"><?php _e( "Slider Shortcode", "lsp" ); ?></td>
90
+ <td colspan="2" class="lsp_data_footer"><?php _e( "Action", "lsp" ); ?></td>
91
+ </tr>
92
+ </tfoot>
93
+ <tbody>
94
+ <?php
95
+ $slide_shordcodes = $wpdb->get_results( "Select * From wp_lsp_sliders Where slider_id = $lsp_slider_id" );
96
+
97
+ foreach ( $slide_shordcodes as $slide_shordcode ) {
98
+ ?>
99
+ <tr>
100
+ <td class="lsp_data_text">
101
+ <span><?php echo $slide_shordcode->slider_name; ?></span></td>
102
+ <td class="lsp_data_text">
103
+ <input type="text" readonly="readonly"
104
+ value="<?php echo $slide_shordcode->slider_shortcode; ?>"
105
+ class="lsp_readonly">
106
+ </td>
107
+ <td width="5%">
108
+ <a href="admin.php?page=manage_sliders&lsp_action=edit_slider&lsp_slider=<?php echo $slide_shordcode->slider_id; ?>"
109
+ class="lsp_admin_btn"
110
+ title="Edit <?php echo $slide_shordcode->slider_name; ?>">
111
+ <?php _e( "Edit", "lsp" ) ?>
112
+ </a>
113
+ </td>
114
+ <td width="5%">
115
+ <a href="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=del_slider&lsp_slider=<?php echo $slide_shordcode->slider_id; ?>"
116
+ class="lsp_admin_del_btn">
117
+ <?php _e( "Delete", "lsp" ) ?>
118
+ </a>
119
+ </td>
120
+ </tr>
121
+ <?php
122
+ }
123
+ ?>
124
+ </tbody>
125
+ </table>
126
+ </div>
127
+ <?php
128
+ break;
129
+ default :
130
+ ?>
131
+ <div class="lsp_left_body">
132
+ <?php
133
+
134
+ if ( isset ( $_REQUEST['lsp_action'] ) ) {
135
+ $lsp_action = $_REQUEST['lsp_action'];
136
+ }
137
+
138
+ if ( isset ( $_GET['lsp_slider'] ) ) {
139
+ $slider_id = $_GET['lsp_slider'];
140
+ }
141
+
142
+ switch ( $lsp_action ) {
143
+ case "edit_slider":
144
+ $slider_edit = $wpdb->prefix . "lsp_sliders";
145
+ $slide_result = $wpdb->get_results( "Select * From $slider_edit Where slider_id = $slider_id" );
146
+ ?>
147
+ <div class="lsp_body_heading">
148
+ <h3><?php _e( 'Edit Slider', 'logo-slider' ) ?></h3>
149
+ </div>
150
+ <div class="lsp_plugin_body">
151
+ <div class="lsp_plugin_div">
152
+ <form action="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=edit_slider"
153
+ method="post" name="lsp_edit_slider">
154
+ <table width="100%" border="0" cellspacing="4" cellpadding="0">
155
+ <tr>
156
+ <td width="15%">
157
+ <label>
158
+ <?php _e( "Slider Name", "lsp" ); ?>
159
+ </label>
160
+ </td>
161
+ <?php
162
+ foreach ( $slide_result as $slider_edit ) {
163
+ ?>
164
+ <td width="68%">
165
+ <input type="hidden" name="lsp_slider_id"
166
+ value="<?php echo $slider_edit->slider_id; ?>">
167
+ <input type="text" name="lsp_edit_slider"
168
+ id="lsp_edit_slider"
169
+ value="<?php echo $slider_edit->slider_name; ?>">
170
+ </td>
171
+ <?php
172
+ }
173
+ ?>
174
+ <td width="10%" align="right">
175
+ <input type="submit" name="lsp_update_slider"
176
+ value="Edit Slider">
177
+ </td>
178
+ </tr>
179
+ <tr>
180
+ <td colspan="3">
181
+ <span class="lsp_admin_notification">
182
+ NOTE: Please do not use weird characters or symbols (like ! @ # $ * _ - etc)
183
+ </span>
184
+ </td>
185
+ </tr>
186
+ </table>
187
+ </form>
188
+ </div>
189
+ </div>
190
+ <?php
191
+ break;
192
+ default:
193
+ ?>
194
+ <div class="lsp_body_heading">
195
+ <h3><?php _e( 'Add Slider', 'logo-slider' ) ?></h3>
196
+ </div>
197
+ <div class="lsp_plugin_body">
198
+ <div class="lsp_plugin_div">
199
+ <form action="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=add_slider"
200
+ method="post" name="lsp_add_slider">
201
+ <table width="100%" border="0" cellspacing="4" cellpadding="0">
202
+ <tr>
203
+ <td width="15%">
204
+ <label>
205
+ <?php _e( "Slider Name", "lsp" ); ?>
206
+ </label>
207
+ </td>
208
+ <td width="68%">
209
+ <input type="text" name="lsp_add_slider" id="lsp_add_slider"
210
+ value="">
211
+ </td>
212
+ <td width="10%" align="right">
213
+ <input type="submit" name="lsp_save_slider"
214
+ value="Add Slider">
215
+ </td>
216
+ </tr>
217
+ <tr>
218
+ <td colspan="3">
219
+ <span class="lsp_admin_notification">
220
+ NOTE: Please do not use weird characters or symbols (like ! @ # $ * _ - etc)
221
+ </span>
222
+ </td>
223
+ </tr>
224
+ </table>
225
+ </form>
226
+ </div>
227
+ </div>
228
+ <?php
229
+ }
230
+ ?>
231
+ </div>
232
+
233
+ <div class="lsp_data_body">
234
+ <?php
235
+ $table_slider = $wpdb->prefix . "lsp_sliders";
236
+
237
+ $slider_results = $wpdb->get_results( "SELECT * FROM $table_slider" );
238
+
239
+ if ( ! empty( $slider_results ) ) {
240
+ ?>
241
+ <table width="100%" border="0" cellspacing="1" cellpadding="5">
242
+ <thead>
243
+ <tr>
244
+ <td width="8%" class="lsp_data_heading" align="center">#</td>
245
+ <td width="24%"
246
+ class="lsp_data_heading"><?php _e( "Slider Name", "lsp" ); ?></td>
247
+ <td width="26%"
248
+ class="lsp_data_heading"><?php _e( "Slider Shortcode", "lsp" ); ?></td>
249
+ <td width="16%"
250
+ class="lsp_data_heading"><?php _e( "Short Name", "lsp" ); ?></td>
251
+ <td colspan="4" class="lsp_data_heading"><?php _e( "Action", "lsp" ); ?></td>
252
+ </tr>
253
+ </thead>
254
+ <tfoot>
255
+ <tr>
256
+ <td class="lsp_data_footer" align="center">#</td>
257
+ <td class="lsp_data_footer"><?php _e( "Slider Name", "lsp" ); ?></td>
258
+ <td class="lsp_data_footer"><?php _e( "Slider Shortcode", "lsp" ); ?></td>
259
+ <td class="lsp_data_footer"><?php _e( "Short Name", "lsp" ); ?></td>
260
+ <td colspan="4" class="lsp_data_footer"><?php _e( "Action", "lsp" ); ?></td>
261
+ </tr>
262
+ </tfoot>
263
+ <tbody>
264
+ <?php
265
+ $slider_count = 0;
266
+
267
+ foreach ( $slider_results as $slider_result ) {
268
+ $slider_count = $slider_count + 1;
269
+ ?>
270
+ <tr>
271
+ <td align="center" class="lsp_data_text"><?php echo $slider_count; ?></td>
272
+ <td class="lsp_data_text"><span>
273
+ <a href="admin.php?page=manage_images&lsp_slider_id=<?php echo $slider_result->slider_id; ?>"
274
+ title="Add images for <?php echo $slider_result->slider_name; ?>">
275
+ <?php echo $slider_result->slider_name; ?>
276
+ </a>
277
+ </span></td>
278
+ <td class="lsp_data_text">
279
+ <input type="text" readonly="readonly"
280
+ value="<?php echo $slider_result->slider_shortcode; ?>"
281
+ class="lsp_readonly">
282
+ </td>
283
+ <td class="lsp_data_text">
284
+ <?php echo $slider_result->slider_shortname; ?>
285
+ </td>
286
+ <td width="12%">
287
+ <a href="admin.php?page=manage_images&lsp_slider_id=<?php echo $slider_result->slider_id; ?>"
288
+ class="lsp_admin_btn"
289
+ title="Add images for <?php echo $slider_result->slider_name; ?>">
290
+ <?php _e( "Manage Images", "lsp" ) ?>
291
+ </a>
292
+ </td>
293
+ <td width="8%">
294
+ <a href="admin.php?page=manage_sliders&lsp_action=edit_slider&lsp_slider=<?php echo $slider_result->slider_id; ?>"
295
+ class="lsp_admin_btn"
296
+ title="Edit <?php echo $slider_result->slider_name; ?>">
297
+ <?php _e( "Edit Title", "lsp" ) ?>
298
+ </a>
299
+ </td>
300
+ <td width="8%">
301
+ <a href="<?php echo LOGO_SLIDER; ?>ls_manage_process.php?lsp_action=del_slider&lsp_slider=<?php echo $slider_result->slider_id; ?>"
302
+ class="lsp_admin_del_btn">
303
+ <?php _e( "Delete", "lsp" ) ?>
304
+ </a>
305
+ </td>
306
+ </tr>
307
+ <?php
308
+ }
309
+ ?>
310
+ </tbody>
311
+ </table>
312
+ <?php
313
+ } else {
314
+ ?>
315
+ <span>
316
+ <?php _e( "There are no sliders", "lsp" ); ?>
317
+ </span>
318
+ <?php
319
+ }
320
+ ?>
321
+ </div>
322
+ <?php
323
+ }
324
+ ?>
325
+ </div>
326
+ </div>
327
+ </div>
328
+ </div>
ls_settings.php ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--==============
2
+ >> Logo Slider Pro Settings
3
+ ==============-->
4
+ <div id="wpbody">
5
+ <div id="wpbody-content">
6
+ <div class="wrap">
7
+ <h2><?php _e('Logo Slider Settings','logo-slider')?></h2>
8
+
9
+ <?php
10
+ if(isset($_GET['settings-updated'])){
11
+ ?>
12
+ <div class='updated' style='margin-top:10px;'>
13
+ <p><?php _e('Settings updated successfully','logo-slider') ?></p>
14
+ </div>
15
+ <?php
16
+ }
17
+ ?>
18
+
19
+ <div class="lsp_main_body">
20
+ <div class="lsp_left_body">
21
+
22
+ <div class="lsp_body_heading">
23
+ <h3><?php _e('Plugin Settings', 'logo-slider') ?></h3>
24
+ </div>
25
+ <div class="lsp_plugin_body">
26
+ <div class="lsp_plugin_div">
27
+ <form action="options.php" method="post">
28
+ <?php
29
+ settings_fields('lsp_settings_group');
30
+ ?>
31
+ <div class="lsp_settings_div">
32
+ <div class="lsp_settings_left">
33
+ <label for="Size">
34
+ <?php _e('Size','logo-slider'); ?>
35
+ </label>
36
+ </div>
37
+ <div class="lsp_settings_right">
38
+ <label class="small_label">
39
+ <?php _e('Width: ','logo-slider'); ?>
40
+ </label>
41
+ <input type="text" name="lsp_slider_width" class="lsp_small_input" value="<?php echo LS_SLIDER_WIDTH; ?>">
42
+ <p>px</p>
43
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
44
+ <label class="small_label">
45
+ <?php _e('Height: ','logo-slider'); ?>
46
+ </label>
47
+ <input type="text" name="lsp_slider_height" class="lsp_small_input" value="<?php echo LS_SLIDER_HEIGHT; ?>">
48
+ <p>px</p>
49
+ </div>
50
+ </div>
51
+
52
+ <div class="lsp_settings_div">
53
+ <div class="lsp_settings_left">
54
+ <label for="Size">
55
+ <?php _e('Background Color','logo-slider'); ?>
56
+ </label>
57
+ </div>
58
+ <div class="lsp_settings_right">
59
+ <input type="text" name="lsp_slider_bgcolor" class="cp-field" value="<?php echo LS_SLIDER_BGCOLOR; ?>">
60
+ <p><?php _e('Format: ','logo-slider'); ?>#FFFFFF</p>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="lsp_settings_div">
65
+ <div class="lsp_settings_left">
66
+ <label for="Size">
67
+ <?php _e('Select Slider Effect','logo-slider'); ?>
68
+ </label>
69
+ </div>
70
+ <div class="lsp_settings_right">
71
+ <select name="lsp_slider_effect">
72
+ <option value="scrollHorz" <?php echo ( LS_SLIDER_EFFECT == 'scrollHorz' ? 'selected="selected"' : '' ) ?>>
73
+ <?php _e('Slide','logo-slider') ?>
74
+ </option>
75
+ <option value="fade" <?php echo ( LS_SLIDER_EFFECT == 'fade' ? 'selected="selected"' : '' ) ?>>
76
+ <?php _e('Fade','logo-slider') ?>
77
+ </option>
78
+ <option value="tileSlide" <?php echo ( LS_SLIDER_EFFECT == 'tileSlide' ? 'selected="selected"' : '' ) ?>>
79
+ <?php _e('Tile Slide','logo-slider') ?>
80
+ </option>
81
+ <option value="tileBlind" <?php echo ( LS_SLIDER_EFFECT == 'tileBlind' ? 'selected="selected"' : '' ) ?>>
82
+ <?php _e('Tile Blind','logo-slider') ?>
83
+ </option>
84
+ <option value="carousel" <?php echo ( LS_SLIDER_EFFECT == 'carousel' ? 'selected="selected"' : '' ) ?>>
85
+ <?php _e('Carousel','logo-slider') ?>
86
+ </option>
87
+ </select>
88
+ </div>
89
+ </div>
90
+
91
+ <div class="lsp_settings_div">
92
+ <div class="lsp_settings_left">
93
+ <label for="Size">
94
+ <?php _e('Images Per Slide','logo-slider'); ?>
95
+ </label>
96
+ </div>
97
+ <div class="lsp_settings_right">
98
+ <select name="lsp_image_per_slide">
99
+ <option value="1" <?php echo ( LS_SLIDER_PER_SLIDE == '1' ? 'selected="selected"' : '') ?>>
100
+ <?php _e('1','logo-slider') ?>
101
+ </option>
102
+ <option value="2" <?php echo ( LS_SLIDER_PER_SLIDE == '2' ? 'selected="selected"' : '') ?>>
103
+ <?php _e('2','logo-slider') ?>
104
+ </option>
105
+ <option value="3" <?php echo ( LS_SLIDER_PER_SLIDE == '3' ? 'selected="selected"' : '') ?>>
106
+ <?php _e('3','logo-slider') ?>
107
+ </option>
108
+ <option value="4" <?php echo ( LS_SLIDER_PER_SLIDE == '4' ? 'selected="selected"' : '') ?>>
109
+ <?php _e('4','logo-slider') ?>
110
+ </option>
111
+ <option value="5" <?php echo ( LS_SLIDER_PER_SLIDE == '5' ? 'selected="selected"' : '') ?>>
112
+ <?php _e('5','logo-slider') ?>
113
+ </option>
114
+ <option value="6" <?php echo ( LS_SLIDER_PER_SLIDE == '6' ? 'selected="selected"' : '') ?>>
115
+ <?php _e('6','logo-slider') ?>
116
+ </option>
117
+ <option value="7" <?php echo ( LS_SLIDER_PER_SLIDE == '7' ? 'selected="selected"' : '') ?>>
118
+ <?php _e('7','logo-slider') ?>
119
+ </option>
120
+ <option value="8" <?php echo ( LS_SLIDER_PER_SLIDE == '8' ? 'selected="selected"' : '') ?>>
121
+ <?php _e('8','logo-slider') ?>
122
+ </option>
123
+ </select>
124
+ <p><?php _e('Number of logos per slide','logo-slider') ?></p>
125
+ </div>
126
+ </div>
127
+
128
+ <div class="lsp_settings_div">
129
+ <div class="lsp_settings_left">
130
+ <label for="Size">
131
+ <?php _e('Open Logo Links in New Window','logo-slider'); ?>
132
+ </label>
133
+ </div>
134
+ <div class="lsp_settings_right">
135
+ <input type="checkbox" name="lsp_link_new_window" <?php echo ( LS_SLIDER_NEW_WINDOW == 'on' ? 'checked="checked"' : '' ) ?> />
136
+ </div>
137
+ </div>
138
+
139
+ <div class="lsp_settings_div">
140
+ <div class="lsp_settings_left">
141
+ <label for="Size">
142
+ <?php _e('Auto Slide','logo-slider'); ?>
143
+ </label>
144
+ </div>
145
+ <div class="lsp_settings_right">
146
+ <label class="small_label"><?php _e('ON','lgs') ?></label>
147
+ <input type="radio" name="lsp_auto_slide" value="1" <?php if( LS_SLIDER_AUTO == 1){echo 'checked="checked"';}?> />
148
+ &nbsp; &nbsp;
149
+ <label class="small_label"><?php _e('OFF','lgs') ?></label>
150
+ <input type="radio" name="lsp_auto_slide" value="0" <?php if( LS_SLIDER_AUTO == 0){echo 'checked="checked"';}?>/>
151
+ </div>
152
+ </div>
153
+
154
+ <div class="lsp_settings_div">
155
+ <div class="lsp_settings_left">
156
+ <label for="Size">
157
+ <?php _e('Auto Slide Time','logo-slider'); ?>
158
+ </label>
159
+ </div>
160
+ <div class="lsp_settings_right">
161
+ <input type="text" name="lsp_auto_slide_time" class="lsp_small_input" value="<?php echo LS_SLIDER_TIME; ?>">
162
+ <p><?php _e('Set auto slide duration in seconds','logo-slider'); ?></p>
163
+ </div>
164
+ </div>
165
+
166
+ <div class="lsp_settings_div">
167
+ <div class="lsp_settings_left">
168
+ <label for="Size">
169
+ <?php _e('Arrow Style','logo-slider'); ?>
170
+ </label>
171
+ </div>
172
+ <div class="lsp_settings_right">
173
+ <table width="100%" border="0" cellspacing="4" cellpadding="0">
174
+ <tr>
175
+ <td width="12.1%" align="center">
176
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_off.png" alt="" />
177
+ </td>
178
+ <td width="12.1%" align="center">
179
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow1_next.png" alt="" />
180
+ </td>
181
+ <td width="12.1%" align="center">
182
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow2_next.png" alt="" />
183
+ </td>
184
+ <td width="12.1%" align="center">
185
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow3_next.png" alt="" />
186
+ </td>
187
+ <td width="12.1%" align="center">
188
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow4_next.png" alt="" />
189
+ </td>
190
+ <td width="12.1%" align="center">
191
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow5_next.png" alt="" />
192
+ </td>
193
+ <td width="12.1%" align="center">
194
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow6_next.png" alt="" />
195
+ </td>
196
+ <td width="12.1%" align="center">
197
+ <img src="<?php echo plugin_dir_url(__FILE__); ?>/ls_arrows/lsp_arrow7_next.png" alt="" />
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <td align="center">
202
+ <input type="radio" name="lsp_slider_arrow" value="0" <?php if( LS_SLIDER_ARROW == 0){echo 'checked="checked"';}?> />
203
+ </td>
204
+ <td align="center">
205
+ <input type="radio" name="lsp_slider_arrow" value="1" <?php if( LS_SLIDER_ARROW == 1){echo 'checked="checked"';}?> />
206
+ </td>
207
+ <td align="center">
208
+ <input type="radio" name="lsp_slider_arrow" value="2" <?php if( LS_SLIDER_ARROW == 2){echo 'checked="checked"';}?> />
209
+ </td>
210
+ <td align="center">
211
+ <input type="radio" name="lsp_slider_arrow" value="3" <?php if( LS_SLIDER_ARROW == 3){echo 'checked="checked"';}?> />
212
+ </td>
213
+ <td align="center">
214
+ <input type="radio" name="lsp_slider_arrow" value="4" <?php if( LS_SLIDER_ARROW == 4){echo 'checked="checked"';}?> />
215
+ </td>
216
+ <td align="center">
217
+ <input type="radio" name="lsp_slider_arrow" value="5" <?php if( LS_SLIDER_ARROW == 5){echo 'checked="checked"';}?> />
218
+ </td>
219
+ <td align="center">
220
+ <input type="radio" name="lsp_slider_arrow" value="6" <?php if( LS_SLIDER_ARROW == 6){echo 'checked="checked"';}?> />
221
+ </td>
222
+ <td align="center">
223
+ <input type="radio" name="lsp_slider_arrow" value="7" <?php if( LS_SLIDER_ARROW == 7){echo 'checked="checked"';}?> />
224
+ </td>
225
+ </tr>
226
+ </table>
227
+ </div>
228
+ </div>
229
+
230
+ <div class="lsp_settings_div">
231
+ <div class="lsp_settings_left">
232
+ <label for="Size">
233
+ <?php _e('Custom CSS','logo-slider'); ?>
234
+ </label>
235
+ </div>
236
+ <div class="lsp_settings_right">
237
+ <textarea name="lsp_slider_css"><?php echo LS_SLIDER_CSS ?></textarea>
238
+ </div>
239
+ </div>
240
+
241
+ <div class="lsp_settings_div" style="border: 0px;">
242
+ <input type="submit" name="lsp_submit" value="Save Settings">
243
+ </div>
244
+ </form>
245
+ </div>
246
+ </div>
247
+
248
+ </div>
249
+
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </div>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: EnigmaWeb
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CEJ9HFWJ94BG4
4
  Tags: logo slide, logo slideshow, logo slide show, logo carousel, image carousel, logo slider, sponsors, logo showcase
5
  Requires at least: 3.1
6
- Tested up to: 4.3.1
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
 
@@ -11,7 +11,7 @@ Showcase logos in stylish slideshow carousel.
11
 
12
  == Description ==
13
 
14
- Add a reponsive logo slideshow carousel to your site quickly and easily. Embed in any post/page using shortcode `[logo-slider]` or in your theme `<?php logo_slider(); ?>`
15
 
16
  Perfect for displaying a list of sponsor or client logos.
17
 
@@ -24,26 +24,19 @@ Perfect for displaying a list of sponsor or client logos.
24
  * Easy image uploader
25
  * Ability to add links to each logo if you want
26
  * Auto-slide option
 
 
27
 
28
  = Demo =
29
 
30
  [Click here](http://demo.enigmaweb.com.au/logo-slider/) to see Logo Slider in action.
31
 
32
- = Pro vs Free Version =
33
-
34
- This is the Free version of the plugin. [Get Pro Version](http://enigmaplugins.com/plugins/logo-slider-pro/) if you need the following advanced features:
35
-
36
- * Mulitple Slideshows - create as many sliders as you like across your site
37
- * Drag n Drop logo manager so you can easily re-order logos
38
- * Fully Responsive Design
39
- * Use WordPress Media Library for logo images
40
-
41
  == Installation ==
42
 
43
  1. Upload the `logo-slider` folder to the `/wp-content/plugins/` directory
44
  1. Activate Logo Slider plugin through the 'Plugins' menu in WordPress
45
  1. Configure the plugin by going to the `Logo Slider` tab that appears in your admin menu.
46
- 1. Add to any page using shortcode `[logo-slider]` or to your theme using `<?php logo_slider(); ?>`
47
 
48
  == Frequently Asked Questions ==
49
 
@@ -57,7 +50,11 @@ Add this code above to fuctions.php between the `<?php` and `?>` tags. A good pl
57
 
58
  = Can I do multiple slideshows? =
59
 
60
- This Free version just does 1 slider. If you want multiple sliders [get Pro version here](http://enigmaplugins.com/plugins/logo-slider-pro/).
 
 
 
 
61
 
62
  = How can I customise the design? =
63
 
@@ -65,7 +62,11 @@ You can do some basic presentation adjustments via Logo Slider tab on the admin
65
 
66
  = The layout is broken =
67
 
68
- It's most likely just a matter of tweaking the css.
 
 
 
 
69
 
70
  = Where can I get support for this plugin? =
71
 
@@ -78,6 +79,14 @@ If you've tried all the obvious stuff and it's still not working please request
78
 
79
  == Changelog ==
80
 
 
 
 
 
 
 
 
 
81
  = 1.4.7 =
82
  * Animation issue fixed.
83
 
@@ -128,6 +137,14 @@ If you've tried all the obvious stuff and it's still not working please request
128
 
129
  == Upgrade Notice ==
130
 
 
 
 
 
 
 
 
 
131
  = 1.4.6 =
132
  * Updated text domain for the plugin repository's new translations
133
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CEJ9HFWJ94BG4
4
  Tags: logo slide, logo slideshow, logo slide show, logo carousel, image carousel, logo slider, sponsors, logo showcase
5
  Requires at least: 3.1
6
+ Tested up to: 4.9.5
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
 
11
 
12
  == Description ==
13
 
14
+ Add a responsive logo slideshow carousel to your site quickly and easily. Embed in any post/page using shortcode or in your theme.
15
 
16
  Perfect for displaying a list of sponsor or client logos.
17
 
24
  * Easy image uploader
25
  * Ability to add links to each logo if you want
26
  * Auto-slide option
27
+ * Multiple Slideshows - create as many sliders as you like across your site
28
+
29
 
30
  = Demo =
31
 
32
  [Click here](http://demo.enigmaweb.com.au/logo-slider/) to see Logo Slider in action.
33
 
 
 
 
 
 
 
 
 
 
34
  == Installation ==
35
 
36
  1. Upload the `logo-slider` folder to the `/wp-content/plugins/` directory
37
  1. Activate Logo Slider plugin through the 'Plugins' menu in WordPress
38
  1. Configure the plugin by going to the `Logo Slider` tab that appears in your admin menu.
39
+ 1. Add to any page using shortcode
40
 
41
  == Frequently Asked Questions ==
42
 
50
 
51
  = Can I do multiple slideshows? =
52
 
53
+ Yes
54
+
55
+ = Can I add a logo slider directly to one of my theme templates? =
56
+
57
+ Yes. Use `<?php echo do_shortcode("[shortcode]"); ?>`. Make sure to replace `[shortcode]` with the shortcode for your own logo slider (which you can find in Logo Slider > Manage Sliders)
58
 
59
  = How can I customise the design? =
60
 
62
 
63
  = The layout is broken =
64
 
65
+ It's most likely just a matter of tweaking the css.
66
+
67
+ = Description says it's responsive but I'm testing and logos stack on top of each other =
68
+
69
+ Check it on an actual mobile device. The logos appear stacked in browser console / simulators, but on an actual device it works fine.
70
 
71
  = Where can I get support for this plugin? =
72
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.4.8 =
83
+ * Adds support for multiple sliders (merging pro features)
84
+ * Images are now stored in media library
85
+ * Fix for filepaths on https
86
+ * Fix for when plugin directory name has been modified
87
+ * CSS precedence improvements
88
+ * jQuery Cycle logging issue fixed
89
+
90
  = 1.4.7 =
91
  * Animation issue fixed.
92
 
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 1.4.8 =
141
+ * Adds support for multiple sliders (merging pro features)
142
+ * Images are now stored in media library
143
+ * Fix for filepaths on https
144
+ * Fix for when plugin directory name has been modified
145
+ * CSS precedence improvements
146
+ * jQuery Cycle logging issue fixed
147
+
148
  = 1.4.6 =
149
  * Updated text domain for the plugin repository's new translations
150
 
uninstall.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //if uninstall not called from WordPress exit
3
+ if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
4
+ exit ();
5
+
6
+ global $wpdb;
7
+ $lsp_tbl_prefix = $wpdb->prefix;
8
+
9
+ //++++++++++++_ Delete Logo slider Pro Plugin Settings from Options Table
10
+ delete_option('lsp_auto_slide');
11
+ delete_option('lsp_slider_css');
12
+ delete_option('lsp_pro_license');
13
+ delete_option('lsp_slider_arrow');
14
+ delete_option('lsp_slider_width');
15
+ delete_option('lsp_slider_height');
16
+ delete_option('lsp_slider_effect');
17
+ delete_option('lsp_slider_bgcolor');
18
+ delete_option('lsp_image_per_slide');
19
+ delete_option('lsp_link_new_window');
20
+ delete_option('lsp_auto_slide_time');
21
+ delete_option('lsp_table_images_version');
22
+ delete_option('lsp_table_sliders_version');
23
+
24
+ //++++++++++++_ Delete Logo slider Pro Data From `posts` and `postmeta` Tables
25
+ $lsp_upload_dir = wp_upload_dir();
26
+
27
+ $lsp_postmeta_qry = $wpdb->get_results("Select * From ".$lsp_tbl_prefix."postmeta
28
+ Where meta_value Like '%lsp_img_%'
29
+ Group By post_id");
30
+ foreach($lsp_postmeta_qry as $lsp_postmeta_result){
31
+ $lsp_post_id = $lsp_postmeta_result->post_id;
32
+
33
+ $lsp_posts_qry = $wpdb->get_results("Select * From ".$lsp_tbl_prefix."posts
34
+ Where ID = $lsp_post_id
35
+ And post_type = 'attachment'
36
+ And post_mime_type = 'image/jpeg'");
37
+ foreach($lsp_posts_qry as $lsp_posts_result){
38
+ $lsp_postID = $lsp_posts_result->ID;
39
+
40
+ // Extract path from images
41
+ $lsp_img_path = get_post_meta($lsp_postID, "_wp_attached_file", true);
42
+ $lsp_main_img_name = substr( $lsp_img_path, strrpos( $lsp_img_path, '/' )+1 );
43
+ $lsp_sub_path = substr($lsp_img_path, 0, strrpos( $lsp_img_path, '/'));
44
+
45
+ $lsp_img_meta = get_post_meta($lsp_postID, "_wp_attachment_metadata", true);
46
+
47
+ $lsp_slider_img = $lsp_img_meta['file'];
48
+ $lsp_upload_path = $lsp_upload_dir["basedir"];
49
+
50
+ unlink($lsp_upload_path."/".$lsp_sub_path."/".$lsp_main_img_name);
51
+
52
+ $wpdb->query("Delete From ".$lsp_tbl_prefix."postmeta Where post_id = $lsp_postID");
53
+
54
+ $wpdb->query("Delete From ".$lsp_tbl_prefix."posts Where ID = $lsp_postID");
55
+ }
56
+ }
57
+
58
+ //++++++++++++_ Drop `lsp_images` and `lsp_sliders` Tables
59
+ $wpdb->query("Drop Table ".$lsp_tbl_prefix."lsp_images");
60
+
61
+ $wpdb->query("Drop Table ".$lsp_tbl_prefix."lsp_sliders");
62
+
63
+ ?>