Version Description
- 2012-12-24
Download this release
Release Info
Developer | kosinix |
Plugin | Cyclone Slider |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.2.0
- README.txt +45 -20
- css/admin.css +112 -13
- cyclone-slider.php +71 -4
- images/screenshot.png +0 -0
- images/uploader-icons.png +0 -0
- inc/admin-parts/box.php +134 -0
- inc/admin-parts/slider-properties.php +79 -0
- inc/admin/box-js.php +0 -85
- inc/admin/box.php +0 -85
- inc/class-cyclone-slider.php +746 -645
- inc/class-image-resizer.php +7 -30
- inc/class-nextgen-integration.php +3 -27
- js/admin.js +79 -16
- js/{jquery.cookie.js → jquery-cookie.js} +47 -47
- js/jquery.cycle2.carousel.min.js +2 -0
- js/jquery.cycle2.min.js +6 -6
- js/jquery.cycle2.tile.min.js +2 -2
- lang/cycloneslider-de_DE.mo +0 -0
- lang/cycloneslider-de_DE.po +268 -219
- lang/cycloneslider.pot +267 -222
- screenshot-2.jpg +0 -0
- templates/black/screenshot.jpg +0 -0
- templates/black/slider.php +9 -21
- templates/blue/screenshot.jpg +0 -0
- templates/blue/slider.php +9 -21
- templates/default/screenshot.jpg +0 -0
- templates/default/slider.php +9 -19
- templates/myrtle/screenshot.jpg +0 -0
- templates/myrtle/slider.php +9 -19
- templates/myrtle/style.css +1 -4
- templates/thumbnails/screenshot.jpg +0 -0
- templates/thumbnails/script.js +18 -0
- templates/thumbnails/slider.php +11 -39
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: kosinix
|
|
3 |
Donate link: http://www.codefleet.net/donate
|
4 |
Tags: slider, slideshow, jquery, cycle 2, responsive, multilingual support, custom post, cyclone slider
|
5 |
Requires at least: 3.3.2
|
6 |
-
Tested up to: 3.
|
7 |
Stable tag: 2.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -12,23 +12,23 @@ Create responsive slideshows with ease. Built for both developers and non-develo
|
|
12 |
|
13 |
== Description ==
|
14 |
|
|
|
|
|
15 |
= Features: =
|
16 |
* Uses jQuery Cycle 2 with full responsiveness
|
17 |
-
*
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
|
|
|
|
|
|
23 |
* It's totally FREE!
|
24 |
|
25 |
-
Cyclone Slider leverages wordpress' built-in features. It uses custom post for the slideshow, custom fields to store settings, and media uploader for the images. Its simple and flexible.
|
26 |
-
|
27 |
-
Note: If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2.
|
28 |
-
|
29 |
= Homepage =
|
30 |
-
|
31 |
-
|
32 |
|
33 |
== Installation ==
|
34 |
|
@@ -53,13 +53,6 @@ Note: If you are using Cyclone Slider (version 1) deactivate it first before act
|
|
53 |
|
54 |
== Frequently Asked Questions ==
|
55 |
|
56 |
-
= What's the improvement of Cyclone Slider 2 over Cyclone Slider? =
|
57 |
-
1. Uses jQuery Cycle 2 plugin.
|
58 |
-
1. All slideshow templates are responsive.
|
59 |
-
1. Cleaner and faster user interface.
|
60 |
-
1. Per slide settings.
|
61 |
-
1. Tile effects.
|
62 |
-
|
63 |
= Why is my slider not working? =
|
64 |
Check for javascript errors in your page. This is the most common cause of the slider not running.
|
65 |
`cycle not a function` error - most probably you have double jquery (jquery.js) included from improperly coded plugins. Remove the duplicate jquery or deactivate the plugin causing the double jquery include.
|
@@ -91,6 +84,22 @@ Inside your theme create a folder named "cycloneslider". Add your templates insi
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 2.1.1 - 2012-11-16 =
|
95 |
* Fix for a code typo error
|
96 |
|
@@ -106,6 +115,22 @@ Inside your theme create a folder named "cycloneslider". Add your templates insi
|
|
106 |
|
107 |
== Upgrade Notice ==
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
= 2.1.1 - 2012-11-16 =
|
110 |
* Fix for a code typo error
|
111 |
|
3 |
Donate link: http://www.codefleet.net/donate
|
4 |
Tags: slider, slideshow, jquery, cycle 2, responsive, multilingual support, custom post, cyclone slider
|
5 |
Requires at least: 3.3.2
|
6 |
+
Tested up to: 3.5
|
7 |
Stable tag: 2.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Cyclone Slider 2 follows the keep it simple principle. It leverages WordPress' built-in features. It uses custom post for the slideshow, custom fields to store settings, and media uploader for the images. Its simple yet flexible.
|
16 |
+
|
17 |
= Features: =
|
18 |
* Uses jQuery Cycle 2 with full responsiveness
|
19 |
+
* Very easy to use interface!
|
20 |
+
* Customizable tile transition effects
|
21 |
+
* Ability to add per-slide transition effects
|
22 |
+
* Unlimited slideshows
|
23 |
+
* Unique settings for each slideshow
|
24 |
+
* Shortcode for displaying slideshows anywhere in your site
|
25 |
+
* A simple template system for developers to easily customize the slideshow
|
26 |
+
* Ability to import images from NextGEN (NextGEN must be installed and active)
|
27 |
+
* Allows title and alt to be specified for each slide images
|
28 |
* It's totally FREE!
|
29 |
|
|
|
|
|
|
|
|
|
30 |
= Homepage =
|
31 |
+
Learn more about [Cyclone Slider 2](http://www.codefleet.net/cyclone-slider-2/)
|
|
|
32 |
|
33 |
== Installation ==
|
34 |
|
53 |
|
54 |
== Frequently Asked Questions ==
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
= Why is my slider not working? =
|
57 |
Check for javascript errors in your page. This is the most common cause of the slider not running.
|
58 |
`cycle not a function` error - most probably you have double jquery (jquery.js) included from improperly coded plugins. Remove the duplicate jquery or deactivate the plugin causing the double jquery include.
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 2.2.0 - 2012-12-24 =
|
88 |
+
* Updated cycle 2 to latest version.
|
89 |
+
* Updated template selection interface to be more visual. A screenshot of each slideshow template is now shown.
|
90 |
+
* Added Tile Count and Tile Position for both slideshow and per-slide settings.
|
91 |
+
* Cleanup Quick Edit screen to hide unused user interface.
|
92 |
+
* Slide box titles can now be clicked to open and close the slide box.
|
93 |
+
* Removed drag icon from slide box title. Slide box can now be dragged by click-holding the slide title area.
|
94 |
+
* Updated template API functions.
|
95 |
+
* Updated plugin screenshot.
|
96 |
+
* Refactored various code parts.
|
97 |
+
* Added ability to add script.js in templates
|
98 |
+
* Added ability to add screenshot.jpg in templates.
|
99 |
+
* Updated templates.
|
100 |
+
* Added fix to preserved PNG transparency.
|
101 |
+
* Fix save routine to allow saving empty slides and to preserve order of slides after drag and/or deletion of slide.
|
102 |
+
|
103 |
= 2.1.1 - 2012-11-16 =
|
104 |
* Fix for a code typo error
|
105 |
|
115 |
|
116 |
== Upgrade Notice ==
|
117 |
|
118 |
+
= 2.2.0 - 2012-12-24 =
|
119 |
+
* Updated cycle 2 to latest version.
|
120 |
+
* Updated template selection interface to be more visual. A screenshot of each slideshow template is now shown.
|
121 |
+
* Added Tile Count and Tile Position for both slideshow and per-slide settings.
|
122 |
+
* Cleanup Quick Edit screen to hide unused user interface.
|
123 |
+
* Slide box titles can now be clicked to open and close the slide box.
|
124 |
+
* Removed drag icon from slide box title. Slide box can now be dragged by click-holding the slide title area.
|
125 |
+
* Updated template API functions.
|
126 |
+
* Updated plugin screenshot.
|
127 |
+
* Refactored various code parts.
|
128 |
+
* Added ability to add script.js in templates
|
129 |
+
* Added ability to add screenshot.jpg in templates.
|
130 |
+
* Updated templates.
|
131 |
+
* Added fix to preserved PNG transparency.
|
132 |
+
* Fix save routine to allow saving empty slides and to preserve order of slides after drag and/or deletion of slide.
|
133 |
+
|
134 |
= 2.1.1 - 2012-11-16 =
|
135 |
* Fix for a code typo error
|
136 |
|
css/admin.css
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
}
|
12 |
/*** Slides - Title ***/
|
13 |
.cycloneslider-box-title{
|
|
|
14 |
background-color: #f1f1f1; /* Fallback */
|
15 |
background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); /* IE10 */
|
16 |
background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); /* Firefox */
|
@@ -31,8 +32,8 @@
|
|
31 |
}
|
32 |
|
33 |
.cycloneslider-box-title .cycloneslider-box-drag,
|
34 |
-
.cycloneslider-box-title
|
35 |
-
.cycloneslider-box-title
|
36 |
margin:0 5px;
|
37 |
display:block;
|
38 |
float:left;
|
@@ -41,23 +42,27 @@
|
|
41 |
height:15px;
|
42 |
}
|
43 |
.cycloneslider-box-title .cycloneslider-box-drag{
|
|
|
44 |
cursor:move;
|
45 |
color:#285C00;
|
46 |
background: url(../images/ui-icons.png) no-repeat 0 0;
|
47 |
}
|
48 |
-
.cycloneslider-box-title
|
|
|
49 |
color:#21759B;
|
50 |
background: url(../images/ui-icons.png) no-repeat -15px 0;
|
51 |
}
|
52 |
-
.cycloneslider-box-title
|
|
|
53 |
color:#ff9191;
|
54 |
background: url(../images/ui-icons.png) no-repeat -30px 0;
|
55 |
}
|
56 |
-
.cycloneslider-box-title
|
|
|
57 |
background-position:-15px -15px;
|
58 |
color:#fff;
|
59 |
}
|
60 |
-
.cycloneslider-box-title
|
61 |
background-color:#ff9191;
|
62 |
color:#fff;
|
63 |
}
|
@@ -83,12 +88,13 @@ input[name=cycloneslider_add_slide]{
|
|
83 |
}
|
84 |
.cycloneslider-body-left{
|
85 |
float:left;
|
86 |
-
width:
|
|
|
87 |
}
|
88 |
.cycloneslider-body-right{
|
89 |
-
float:
|
90 |
width:50%;
|
91 |
-
|
92 |
}
|
93 |
.cycloneslider-slide-thumb{
|
94 |
display:block;
|
@@ -181,11 +187,16 @@ input[name=cycloneslider_add_slide]{
|
|
181 |
margin-bottom:10px;
|
182 |
}
|
183 |
.cycloneslider-slide-meta-speed,
|
184 |
-
.cycloneslider-slide-meta-timeout
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
-
|
188 |
-
|
189 |
|
190 |
|
191 |
|
@@ -234,4 +245,92 @@ input[name=cycloneslider_add_slide]{
|
|
234 |
#cyclone-nextgen-metabox select{
|
235 |
display:inline-block;
|
236 |
margin:0 0 0 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
11 |
}
|
12 |
/*** Slides - Title ***/
|
13 |
.cycloneslider-box-title{
|
14 |
+
cursor:move;
|
15 |
background-color: #f1f1f1; /* Fallback */
|
16 |
background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); /* IE10 */
|
17 |
background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); /* Firefox */
|
32 |
}
|
33 |
|
34 |
.cycloneslider-box-title .cycloneslider-box-drag,
|
35 |
+
.cycloneslider-box-title .cycloneslider-box-toggle,
|
36 |
+
.cycloneslider-box-title .cycloneslider-box-delete{
|
37 |
margin:0 5px;
|
38 |
display:block;
|
39 |
float:left;
|
42 |
height:15px;
|
43 |
}
|
44 |
.cycloneslider-box-title .cycloneslider-box-drag{
|
45 |
+
display:none;
|
46 |
cursor:move;
|
47 |
color:#285C00;
|
48 |
background: url(../images/ui-icons.png) no-repeat 0 0;
|
49 |
}
|
50 |
+
.cycloneslider-box-title .cycloneslider-box-toggle{
|
51 |
+
cursor:pointer;
|
52 |
color:#21759B;
|
53 |
background: url(../images/ui-icons.png) no-repeat -15px 0;
|
54 |
}
|
55 |
+
.cycloneslider-box-title .cycloneslider-box-delete{
|
56 |
+
cursor:pointer;
|
57 |
color:#ff9191;
|
58 |
background: url(../images/ui-icons.png) no-repeat -30px 0;
|
59 |
}
|
60 |
+
.cycloneslider-box-title:hover .cycloneslider-box-toggle,
|
61 |
+
.cycloneslider-box-title .cycloneslider-box-toggle:hover{
|
62 |
background-position:-15px -15px;
|
63 |
color:#fff;
|
64 |
}
|
65 |
+
.cycloneslider-box-title .cycloneslider-box-delete:hover{
|
66 |
background-color:#ff9191;
|
67 |
color:#fff;
|
68 |
}
|
88 |
}
|
89 |
.cycloneslider-body-left{
|
90 |
float:left;
|
91 |
+
width:45%;
|
92 |
+
margin-right:5%;
|
93 |
}
|
94 |
.cycloneslider-body-right{
|
95 |
+
float:left;
|
96 |
width:50%;
|
97 |
+
min-width:400px;
|
98 |
}
|
99 |
.cycloneslider-slide-thumb{
|
100 |
display:block;
|
187 |
margin-bottom:10px;
|
188 |
}
|
189 |
.cycloneslider-slide-meta-speed,
|
190 |
+
.cycloneslider-slide-meta-timeout,
|
191 |
+
.cycloneslider-slide-meta-tile-count,
|
192 |
+
.cycloneslider-slide-meta-tile-delay{
|
193 |
+
width:25%;
|
194 |
+
}
|
195 |
+
.cycloneslider-meta-field .note.disabled,
|
196 |
+
label.disabled,
|
197 |
+
input:disabled{
|
198 |
+
color:#999;
|
199 |
}
|
|
|
|
|
200 |
|
201 |
|
202 |
|
245 |
#cyclone-nextgen-metabox select{
|
246 |
display:inline-block;
|
247 |
margin:0 0 0 3px;
|
248 |
+
}
|
249 |
+
|
250 |
+
|
251 |
+
/*** Templates ***/
|
252 |
+
.template-choices{
|
253 |
+
margin:0;
|
254 |
+
}
|
255 |
+
.template-choices li{
|
256 |
+
position:relative;
|
257 |
+
float:left;
|
258 |
+
width:200px;
|
259 |
+
margin-right:10px;
|
260 |
+
margin-bottom:10px;
|
261 |
+
border:3px solid #cfcfcf;
|
262 |
+
-moz-border-radius:3px; /* Firefox */
|
263 |
+
-webkit-border-radius:3px; /* Safari and chrome */
|
264 |
+
-khtml-border-radius:3px; /* Linux browsers */
|
265 |
+
border-radius:3px; /* CSS3 */
|
266 |
+
}
|
267 |
+
.template-choices li:hover,
|
268 |
+
.template-choices li.active{
|
269 |
+
border-color:#21759B;
|
270 |
+
background-color:#21759B;
|
271 |
+
color:#fff;
|
272 |
+
}
|
273 |
+
.template-choices li label,
|
274 |
+
.template-choices li img{
|
275 |
+
display:block;
|
276 |
+
}
|
277 |
+
.template-choices li img{
|
278 |
+
max-width:100%;
|
279 |
+
}
|
280 |
+
.template-choices li label{
|
281 |
+
height:125px;
|
282 |
+
}
|
283 |
+
.template-choices li .title{
|
284 |
+
display:block;
|
285 |
+
padding:3px 10px;
|
286 |
+
}
|
287 |
+
.template-choices li input{
|
288 |
+
position:absolute;
|
289 |
+
z-index:-1;
|
290 |
+
}
|
291 |
+
.template-choices li.active .check{
|
292 |
+
display:block;
|
293 |
+
}
|
294 |
+
.template-choices .check{
|
295 |
+
display:none;
|
296 |
+
position:absolute;
|
297 |
+
width:15px;
|
298 |
+
height:15px;
|
299 |
+
z-index:90;
|
300 |
+
right:0;
|
301 |
+
top:0;
|
302 |
+
border:3px solid #21759B ;
|
303 |
+
background:#21759B url(../images/uploader-icons.png) no-repeat -21px 0;
|
304 |
+
-webkit-border-radius: 0px 0px 0px 5px;
|
305 |
+
border-radius: 0px 0px 0px 5px;
|
306 |
+
}
|
307 |
+
.template-scroller{
|
308 |
+
overflow:auto;
|
309 |
+
margin-bottom:5px;
|
310 |
+
height:350px;
|
311 |
+
}
|
312 |
+
|
313 |
+
.cycloneslider-field-tile-properties,
|
314 |
+
.cycloneslider-slide-tile-properties{
|
315 |
+
display:none;
|
316 |
+
}
|
317 |
+
.cycloneslider-spacer-10{
|
318 |
+
height:10px;
|
319 |
+
}
|
320 |
+
.cycloneslider-spacer-15{
|
321 |
+
height:15px;
|
322 |
+
}
|
323 |
+
.cycloneslider_metas_enable_slide_effects{
|
324 |
+
float:right;
|
325 |
+
}
|
326 |
+
|
327 |
+
/*** Hide admin stuff ***/
|
328 |
+
.inline-edit-date,
|
329 |
+
.inline-edit-group{
|
330 |
+
display:none;
|
331 |
+
}
|
332 |
+
|
333 |
+
.cycloneslider-get-more{
|
334 |
+
padding-top:5px;
|
335 |
+
float:right;
|
336 |
}
|
cyclone-slider.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-2/
|
5 |
Description: Create responsive slideshows with ease. Built for both developers and non-developers.
|
6 |
-
Version: 2.
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
@@ -52,8 +52,7 @@ endif;
|
|
52 |
* @param bool $refresh Recreate thumbnail if it already exists if set to true. Default to false, will not recreate thumbnails if it already exist.
|
53 |
* @return string The url to the thumbnail. False on failure.
|
54 |
*/
|
55 |
-
|
56 |
-
function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh = false, $slide_meta = array() ){
|
57 |
$dir = wp_upload_dir();
|
58 |
|
59 |
// Get full path to the slide image
|
@@ -81,8 +80,76 @@ function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh
|
|
81 |
}
|
82 |
|
83 |
$resizeObj = new Image_Resizer($image_path);
|
84 |
-
$resizeObj -> resizeImage($width, $height);
|
85 |
$resizeObj -> saveImage($dirname.'/'.$thumb, 80);
|
86 |
|
87 |
return dirname($image_url).'/'.$thumb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-2/
|
5 |
Description: Create responsive slideshows with ease. Built for both developers and non-developers.
|
6 |
+
Version: 2.2.0
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
52 |
* @param bool $refresh Recreate thumbnail if it already exists if set to true. Default to false, will not recreate thumbnails if it already exist.
|
53 |
* @return string The url to the thumbnail. False on failure.
|
54 |
*/
|
55 |
+
function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh = false, $slide_meta = array(), $option="auto" ){
|
|
|
56 |
$dir = wp_upload_dir();
|
57 |
|
58 |
// Get full path to the slide image
|
80 |
}
|
81 |
|
82 |
$resizeObj = new Image_Resizer($image_path);
|
83 |
+
$resizeObj -> resizeImage($width, $height, $option);
|
84 |
$resizeObj -> saveImage($dirname.'/'.$thumb, 80);
|
85 |
|
86 |
return dirname($image_url).'/'.$thumb;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Cycle Settings Printer
|
91 |
+
*
|
92 |
+
* Prints out cycle slideshow settings in templates
|
93 |
+
*
|
94 |
+
*
|
95 |
+
* @param array $slider_settings Slider settings array.
|
96 |
+
* @param string $slider_id HTML ID of slideshow.
|
97 |
+
* @param int $slider_count Current slideshow count.
|
98 |
+
* @return string Data attributes for slideshow.
|
99 |
+
*/
|
100 |
+
function cycloneslider_settings($slider_settings, $slider_id='', $slider_count=1){
|
101 |
+
$out = ' data-cycle-slides="> div"';
|
102 |
+
$out .= ' data-cycle-auto-height="'.$slider_settings['width'].':'.$slider_settings['height'].'"';
|
103 |
+
$out .= ' data-cycle-fx="'.$slider_settings['fx'].'"';
|
104 |
+
$out .= ' data-cycle-speed="'.$slider_settings['speed'].'"';
|
105 |
+
$out .= ' data-cycle-timeout="'.$slider_settings['timeout'].'"';
|
106 |
+
$out .= ' data-cycle-pause-on-hover="'.$slider_settings['hover_pause'].'"';
|
107 |
+
$out .= ' data-cycle-pager="#cycloneslider-'.$slider_id.' .cycloneslider-pager"';
|
108 |
+
$out .= ' data-cycle-prev="#cycloneslider-'.$slider_id.' .cycloneslider-prev"';
|
109 |
+
$out .= ' data-cycle-next="#cycloneslider-'.$slider_id.' .cycloneslider-next"';
|
110 |
+
$out .= ' data-cycle-tile-count="'.$slider_settings['tile_count'].'"';
|
111 |
+
$out .= ' data-cycle-tile-delay="'.$slider_settings['tile_delay'].'"';
|
112 |
+
$out .= ' data-cycle-tile-vertical="'.$slider_settings['tile_vertical'].'"';
|
113 |
+
$out .= ' data-cycle-log="false"';
|
114 |
+
$out = apply_filters('cycloneslider_cycle_settings', $out);
|
115 |
+
return $out;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Cycle Slide Settings Printer
|
120 |
+
*
|
121 |
+
* Prints out cycle slide settings in templates
|
122 |
+
*
|
123 |
+
*
|
124 |
+
* @param array $slider_meta Slide settings array.
|
125 |
+
* @param array $slider_settings Slider settings array.
|
126 |
+
* @param string $slider_id HTML ID of slideshow.
|
127 |
+
* @param int $slider_count Current slideshow count.
|
128 |
+
* @return string Data attributes for slide.
|
129 |
+
*/
|
130 |
+
function cycloneslider_slide_settings($slider_meta, $slider_settings=array(), $slider_id='', $slider_count=1){
|
131 |
+
$out = '';
|
132 |
+
if(empty($slider_meta['enable_slide_effects'])){
|
133 |
+
return $out;
|
134 |
+
}
|
135 |
+
if($slider_meta['fx']!='default') {
|
136 |
+
$out .= ' data-cycle-fx="'.$slider_meta['fx'].'"';
|
137 |
+
}
|
138 |
+
if(!empty($slider_meta['speed'])) {
|
139 |
+
$out .= ' data-cycle-speed="'.$slider_meta['speed'].'"';
|
140 |
+
}
|
141 |
+
if(!empty($slider_meta['timeout'])) {
|
142 |
+
$out .= ' data-cycle-timeout="'.$slider_meta['timeout'].'"';
|
143 |
+
}
|
144 |
+
if($slider_meta['fx']=='tileBlind' or $slider_meta['fx']=='tileSlide'){
|
145 |
+
if(!empty($slider_meta['tile_count'])) {
|
146 |
+
$out .= ' data-cycle-tile-count="'.$slider_meta['tile_count'].'"';
|
147 |
+
}
|
148 |
+
if(!empty($slider_meta['tile_delay'])) {
|
149 |
+
$out .= ' data-cycle-tile-delay="'.$slider_meta['tile_delay'].'"';
|
150 |
+
}
|
151 |
+
$out .= ' data-cycle-tile-vertical="'.$slider_meta['tile_vertical'].'"';
|
152 |
+
}
|
153 |
+
$out = apply_filters('cycloneslider_cycle_slide_settings', $out);
|
154 |
+
return $out;
|
155 |
}
|
images/screenshot.png
ADDED
Binary file
|
images/uploader-icons.png
ADDED
Binary file
|
inc/admin-parts/box.php
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if(!defined('CYCLONE_PATH')) die('Direct access denied.'); ?>
|
2 |
+
<div class="cycloneslider-box">
|
3 |
+
<div class="cycloneslider-box-title ui-state-default">
|
4 |
+
<span class="cycloneslider-box-title-left">
|
5 |
+
<?php echo $box_title; ?>
|
6 |
+
</span>
|
7 |
+
<span class="cycloneslider-box-title-right">
|
8 |
+
<span class="cycloneslider-box-drag" title="<?php _e('Drag', 'cycloneslider'); ?>"><?php _e('Drag', 'cycloneslider'); ?></span>
|
9 |
+
<span class="cycloneslider-box-toggle" title="<?php _e('Toggle', 'cycloneslider'); ?>"><?php _e('Toggle', 'cycloneslider'); ?></span>
|
10 |
+
<span class="cycloneslider-box-delete" title="<?php _e('Delete', 'cycloneslider'); ?>"><?php _e('Delete', 'cycloneslider'); ?></span>
|
11 |
+
</span>
|
12 |
+
<div class="clear"></div>
|
13 |
+
</div>
|
14 |
+
<div class="cycloneslider-box-body">
|
15 |
+
<div class="cycloneslider-body-left">
|
16 |
+
<img class="cycloneslider-slide-thumb" src="<?php echo esc_url($image_url); ?>" alt="" />
|
17 |
+
<input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[<?php echo $i; ?>][id]" type="hidden" value="<?php echo esc_attr($slider_meta['id']); ?>" />
|
18 |
+
<input class="cycloneslider-slide-meta-type" name="cycloneslider_metas[<?php echo $i; ?>][type]" type="hidden" value="<?php echo esc_attr($slider_meta['type']); ?>" />
|
19 |
+
<input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
|
20 |
+
</div>
|
21 |
+
<div class="cycloneslider-body-right">
|
22 |
+
<p class="cycloneslider-sub-title"><?php _e('Slide Elements:', 'cycloneslider'); ?></p>
|
23 |
+
<div class="cycloneslider-slide-metas">
|
24 |
+
<div class="cycloneslider-meta-field">
|
25 |
+
<div class="cycloneslider-field-title first">
|
26 |
+
<?php _e('Slide Link', 'cycloneslider'); ?>
|
27 |
+
</div>
|
28 |
+
<div class="cycloneslider-field-body">
|
29 |
+
<label for=""><?php _e('Link:', 'cycloneslider'); ?></label>
|
30 |
+
<input class="widefat cycloneslider-slide-meta-link" name="cycloneslider_metas[<?php echo $i; ?>][link]" type="text" value="<?php echo esc_url($slider_meta['link']); ?>" />
|
31 |
+
<label for=""><?php _e('Open Link in:', 'cycloneslider'); ?></label>
|
32 |
+
<select id="" name="cycloneslider_metas[<?php echo $i; ?>][link_target]">
|
33 |
+
<option <?php echo ('_self'==$slider_meta['link_target']) ? 'selected="selected"' : ''; ?> value="_self"><?php _e('Same Window', 'cycloneslider'); ?></option>
|
34 |
+
<option <?php echo ('_blank'==$slider_meta['link_target']) ? 'selected="selected"' : ''; ?> value="_blank"><?php _e('New Tab or Window', 'cycloneslider'); ?></option>
|
35 |
+
</select>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
<div class="cycloneslider-meta-field">
|
39 |
+
<div class="cycloneslider-field-title">
|
40 |
+
<?php _e('Title', 'cycloneslider'); ?>
|
41 |
+
</div>
|
42 |
+
<div class="cycloneslider-field-body">
|
43 |
+
<input class="widefat cycloneslider-slide-meta-title" name="cycloneslider_metas[<?php echo $i; ?>][title]" type="text" value="<?php echo esc_attr($slider_meta['title']); ?>" />
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<div class="cycloneslider-meta-field">
|
47 |
+
<div class="cycloneslider-field-title">
|
48 |
+
<?php _e('Description', 'cycloneslider'); ?>
|
49 |
+
</div>
|
50 |
+
<div class="cycloneslider-field-body">
|
51 |
+
<textarea class="widefat cycloneslider-slide-meta-description" name="cycloneslider_metas[<?php echo $i; ?>][description]"><?php echo esc_html($slider_meta['description']); ?></textarea>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
<p class="cycloneslider-sub-title"><?php _e('Image Properties:', 'cycloneslider'); ?></p>
|
56 |
+
<div class="cycloneslider-slide-metas">
|
57 |
+
<div class="cycloneslider-meta-field">
|
58 |
+
<div class="cycloneslider-field-title first">
|
59 |
+
<?php _e('Alternate Text', 'cycloneslider'); ?>
|
60 |
+
</div>
|
61 |
+
<div class="cycloneslider-field-body">
|
62 |
+
<input class="widefat cycloneslider-slide-meta-alt" name="cycloneslider_metas[<?php echo $i; ?>][img_alt]" type="text" value="<?php echo esc_attr($slider_meta['img_alt']); ?>" />
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<div class="cycloneslider-meta-field">
|
66 |
+
<div class="cycloneslider-field-title">
|
67 |
+
<?php _e('Title Text', 'cycloneslider'); ?>
|
68 |
+
</div>
|
69 |
+
<div class="cycloneslider-field-body">
|
70 |
+
<input class="widefat cycloneslider-slide-meta-title" name="cycloneslider_metas[<?php echo $i; ?>][img_title]" type="text" value="<?php echo esc_attr($slider_meta['img_title']); ?>" />
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<p class="cycloneslider-sub-title"><?php _e('Slide Properties:', 'cycloneslider'); ?></p>
|
76 |
+
<div class="cycloneslider-slide-metas">
|
77 |
+
<div class="cycloneslider-meta-field">
|
78 |
+
<div class="cycloneslider-field-title first">
|
79 |
+
<?php _e('Slide Effects', 'cycloneslider'); ?>
|
80 |
+
</div>
|
81 |
+
<div class="cycloneslider-field-body">
|
82 |
+
|
83 |
+
<select id="" class="cycloneslider_metas_enable_slide_effects" name="cycloneslider_metas[<?php echo $i; ?>][enable_slide_effects]">
|
84 |
+
<option <?php echo (0==$slider_meta['enable_slide_effects']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('Disable', 'cycloneslider'); ?></option>
|
85 |
+
<option <?php echo (1==$slider_meta['enable_slide_effects']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Enable Slide Effects', 'cycloneslider'); ?></option>
|
86 |
+
</select>
|
87 |
+
|
88 |
+
<div class="clear"></div>
|
89 |
+
|
90 |
+
<label for=""><?php _e('Transition Effects:', 'cycloneslider'); ?></label>
|
91 |
+
<select id="" class="cycloneslider_metas_fx" name="cycloneslider_metas[<?php echo $i; ?>][fx]">
|
92 |
+
<option value="default">Default</option>
|
93 |
+
<?php foreach($this->effects as $value=>$name): ?>
|
94 |
+
<option value="<?php echo $value; ?>" <?php echo ($slider_meta['fx']==$value) ? 'selected="selected"' : ''; ?>><?php echo $name; ?></option>
|
95 |
+
<?php endforeach; ?>
|
96 |
+
</select>
|
97 |
+
<div class="cycloneslider-spacer-15"></div>
|
98 |
+
|
99 |
+
<label for=""><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
|
100 |
+
<input class="widefat cycloneslider-slide-meta-speed" name="cycloneslider_metas[<?php echo $i; ?>][speed]" type="text" value="<?php esc_attr_e(@$slider_meta['speed']); ?>" />
|
101 |
+
<span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
102 |
+
<div class="cycloneslider-spacer-15"></div>
|
103 |
+
|
104 |
+
<label for=""><?php _e('Next Slide Delay:', 'cycloneslider'); ?></label>
|
105 |
+
<input class="widefat cycloneslider-slide-meta-timeout" name="cycloneslider_metas[<?php echo $i; ?>][timeout]" type="text" value="<?php esc_attr_e(@$slider_meta['timeout']); ?>" />
|
106 |
+
<span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
107 |
+
|
108 |
+
|
109 |
+
<div class="cycloneslider-slide-tile-properties">
|
110 |
+
<div class="cycloneslider-spacer-15"></div>
|
111 |
+
<label for=""><?php _e('Tile Count:', 'cycloneslider'); ?></label>
|
112 |
+
<input class="widefat cycloneslider-slide-meta-tile-count" name="cycloneslider_metas[<?php echo $i; ?>][tile_count]" type="text" value="<?php esc_attr_e(@$slider_meta['tile_count']); ?>" />
|
113 |
+
<span class="note"> <?php _e('The number of tiles to use in the transition.', 'cycloneslider'); ?></span>
|
114 |
+
<div class="cycloneslider-spacer-15"></div>
|
115 |
+
<!--
|
116 |
+
<label for=""><?php _e('Tile Delay:', 'cycloneslider'); ?></label>
|
117 |
+
<input class="widefat cycloneslider-slide-meta-tile-delay" name="cycloneslider_metas[<?php echo $i; ?>][tile_delay]" type="text" value="<?php esc_attr_e(@$slider_meta['tile_delay']); ?>" />
|
118 |
+
<span class="note"> <?php _e('Milliseconds to delay each individual tile transition.', 'cycloneslider'); ?></span>
|
119 |
+
<div class="cycloneslider-spacer-15"></div>
|
120 |
+
-->
|
121 |
+
<label for=""><?php _e('Tile Position:', 'cycloneslider'); ?></label>
|
122 |
+
<select id="" name="cycloneslider_metas[<?php echo $i; ?>][tile_vertical]">
|
123 |
+
<option <?php echo ('true'==$slider_meta['tile_vertical']) ? 'selected="selected"' : ''; ?> value="true"><?php _e('Vertical', 'cycloneslider'); ?></option>
|
124 |
+
<option <?php echo ('false'==$slider_meta['tile_vertical']) ? 'selected="selected"' : ''; ?> value="false"><?php _e('Horizontal', 'cycloneslider'); ?></option>
|
125 |
+
</select>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
<div class="clear"></div>
|
133 |
+
</div>
|
134 |
+
</div>
|
inc/admin-parts/slider-properties.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if(!defined('CYCLONE_PATH')) die('Direct access denied.'); ?>
|
2 |
+
<div class="cycloneslider-field">
|
3 |
+
<label for="cycloneslider_settings_fx"><?php _e('Transition Effects to Use:', 'cycloneslider'); ?></label>
|
4 |
+
<select id="cycloneslider_settings_fx" name="cycloneslider_settings[fx]">
|
5 |
+
<?php foreach($this->effects as $key=>$fx): ?>
|
6 |
+
<option <?php echo (isset($slider_settings['fx']) && $key==$slider_settings['fx']) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr($key); ?>"><?php echo esc_attr($fx); ?></option>
|
7 |
+
<?php endforeach; ?>
|
8 |
+
</select>
|
9 |
+
<div class="clear"></div>
|
10 |
+
</div>
|
11 |
+
<div class="cycloneslider-field cycloneslider-field-tile-properties">
|
12 |
+
<label for="cycloneslider_settings_tile_count"><?php _e('Tile Count:', 'cycloneslider'); ?> </label>
|
13 |
+
<input id="cycloneslider_settings_tile_count" type="text" name="cycloneslider_settings[tile_count]" value="<?php echo esc_attr($slider_settings['tile_count']); ?>" />
|
14 |
+
<span class="note"><?php _e('The number of tiles to use in the transition.', 'cycloneslider'); ?></span>
|
15 |
+
<div class="clear"></div>
|
16 |
+
<br />
|
17 |
+
<!--
|
18 |
+
<label for="cycloneslider_settings_tile_delay"><?php _e('Tile Delay:', 'cycloneslider'); ?> </label>
|
19 |
+
<input id="cycloneslider_settings_tile_delay" type="text" name="cycloneslider_settings[tile_delay]" value="<?php echo esc_attr($slider_settings['tile_delay']); ?>" />
|
20 |
+
<span class="note"><?php _e('The number of milliseconds to delay each individual tile transition.', 'cycloneslider'); ?></span>
|
21 |
+
<div class="clear"></div>
|
22 |
+
<br />
|
23 |
+
-->
|
24 |
+
<label for="cycloneslider_settings_tile_vertical"><?php _e('Tile Position:', 'cycloneslider'); ?> </label>
|
25 |
+
<select id="cycloneslider_settings_tile_vertical" name="cycloneslider_settings[tile_vertical]">
|
26 |
+
<option <?php echo ('true'==$slider_settings['tile_vertical']) ? 'selected="selected"' : ''; ?> value="true"><?php _e('Vertical', 'cycloneslider'); ?></option>
|
27 |
+
<option <?php echo ('false'==$slider_settings['tile_vertical']) ? 'selected="selected"' : ''; ?> value="false"><?php _e('Horizontal', 'cycloneslider'); ?></option>
|
28 |
+
</select>
|
29 |
+
<div class="clear"></div>
|
30 |
+
</div>
|
31 |
+
|
32 |
+
<div class="cycloneslider-field">
|
33 |
+
<label for="cycloneslider_settings_timeout"><?php _e('Next Slide Delay:', 'cycloneslider'); ?> </label>
|
34 |
+
<input id="cycloneslider_settings_timeout" type="text" name="cycloneslider_settings[timeout]" value="<?php echo esc_attr($slider_settings['timeout']); ?>" />
|
35 |
+
<span class="note"><?php _e('Milliseconds. 0 to disable auto advance.', 'cycloneslider'); ?></span>
|
36 |
+
<div class="clear"></div>
|
37 |
+
</div>
|
38 |
+
<div class="cycloneslider-field">
|
39 |
+
<label for="cycloneslider_settings_speed"><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
|
40 |
+
<input id="cycloneslider_settings_speed" type="text" name="cycloneslider_settings[speed]" value="<?php echo esc_attr($slider_settings['speed']); ?>" />
|
41 |
+
<span class="note"><?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
42 |
+
<div class="clear"></div>
|
43 |
+
</div>
|
44 |
+
<div class="cycloneslider-field">
|
45 |
+
<label for="cycloneslider_settings_width"><?php _e('Width:', 'cycloneslider'); ?> </label>
|
46 |
+
<input id="cycloneslider_settings_width" type="text" name="cycloneslider_settings[width]" value="<?php echo esc_attr($slider_settings['width']); ?>" />
|
47 |
+
<span class="note"><?php _e('pixels.', 'cycloneslider'); ?></span>
|
48 |
+
<div class="clear"></div>
|
49 |
+
</div>
|
50 |
+
<div class="cycloneslider-field">
|
51 |
+
<label for="cycloneslider_settings_height"><?php _e('Height:', 'cycloneslider'); ?> </label>
|
52 |
+
<input id="cycloneslider_settings_height" type="text" name="cycloneslider_settings[height]" value="<?php echo esc_attr($slider_settings['height']); ?>" />
|
53 |
+
<span class="note"><?php _e('pixels.', 'cycloneslider'); ?></span>
|
54 |
+
<div class="clear"></div>
|
55 |
+
</div>
|
56 |
+
<div class="cycloneslider-field">
|
57 |
+
<label for="cycloneslider_settings_hover_pause"><?php _e('Pause on Hover?', 'cycloneslider'); ?></label>
|
58 |
+
<select id="cycloneslider_settings_hover_pause" name="cycloneslider_settings[hover_pause]">
|
59 |
+
<option <?php echo ('true'==$slider_settings['hover_pause']) ? 'selected="selected"' : ''; ?> value="true"><?php _e('Yes', 'cycloneslider'); ?></option>
|
60 |
+
<option <?php echo ('false'==$slider_settings['hover_pause']) ? 'selected="selected"' : ''; ?> value="false"><?php _e('No', 'cycloneslider'); ?></option>
|
61 |
+
</select>
|
62 |
+
<div class="clear"></div>
|
63 |
+
</div>
|
64 |
+
<div class="cycloneslider-field">
|
65 |
+
<label for="cycloneslider_settings_show_prev_next"><?php _e('Show Prev/Next Buttons?', 'cycloneslider'); ?></label>
|
66 |
+
<select id="cycloneslider_settings_show_prev_next" name="cycloneslider_settings[show_prev_next]">
|
67 |
+
<option <?php echo (1==$slider_settings['show_prev_next']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
|
68 |
+
<option <?php echo (0==$slider_settings['show_prev_next']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
|
69 |
+
</select>
|
70 |
+
<div class="clear"></div>
|
71 |
+
</div>
|
72 |
+
<div class="cycloneslider-field last">
|
73 |
+
<label for="cycloneslider_settings_show_nav"><?php _e('Show Navigation?', 'cycloneslider'); ?></label>
|
74 |
+
<select id="cycloneslider_settings_show_nav" name="cycloneslider_settings[show_nav]">
|
75 |
+
<option <?php echo (1==$slider_settings['show_nav']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
|
76 |
+
<option <?php echo (0==$slider_settings['show_nav']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
|
77 |
+
</select>
|
78 |
+
<div class="clear"></div>
|
79 |
+
</div>
|
inc/admin/box-js.php
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
<div class="cycloneslider-box">
|
2 |
-
<div class="cycloneslider-box-title ui-state-default">
|
3 |
-
<span class="cycloneslider-box-title-left">
|
4 |
-
<?php _e('Slide', 'cycloneslider'); ?>
|
5 |
-
</span>
|
6 |
-
<span class="cycloneslider-box-title-right">
|
7 |
-
<span class="cycloneslider-box-drag" title="<?php _e('Drag', 'cycloneslider'); ?>"><?php _e('Drag', 'cycloneslider'); ?></span>
|
8 |
-
<a href="#" class="cycloneslider-box-toggle" title="<?php _e('Toggle', 'cycloneslider'); ?>"><?php _e('Toggle', 'cycloneslider'); ?></a>
|
9 |
-
<a href="#" class="cycloneslider-box-delete" title="<?php _e('Delete', 'cycloneslider'); ?>"><?php _e('Delete', 'cycloneslider'); ?></a>
|
10 |
-
</span>
|
11 |
-
<div class="clear"></div>
|
12 |
-
</div>
|
13 |
-
<div class="cycloneslider-box-body">
|
14 |
-
<div class="cycloneslider-body-left">
|
15 |
-
<img class="cycloneslider-slide-thumb" src="" alt="" />
|
16 |
-
<input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[{id}][id]" type="hidden" value="" />
|
17 |
-
<input class="cycloneslider-slide-meta-type" name="cycloneslider_metas[{id}][type]" type="hidden" value="image" />
|
18 |
-
<input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
|
19 |
-
</div>
|
20 |
-
<div class="cycloneslider-body-right">
|
21 |
-
<p class="cycloneslider-sub-title"><?php _e('Extra slide elements:', 'cycloneslider'); ?></p>
|
22 |
-
<div class="cycloneslider-slide-metas">
|
23 |
-
<div class="cycloneslider-meta-field">
|
24 |
-
<div class="cycloneslider-field-title first">
|
25 |
-
<?php _e('Slide Link', 'cycloneslider'); ?>
|
26 |
-
</div>
|
27 |
-
<div class="cycloneslider-field-body">
|
28 |
-
<label for=""><?php _e('Link:', 'cycloneslider'); ?></label>
|
29 |
-
<input class="widefat cycloneslider-slide-meta-link" name="cycloneslider_metas[{id}][link]" type="text" value="" />
|
30 |
-
<label for=""><?php _e('Open Link in:', 'cycloneslider'); ?></label>
|
31 |
-
<select id="" name="cycloneslider_metas[{id}][link_target]">
|
32 |
-
<option value="_self"><?php _e('Same Window', 'cycloneslider'); ?></option>
|
33 |
-
<option value="_blank"><?php _e('New Tab or Window', 'cycloneslider'); ?></option>
|
34 |
-
</select>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
<div class="cycloneslider-meta-field">
|
38 |
-
<div class="cycloneslider-field-title">
|
39 |
-
<?php _e('Title', 'cycloneslider'); ?>
|
40 |
-
</div>
|
41 |
-
<div class="cycloneslider-field-body">
|
42 |
-
<input class="widefat cycloneslider-slide-meta-title" name="cycloneslider_metas[{id}][title]" type="text" value="" />
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
<div class="cycloneslider-meta-field">
|
46 |
-
<div class="cycloneslider-field-title">
|
47 |
-
<?php _e('Description', 'cycloneslider'); ?>
|
48 |
-
</div>
|
49 |
-
<div class="cycloneslider-field-body">
|
50 |
-
<textarea class="widefat cycloneslider-slide-meta-description" name="cycloneslider_metas[{id}][description]"></textarea>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
|
55 |
-
<p class="cycloneslider-sub-title"><?php _e('Slide Properties:', 'cycloneslider'); ?></p>
|
56 |
-
<div class="cycloneslider-slide-metas">
|
57 |
-
<div class="cycloneslider-meta-field">
|
58 |
-
<div class="cycloneslider-field-title first">
|
59 |
-
<?php _e('Slide Effects', 'cycloneslider'); ?>
|
60 |
-
</div>
|
61 |
-
<div class="cycloneslider-field-body">
|
62 |
-
<label for=""><?php _e('Effects:', 'cycloneslider'); ?></label>
|
63 |
-
<select id="" name="cycloneslider_metas[{id}][fx]">
|
64 |
-
<option value="default">Default</option>
|
65 |
-
<?php foreach($this->effects as $value=>$name): ?>
|
66 |
-
<option value="<?php echo $value; ?>"><?php echo $name; ?></option>
|
67 |
-
<?php endforeach; ?>
|
68 |
-
</select>
|
69 |
-
<br /><br />
|
70 |
-
<label for=""><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
|
71 |
-
<input class="widefat cycloneslider-slide-meta-speed" name="cycloneslider_metas[{id}][speed]" type="text" value="" />
|
72 |
-
<span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
73 |
-
<br /><br />
|
74 |
-
<label for=""><?php _e('Next Slide Delay:', 'cycloneslider'); ?></label>
|
75 |
-
<input class="widefat cycloneslider-slide-meta-timeout" name="cycloneslider_metas[{id}][timeout]" type="text" value="" />
|
76 |
-
<span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
77 |
-
<br /><br />
|
78 |
-
<span class="note"><?php _e('Settings here will override the main slideshow settings. Leave blank to disable.', 'cycloneslider'); ?></span>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
-
</div>
|
83 |
-
<div class="clear"></div>
|
84 |
-
</div>
|
85 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/admin/box.php
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
<div class="cycloneslider-box">
|
2 |
-
<div class="cycloneslider-box-title ui-state-default">
|
3 |
-
<span class="cycloneslider-box-title-left">
|
4 |
-
<?php echo $box_title; ?>
|
5 |
-
</span>
|
6 |
-
<span class="cycloneslider-box-title-right">
|
7 |
-
<span class="cycloneslider-box-drag" title="<?php _e('Drag', 'cycloneslider'); ?>"><?php _e('Drag', 'cycloneslider'); ?></span>
|
8 |
-
<a href="#" class="cycloneslider-box-toggle" title="<?php _e('Toggle', 'cycloneslider'); ?>"><?php _e('Toggle', 'cycloneslider'); ?></a>
|
9 |
-
<a href="#" class="cycloneslider-box-delete" title="<?php _e('Delete', 'cycloneslider'); ?>"><?php _e('Delete', 'cycloneslider'); ?></a>
|
10 |
-
</span>
|
11 |
-
<div class="clear"></div>
|
12 |
-
</div>
|
13 |
-
<div class="cycloneslider-box-body">
|
14 |
-
<div class="cycloneslider-body-left">
|
15 |
-
<img class="cycloneslider-slide-thumb" src="<?php echo esc_url($image_url); ?>" alt="" />
|
16 |
-
<input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[<?php echo $i; ?>][id]" type="hidden" value="<?php echo esc_attr($slider_metas[$i]['id']); ?>" />
|
17 |
-
<input class="cycloneslider-slide-meta-type" name="cycloneslider_metas[<?php echo $i; ?>][type]" type="hidden" value="<?php echo esc_attr($slider_meta['type']); ?>" />
|
18 |
-
<input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
|
19 |
-
</div>
|
20 |
-
<div class="cycloneslider-body-right">
|
21 |
-
<p class="cycloneslider-sub-title"><?php _e('Extra slide elements:', 'cycloneslider'); ?></p>
|
22 |
-
<div class="cycloneslider-slide-metas">
|
23 |
-
<div class="cycloneslider-meta-field">
|
24 |
-
<div class="cycloneslider-field-title first">
|
25 |
-
<?php _e('Slide Link', 'cycloneslider'); ?>
|
26 |
-
</div>
|
27 |
-
<div class="cycloneslider-field-body">
|
28 |
-
<label for=""><?php _e('Link:', 'cycloneslider'); ?></label>
|
29 |
-
<input class="widefat cycloneslider-slide-meta-link" name="cycloneslider_metas[<?php echo $i; ?>][link]" type="text" value="<?php echo esc_url($slider_metas[$i]['link']); ?>" />
|
30 |
-
<label for=""><?php _e('Open Link in:', 'cycloneslider'); ?></label>
|
31 |
-
<select id="" name="cycloneslider_metas[<?php echo $i; ?>][link_target]">
|
32 |
-
<option <?php echo ('_self'==$slider_metas[$i]['link_target']) ? 'selected="selected"' : ''; ?> value="_self"><?php _e('Same Window', 'cycloneslider'); ?></option>
|
33 |
-
<option <?php echo ('_blank'==$slider_metas[$i]['link_target']) ? 'selected="selected"' : ''; ?> value="_blank"><?php _e('New Tab or Window', 'cycloneslider'); ?></option>
|
34 |
-
</select>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
<div class="cycloneslider-meta-field">
|
38 |
-
<div class="cycloneslider-field-title">
|
39 |
-
<?php _e('Title', 'cycloneslider'); ?>
|
40 |
-
</div>
|
41 |
-
<div class="cycloneslider-field-body">
|
42 |
-
<input class="widefat cycloneslider-slide-meta-title" name="cycloneslider_metas[<?php echo $i; ?>][title]" type="text" value="<?php echo esc_attr($slider_metas[$i]['title']); ?>" />
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
<div class="cycloneslider-meta-field">
|
46 |
-
<div class="cycloneslider-field-title">
|
47 |
-
<?php _e('Description', 'cycloneslider'); ?>
|
48 |
-
</div>
|
49 |
-
<div class="cycloneslider-field-body">
|
50 |
-
<textarea class="widefat cycloneslider-slide-meta-description" name="cycloneslider_metas[<?php echo $i; ?>][description]"><?php echo esc_html($slider_metas[$i]['description']); ?></textarea>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
|
55 |
-
<p class="cycloneslider-sub-title"><?php _e('Slide Properties:', 'cycloneslider'); ?></p>
|
56 |
-
<div class="cycloneslider-slide-metas">
|
57 |
-
<div class="cycloneslider-meta-field">
|
58 |
-
<div class="cycloneslider-field-title first">
|
59 |
-
<?php _e('Slide Effects', 'cycloneslider'); ?>
|
60 |
-
</div>
|
61 |
-
<div class="cycloneslider-field-body">
|
62 |
-
<label for=""><?php _e('Effects:', 'cycloneslider'); ?></label>
|
63 |
-
<select id="" name="cycloneslider_metas[<?php echo $i; ?>][fx]">
|
64 |
-
<option value="default">Default</option>
|
65 |
-
<?php foreach($this->effects as $value=>$name): ?>
|
66 |
-
<option value="<?php echo $value; ?>" <?php echo ($slider_metas[$i]['fx']==$value) ? 'selected="selected"' : ''; ?>><?php echo $name; ?></option>
|
67 |
-
<?php endforeach; ?>
|
68 |
-
</select>
|
69 |
-
<br /><br />
|
70 |
-
<label for=""><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
|
71 |
-
<input class="widefat cycloneslider-slide-meta-speed" name="cycloneslider_metas[<?php echo $i; ?>][speed]" type="text" value="<?php esc_attr_e(@$slider_metas[$i]['speed']); ?>" />
|
72 |
-
<span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
73 |
-
<br /><br />
|
74 |
-
<label for=""><?php _e('Next Slide Delay:', 'cycloneslider'); ?></label>
|
75 |
-
<input class="widefat cycloneslider-slide-meta-timeout" name="cycloneslider_metas[<?php echo $i; ?>][timeout]" type="text" value="<?php esc_attr_e(@$slider_metas[$i]['timeout']); ?>" />
|
76 |
-
<span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
77 |
-
<br /><br />
|
78 |
-
<span class="note"><?php _e('Settings here will override the main slideshow settings. Leave blank to disable.', 'cycloneslider'); ?></span>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
-
</div>
|
83 |
-
<div class="clear"></div>
|
84 |
-
</div>
|
85 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-cyclone-slider.php
CHANGED
@@ -1,710 +1,811 @@
|
|
1 |
<?php
|
2 |
if(!class_exists('Cyclone_Slider')):
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
$this->plugin_url = CYCLONE_URL;//url to plugin
|
24 |
-
$this->template_slide_box = $this->plugin_path . 'inc'.$ds.'admin'.$ds.'box.php';
|
25 |
-
$this->template_slide_box_js = $this->plugin_path . 'inc'.$ds.'admin'.$ds.'box-js.php';
|
26 |
-
$this->template_slider_dir = $this->plugin_path . 'templates'.$ds;
|
27 |
-
$this->slider_count = 0;
|
28 |
-
$this->effects = array(
|
29 |
-
'fade'=>'Fade',
|
30 |
-
'fadeout'=>'Fade Out',
|
31 |
-
'none'=>'None',
|
32 |
-
'scrollHorz'=>'Scroll Horizontally',
|
33 |
-
'tileBlind'=>'Tile Blind',
|
34 |
-
'tileSlide'=>'Tile Slide'
|
35 |
-
);
|
36 |
-
|
37 |
-
load_plugin_textdomain( 'cycloneslider', false, 'cyclone-slider-2/lang' );
|
38 |
-
|
39 |
-
// Register admin styles and scripts
|
40 |
-
add_action( 'admin_enqueue_scripts', array( &$this, 'register_admin_scripts' ), 10);
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
-
//
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
//
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
-
//
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Registers and enqueues admin-specific JavaScript.
|
84 |
-
*/
|
85 |
-
public function register_admin_scripts() {
|
86 |
-
if('cycloneslider' == get_post_type()){ /* Load only scripts here and not on all admin pages */
|
87 |
-
//styles
|
88 |
-
wp_enqueue_style('thickbox');
|
89 |
-
|
90 |
-
wp_register_style( 'cycloneslider-admin-styles', $this->plugin_url.'css/admin.css' );
|
91 |
-
wp_enqueue_style( 'cycloneslider-admin-styles' );
|
92 |
|
93 |
-
//
|
94 |
-
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
wp_enqueue_script('media-upload');
|
99 |
-
wp_enqueue_script('thickbox');
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
|
|
|
|
106 |
}
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
wp_register_style( 'cyclone-slider-plugin-styles', $cyclone_css );//contains our combined css from ALL templates
|
116 |
-
wp_enqueue_style( 'cyclone-slider-plugin-styles' );
|
117 |
-
|
118 |
-
/*** Scripts ***/
|
119 |
-
wp_register_script( 'cycle2', $this->plugin_url.'js/jquery.cycle2.min.js', array('jquery') );
|
120 |
-
wp_enqueue_script( 'cycle2' );
|
121 |
-
|
122 |
-
wp_register_script( 'cycle2-tile', $this->plugin_url.'js/jquery.cycle2.tile.min.js', array('cycle2') );
|
123 |
-
wp_enqueue_script( 'cycle2-tile' );
|
124 |
-
|
125 |
-
}
|
126 |
|
127 |
-
|
128 |
-
* Core Functions
|
129 |
-
*---------------------------------------------*/
|
130 |
-
// Create custom post for slideshows
|
131 |
-
function create_post_types() {
|
132 |
-
register_post_type( 'cycloneslider',
|
133 |
-
array(
|
134 |
-
'labels' => array(
|
135 |
-
'name' => __('Cyclone Slider', 'cycloneslider'),
|
136 |
-
'singular_name' => __('Slideshow', 'cycloneslider'),
|
137 |
-
'add_new' => __('Add Slideshow', 'cycloneslider'),
|
138 |
-
'add_new_item' => __('Add New Slideshow', 'cycloneslider'),
|
139 |
-
'edit_item' => __('Edit Slideshow', 'cycloneslider'),
|
140 |
-
'new_item' => __('New Slideshow', 'cycloneslider'),
|
141 |
-
'view_item' => __('View Slideshow', 'cycloneslider'),
|
142 |
-
'search_items' => __('Search Slideshows', 'cycloneslider'),
|
143 |
-
'not_found' => __('No slideshows found', 'cycloneslider'),
|
144 |
-
'not_found_in_trash' => __('No slideshows found in Trash', 'cycloneslider')
|
145 |
-
),
|
146 |
-
'supports' => array('title'),
|
147 |
-
'public' => false,
|
148 |
-
'exclude_from_search' => true,
|
149 |
-
'show_ui' => true,
|
150 |
-
'menu_position' => 100
|
151 |
-
)
|
152 |
-
);
|
153 |
-
}
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
'
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
'
|
190 |
-
'low'
|
191 |
-
);
|
192 |
-
add_meta_box(
|
193 |
-
'cyclone-slider-templates-metabox',
|
194 |
-
__('Slider Templates', 'cycloneslider'),
|
195 |
-
array( &$this, 'render_slider_templates_meta_box' ),
|
196 |
-
'cycloneslider' ,
|
197 |
-
'normal',
|
198 |
-
'low'
|
199 |
-
);
|
200 |
-
}
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
-
return false;
|
208 |
-
}
|
209 |
-
|
210 |
-
// Slides metabox render
|
211 |
-
function render_slides_meta_box($post){
|
212 |
|
213 |
-
//
|
214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
$defaults = array(
|
234 |
-
'id' => 0,
|
235 |
-
'link' => '',
|
236 |
-
'title' => '',
|
237 |
-
'description' => '',
|
238 |
-
'link_target' => '_self',
|
239 |
-
'fx' => 'default',
|
240 |
-
'speed' => '',
|
241 |
-
'timeout' => '',
|
242 |
-
'type' => 'image'
|
243 |
-
);
|
244 |
-
foreach($slider_metas as $i=>$slider_meta):
|
245 |
-
$slider_meta = wp_parse_args($slider_meta, $defaults);
|
246 |
-
$attachment_id = (int) $slider_meta['id'];
|
247 |
-
$image_url = wp_get_attachment_image_src( $attachment_id, 'medium', true );
|
248 |
-
$image_url = (is_array($image_url)) ? $image_url[0] : '';
|
249 |
-
$image_url = apply_filters('cycloneslider_preview_url', $image_url, $slider_meta);
|
250 |
-
$box_title = apply_filters('cycloneslider_box_title', __('Slide', 'cycloneslider'), $slider_meta);
|
251 |
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
|
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
$slider_settings = $this->get_slider_admin_settings($meta);
|
268 |
-
//default values
|
269 |
-
$slider_settings['timeout'] = (!isset($slider_settings['timeout']) || $slider_settings['timeout']===null) ? 4000 : $slider_settings['timeout'];
|
270 |
-
$slider_settings['speed'] = (!isset($slider_settings['speed']) || $slider_settings['speed']===null) ? 1000 : $slider_settings['speed'];
|
271 |
-
$slider_settings['width'] = (!isset($slider_settings['width']) || $slider_settings['width']===null) ? 960 : $slider_settings['width'];
|
272 |
-
$slider_settings['height'] = (!isset($slider_settings['height']) || $slider_settings['height']===null) ? 300 : $slider_settings['height'];
|
273 |
-
$slider_settings['show_prev_next'] = (!isset($slider_settings['show_prev_next']) || $slider_settings['show_prev_next']===null) ? 1 : $slider_settings['show_prev_next'];
|
274 |
-
$slider_settings['show_nav'] = (!isset($slider_settings['show_nav']) || $slider_settings['show_nav']===null) ? 1 : $slider_settings['show_nav'];
|
275 |
-
$slider_settings['hover_pause'] = (!isset($slider_settings['hover_pause']) || $slider_settings['hover_pause']===null) ? 1 : $slider_settings['hover_pause'];
|
276 |
-
|
277 |
-
?>
|
278 |
-
<div class="cycloneslider-field">
|
279 |
-
<label for="cycloneslider_settings_fx"><?php _e('Transition Effects to Use:', 'cycloneslider'); ?></label>
|
280 |
-
<select id="cycloneslider_settings_fx" name="cycloneslider_settings[fx]">
|
281 |
-
<?php foreach($this->effects as $key=>$fx): ?>
|
282 |
-
<option <?php echo (isset($slider_settings['fx']) && $key==$slider_settings['fx']) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr($key); ?>"><?php echo esc_attr($fx); ?></option>
|
283 |
-
<?php endforeach; ?>
|
284 |
-
</select>
|
285 |
-
<div class="clear"></div>
|
286 |
-
</div>
|
287 |
-
<?php
|
288 |
-
?>
|
289 |
-
<div class="cycloneslider-field">
|
290 |
-
<label for="cycloneslider_settings_timeout"><?php _e('Next Slide Delay:', 'cycloneslider'); ?> </label>
|
291 |
-
<input id="cycloneslider_settings_timeout" type="text" name="cycloneslider_settings[timeout]" value="<?php echo esc_attr($slider_settings['timeout']); ?>" />
|
292 |
-
<span class="note"><?php _e('Milliseconds. 0 to disable auto advance.', 'cycloneslider'); ?></span>
|
293 |
-
<div class="clear"></div>
|
294 |
-
</div>
|
295 |
-
<div class="cycloneslider-field">
|
296 |
-
<label for="cycloneslider_settings_speed"><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
|
297 |
-
<input id="cycloneslider_settings_speed" type="text" name="cycloneslider_settings[speed]" value="<?php echo esc_attr($slider_settings['speed']); ?>" />
|
298 |
-
<span class="note"><?php _e('Milliseconds', 'cycloneslider'); ?></span>
|
299 |
-
<div class="clear"></div>
|
300 |
-
</div>
|
301 |
-
<div class="cycloneslider-field">
|
302 |
-
<label for="cycloneslider_settings_width"><?php _e('Width:', 'cycloneslider'); ?> </label>
|
303 |
-
<input id="cycloneslider_settings_width" type="text" name="cycloneslider_settings[width]" value="<?php echo esc_attr($slider_settings['width']); ?>" />
|
304 |
-
<span class="note"><?php _e('pixels.', 'cycloneslider'); ?></span>
|
305 |
-
<div class="clear"></div>
|
306 |
-
</div>
|
307 |
-
<div class="cycloneslider-field">
|
308 |
-
<label for="cycloneslider_settings_height"><?php _e('Height:', 'cycloneslider'); ?> </label>
|
309 |
-
<input id="cycloneslider_settings_height" type="text" name="cycloneslider_settings[height]" value="<?php echo esc_attr($slider_settings['height']); ?>" />
|
310 |
-
<span class="note"><?php _e('pixels.', 'cycloneslider'); ?></span>
|
311 |
-
<div class="clear"></div>
|
312 |
-
</div>
|
313 |
-
<div class="cycloneslider-field">
|
314 |
-
<label for="cycloneslider_settings_hover_pause"><?php _e('Pause on Hover?', 'cycloneslider'); ?></label>
|
315 |
-
<select id="cycloneslider_settings_hover_pause" name="cycloneslider_settings[hover_pause]">
|
316 |
-
<option <?php echo ('true'==$slider_settings['hover_pause']) ? 'selected="selected"' : ''; ?> value="true"><?php _e('Yes', 'cycloneslider'); ?></option>
|
317 |
-
<option <?php echo ('false'==$slider_settings['hover_pause']) ? 'selected="selected"' : ''; ?> value="false"><?php _e('No', 'cycloneslider'); ?></option>
|
318 |
-
</select>
|
319 |
-
<div class="clear"></div>
|
320 |
-
</div>
|
321 |
-
<div class="cycloneslider-field">
|
322 |
-
<label for="cycloneslider_settings_show_prev_next"><?php _e('Show Prev/Next Buttons?', 'cycloneslider'); ?></label>
|
323 |
-
<select id="cycloneslider_settings_show_prev_next" name="cycloneslider_settings[show_prev_next]">
|
324 |
-
<option <?php echo (1==$slider_settings['show_prev_next']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
|
325 |
-
<option <?php echo (0==$slider_settings['show_prev_next']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
|
326 |
-
</select>
|
327 |
-
<div class="clear"></div>
|
328 |
-
</div>
|
329 |
-
<div class="cycloneslider-field last">
|
330 |
-
<label for="cycloneslider_settings_show_nav"><?php _e('Show Navigation?', 'cycloneslider'); ?></label>
|
331 |
-
<select id="cycloneslider_settings_show_nav" name="cycloneslider_settings[show_nav]">
|
332 |
-
<option <?php echo (1==$slider_settings['show_nav']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
|
333 |
-
<option <?php echo (0==$slider_settings['show_nav']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
|
334 |
-
</select>
|
335 |
-
<div class="clear"></div>
|
336 |
-
</div>
|
337 |
-
<?php
|
338 |
-
}
|
339 |
-
|
340 |
-
function render_slider_templates_meta_box($post){
|
341 |
-
// Use nonce for verification
|
342 |
-
echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
|
343 |
-
|
344 |
-
$meta = get_post_custom($post->ID);
|
345 |
-
$slider_settings = $this->get_slider_admin_settings($meta);
|
346 |
-
//default values
|
347 |
-
$slider_settings['template'] = ($slider_settings['template']===null) ? 'default' : $slider_settings['template'];
|
348 |
-
|
349 |
-
$templates = $this->get_all_templates();
|
350 |
-
$template_options = array();
|
351 |
-
$template_options['default'] = 'Default';
|
352 |
-
foreach($templates as $name=>$template){
|
353 |
-
if($name!='default'){
|
354 |
-
$template_options[$name]= ucwords(str_replace('-',' ',$name));
|
355 |
}
|
|
|
356 |
}
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
<
|
361 |
-
|
362 |
-
<option <?php echo ($key==$slider_settings['template']) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr($key); ?>"><?php echo esc_attr($name); ?></option>
|
363 |
-
<?php endforeach; ?>
|
364 |
-
</select>
|
365 |
-
<div class="clear"></div>
|
366 |
-
</div>
|
367 |
-
<?php
|
368 |
-
}
|
369 |
-
|
370 |
-
function save_post($post_id){
|
371 |
-
|
372 |
-
// Verify nonce
|
373 |
-
$nonce_name = 'cycloneslider_metabox_nonce';
|
374 |
-
if (!empty($_POST[$nonce_name])) {
|
375 |
-
if (!wp_verify_nonce($_POST[$nonce_name], basename(__FILE__))) {
|
376 |
-
return $post_id;
|
377 |
}
|
378 |
-
|
379 |
-
return $post_id; // Make sure we cancel on missing nonce!
|
380 |
}
|
381 |
|
382 |
-
//
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
|
|
385 |
}
|
386 |
|
387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
-
//
|
390 |
-
|
|
|
|
|
391 |
|
392 |
-
//
|
393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
|
396 |
-
|
397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
$
|
412 |
-
|
413 |
-
$slides[$i]['fx'] = wp_kses_post($slide['fx']);
|
414 |
-
$slides[$i]['speed'] = sanitize_text_field($slide['speed']);
|
415 |
-
$slides[$i]['timeout'] = sanitize_text_field($slide['timeout']);
|
416 |
-
$slides[$i]['type'] = sanitize_text_field($slide['type']);
|
417 |
-
$i++;
|
418 |
-
}
|
419 |
-
|
420 |
-
$slides = apply_filters('cycloneslider_slides', $slides); //do filter before saving
|
421 |
|
422 |
-
|
423 |
-
update_post_meta($post_id, '_cycloneslider_metas', $slides);
|
424 |
}
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
function save_settings($post_id){
|
429 |
-
if(isset($_POST['cycloneslider_settings'])){
|
430 |
-
$settings = array();
|
431 |
-
$settings['template'] = wp_filter_nohtml_kses($_POST['cycloneslider_settings']['template']);
|
432 |
-
$settings['fx'] = wp_filter_nohtml_kses($_POST['cycloneslider_settings']['fx']);
|
433 |
-
$settings['timeout'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['timeout']);
|
434 |
-
$settings['speed'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['speed']);
|
435 |
-
$settings['width'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['width']);
|
436 |
-
$settings['height'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['height']);
|
437 |
-
$settings['hover_pause'] = wp_filter_nohtml_kses($_POST['cycloneslider_settings']['hover_pause']);
|
438 |
-
$settings['show_prev_next'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_prev_next']);
|
439 |
-
$settings['show_nav'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_nav']);
|
440 |
-
|
441 |
-
$settings = apply_filters('cycloneslider_settings', $settings); //do filter before saving
|
442 |
-
|
443 |
-
delete_post_meta($post_id, '_cycloneslider_settings');
|
444 |
-
update_post_meta($post_id, '_cycloneslider_settings', $settings);
|
445 |
-
}
|
446 |
-
}
|
447 |
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
return 'Add to Slide';
|
455 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
}
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
}
|
465 |
-
return $html;
|
466 |
-
}
|
467 |
-
|
468 |
-
// Modify columns
|
469 |
-
function slideshow_columns($columns) {
|
470 |
-
$columns = array();
|
471 |
-
$columns['title']= __('Slideshow Name', 'cycloneslider');
|
472 |
-
$columns['id']= __('Slideshow ID', 'cycloneslider');
|
473 |
-
$columns['shortcode']= __('Shortcode', 'cycloneslider');
|
474 |
-
return $columns;
|
475 |
-
}
|
476 |
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
// For js adding of box
|
490 |
-
function admin_footer() {
|
491 |
-
if(get_post_type()=='cycloneslider'){
|
492 |
-
?>
|
493 |
-
<div class="cycloneslider-box-template">
|
494 |
-
<?php
|
495 |
-
include_once($this->template_slide_box_js);
|
496 |
-
?>
|
497 |
-
</div><!-- end .cycloneslider-box-template -->
|
498 |
-
<?php
|
499 |
}
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
return $
|
506 |
}
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
*/
|
514 |
-
function cycloneslider_shortcode($shortcode_settings) {
|
515 |
-
// Process shortcode settings and return only allowed vars
|
516 |
-
$shortcode_settings = shortcode_atts(
|
517 |
-
array(
|
518 |
-
'id' => 0,
|
519 |
-
'template' => null,
|
520 |
-
'fx' => null,
|
521 |
-
'speed' => null,
|
522 |
-
'timeout' => null,
|
523 |
-
'width' => null,
|
524 |
-
'height' => null,
|
525 |
-
'hover_pause' => null,
|
526 |
-
'show_prev_next' => null,
|
527 |
-
'show_nav' => null
|
528 |
-
),
|
529 |
-
$shortcode_settings
|
530 |
-
);
|
531 |
-
$slider_id = esc_attr($shortcode_settings['id']);
|
532 |
-
|
533 |
-
$cycle_options = array();
|
534 |
-
$this->slider_count++;//make each call to shortcode unique
|
535 |
-
// Get slideshow by id
|
536 |
-
$my_query = new WP_Query(
|
537 |
-
array(
|
538 |
-
'post_type' => 'cycloneslider',
|
539 |
-
'order'=>'ASC',
|
540 |
-
'posts_per_page' => 1,
|
541 |
-
'name'=> $slider_id
|
542 |
-
)
|
543 |
-
);
|
544 |
-
if($my_query->have_posts()):
|
545 |
-
while ( $my_query->have_posts() ) : $my_query->the_post();
|
546 |
-
|
547 |
-
$meta = get_post_custom();
|
548 |
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
|
553 |
-
$
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
|
564 |
-
$slider = $this->get_slider_template($slider_id, $template, $slides, $slider_metas, $slider_settings, $this->slider_count);
|
565 |
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
}
|
576 |
-
|
577 |
-
// Get slideshow template
|
578 |
-
function get_slider_template($slider_id, $template_name, $slides, $slider_metas, $slider_settings, $slider_count){
|
579 |
-
|
580 |
-
$template = get_stylesheet_directory()."/cycloneslider/{$template_name}/slider.php";
|
581 |
-
if(@is_file($template)){
|
582 |
-
ob_start();
|
583 |
-
include($template);
|
584 |
-
$html = ob_get_clean();
|
585 |
-
return $html = $this->trim_white_spaces($html);
|
586 |
}
|
587 |
|
588 |
-
$template = $this->template_slider_dir."{$template_name}/slider.php";
|
589 |
-
if(@is_file($template)) {
|
590 |
-
ob_start();
|
591 |
-
include($template);
|
592 |
-
$html = ob_get_clean();
|
593 |
-
return $html = $this->trim_white_spaces($html);
|
594 |
-
}
|
595 |
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
if(isset($meta['_cycloneslider_metas'][0]) and !empty($meta['_cycloneslider_metas'][0])){
|
610 |
-
return maybe_unserialize($meta['_cycloneslider_metas'][0]);
|
611 |
}
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
// Return array of slide urls from meta
|
632 |
-
function get_slides_from_meta($slider_metas){
|
633 |
-
$slides = array();
|
634 |
-
if(is_array($slider_metas)){
|
635 |
-
foreach($slider_metas as $slider_meta){
|
636 |
-
$attachment_id = (int) $slider_meta['id'];
|
637 |
-
$image_url = wp_get_attachment_url($attachment_id);
|
638 |
-
$image_url = ($image_url===false) ? '' : $image_url;
|
639 |
-
$slides[] = $image_url;
|
640 |
}
|
|
|
641 |
}
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
$
|
655 |
-
|
656 |
-
|
657 |
-
if(file_exists($this->plugin_path."css{$ds}common.css")){
|
658 |
-
echo file_get_contents($this->plugin_path."css{$ds}common.css");
|
659 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
|
661 |
-
$
|
662 |
-
|
663 |
-
$
|
664 |
-
|
665 |
-
|
|
|
666 |
}
|
|
|
|
|
667 |
}
|
668 |
-
|
669 |
}
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
foreach($template_locations as $location){
|
692 |
-
if($files = @scandir($location['path'])){
|
693 |
-
$c = 0;
|
694 |
-
foreach($files as $name){
|
695 |
-
if($name!='.' and $name!='..' and is_dir($location['path'].$name)){
|
696 |
-
$name = sanitize_title($name);//change space to dash and all lowercase
|
697 |
-
$template_folders[$name] = array( //here we override template of the same names. templates inside themes take precedence
|
698 |
-
'path'=>$location['path'].$name,
|
699 |
-
'url'=>$location['url'].$name,
|
700 |
-
);
|
701 |
-
}
|
702 |
-
}
|
703 |
-
}
|
704 |
}
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
|
708 |
-
|
709 |
-
|
710 |
-
endif;
|
1 |
<?php
|
2 |
if(!class_exists('Cyclone_Slider')):
|
3 |
+
class Cyclone_Slider {
|
4 |
+
var $slider_count;
|
5 |
+
var $effects;
|
6 |
+
var $debug;
|
7 |
|
8 |
+
/**
|
9 |
+
* Initializes the plugin by setting localization, filters, and administration functions.
|
10 |
+
*/
|
11 |
+
function __construct() {
|
12 |
+
// Set defaults
|
13 |
+
$this->slider_count = 0;
|
14 |
+
$this->effects = array(
|
15 |
+
'fade'=>'Fade',
|
16 |
+
'fadeout'=>'Fade Out',
|
17 |
+
'none'=>'None',
|
18 |
+
'scrollHorz'=>'Scroll Horizontally',
|
19 |
+
'tileBlind'=>'Tile Blind',
|
20 |
+
'tileSlide'=>'Tile Slide'
|
21 |
+
);
|
22 |
+
$this->debug = false;
|
23 |
+
|
24 |
+
load_plugin_textdomain( 'cycloneslider', false, 'cyclone-slider-2/lang' );
|
25 |
+
|
26 |
+
// Register admin styles and scripts
|
27 |
+
add_action( 'admin_enqueue_scripts', array( &$this, 'register_admin_scripts' ), 10);
|
28 |
+
|
29 |
+
// Register frontend styles and scripts
|
30 |
+
add_action( 'wp_enqueue_scripts', array( &$this, 'register_plugin_scripts' ), 100 );
|
31 |
+
|
32 |
+
|
33 |
+
// Add admin menus
|
34 |
+
add_action( 'init', array( &$this, 'create_post_types' ) );
|
35 |
+
|
36 |
+
// Update the messages for our custom post make it appropriate for slideshow
|
37 |
+
add_filter('post_updated_messages', array( &$this, 'post_updated_messages' ) );
|
38 |
+
|
39 |
+
// Add slider metaboxes
|
40 |
+
add_action( 'add_meta_boxes', array( &$this, 'add_meta_boxes' ) );
|
41 |
+
|
42 |
+
// Save slides
|
43 |
+
add_action( 'save_post', array( &$this, 'save_post' ) );
|
44 |
+
|
45 |
+
// Hacky way to change text in thickbox
|
46 |
+
add_filter( 'gettext', array( $this, 'replace_text_in_thickbox' ), 10, 3 );
|
47 |
+
|
48 |
+
// Modify html of image
|
49 |
+
add_filter( 'image_send_to_editor', array( $this, 'image_send_to_editor'), 1, 8 );
|
50 |
+
|
51 |
+
// Custom columns
|
52 |
+
add_action( 'manage_cycloneslider_posts_custom_column', array( $this, 'custom_column' ), 10, 2);
|
53 |
+
add_filter( 'manage_edit-cycloneslider_columns', array( $this, 'slideshow_columns') );
|
54 |
+
|
55 |
+
// Add hook for admin footer
|
56 |
+
add_action('admin_footer', array( $this, 'admin_footer') );
|
57 |
+
|
58 |
+
// Our shortcode
|
59 |
+
add_shortcode('cycloneslider', array( $this, 'cycloneslider_shortcode') );
|
60 |
+
|
61 |
+
// Add query var for so we can access our css via www.mysite.com/?cyclone_templates_css=1
|
62 |
+
add_filter('query_vars', array( $this, 'modify_query_vars'));
|
63 |
|
64 |
+
// The magic that shows our css
|
65 |
+
add_action('template_redirect', array( $this, 'cyclone_css_hook'));
|
66 |
+
|
67 |
+
// The magic that shows our js
|
68 |
+
add_action('template_redirect', array( $this, 'cyclone_js_hook'));
|
69 |
+
|
70 |
+
} // end constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
+
/**
|
73 |
+
* Registers and enqueues admin-specific JavaScript.
|
74 |
+
*/
|
75 |
+
public function register_admin_scripts() {
|
76 |
+
if('cycloneslider' == get_post_type()){ /* Load only scripts here and not on all admin pages */
|
77 |
+
//styles
|
78 |
+
wp_enqueue_style('thickbox');
|
79 |
+
|
80 |
+
wp_register_style( 'cycloneslider-admin-styles', Cyclone_Slider::url().'css/admin.css' );
|
81 |
+
wp_enqueue_style( 'cycloneslider-admin-styles' );
|
82 |
+
|
83 |
+
//scripts
|
84 |
+
wp_dequeue_script( 'autosave' );//disable autosave
|
85 |
+
|
86 |
+
wp_enqueue_script('jquery');
|
87 |
+
wp_enqueue_script('jquery-ui-sortable');
|
88 |
+
wp_enqueue_script('media-upload');
|
89 |
+
wp_enqueue_script('thickbox');
|
90 |
+
|
91 |
+
wp_register_script( 'jquery-cookie', Cyclone_Slider::url().'js/jquery-cookie.js' );
|
92 |
+
wp_enqueue_script( 'jquery-cookie' );
|
93 |
+
wp_register_script( 'cycloneslider-admin-script', Cyclone_Slider::url().'js/admin.js' );
|
94 |
+
wp_enqueue_script( 'cycloneslider-admin-script' );
|
95 |
+
|
96 |
+
}
|
97 |
+
}
|
98 |
|
99 |
+
/**
|
100 |
+
* Registers and enqueues frontend-specific scripts.
|
101 |
+
*/
|
102 |
+
public function register_plugin_scripts() {
|
103 |
+
/*** Styles ***/
|
104 |
+
$cyclone_css = add_query_arg(array('cyclone_templates_css' => 1), home_url( '/' ));
|
105 |
+
wp_register_style( 'cyclone-slider-plugin-styles', $cyclone_css );//contains our combined css from ALL templates
|
106 |
+
wp_enqueue_style( 'cyclone-slider-plugin-styles' );
|
107 |
+
|
108 |
+
/*** Scripts ***/
|
109 |
+
wp_register_script( 'cycle2', Cyclone_Slider::url().'js/jquery.cycle2.min.js', array('jquery') );
|
110 |
+
wp_enqueue_script( 'cycle2' );
|
111 |
+
|
112 |
+
wp_register_script( 'cycle2-tile', Cyclone_Slider::url().'js/jquery.cycle2.tile.min.js', array('cycle2') );
|
113 |
+
wp_enqueue_script( 'cycle2-tile' );
|
114 |
+
|
115 |
+
wp_register_script( 'cycle2-carousel', Cyclone_Slider::url().'js/jquery.cycle2.carousel.min.js', array('cycle2') );
|
116 |
+
wp_enqueue_script( 'cycle2-carousel' );
|
117 |
+
|
118 |
+
$cyclone_js= add_query_arg(array('cyclone_templates_js' => 1), home_url( '/' ));
|
119 |
+
wp_register_script( 'cyclone-slider-plugin-scripts', $cyclone_js );//contains our combined css from ALL templates
|
120 |
+
wp_enqueue_script( 'cyclone-slider-plugin-scripts' );
|
121 |
+
|
122 |
+
}
|
123 |
|
124 |
+
/*--------------------------------------------*
|
125 |
+
* Core Functions
|
126 |
+
*---------------------------------------------*/
|
127 |
+
// Create custom post for slideshows
|
128 |
+
function create_post_types() {
|
129 |
+
register_post_type( 'cycloneslider',
|
130 |
+
array(
|
131 |
+
'labels' => array(
|
132 |
+
'name' => __('Cyclone Slider', 'cycloneslider'),
|
133 |
+
'singular_name' => __('Slideshow', 'cycloneslider'),
|
134 |
+
'add_new' => __('Add Slideshow', 'cycloneslider'),
|
135 |
+
'add_new_item' => __('Add New Slideshow', 'cycloneslider'),
|
136 |
+
'edit_item' => __('Edit Slideshow', 'cycloneslider'),
|
137 |
+
'new_item' => __('New Slideshow', 'cycloneslider'),
|
138 |
+
'view_item' => __('View Slideshow', 'cycloneslider'),
|
139 |
+
'search_items' => __('Search Slideshows', 'cycloneslider'),
|
140 |
+
'not_found' => __('No slideshows found', 'cycloneslider'),
|
141 |
+
'not_found_in_trash' => __('No slideshows found in Trash', 'cycloneslider')
|
142 |
+
),
|
143 |
+
'supports' => array('title'),
|
144 |
+
'public' => false,
|
145 |
+
'exclude_from_search' => true,
|
146 |
+
'show_ui' => true,
|
147 |
+
'menu_position' => 100
|
148 |
+
)
|
149 |
+
);
|
150 |
+
}
|
151 |
|
152 |
+
// Messages
|
153 |
+
function post_updated_messages($messages){
|
154 |
+
global $post, $post_ID;
|
155 |
+
$messages['cycloneslider'] = array(
|
156 |
+
0 => '',
|
157 |
+
1 => sprintf( __( 'Slideshow updated. Shortcode is [cycloneslider id="%s"]', 'cycloneslider' ), $post->post_name),
|
158 |
+
2 => __( 'Custom field updated.', 'cycloneslider' ),
|
159 |
+
3 => __( 'Custom field deleted.', 'cycloneslider' ),
|
160 |
+
4 => __( 'Slideshow updated.', 'cycloneslider' ),
|
161 |
+
5 => __( 'Slideshow updated.', 'cycloneslider' ),
|
162 |
+
6 => sprintf( __( 'Slideshow published. Shortcode is [cycloneslider id="%s"]', 'cycloneslider' ), $post->post_name),
|
163 |
+
7 => __( 'Slideshow saved.', 'cycloneslider' ),
|
164 |
+
8 => __( 'Slideshow updated.', 'cycloneslider' ),
|
165 |
+
9 => __( 'Slideshow updated.', 'cycloneslider' ),
|
166 |
+
10 => __( 'Slideshow updated.', 'cycloneslider' )
|
167 |
+
);
|
168 |
+
return $messages;
|
169 |
+
}
|
170 |
|
171 |
+
// Slides metabox init
|
172 |
+
function add_meta_boxes(){
|
173 |
+
add_meta_box(
|
174 |
+
'cyclone-slides-metabox',
|
175 |
+
__('Slides', 'cycloneslider'),
|
176 |
+
array( &$this, 'render_slides_meta_box' ),
|
177 |
+
'cycloneslider' ,
|
178 |
+
'normal',
|
179 |
+
'high'
|
180 |
+
);
|
181 |
+
add_meta_box(
|
182 |
+
'cyclone-slider-properties-metabox',
|
183 |
+
__('Slideshow Settings', 'cycloneslider'),
|
184 |
+
array( &$this, 'render_slider_properties_meta_box' ),
|
185 |
+
'cycloneslider' ,
|
186 |
+
'side',
|
187 |
+
'low'
|
188 |
+
);
|
189 |
+
add_meta_box(
|
190 |
+
'cyclone-slider-templates-metabox',
|
191 |
+
__('Slideshow Templates', 'cycloneslider'),
|
192 |
+
array( &$this, 'render_slider_templates_meta_box' ),
|
193 |
+
'cycloneslider' ,
|
194 |
+
'normal',
|
195 |
+
'low'
|
196 |
+
);
|
197 |
+
}
|
198 |
|
199 |
+
// Get Image mime type. @param $image - full path to image
|
200 |
+
function get_mime_type( $image ){
|
201 |
+
if($properties = getimagesize( $image )){
|
202 |
+
return $properties['mime'];
|
203 |
+
}
|
204 |
+
return false;
|
205 |
+
}
|
206 |
|
207 |
+
// Slides metabox render
|
208 |
+
function render_slides_meta_box($post){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
+
// Use nonce for verification
|
211 |
+
echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
|
212 |
|
213 |
+
$slider_settings = Cyclone_Slider::get_slideshow_settings($post->ID);
|
214 |
+
$slider_metas = Cyclone_Slider::get_slides($post->ID);
|
|
|
|
|
215 |
|
216 |
+
if($this->debug){
|
217 |
+
echo '<pre>';
|
218 |
+
print_r($slider_metas);
|
219 |
+
echo '</pre>';
|
220 |
+
}
|
221 |
+
?>
|
222 |
+
<div class="cycloneslider-sortable">
|
223 |
+
<?php
|
224 |
+
if(is_array($slider_metas) and count($slider_metas)>0):
|
225 |
+
|
226 |
+
foreach($slider_metas as $i=>$slider_meta):
|
227 |
+
|
228 |
+
$attachment_id = (int) $slider_meta['id'];
|
229 |
+
$image_url = wp_get_attachment_image_src( $attachment_id, 'medium', true );
|
230 |
+
$image_url = (is_array($image_url)) ? $image_url[0] : '';
|
231 |
+
$image_url = apply_filters('cycloneslider_preview_url', $image_url, $slider_meta);
|
232 |
+
$box_title = apply_filters('cycloneslider_box_title', __('Slide', 'cycloneslider'), $slider_meta);
|
233 |
+
|
234 |
+
include(Cyclone_Slider::get_admin_parts_folder().'box.php');
|
235 |
+
endforeach;
|
236 |
+
|
237 |
+
endif;
|
238 |
+
?>
|
239 |
+
</div><!-- end .cycloneslider-sortable -->
|
240 |
|
241 |
+
<input type="button" value="<?php _e('Add Slide', 'cycloneslider'); ?>" class="button-secondary" name="cycloneslider_add_slide" />
|
242 |
+
<?php
|
243 |
}
|
244 |
+
|
245 |
+
function render_slider_properties_meta_box($post){
|
246 |
+
// Use nonce for verification
|
247 |
+
echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
|
248 |
+
|
249 |
+
$slider_settings = Cyclone_Slider::get_slideshow_settings($post->ID);
|
250 |
+
|
251 |
+
if($this->debug){
|
252 |
+
echo '<pre>';
|
253 |
+
print_r($slider_settings);
|
254 |
+
echo '</pre>';
|
255 |
+
}
|
256 |
|
257 |
+
include(Cyclone_Slider::get_admin_parts_folder() . 'slider-properties.php');
|
258 |
+
}
|
259 |
+
|
260 |
+
function render_slider_templates_meta_box($post){
|
261 |
+
// Use nonce for verification
|
262 |
+
echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
+
$slider_settings = Cyclone_Slider::get_slideshow_settings($post->ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
|
266 |
+
$templates = $this->get_all_templates();
|
267 |
+
if($this->debug){
|
268 |
+
echo '<pre>';
|
269 |
+
print_r($templates);
|
270 |
+
echo '</pre>';
|
271 |
+
}
|
272 |
+
?>
|
273 |
+
<div class="cycloneslider-field last">
|
274 |
+
<div class="template-scroller">
|
275 |
+
<ul class="template-choices">
|
276 |
+
<?php foreach($templates as $name=>$template): ?>
|
277 |
+
<li <?php echo ($name==$slider_settings['template']) ? 'class="active"' : ''; ?>>
|
278 |
+
<label for="template-<?php echo esc_attr($name); ?>">
|
279 |
+
<?php if(file_exists($template['path'].DIRECTORY_SEPARATOR.'screenshot.jpg')) {
|
280 |
+
?>
|
281 |
+
<img src="<?php echo $template['url'];?>/screenshot.jpg" alt="" />
|
282 |
+
<?php
|
283 |
+
} else {
|
284 |
+
?>
|
285 |
+
<img src="<?php echo Cyclone_Slider::url();?>images/screenshot.png" alt="" />
|
286 |
+
<?php
|
287 |
+
}
|
288 |
+
?>
|
289 |
+
|
290 |
+
<input <?php echo ($name==$slider_settings['template']) ? 'checked="checked"' : ''; ?> id="template-<?php echo esc_attr($name); ?>" type="radio" name="cycloneslider_settings[template]" value="<?php echo esc_attr($name); ?>" />
|
291 |
+
</label>
|
292 |
+
<span class="title"><?php echo esc_attr(ucwords(str_replace('-',' ',$name))); ?></span>
|
293 |
+
<span class="check"></span>
|
294 |
+
</li>
|
295 |
+
<?php endforeach; ?>
|
296 |
+
</ul>
|
297 |
+
<div class="clear"></div>
|
298 |
+
</div>
|
299 |
+
<span class="note"><?php _e("Select a template to use.", 'cycloneslider'); ?></span>
|
300 |
+
<div class="cycloneslider-get-more">
|
301 |
+
<a target="_blank" class="button-primary" href="http://www.codefleet.net/cyclone-slider-2/templates/"><?php _e("Get more templates..", 'cycloneslider'); ?></a>
|
302 |
+
</div>
|
303 |
+
<div class="clear"></div>
|
304 |
+
</div>
|
305 |
+
<?php
|
306 |
+
}
|
307 |
+
|
308 |
+
function save_post($post_id){
|
309 |
|
310 |
+
// Verify nonce
|
311 |
+
$nonce_name = 'cycloneslider_metabox_nonce';
|
312 |
+
if (!empty($_POST[$nonce_name])) {
|
313 |
+
if (!wp_verify_nonce($_POST[$nonce_name], basename(__FILE__))) {
|
314 |
+
return $post_id;
|
315 |
+
}
|
316 |
+
} else {
|
317 |
+
return $post_id; // Make sure we cancel on missing nonce!
|
318 |
+
}
|
319 |
+
|
320 |
+
// check autosave
|
321 |
+
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
|
322 |
+
return $post_id;
|
323 |
+
}
|
324 |
+
|
325 |
+
do_action('cycloneslider_before_save', $post_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
|
327 |
+
//slide metas
|
328 |
+
$this->save_metas($post_id);
|
329 |
+
|
330 |
+
//settings
|
331 |
+
$this->save_settings($post_id);
|
332 |
+
|
333 |
+
|
334 |
+
remove_action( 'save_post', array( &$this, 'save_post' ) );
|
335 |
}
|
|
|
|
|
|
|
|
|
|
|
336 |
|
337 |
+
//sanitize and save
|
338 |
+
function save_metas($post_id){
|
339 |
+
$slides = array();
|
340 |
+
if(isset($_POST['cycloneslider_metas'])){
|
341 |
+
|
342 |
+
|
343 |
+
$i=0;//always start from 0
|
344 |
+
foreach($_POST['cycloneslider_metas'] as $slide){
|
345 |
+
$slide = wp_parse_args($slide, Cyclone_Slider::get_slide_defaults());
|
346 |
+
$slides[$i]['id'] = (int) ($slide['id']);
|
347 |
+
$slides[$i]['type'] = sanitize_text_field($slide['type']);
|
348 |
+
|
349 |
+
$slides[$i]['link'] = esc_url_raw($slide['link']);
|
350 |
+
$slides[$i]['title'] = wp_kses_post($slide['title']);
|
351 |
+
$slides[$i]['description'] = wp_kses_post($slide['description']);
|
352 |
+
$slides[$i]['link_target'] = sanitize_text_field($slide['link_target']);
|
353 |
+
|
354 |
+
$slides[$i]['img_alt'] = sanitize_text_field($slide['img_alt']);
|
355 |
+
$slides[$i]['img_title'] = sanitize_text_field($slide['img_title']);
|
356 |
+
|
357 |
+
$slides[$i]['enable_slide_effects'] = (int) ($slide['enable_slide_effects']);
|
358 |
+
$slides[$i]['fx'] = sanitize_text_field($slide['fx']);
|
359 |
+
$slides[$i]['speed'] = sanitize_text_field($slide['speed']);
|
360 |
+
$slides[$i]['timeout'] = sanitize_text_field($slide['timeout']);
|
361 |
+
$slides[$i]['tile_count'] = sanitize_text_field($slide['tile_count']);
|
362 |
+
$slides[$i]['tile_delay'] = sanitize_text_field($slide['tile_delay']);
|
363 |
+
$slides[$i]['tile_vertical'] = sanitize_text_field($slide['tile_vertical']);
|
364 |
+
$i++;
|
365 |
+
}
|
366 |
+
|
367 |
+
|
368 |
+
}
|
369 |
+
$slides = apply_filters('cycloneslider_slides', $slides); //do filter before saving
|
370 |
+
|
371 |
+
delete_post_meta($post_id, '_cycloneslider_metas');
|
372 |
+
update_post_meta($post_id, '_cycloneslider_metas', $slides);
|
373 |
+
}
|
374 |
|
375 |
+
//sanitize and save
|
376 |
+
function save_settings($post_id){
|
377 |
+
if(isset($_POST['cycloneslider_settings'])){
|
378 |
+
$_POST['cycloneslider_settings'] = wp_parse_args($_POST['cycloneslider_settings'], Cyclone_Slider::get_slideshow_defaults());
|
379 |
+
$settings = array();
|
380 |
+
$settings['template'] = sanitize_text_field($_POST['cycloneslider_settings']['template']);
|
381 |
+
$settings['fx'] = sanitize_text_field($_POST['cycloneslider_settings']['fx']);
|
382 |
+
$settings['timeout'] = (int) ($_POST['cycloneslider_settings']['timeout']);
|
383 |
+
$settings['speed'] = (int) ($_POST['cycloneslider_settings']['speed']);
|
384 |
+
$settings['width'] = (int) ($_POST['cycloneslider_settings']['width']);
|
385 |
+
$settings['height'] = (int) ($_POST['cycloneslider_settings']['height']);
|
386 |
+
$settings['hover_pause'] = sanitize_text_field($_POST['cycloneslider_settings']['hover_pause']);
|
387 |
+
$settings['show_prev_next'] = (int) ($_POST['cycloneslider_settings']['show_prev_next']);
|
388 |
+
$settings['show_nav'] = (int) ($_POST['cycloneslider_settings']['show_nav']);
|
389 |
+
$settings['tile_count'] = (int) ($_POST['cycloneslider_settings']['tile_count']);
|
390 |
+
$settings['tile_delay'] = (int) ($_POST['cycloneslider_settings']['tile_delay']);
|
391 |
+
$settings['tile_vertical'] = sanitize_text_field($_POST['cycloneslider_settings']['tile_vertical']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
|
393 |
+
$settings = apply_filters('cycloneslider_settings', $settings); //do filter before saving
|
394 |
+
|
395 |
+
delete_post_meta($post_id, '_cycloneslider_settings');
|
396 |
+
update_post_meta($post_id, '_cycloneslider_settings', $settings);
|
397 |
+
}
|
398 |
+
}
|
399 |
|
400 |
+
//Replace text in media button
|
401 |
+
function replace_text_in_thickbox($translation, $text, $domain ) {
|
402 |
+
$http_referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
|
403 |
+
$req_referrer = isset($_REQUEST['referer']) ? $_REQUEST['referer'] : '';
|
404 |
+
if(strpos($http_referrer, 'cycloneslider')!==false or $req_referrer=='cycloneslider') {
|
405 |
+
if ( 'default' == $domain and 'Insert into Post' == $text )
|
406 |
+
{
|
407 |
+
return 'Add to Slide';
|
408 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
}
|
410 |
+
return $translation;
|
411 |
}
|
412 |
+
|
413 |
+
// Add attachment ID as html5 data attr in thickbox
|
414 |
+
function image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ){
|
415 |
+
if(strpos($html, '<img data-id="')===false){
|
416 |
+
$html = str_replace('<img', '<img data-id="'.$id.'" ', $html);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
}
|
418 |
+
return $html;
|
|
|
419 |
}
|
420 |
|
421 |
+
// Modify columns
|
422 |
+
function slideshow_columns($columns) {
|
423 |
+
$columns = array();
|
424 |
+
$columns['title']= __('Slideshow Name', 'cycloneslider');
|
425 |
+
$columns['id']= __('Slideshow ID', 'cycloneslider');
|
426 |
+
$columns['shortcode']= __('Shortcode', 'cycloneslider');
|
427 |
+
return $columns;
|
428 |
}
|
429 |
|
430 |
+
// Add content to custom columns
|
431 |
+
function custom_column( $column_name, $post_id ){
|
432 |
+
if ($column_name == 'id') {
|
433 |
+
$post = get_post($post_id);
|
434 |
+
echo $post->post_name;
|
435 |
+
}
|
436 |
+
if ($column_name == 'shortcode') {
|
437 |
+
$post = get_post($post_id);
|
438 |
+
echo '[cycloneslider id="'.$post->post_name.'"]';
|
439 |
+
}
|
440 |
+
}
|
441 |
|
442 |
+
// Hook to admin footer
|
443 |
+
function admin_footer() {
|
444 |
+
$this->slide_box_for_js();
|
445 |
+
}
|
446 |
|
447 |
+
// For js adding of box
|
448 |
+
function slide_box_for_js(){
|
449 |
+
if(get_post_type()=='cycloneslider'){
|
450 |
+
$box_title = __('Slide', 'cycloneslider');
|
451 |
+
$image_url = '';
|
452 |
+
$i = '{id}';
|
453 |
+
$slider_meta = Cyclone_Slider::get_slide_defaults();
|
454 |
+
foreach($slider_meta as $key=>$value){
|
455 |
+
$slider_meta[$key] = '';
|
456 |
+
}
|
457 |
+
$slider_meta['type'] = 'image';
|
458 |
+
?>
|
459 |
+
<div class="cycloneslider-box-template">
|
460 |
+
<?php
|
461 |
+
include(Cyclone_Slider::get_admin_parts_folder().'box.php');
|
462 |
+
?>
|
463 |
+
</div><!-- end .cycloneslider-box-template -->
|
464 |
+
<?php
|
465 |
+
}
|
466 |
+
}
|
467 |
|
468 |
+
// Compare the value from admin and shortcode. If shortcode value is present and not empty, use it, otherwise return admin value
|
469 |
+
function get_comp_slider_setting($admin_val, $shortcode_val){
|
470 |
+
if($shortcode_val!==null){//make sure its really null and not just int zero 0
|
471 |
+
return $shortcode_val;
|
472 |
+
}
|
473 |
+
return $admin_val;
|
474 |
+
}
|
475 |
|
476 |
+
/* Our shortcode function.
|
477 |
+
Slider settings comes from both admin settings and shortcode attributes.
|
478 |
+
Shortcode attributes, if present, will override the admin settings.
|
479 |
+
*/
|
480 |
+
function cycloneslider_shortcode($shortcode_settings) {
|
481 |
+
// Process shortcode settings and return only allowed vars
|
482 |
+
$shortcode_settings = shortcode_atts(
|
483 |
+
array(
|
484 |
+
'id' => 0,
|
485 |
+
'template' => null,
|
486 |
+
'fx' => null,
|
487 |
+
'speed' => null,
|
488 |
+
'timeout' => null,
|
489 |
+
'width' => null,
|
490 |
+
'height' => null,
|
491 |
+
'hover_pause' => null,
|
492 |
+
'show_prev_next' => null,
|
493 |
+
'show_nav' => null,
|
494 |
+
'tile_count' => null,
|
495 |
+
'tile_delay' => null,
|
496 |
+
'tile_vertical' => null
|
497 |
+
),
|
498 |
+
$shortcode_settings
|
499 |
+
);
|
500 |
+
$slider_id = esc_attr($shortcode_settings['id']);
|
501 |
|
502 |
+
$cycle_options = array();
|
503 |
+
$this->slider_count++;//make each call to shortcode unique
|
504 |
+
// Get slideshow by id
|
505 |
+
$my_query = new WP_Query(
|
506 |
+
array(
|
507 |
+
'post_type' => 'cycloneslider',
|
508 |
+
'order'=>'ASC',
|
509 |
+
'posts_per_page' => 1,
|
510 |
+
'name'=> $slider_id
|
511 |
+
)
|
512 |
+
);
|
513 |
+
if($my_query->have_posts()):
|
514 |
+
while ( $my_query->have_posts() ) : $my_query->the_post();
|
515 |
+
|
516 |
+
$meta = get_post_custom();
|
517 |
+
$admin_settings = Cyclone_Slider::get_slideshow_settings(get_the_ID());
|
518 |
+
$slider_metas = Cyclone_Slider::get_slides(get_the_ID());
|
519 |
+
|
520 |
+
foreach($slider_metas as $i=>$slider_meta){
|
521 |
+
$slider_metas[$i]['title'] = __($slider_meta['title']);
|
522 |
+
$slider_metas[$i]['description'] = __($slider_meta['description']);
|
523 |
+
}
|
524 |
+
$slides = $this->get_slides_from_meta($slider_metas);
|
525 |
+
|
526 |
+
$template = $this->get_comp_slider_setting($admin_settings['template'], $shortcode_settings['template']);
|
527 |
+
$template = esc_attr($template===null ? 'default' : $template);//fallback to default
|
528 |
+
$slider_settings['fx'] = esc_attr($this->get_comp_slider_setting($admin_settings['fx'], $shortcode_settings['fx']));
|
529 |
+
$slider_settings['speed'] = (int) $this->get_comp_slider_setting($admin_settings['speed'], $shortcode_settings['speed']);
|
530 |
+
$slider_settings['timeout'] = (int) $this->get_comp_slider_setting($admin_settings['timeout'], $shortcode_settings['timeout']);
|
531 |
+
$slider_settings['width'] = (int) $this->get_comp_slider_setting($admin_settings['width'], $shortcode_settings['width']);
|
532 |
+
$slider_settings['height'] = (int) $this->get_comp_slider_setting($admin_settings['height'], $shortcode_settings['height']);
|
533 |
+
$slider_settings['hover_pause'] = $this->get_comp_slider_setting($admin_settings['hover_pause'], $shortcode_settings['hover_pause']);
|
534 |
+
$slider_settings['show_prev_next'] = (int) $this->get_comp_slider_setting($admin_settings['show_prev_next'], $shortcode_settings['show_prev_next']);
|
535 |
+
$slider_settings['show_nav'] = (int) $this->get_comp_slider_setting($admin_settings['show_nav'], $shortcode_settings['show_nav']);
|
536 |
+
|
537 |
+
$slider_settings['tile_count'] = $this->get_comp_slider_setting($admin_settings['tile_count'], $shortcode_settings['tile_count']);
|
538 |
+
$slider_settings['tile_delay'] = $this->get_comp_slider_setting($admin_settings['tile_delay'], $shortcode_settings['tile_delay']);
|
539 |
+
$slider_settings['tile_vertical'] = $this->get_comp_slider_setting($admin_settings['tile_vertical'], $shortcode_settings['tile_vertical']);
|
540 |
+
|
541 |
+
$slider = $this->get_slider_template($slider_id, $template, $slides, $slider_metas, $slider_settings, $this->slider_count);
|
542 |
+
|
543 |
+
endwhile;
|
544 |
|
545 |
+
wp_reset_postdata();
|
546 |
+
|
547 |
+
else:
|
548 |
+
$slider = __('[Slideshow not found]', 'cycloneslider');
|
549 |
+
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
|
551 |
+
return $slider;
|
|
|
552 |
}
|
553 |
+
|
554 |
+
// Get slideshow template
|
555 |
+
function get_slider_template($slider_id, $template_name, $slides, $slider_metas, $slider_settings, $slider_count){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
|
557 |
+
$template = get_stylesheet_directory()."/cycloneslider/{$template_name}/slider.php";
|
558 |
+
if(@is_file($template)){
|
559 |
+
ob_start();
|
560 |
+
include($template);
|
561 |
+
$html = ob_get_clean();
|
562 |
+
return $html = $this->trim_white_spaces($html);
|
|
|
563 |
}
|
564 |
+
|
565 |
+
$template = Cyclone_Slider::get_templates_folder()."{$template_name}/slider.php";
|
566 |
+
if(@is_file($template)) {
|
567 |
+
ob_start();
|
568 |
+
include($template);
|
569 |
+
$html = ob_get_clean();
|
570 |
+
return $html = $this->trim_white_spaces($html);
|
571 |
+
}
|
572 |
+
|
573 |
+
return sprintf(__('[Template "%s" not found]', 'cycloneslider'), $template_name);
|
574 |
}
|
575 |
+
|
576 |
+
function trim_white_spaces($buffer){
|
577 |
+
$search = array(
|
578 |
+
'/\>[^\S ]+/s', //strip whitespaces after tags, except space
|
579 |
+
'/[^\S ]+\</s', //strip whitespaces before tags, except space
|
580 |
+
'/(\s)+/s' // shorten multiple whitespace sequences
|
581 |
+
);
|
582 |
+
$replace = array(
|
583 |
+
'>',
|
584 |
+
'<',
|
585 |
+
'\\1'
|
586 |
+
);
|
587 |
+
return preg_replace($search, $replace, $buffer);
|
588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
+
// Return array of slide urls from meta
|
591 |
+
function get_slides_from_meta($slider_metas){
|
592 |
+
$slides = array();
|
593 |
+
if(is_array($slider_metas)){
|
594 |
+
foreach($slider_metas as $slider_meta){
|
595 |
+
$attachment_id = (int) $slider_meta['id'];
|
596 |
+
$image_url = wp_get_attachment_url($attachment_id);
|
597 |
+
$image_url = ($image_url===false) ? '' : $image_url;
|
598 |
+
$slides[] = $image_url;
|
599 |
+
}
|
600 |
+
}
|
601 |
+
return $slides;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
}
|
603 |
+
|
604 |
+
// Add custom query var
|
605 |
+
function modify_query_vars($vars) {
|
606 |
+
$vars[] = 'cyclone_templates_css';//add our own
|
607 |
+
$vars[] = 'cyclone_templates_js';//add our own
|
608 |
+
return $vars;
|
609 |
}
|
610 |
+
|
611 |
+
// Hook to template redirect
|
612 |
+
function cyclone_css_hook() {
|
613 |
+
if(intval(get_query_var('cyclone_templates_css')) == 1) {
|
614 |
+
$ds = DIRECTORY_SEPARATOR;
|
615 |
+
header("Content-type: text/css");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
|
617 |
+
if(file_exists(Cyclone_Slider::path()."css{$ds}common.css")){
|
618 |
+
echo file_get_contents(Cyclone_Slider::path()."css{$ds}common.css");
|
619 |
+
}
|
620 |
|
621 |
+
$template_folders = $this->get_all_templates();
|
622 |
+
foreach($template_folders as $name=>$folder){
|
623 |
+
$style = $folder['path']."{$ds}style.css";
|
624 |
+
if(file_exists($style)){
|
625 |
+
echo "\n".str_replace('$tpl', $folder['url'], file_get_contents($style));//apply url and print css
|
626 |
+
}
|
627 |
+
}
|
628 |
+
die();
|
629 |
+
}
|
630 |
+
}
|
631 |
+
|
632 |
+
// Hook to template redirect
|
633 |
+
function cyclone_js_hook() {
|
634 |
+
if(intval(get_query_var('cyclone_templates_js')) == 1) {
|
635 |
+
$ds = DIRECTORY_SEPARATOR;
|
636 |
+
header("Content-type: text/javascript");
|
637 |
|
|
|
638 |
|
639 |
+
$template_folders = $this->get_all_templates();
|
640 |
+
foreach($template_folders as $name=>$folder){
|
641 |
+
$js = $folder['path']."{$ds}script.js"; //check if template has script.js file
|
642 |
+
if(file_exists($js)){
|
643 |
+
echo "\n".file_get_contents($js);//print
|
644 |
+
}
|
645 |
+
}
|
646 |
+
die();
|
647 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
}
|
649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
|
651 |
+
// Get all template locations. Returns array of locations containing path and url
|
652 |
+
function get_all_locations(){
|
653 |
+
$ds = DIRECTORY_SEPARATOR;
|
654 |
+
$template_locations = array();
|
655 |
+
$template_locations[0] = array(
|
656 |
+
'path'=>Cyclone_Slider::get_templates_folder(), //this resides in the plugin
|
657 |
+
'url'=>Cyclone_Slider::url().'templates/'
|
658 |
+
);
|
659 |
+
$template_locations[1] = array(
|
660 |
+
'path'=> realpath(get_stylesheet_directory())."{$ds}cycloneslider{$ds}",//this resides in the current theme or child theme
|
661 |
+
'url'=> get_stylesheet_directory_uri()."/cycloneslider/"
|
662 |
+
);
|
663 |
+
return $template_locations;
|
|
|
|
|
664 |
}
|
665 |
+
|
666 |
+
// Get all templates from all locations. Returns array of templates with keys as name containing array of path and url
|
667 |
+
function get_all_templates(){
|
668 |
+
$template_locations = $this->get_all_locations();
|
669 |
+
$template_folders = array();
|
670 |
+
foreach($template_locations as $location){
|
671 |
+
if($files = @scandir($location['path'])){
|
672 |
+
$c = 0;
|
673 |
+
foreach($files as $name){
|
674 |
+
if($name!='.' and $name!='..' and is_dir($location['path'].$name)){
|
675 |
+
$name = sanitize_title($name);//change space to dash and all lowercase
|
676 |
+
$template_folders[$name] = array( //here we override template of the same names. templates inside themes take precedence
|
677 |
+
'path'=>$location['path'].$name,
|
678 |
+
'url'=>$location['url'].$name,
|
679 |
+
);
|
680 |
+
}
|
681 |
+
}
|
682 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
683 |
}
|
684 |
+
return $template_folders;
|
685 |
}
|
686 |
+
|
687 |
+
// Global utility functions
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Gets the slideshow settings. Defaults and filters are applied.
|
691 |
+
*
|
692 |
+
* @param int $slideshow_id Post ID of the slideshow custom post.
|
693 |
+
* @return array The array of slideshow settings
|
694 |
+
*/
|
695 |
+
public static function get_slideshow_settings($slideshow_id) {
|
696 |
+
$meta = get_post_custom($slideshow_id);
|
697 |
+
$slideshow_settings = array();
|
698 |
+
if(isset($meta['_cycloneslider_settings'][0]) and !empty($meta['_cycloneslider_settings'][0])){
|
699 |
+
$slideshow_settings = maybe_unserialize($meta['_cycloneslider_settings'][0]);
|
|
|
|
|
|
|
700 |
}
|
701 |
+
$slideshow_settings = wp_parse_args($slideshow_settings, Cyclone_Slider::get_slideshow_defaults() );
|
702 |
+
return apply_filters('cycloneslider_get_slideshow', $slideshow_settings);
|
703 |
+
}
|
704 |
+
|
705 |
+
/**
|
706 |
+
* Gets the slides. Defaults and filters are applied.
|
707 |
+
*
|
708 |
+
* @param int $slideshow_id Post ID of the slideshow custom post.
|
709 |
+
* @return array The array of slides settings
|
710 |
+
*/
|
711 |
+
public static function get_slides($slideshow_id){
|
712 |
+
$meta = get_post_custom($slideshow_id);
|
713 |
|
714 |
+
if(isset($meta['_cycloneslider_metas'][0]) and !empty($meta['_cycloneslider_metas'][0])){
|
715 |
+
$slides = maybe_unserialize($meta['_cycloneslider_metas'][0]);
|
716 |
+
$defaults = Cyclone_Slider::get_slide_defaults();
|
717 |
+
|
718 |
+
foreach($slides as $i=>$slide){
|
719 |
+
$slides[$i] = wp_parse_args($slide, $defaults);
|
720 |
}
|
721 |
+
|
722 |
+
return apply_filters('cycloneslider_get_slides', $slides);
|
723 |
}
|
724 |
+
return false;
|
725 |
}
|
726 |
+
|
727 |
+
/**
|
728 |
+
* Gets the slideshow default settings.
|
729 |
+
*
|
730 |
+
* @return array The array of slideshow defaults
|
731 |
+
*/
|
732 |
+
public static function get_slideshow_defaults(){
|
733 |
+
return array(
|
734 |
+
'template' => 'default',
|
735 |
+
'fx' => 'fade',
|
736 |
+
'timeout' => '4000',
|
737 |
+
'speed' => '1000',
|
738 |
+
'width' => '960',
|
739 |
+
'height' => '300',
|
740 |
+
'hover_pause' => 'true',
|
741 |
+
'show_prev_next' => '1',
|
742 |
+
'show_nav' => '1',
|
743 |
+
'tile_count' => '7',
|
744 |
+
'tile_delay' => '100',
|
745 |
+
'tile_vertical' => 'true'
|
746 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
747 |
}
|
748 |
+
|
749 |
+
/**
|
750 |
+
* Gets the slide default settings.
|
751 |
+
*
|
752 |
+
* @return array The array of slide defaults
|
753 |
+
*/
|
754 |
+
public static function get_slide_defaults(){
|
755 |
+
return array(
|
756 |
+
'enable_slide_effects'=>0,
|
757 |
+
'type' => 'image',
|
758 |
+
'id' => '',
|
759 |
+
'link' => '',
|
760 |
+
'title' => '',
|
761 |
+
'description' => '',
|
762 |
+
'link_target' => '_self',
|
763 |
+
'fx' => 'default',
|
764 |
+
'speed' => '',
|
765 |
+
'timeout' => '',
|
766 |
+
'tile_count' => '7',
|
767 |
+
'tile_delay' => '100',
|
768 |
+
'tile_vertical' => 'true',
|
769 |
+
'img_alt' => '',
|
770 |
+
'img_title' => ''
|
771 |
+
);
|
772 |
+
}
|
773 |
+
|
774 |
+
/**
|
775 |
+
* Gets the path to plugin
|
776 |
+
*
|
777 |
+
* @return string Path to plugin in the filesystem with trailing slash
|
778 |
+
*/
|
779 |
+
public static function path(){
|
780 |
+
return CYCLONE_PATH;
|
781 |
+
}
|
782 |
+
|
783 |
+
/**
|
784 |
+
* Gets the URL to plugin
|
785 |
+
*
|
786 |
+
* @return string URL to plugin with trailing slash
|
787 |
+
*/
|
788 |
+
public static function url(){
|
789 |
+
return CYCLONE_URL;
|
790 |
+
}
|
791 |
+
|
792 |
+
/**
|
793 |
+
* Gets the path to folder of admin user interface parts with trailing slash
|
794 |
+
*
|
795 |
+
* @return string Path to folder
|
796 |
+
*/
|
797 |
+
public static function get_admin_parts_folder(){
|
798 |
+
return Cyclone_Slider::path() . 'inc'.DIRECTORY_SEPARATOR.'admin-parts'.DIRECTORY_SEPARATOR;
|
799 |
+
}
|
800 |
+
|
801 |
+
/**
|
802 |
+
* Gets the path to templates folder
|
803 |
+
*
|
804 |
+
* @return string Path to templates inside the plugin with trailing slash
|
805 |
+
*/
|
806 |
+
public static function get_templates_folder(){
|
807 |
+
return Cyclone_Slider::path() . 'templates'.DIRECTORY_SEPARATOR;
|
808 |
+
}
|
809 |
+
} // end class
|
810 |
|
811 |
+
endif;
|
|
|
|
inc/class-image-resizer.php
CHANGED
@@ -1,23 +1,8 @@
|
|
1 |
<?php
|
2 |
if(!class_exists('Image_Resizer')):
|
3 |
|
4 |
-
# ========================================================================#
|
5 |
-
#
|
6 |
-
# Author: Jarrod Oberto
|
7 |
-
# Version: 1.0
|
8 |
-
# Date: 17-Jan-10
|
9 |
-
# Purpose: Resizes and saves image
|
10 |
-
# Requires : Requires PHP5, GD library.
|
11 |
-
# Usage Example:
|
12 |
-
# include("classes/resize_class.php");
|
13 |
-
# $resizeObj = new resize('images/cars/large/input.jpg');
|
14 |
-
# $resizeObj -> resizeImage(150, 100, 0);
|
15 |
-
# $resizeObj -> saveImage('images/cars/large/output.jpg', 100);
|
16 |
-
#
|
17 |
-
#
|
18 |
-
# ========================================================================#
|
19 |
-
|
20 |
Class Image_Resizer {
|
|
|
21 |
// *** Class variables
|
22 |
private $image;
|
23 |
private $width;
|
@@ -34,8 +19,6 @@ if(!class_exists('Image_Resizer')):
|
|
34 |
$this->height = imagesy($this->image);
|
35 |
}
|
36 |
|
37 |
-
## --------------------------------------------------------
|
38 |
-
|
39 |
private function openImage($file)
|
40 |
{
|
41 |
// *** Get extension
|
@@ -60,8 +43,6 @@ if(!class_exists('Image_Resizer')):
|
|
60 |
return $img;
|
61 |
}
|
62 |
|
63 |
-
## --------------------------------------------------------
|
64 |
-
|
65 |
public function resizeImage($newWidth, $newHeight, $option="auto")
|
66 |
{
|
67 |
// *** Get optimal width and height - based on $option
|
@@ -73,6 +54,12 @@ if(!class_exists('Image_Resizer')):
|
|
73 |
|
74 |
// *** Resample - create image canvas of x, y size
|
75 |
$this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight);
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height);
|
77 |
|
78 |
|
@@ -82,8 +69,6 @@ if(!class_exists('Image_Resizer')):
|
|
82 |
}
|
83 |
}
|
84 |
|
85 |
-
## --------------------------------------------------------
|
86 |
-
|
87 |
public function getDimensions($newWidth, $newHeight, $option)
|
88 |
{
|
89 |
|
@@ -115,8 +100,6 @@ if(!class_exists('Image_Resizer')):
|
|
115 |
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
|
116 |
}
|
117 |
|
118 |
-
## --------------------------------------------------------
|
119 |
-
|
120 |
private function getSizeByFixedHeight($newHeight)
|
121 |
{
|
122 |
$ratio = $this->width / $this->height;
|
@@ -164,8 +147,6 @@ if(!class_exists('Image_Resizer')):
|
|
164 |
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
|
165 |
}
|
166 |
|
167 |
-
## --------------------------------------------------------
|
168 |
-
|
169 |
private function getOptimalCrop($newWidth, $newHeight)
|
170 |
{
|
171 |
|
@@ -184,8 +165,6 @@ if(!class_exists('Image_Resizer')):
|
|
184 |
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
|
185 |
}
|
186 |
|
187 |
-
## --------------------------------------------------------
|
188 |
-
|
189 |
private function crop($optimalWidth, $optimalHeight, $newWidth, $newHeight)
|
190 |
{
|
191 |
// *** Find center - this will be used for the crop
|
@@ -200,8 +179,6 @@ if(!class_exists('Image_Resizer')):
|
|
200 |
imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight);
|
201 |
}
|
202 |
|
203 |
-
## --------------------------------------------------------
|
204 |
-
|
205 |
public function saveImage($savePath, $imageQuality="100")
|
206 |
{
|
207 |
// *** Get extension
|
1 |
<?php
|
2 |
if(!class_exists('Image_Resizer')):
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
Class Image_Resizer {
|
5 |
+
|
6 |
// *** Class variables
|
7 |
private $image;
|
8 |
private $width;
|
19 |
$this->height = imagesy($this->image);
|
20 |
}
|
21 |
|
|
|
|
|
22 |
private function openImage($file)
|
23 |
{
|
24 |
// *** Get extension
|
43 |
return $img;
|
44 |
}
|
45 |
|
|
|
|
|
46 |
public function resizeImage($newWidth, $newHeight, $option="auto")
|
47 |
{
|
48 |
// *** Get optimal width and height - based on $option
|
54 |
|
55 |
// *** Resample - create image canvas of x, y size
|
56 |
$this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight);
|
57 |
+
/*** Preserve PNG transparency start ***/
|
58 |
+
imagealphablending($this->imageResized, false);
|
59 |
+
imagesavealpha($this->imageResized, true);
|
60 |
+
$transparent = imagecolorallocatealpha($this->imageResized, 255, 255, 255, 127);
|
61 |
+
imagefilledrectangle($this->imageResized, 0, 0, $optimalWidth, $optimalHeight, $transparent);
|
62 |
+
/*** Preserve PNG transparency end ***/
|
63 |
imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height);
|
64 |
|
65 |
|
69 |
}
|
70 |
}
|
71 |
|
|
|
|
|
72 |
public function getDimensions($newWidth, $newHeight, $option)
|
73 |
{
|
74 |
|
100 |
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
|
101 |
}
|
102 |
|
|
|
|
|
103 |
private function getSizeByFixedHeight($newHeight)
|
104 |
{
|
105 |
$ratio = $this->width / $this->height;
|
147 |
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
|
148 |
}
|
149 |
|
|
|
|
|
150 |
private function getOptimalCrop($newWidth, $newHeight)
|
151 |
{
|
152 |
|
165 |
return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
|
166 |
}
|
167 |
|
|
|
|
|
168 |
private function crop($optimalWidth, $optimalHeight, $newWidth, $newHeight)
|
169 |
{
|
170 |
// *** Find center - this will be used for the crop
|
179 |
imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight);
|
180 |
}
|
181 |
|
|
|
|
|
182 |
public function saveImage($savePath, $imageQuality="100")
|
183 |
{
|
184 |
// *** Get extension
|
inc/class-nextgen-integration.php
CHANGED
@@ -44,11 +44,7 @@ if(!class_exists('Nextgen_Integration')):
|
|
44 |
function render_nextgen_meta_box($post){
|
45 |
global $nggdb;
|
46 |
|
47 |
-
$meta = get_post_custom($post->ID);
|
48 |
-
$slider_settings = $this->get_slider_admin_settings($meta);
|
49 |
-
$slider_settings['nextgen_gallery'] = isset($slider_settings['nextgen_gallery']) ? $slider_settings['nextgen_gallery'] : '';
|
50 |
?>
|
51 |
-
|
52 |
<div class="cycloneslider-field last">
|
53 |
<label for="cycloneslider_nextgen_gallery"><?php _e('Choose a NextGEN Gallery', 'cycloneslider'); ?></label>
|
54 |
<?php
|
@@ -57,7 +53,7 @@ if(!class_exists('Nextgen_Integration')):
|
|
57 |
<select id="cycloneslider_nextgen_gallery" name="cycloneslider_settings[nextgen_gallery]">
|
58 |
<option selected="selected" value="0"></option>
|
59 |
<?php foreach($galleries as $gallery): ?>
|
60 |
-
<option
|
61 |
<?php endforeach; ?>
|
62 |
</select>
|
63 |
<input type="submit" name="cycloneslider_settings[nextgen]" value="<?php _e('Import', 'cycloneslider'); ?>" class="button-secondary" />
|
@@ -169,18 +165,8 @@ if(!class_exists('Nextgen_Integration')):
|
|
169 |
if(!empty($nextgen_gallery) and is_array($nextgen_gallery)){
|
170 |
|
171 |
foreach($nextgen_gallery as $image){
|
172 |
-
if($attach_id = $this->copy_image($image->imagePath)){
|
173 |
-
$slides[] = array(
|
174 |
-
'id' => $attach_id,
|
175 |
-
'link' => '',
|
176 |
-
'title' => '',
|
177 |
-
'description' => '',
|
178 |
-
'link_target' => '_self',
|
179 |
-
'fx' => 'default',
|
180 |
-
'speed' => '',
|
181 |
-
'timeout' => '',
|
182 |
-
'type' => 'image'
|
183 |
-
);
|
184 |
}
|
185 |
}
|
186 |
}
|
@@ -189,16 +175,6 @@ if(!class_exists('Nextgen_Integration')):
|
|
189 |
return $slides;
|
190 |
}
|
191 |
|
192 |
-
/**
|
193 |
-
* Slides
|
194 |
-
*/
|
195 |
-
function get_slider_admin_settings($meta){
|
196 |
-
if(isset($meta['_cycloneslider_settings'][0]) and !empty($meta['_cycloneslider_settings'][0])){
|
197 |
-
return maybe_unserialize($meta['_cycloneslider_settings'][0]);
|
198 |
-
}
|
199 |
-
return false;
|
200 |
-
}
|
201 |
-
|
202 |
} // end class
|
203 |
|
204 |
new Nextgen_Integration();
|
44 |
function render_nextgen_meta_box($post){
|
45 |
global $nggdb;
|
46 |
|
|
|
|
|
|
|
47 |
?>
|
|
|
48 |
<div class="cycloneslider-field last">
|
49 |
<label for="cycloneslider_nextgen_gallery"><?php _e('Choose a NextGEN Gallery', 'cycloneslider'); ?></label>
|
50 |
<?php
|
53 |
<select id="cycloneslider_nextgen_gallery" name="cycloneslider_settings[nextgen_gallery]">
|
54 |
<option selected="selected" value="0"></option>
|
55 |
<?php foreach($galleries as $gallery): ?>
|
56 |
+
<option value="<?php echo $gallery->gid; ?>"><?php echo $gallery->title; ?></option>
|
57 |
<?php endforeach; ?>
|
58 |
</select>
|
59 |
<input type="submit" name="cycloneslider_settings[nextgen]" value="<?php _e('Import', 'cycloneslider'); ?>" class="button-secondary" />
|
165 |
if(!empty($nextgen_gallery) and is_array($nextgen_gallery)){
|
166 |
|
167 |
foreach($nextgen_gallery as $image){
|
168 |
+
if($attach_id = $this->copy_image($image->imagePath)){ //Copy success!
|
169 |
+
$slides[] = wp_parse_args(array('id' => $attach_id), Cyclone_Slider::get_slide_defaults() ); //Add the slide ID and fill in default values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
}
|
172 |
}
|
175 |
return $slides;
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
} // end class
|
179 |
|
180 |
new Nextgen_Integration();
|
js/admin.js
CHANGED
@@ -1,20 +1,67 @@
|
|
1 |
jQuery(document).ready(function($){
|
2 |
(function() {
|
|
|
3 |
/*** hide wordpress admin stuff ***/
|
4 |
$('#minor-publishing-actions').hide();
|
5 |
$('#misc-publishing-actions').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
/*** make it sortable ***/
|
8 |
$('.cycloneslider-sortable').sortable({
|
9 |
-
handle:'.cycloneslider-box-
|
10 |
placeholder: "cycloneslider-box-placeholder",
|
11 |
forcePlaceholderSize:true,
|
|
|
|
|
12 |
update: function(event, ui) {
|
13 |
-
$('.cycloneslider-sortable .cycloneslider-box').each(function(
|
14 |
-
$(
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
18 |
});
|
19 |
}
|
20 |
});
|
@@ -52,17 +99,21 @@ jQuery(document).ready(function($){
|
|
52 |
});
|
53 |
|
54 |
/*** Toggle slide visiblity ***/
|
55 |
-
$('
|
56 |
var box = $(this).parents('.cycloneslider-box');
|
57 |
var body = box.find('.cycloneslider-box-body');
|
58 |
|
59 |
if(body.is(':visible')){
|
60 |
body.slideUp(100);
|
61 |
-
$.cookie
|
|
|
|
|
62 |
|
63 |
} else {
|
64 |
body.slideDown(100);
|
65 |
-
$.cookie
|
|
|
|
|
66 |
}
|
67 |
e.preventDefault();
|
68 |
});
|
@@ -71,42 +122,54 @@ jQuery(document).ready(function($){
|
|
71 |
$('.cycloneslider-field-body').each(function(i){
|
72 |
$(this).data('cycloneslider_id',i);
|
73 |
});
|
|
|
74 |
/*** Slide Properties Toggle ***/
|
75 |
$('.cycloneslider-meta-field .cycloneslider-field-title').live('click',function(e){
|
76 |
var body = $(this).next();
|
77 |
var id = body.data('cycloneslider_id');
|
78 |
if(body.is(':visible')){
|
79 |
body.slideUp(100);
|
80 |
-
$.cookie
|
|
|
|
|
81 |
} else {
|
82 |
body.slideDown(100);
|
83 |
-
$.cookie
|
|
|
|
|
84 |
}
|
85 |
});
|
|
|
86 |
/*** Slide Properties Cookie ***/
|
87 |
$('.cycloneslider-field-body').each(function(i){
|
88 |
body = $(this);
|
89 |
var id = $(this).data('cycloneslider_id');
|
90 |
-
if($.cookie
|
91 |
-
|
|
|
|
|
92 |
}
|
93 |
});
|
|
|
94 |
/*** hide all thats hidden ***/
|
95 |
$('.cycloneslider-sortable .cycloneslider-box').each(function(){
|
96 |
var body = $(this).find('.cycloneslider-box-body');
|
97 |
var id = $(this).data('cycloneslider_id');
|
98 |
-
if($.cookie
|
99 |
-
|
|
|
|
|
100 |
}
|
101 |
});
|
102 |
|
103 |
/*** Delete Slide ***/
|
104 |
-
$('
|
105 |
|
106 |
var box = $(this).parents('.cycloneslider-box');
|
107 |
box.fadeOut('slow', function(){ box.remove()});
|
108 |
|
109 |
e.preventDefault();
|
|
|
110 |
});
|
111 |
})();
|
112 |
|
1 |
jQuery(document).ready(function($){
|
2 |
(function() {
|
3 |
+
|
4 |
/*** hide wordpress admin stuff ***/
|
5 |
$('#minor-publishing-actions').hide();
|
6 |
$('#misc-publishing-actions').hide();
|
7 |
+
$('.inline-edit-date').prev().hide();
|
8 |
+
|
9 |
+
/*** Template Chooser ***/
|
10 |
+
$('.template-choices li').click(function(){
|
11 |
+
$('.template-choices li').removeClass('active');
|
12 |
+
$('.template-choices li input').removeAttr('checked');
|
13 |
+
$(this).addClass('active').find('input').attr('checked','checked');
|
14 |
+
});
|
15 |
+
|
16 |
+
/*** show/Hide Tile Properties for slideshow ***/
|
17 |
+
$('#cyclone-slider-properties-metabox').on('change', '#cycloneslider_settings_fx', function(){
|
18 |
+
if($(this).val()=='tileBlind' || $(this).val()=='tileSlide'){
|
19 |
+
$('.cycloneslider-field-tile-properties').slideDown('fast');
|
20 |
+
} else {
|
21 |
+
$('.cycloneslider-field-tile-properties').slideUp('fast');
|
22 |
+
}
|
23 |
+
});
|
24 |
+
$("#cycloneslider_settings_fx").trigger('change');
|
25 |
+
|
26 |
+
/*** show/Hide Tile Properties for slides ***/
|
27 |
+
$('#cyclone-slides-metabox').on('change', '.cycloneslider_metas_fx', function(){
|
28 |
+
if($(this).val()=='tileBlind' || $(this).val()=='tileSlide'){
|
29 |
+
$(this).siblings('.cycloneslider-slide-tile-properties').slideDown('fast');
|
30 |
+
} else {
|
31 |
+
$(this).siblings('.cycloneslider-slide-tile-properties').slideUp('fast');
|
32 |
+
}
|
33 |
+
});
|
34 |
+
$(".cycloneslider_metas_fx").trigger('change');
|
35 |
+
|
36 |
+
/*** enable/disable form fields and labels ***/
|
37 |
+
$('#cyclone-slides-metabox').on('change', '.cycloneslider_metas_enable_slide_effects', function(){
|
38 |
+
if($(this).val()==0){
|
39 |
+
$(this).parent().find('input,select').not(this).attr('disabled','disabled');
|
40 |
+
$(this).parent().find('label,.note').addClass('disabled');
|
41 |
+
} else {
|
42 |
+
$(this).parent().find('input,select').not(this).removeAttr('disabled');
|
43 |
+
$(this).parent().find('label,.note').removeClass('disabled');
|
44 |
+
}
|
45 |
+
});
|
46 |
+
$(".cycloneslider_metas_enable_slide_effects").trigger('change');
|
47 |
+
|
48 |
|
49 |
/*** make it sortable ***/
|
50 |
$('.cycloneslider-sortable').sortable({
|
51 |
+
handle:'.cycloneslider-box-title',
|
52 |
placeholder: "cycloneslider-box-placeholder",
|
53 |
forcePlaceholderSize:true,
|
54 |
+
delay:500,
|
55 |
+
/*** Update form field indexes when slide order changes ***/
|
56 |
update: function(event, ui) {
|
57 |
+
$('.cycloneslider-sortable .cycloneslider-box').each(function(boxIndex, box){ /*** Loop thru each box ***/
|
58 |
+
$(box).find('input, select, textarea').each(function(i, field){ /*** Loop thru relevant form fields ***/
|
59 |
+
var name = $(field).attr('name');
|
60 |
+
if(name){
|
61 |
+
name = name.replace(/\[[0-9]+\]/, '['+boxIndex+']'); /*** Replace all [index] in field_key[index][name] ***/
|
62 |
+
$(field).attr('name',name);
|
63 |
+
}
|
64 |
+
});
|
65 |
});
|
66 |
}
|
67 |
});
|
99 |
});
|
100 |
|
101 |
/*** Toggle slide visiblity ***/
|
102 |
+
$('#cyclone-slides-metabox').on('click', '.cycloneslider-box-title', function(e) {
|
103 |
var box = $(this).parents('.cycloneslider-box');
|
104 |
var body = box.find('.cycloneslider-box-body');
|
105 |
|
106 |
if(body.is(':visible')){
|
107 |
body.slideUp(100);
|
108 |
+
if($.cookie!=undefined){
|
109 |
+
$.cookie('cycloneslider_box_'+box.data('cycloneslider_id'), null);
|
110 |
+
}
|
111 |
|
112 |
} else {
|
113 |
body.slideDown(100);
|
114 |
+
if($.cookie!=undefined){
|
115 |
+
$.cookie('cycloneslider_box_'+box.data('cycloneslider_id'), 'open', { expires: 7});/*** remember open section ***/
|
116 |
+
}
|
117 |
}
|
118 |
e.preventDefault();
|
119 |
});
|
122 |
$('.cycloneslider-field-body').each(function(i){
|
123 |
$(this).data('cycloneslider_id',i);
|
124 |
});
|
125 |
+
|
126 |
/*** Slide Properties Toggle ***/
|
127 |
$('.cycloneslider-meta-field .cycloneslider-field-title').live('click',function(e){
|
128 |
var body = $(this).next();
|
129 |
var id = body.data('cycloneslider_id');
|
130 |
if(body.is(':visible')){
|
131 |
body.slideUp(100);
|
132 |
+
if($.cookie!=undefined){
|
133 |
+
$.cookie('cycloneslider_slide_meta_field_'+id, null);/*** delete cookie ***/
|
134 |
+
}
|
135 |
} else {
|
136 |
body.slideDown(100);
|
137 |
+
if($.cookie!=undefined){
|
138 |
+
$.cookie('cycloneslider_slide_meta_field_'+id, 'open', { expires: 7});/*** remember open section ***/
|
139 |
+
}
|
140 |
}
|
141 |
});
|
142 |
+
|
143 |
/*** Slide Properties Cookie ***/
|
144 |
$('.cycloneslider-field-body').each(function(i){
|
145 |
body = $(this);
|
146 |
var id = $(this).data('cycloneslider_id');
|
147 |
+
if($.cookie!=undefined){
|
148 |
+
if($.cookie('cycloneslider_slide_meta_field_'+id)!='open'){/*** do not close open section ***/
|
149 |
+
body.hide();
|
150 |
+
}
|
151 |
}
|
152 |
});
|
153 |
+
|
154 |
/*** hide all thats hidden ***/
|
155 |
$('.cycloneslider-sortable .cycloneslider-box').each(function(){
|
156 |
var body = $(this).find('.cycloneslider-box-body');
|
157 |
var id = $(this).data('cycloneslider_id');
|
158 |
+
if($.cookie!=undefined){
|
159 |
+
if($.cookie('cycloneslider_box_'+id)=='open'){/*** do not close open section ***/
|
160 |
+
body.show();
|
161 |
+
}
|
162 |
}
|
163 |
});
|
164 |
|
165 |
/*** Delete Slide ***/
|
166 |
+
$('#cyclone-slides-metabox').on('click', '.cycloneslider-box-delete', function(e) {
|
167 |
|
168 |
var box = $(this).parents('.cycloneslider-box');
|
169 |
box.fadeOut('slow', function(){ box.remove()});
|
170 |
|
171 |
e.preventDefault();
|
172 |
+
e.stopPropagation();
|
173 |
});
|
174 |
})();
|
175 |
|
js/{jquery.cookie.js → jquery-cookie.js}
RENAMED
@@ -1,47 +1,47 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery Cookie Plugin
|
3 |
-
* https://github.com/carhartl/jquery-cookie
|
4 |
-
*
|
5 |
-
* Copyright 2011, Klaus Hartl
|
6 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
-
* http://www.opensource.org/licenses/mit-license.php
|
8 |
-
* http://www.opensource.org/licenses/GPL-2.0
|
9 |
-
*/
|
10 |
-
(function($) {
|
11 |
-
$.cookie = function(key, value, options) {
|
12 |
-
|
13 |
-
// key and at least value given, set cookie...
|
14 |
-
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
|
15 |
-
options = $.extend({}, options);
|
16 |
-
|
17 |
-
if (value === null || value === undefined) {
|
18 |
-
options.expires = -1;
|
19 |
-
}
|
20 |
-
|
21 |
-
if (typeof options.expires === 'number') {
|
22 |
-
var days = options.expires, t = options.expires = new Date();
|
23 |
-
t.setDate(t.getDate() + days);
|
24 |
-
}
|
25 |
-
|
26 |
-
value = String(value);
|
27 |
-
|
28 |
-
return (document.cookie = [
|
29 |
-
encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
|
30 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
31 |
-
options.path ? '; path=' + options.path : '',
|
32 |
-
options.domain ? '; domain=' + options.domain : '',
|
33 |
-
options.secure ? '; secure' : ''
|
34 |
-
].join(''));
|
35 |
-
}
|
36 |
-
|
37 |
-
// key and possibly options given, get cookie...
|
38 |
-
options = value || {};
|
39 |
-
var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
|
40 |
-
|
41 |
-
var pairs = document.cookie.split('; ');
|
42 |
-
for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
|
43 |
-
if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
|
44 |
-
}
|
45 |
-
return null;
|
46 |
-
};
|
47 |
-
})(jQuery);
|
1 |
+
/*!
|
2 |
+
* jQuery Cookie Plugin
|
3 |
+
* https://github.com/carhartl/jquery-cookie
|
4 |
+
*
|
5 |
+
* Copyright 2011, Klaus Hartl
|
6 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
+
* http://www.opensource.org/licenses/mit-license.php
|
8 |
+
* http://www.opensource.org/licenses/GPL-2.0
|
9 |
+
*/
|
10 |
+
(function($) {
|
11 |
+
$.cookie = function(key, value, options) {
|
12 |
+
|
13 |
+
// key and at least value given, set cookie...
|
14 |
+
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
|
15 |
+
options = $.extend({}, options);
|
16 |
+
|
17 |
+
if (value === null || value === undefined) {
|
18 |
+
options.expires = -1;
|
19 |
+
}
|
20 |
+
|
21 |
+
if (typeof options.expires === 'number') {
|
22 |
+
var days = options.expires, t = options.expires = new Date();
|
23 |
+
t.setDate(t.getDate() + days);
|
24 |
+
}
|
25 |
+
|
26 |
+
value = String(value);
|
27 |
+
|
28 |
+
return (document.cookie = [
|
29 |
+
encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
|
30 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
31 |
+
options.path ? '; path=' + options.path : '',
|
32 |
+
options.domain ? '; domain=' + options.domain : '',
|
33 |
+
options.secure ? '; secure' : ''
|
34 |
+
].join(''));
|
35 |
+
}
|
36 |
+
|
37 |
+
// key and possibly options given, get cookie...
|
38 |
+
options = value || {};
|
39 |
+
var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
|
40 |
+
|
41 |
+
var pairs = document.cookie.split('; ');
|
42 |
+
for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
|
43 |
+
if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
|
44 |
+
}
|
45 |
+
return null;
|
46 |
+
};
|
47 |
+
})(jQuery);
|
js/jquery.cycle2.carousel.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: 20121206 */
|
2 |
+
(function(a){"use strict",a(document).on("cycle-bootstrap",function(a,b,c){if(b.fx!=="carousel")return;c.getSlideIndex=function(a){var b=this.opts()._carouselWrap.children(),c=b.index(a);return c%b.length},c.next=function(){var a=b.reverse?-1:1;if(b.allowWrap===!1&&b.currSlide+a>b.slideCount-b.carouselVisible)return;b.API.advanceSlide(a),b.API.trigger("cycle-next",[b]).log("cycle-next")}}),a.fn.cycle.transitions.carousel={preInit:function(b){b.hideNonActive=!1,b.container.on("cycle-destroyed",a.proxy(this.onDestroy,b.API)),b.API.stopTransition=this.stopTransition;for(var c=0;c<b.startingSlide;c++)b.container.append(b.slides[0])},postInit:function(b){var c,d,e=b.carouselVertical;b.carouselVisible&&b.carouselVisible>b.slideCount&&(b.carouselVisible=b.slideCount-1);var f=b.carouselVisible||b.slides.length,g={display:e?"block":"inline-block",position:"static"};b.container.css({position:"relative",overflow:"hidden"}),b.slides.css(g),b._currSlide=b.currSlide,d=a('<div class="cycle-carousel-wrap"></div').prependTo(b.container).css({margin:0,padding:0,top:0,left:0,position:"absolute"}).append(b.slides),b._carouselWrap=d,e||d.css("white-space","nowrap"),b.allowWrap!==!1&&(b.slides.slice(0,b.slideCount).clone().css(g).appendTo(d),b.carouselVisible===undefined&&b.slides.slice(0,b.slideCount).clone().css(g).appendTo(d),b.slides.slice(0,b.slideCount).clone().css(g).prependTo(d),b.carouselVisible===undefined&&b.slides.slice(0,b.slideCount).clone().css(g).prependTo(d)),b.pager&&b.allowWrap===!1&&(c=b.slideCount-f,a(b.pager).children().filter(":gt("+c+")").hide()),b._nextBoundry=b.slideCount-b.carouselVisible,this.prepareDimensions(b)},prepareDimensions:function(b){var c,d,e,f,g=b.carouselVertical,h=b.carouselVisible||b.slides.length;b.carouselFluid&&b.carouselVisible?b._carouselResizeThrottle||this.fluidSlides(b):b.carouselVisible&&b.carouselSlideDimension?(c=h*b.carouselSlideDimension,b.container[g?"height":"width"](c)):b.carouselVisible&&(c=h*a(b.slides[0])[g?"outerHeight":"outerWidth"](!0),b.container[g?"height":"width"](c)),d=b.carouselOffset||0;if(b.allowWrap!==!1)if(b.carouselSlideDimension)d-=(b.slideCount+b.currSlide)*b.carouselSlideDimension;else{f=b._carouselWrap.children();for(var i=0;i<b.slideCount+b.currSlide;i++)d-=a(f[i])[g?"outerHeight":"outerWidth"](!0)}b._carouselWrap.css(g?"top":"left",d)},fluidSlides:function(b){function g(){clearTimeout(c),c=setTimeout(h,20)}function h(){b._carouselWrap.stop(!1,!0);var a=b.container.width()/b.carouselVisible;a=Math.ceil(a-e),b._carouselWrap.children().width(a),b._sentinel&&b._sentinel.width(a),f(b)}var c,d=b.slides.eq(0),e=d.outerWidth()-d.width(),f=this.prepareDimensions;a(window).on("resize",g),b._carouselResizeThrottle=g,h()},transition:function(b,c,d,e,f){var g,h={},i=b.nextSlide-b.currSlide,j=b.carouselVertical,k=b.speed;if(b.allowWrap===!1){e=i>0;var l=b._currSlide,m=b.slideCount-b.carouselVisible;i>0&&b.nextSlide>m&&l==m?i=0:i>0&&b.nextSlide>m?i=b.nextSlide-l-(b.nextSlide-m):i<0&&b.currSlide>m&&b.nextSlide>m?i=0:i<0&&b.currSlide>m?i+=b.currSlide-m:l=b.currSlide,g=this.getScroll(b,j,l,i),b.API.opts()._currSlide=b.nextSlide>m?m:b.nextSlide}else e&&b.nextSlide===0?(g=this.getDim(b,b.currSlide,j),f=this.genCallback(b,e,j,f)):!e&&b.nextSlide==b.slideCount-1?(g=this.getDim(b,b.currSlide,j),f=this.genCallback(b,e,j,f)):g=this.getScroll(b,j,b.currSlide,i);h[j?"top":"left"]=e?"-="+g:"+="+g,b.throttleSpeed&&(k=g/a(b.slides[0])[j?"height":"width"]()*b.speed),b._carouselWrap.animate(h,k,b.easing,f)},getDim:function(b,c,d){var e=a(b.slides[c]);return e[d?"outerHeight":"outerWidth"](!0)},getScroll:function(a,b,c,d){var e,f=0;if(d>0)for(e=c;e<c+d;e++)f+=this.getDim(a,e,b);else for(e=c;e>c+d;e--)f+=this.getDim(a,e,b);return f},genCallback:function(b,c,d,e){return function(){var c=a(b.slides[b.nextSlide]).position(),f=0-c[d?"top":"left"]-(b.carouselOffset||0);b._carouselWrap.css(b.carouselVertical?"top":"left",f),e()}},stopTransition:function(){var a=this.opts();a.slides.stop(!1,!0),a._carouselWrap.stop(!1,!0)},onDestroy:function(b){var c=this.opts();c._carouselResizeThrottle&&a(window).off("resize",c._carouselResizeThrottle),c.slides.prependTo(c.container),c._carouselWrap.remove()}}})(jQuery);
|
js/jquery.cycle2.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery Cycle2; ver:
|
3 |
-
* http://jquery.malsup.com/cycle2/
|
4 |
-
* Copyright (c) 2012 M. Alsup; Dual licensed: MIT/GPL
|
5 |
-
*/
|
6 |
-
(function(a){function c(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))}function d(a){return(a||"").toLowerCase()}"use strict";var b="BETA-20121030";a.fn.cycle=function(b){var e;return this.length===0&&!a.isReady?(e={s:this.selector,c:this.context},c("requeuing slideshow (dom not ready)"),a(function(){a(e.s,e.c).cycle(b)}),this):this.each(function(){var e,f,g,h,i=a(this);if(i.data("cycle.opts"))return;if(i.data("cycle-log")===!1||b&&b.log===!1||f&&f.log===!1)c=a.noop;c("--c2 init--"),e=i.data();for(var j in e)e.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(h=e[j],g=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c(g+":",h,"("+typeof h+")"),e[g]=h);f=a.extend({},a.fn.cycle.defaults,e,b||{}),f.timeoutId=0,f.paused=0,f.container=i,f._maxZ=f.maxZ,f.API=a.extend({_container:i},a.fn.cycle.API),f.API.log=c,f.API.trigger=function(a,b){return f.container.trigger(a,b),f.API},i.data("cycle.opts",f),i.data("cycle.API",f.API),f.API.trigger("cycle-bootstrap",[f,f.API]),f.API.addInitialSlides(),f.API.preInitSlideshow(),f.slides.length&&f.API.initSlideshow()})},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.random&&c.sort(function(){return Math.random()-.5}),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b=this.opts(),c=b.container;b.API.calcFirstSlide(),b.container.css("position")=="static"&&b.container.css("position","relative"),a(b.slides[b.currSlide]).css("opacity",1).show(),b.API.stackSlides(b.slides[b.currSlide],b.slides[b.nextSlide],!b.reverse),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.hover(function(){b.paused=1,b.API.trigger("cycle-paused",[b])},function(){b.paused=0,b.API.trigger("cycle-resumed",[b])})),b.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},b.timeout+b.delay)),b._initialized=!0,b.API.updateView(),b.container.on("cycle-paused cycle-resumed",function(a){b.container[a.type==="cycle-paused"?"addClass":"removeClass"]("cycle-paused")}),b.API.trigger("cycle-initialized",[b]),b.API.postInitSlideshow()},add:function(b,c){var d=this.opts(),e=d.slideCount,f=!1,g;a(b).each(function(b){var e,f=a(this);c?d.container.prepend(f):d.container.append(f),d.slideCount++,e=d.API.buildSlideOpts(f),c?d.slides=a(f).add(d.slides):d.slides=d.slides.add(f),d.API.initSlide(e,f,--d._maxZ),f.data("cycle.opts",e),d.API.trigger("cycle-slide-added",[d,e,f])}),d.API.updateView(),f=d._preInitialized&&e<2&&d.slideCount>=1,f&&(d._initialized?d.timeout&&(g=d.slides.length,d.nextSlide=d.reverse?g-1:1):d.API.initSlideshow())},calcFirstSlide:function(){var a=this.opts(),b;b=parseInt(a.startingSlide||0,10);if(b>=a.slides.length||b<0)b=0;a.currSlide=b,a.reverse?(a.nextSlide=b-1,a.nextSlide<0&&(a.nextSlide=a.slides.length-1)):(a.nextSlide=b+1,a.nextSlide==a.slides.length&&(a.nextSlide=0))},calcNextSlide:function(){var a=this.opts(),b;a.reverse?(b=a.nextSlide-1<0,a.nextSlide=b?a.slideCount-1:a.nextSlide-1,a.currSlide=b?0:a.nextSlide+1):(b=a.nextSlide+1==a.slides.length,a.nextSlide=b?0:a.nextSlide+1,a.currSlide=b?a.slides.length-1:a.nextSlide-1)},calcTx:function(b,d){var e=b,f;return d&&e.manualFx&&(f=a.fn.cycle.transitions[e.manualFx]),f||(f=a.fn.cycle.transitions[e.fx]),f||(f=a.fn.cycle.transitions.fade,c('Transition "'+e.fx+'" not found. Using fade.')),f},prepareTx:function(a,b){var c=this.opts(),d,e,f,g,h;if(c.slideCount<2){c.timeoutId=0;return}a&&(c.API.stopTransition(),c.busy=!1,clearTimeout(c.timeoutId),c.timeoutId=0);if(c.busy)return;if(c.timeoutId===0&&!a)return;e=c.slides[c.currSlide],f=c.slides[c.nextSlide],g=c.API.getSlideOpts(c.nextSlide),h=c.API.calcTx(g,a),c._tx=h,a&&g.manualSpeed!==undefined&&(g.speed=g.manualSpeed),c.nextSlide!=c.currSlide&&(a||!c.paused&&c.timeout)?(c.API.trigger("cycle-before",[g,e,f,b]),h.before&&h.before(g,e,f,b),d=function(){c.busy=!1,h.after&&h.after(g,e,f,b),c.API.trigger("cycle-after",[g,e,f,b]),c.API.queueTransition(g),c.API.updateView()},c.busy=!0,h.transition?h.transition(g,e,f,b,d):c.API.doTransition(g,e,f,b,d),c.API.calcNextSlide()):c.API.queueTransition(g)},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(a){var b=this.opts();if(b.nextSlide===0&&--b.loop===0){b.API.log("terminating; loop=0"),b.timeout=0,b.API.trigger("cycle-finished",[b]),b.nextSlide=b.currSlide;return}a.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},a.timeout))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(b){var e=this.opts(),f,g,h=b.data()||{};for(var i in h)h.hasOwnProperty(i)&&/^cycle[A-Z]+/.test(i)&&(f=h[i],g=i.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c("["+(e.slideCount-1)+"]",g+":",f,"("+typeof f+")"),h[g]=f);h=a.extend({},a.fn.cycle.defaults,e,h),h.slideNum=e.slideCount;try{delete h.API,delete h.slideCount,delete h.currSlide,delete h.nextSlide,delete h.slides}catch(j){}return h},getSlideOpts:function(b){var c=this.opts();b===undefined&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(){var a=this.opts();if(!a._initialized)return;var b=a.API.getSlideOpts(),c=a.slides[a.currSlide];a.slideActiveClass&&a.slides.removeClass(a.slideActiveClass).eq(a.currSlide).addClass(a.slideActiveClass),a.hideNonActive&&a.slides.filter(":not(."+a.slideActiveClass+")").hide(),a.API.trigger("cycle-update-view",[a,b,c])},getComponent:function(b){var c=this.opts(),d=c[b];return typeof d=="string"?/^\s*\>/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;f<h;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=c,a.fn.cycle.version=function(){return"Cycle2: "+b},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,display:"block"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,display:"block"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,display:"block"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,display:"block"},a.cssAfter={zIndex:a._maxZ-2},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:undefined,manualSpeed:undefined,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})})(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{autoHeight:0}),a(document).on("cycle-initialized",function(b,c){function e(){c.container.height(c.container.width()/d)}var d;a.type(c.autoHeight)=="number"&&c.autoHeight>=0?c._sentinel=a(c.slides[c.autoHeight]).clone().css({position:"static",visibility:"hidden",display:"block"}).prependTo(c.container).removeClass().addClass("cycle-sentinel cycle-slide"):a.type(c.autoHeight)=="string"&&/\d+\:\d+/.test(c.autoHeight)&&(d=c.autoHeight.match(/(\d+)\:(\d+)/),d=d[1]/d[2],a(window).on("resize",e),c._autoHeightOnResize=e,setTimeout(function(){a(window).triggerHandler("resize")},15))}),a(document).on("cycle-destroyed",function(b,c){c._sentinel&&c._sentinel.remove(),c._autoHeightOnResize&&a(window).off("resize",c._autoHeightOnResize)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>"}),a(document).on("cycle-update-view",function(b,c,d,e){var f;a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"];c[a]&&b&&(f=c.API.getComponent(a),f.html(c.API.tmpl(b,d,e)))})}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return a.type(c)=="number"?this.cycle("goto",c):a.type(c)=="string"?this.each(function(){var h;d=c,f=a(this).data("cycle.opts");if(f===undefined){b.log('slideshow must be initialized before sending commands; "'+d+'" ignored');return}d=d=="goto"?"jump":d,e=f.API[d];if(a.isFunction(e))return h=a.makeArray(g),h.shift(),e.apply(f.API,h);b.log("unknown command: ",d)}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts(),b=a.reverse?-1:1;if(a.allowWrap===!1&&a.currSlide+b>=a.slideCount)return;a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next")},prev:function(){var a=this.opts(),b=a.reverse?1:-1;if(a.allowWrap===!1&&a.currSlide+b<0)return;a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev")},destroy:function(){var a=this.opts();clearTimeout(a.timeoutId),a.timeoutId=0,a.API.stop(),a.API.trigger("cycle-destroyed",[a]).log("cycle-destroyed"),a.container.removeData("cycle.opts")},jump:function(a){var b,c=this.opts(),d=parseInt(a,10);if(isNaN(d)||d<0||d>=c.slides.length){c.API.log("goto: invalid slide index: "+d);return}if(d==c.currSlide){c.API.log("goto: skipping, already on slide",d);return}c.nextSlide=d,clearTimeout(c.timeoutId),c.timeoutId=0,c.API.log("goto: ",d," (zero-index)"),b=c.currSlide<c.nextSlide,c.API.prepareTx(!0,b)},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},pause:function(){var a=this.opts();a.paused=!0,a.API.trigger("cycle-paused",[a]).log("cycle-paused")},resume:function(){var a=this.opts();a.paused=!1,a.API.trigger("cycle-resumed",[a]).log("cycle-resumed")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){var c=this.opts(),d,e,f=[],g=1;for(var h=0;h<c.slides.length;h++)d=c.slides[h],h==b?e=d:(f.push(d),a(d).data("cycle.opts").slideNum=g,g++);e&&(c.slides=a(f),c.slideCount--,a(e).remove(),b==c.currSlide&&c.API.advanceSlide(1),c.API.trigger("cycle-slide-removed",[c,b,e]).log("cycle-slide-removed"),c.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),function(a){function b(b,c){var d;if(b._hashFence){b._hashFence=!1;return}d=window.location.hash.substring(1),b.slides.each(function(e){if(a(this).data("cycle-hash")===d)return c===!0?b.startingSlide=e:(b.nextSlide=e,b.API.prepareTx(!0,!1)),!1})}"use strict",a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function e(b,e){function h(b){var h;c.loader=="wait"?(f.push(b),g===0&&(d.apply(c.API,[f,e]),c.container.removeClass("cycle-loading"))):(h=a(c.slides[c.currSlide]),d.apply(c.API,[b,e]),h.show(),c.container.removeClass("cycle-loading"))}var f=[];b=a(b);var g=b.length;b.hide().each(function(){function k(){--b===0&&(--g,h(i))}var b=0,i=a(this),j=i.is("img")?i:i.find("img");j=j.filter(":not(.cycle-loader-ignore)");if(!j.length){--g,f.push(i);return}b=j.length,j.each(function(){this.complete?k():a(this).load(function(){k()}).error(function(){--b===0&&(c.API.log("slide skipped; img not loaded:",this.src),--g===0&&c.loader=="wait"&&d.apply(c.API,[f,e]))})})}),g&&c.container.addClass("cycle-loading")}var d;if(!c.loader)return;d=c.API.add,c.API.add=e})}(jQuery),function(a){function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts(),d=a.children().index(b),e=d,f=c.currSlide<e;if(c.currSlide==e)return;c.nextSlide=e,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b])}"use strict",a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:"<span>•</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d,e){if(c.pager){var f=c.API.getComponent("pager");f.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c,d){var e;c.pager&&(e=c.API.getComponent("pager"),e.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c;b.pager&&b.pagerTemplate&&(c=b.API.getComponent("pager"),c.empty())})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){b.API.getComponent("next").off(b.nextEvent).on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").off(b.prevEvent).on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()});if(b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(a){b.API.next()}),b.container.on(d,function(){b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b,c,d){if(b.allowWrap)return;var e=b.disabledClass,f=b.API.getComponent("next"),g=b.API.getComponent("prev"),h=b._prevBoundry||0,i=b._nextBoundry||b.slideCount-1;b.currSlide==i?f.addClass(e).prop("disabled",!0):f.removeClass(e).prop("disabled",!1),b.currSlide===h?g.addClass(e).prop("disabled",!0):g.removeClass(e).prop("disabled",!1)}),a(document).on("cycle-destroyed",function(b,c){a(c.next).off(c.nextEvent),a(c.prev).off(c.prevEvent),c.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(!c.progressive)return;var d=c.API,e=d.next,f=d.prev,g=d.prepareTx,h,i=a.type(c.progressive);if(i=="array")h=c.progressive;else if(a.isFunction(c.progressive))h=c.progressive(c);else if(i=="string"){h=a(c.progressive).html();if(!a.trim(h))return;try{h=a.parseJSON(h)}catch(j){d.log("error parsing progressive slides",j);return}}g&&(d.prepareTx=function(a,b){var d,e;if(a||h.length===0){g.apply(c.API,[a,b]);return}b&&c.currSlide==c.slideCount-1?(e=h[0],h=h.slice(1),c.container.one("cycle-slide-added",function(a,b){b.API.advanceSlide(1)}),c.API.add(e)):!b&&c.currSlide===0?(d=h.length-1,e=h[d],h=h.slice(0,d),c.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1)}),c.API.add(e,!0)):g.apply(c.API,[a,b])}),e&&(d.next=function(){var a=this.opts();if(h.length&&a.currSlide==a.slideCount-1){var b=h[0];h=h.slice(1),a.container.one("cycle-slide-added",function(a,b){e.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else e.apply(a.API)}),f&&(d.prev=function(){var a=this.opts();if(h.length&&a.currSlide===0){var b=h.length-1,c=h[b];h=h.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else f.apply(a.API)})})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(b,c,d){var e=new RegExp(c.tmplRegex,"g");if(b&&c)return b.replace(e,function(b,e){var f,g,h=c,i=e.split(".");if(i.length>1){g=c;for(f=0;f<i.length;f++)h=g,g=g[i[f]]||e}else g=c[e];return a.isFunction(g)?g.call(h,c):g!==undefined&&g!==null?g:d&&d[e]!==undefined?d[e]:e})}})}(jQuery);
|
1 |
+
/*!
|
2 |
+
* jQuery Cycle2; ver: 20121219
|
3 |
+
* http://jquery.malsup.com/cycle2/
|
4 |
+
* Copyright (c) 2012 M. Alsup; Dual licensed: MIT/GPL
|
5 |
+
*/
|
6 |
+
(function(a){function c(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))}function d(a){return(a||"").toLowerCase()}"use strict";var b="20121219";a.fn.cycle=function(b){var e;return this.length===0&&!a.isReady?(e={s:this.selector,c:this.context},c("requeuing slideshow (dom not ready)"),a(function(){a(e.s,e.c).cycle(b)}),this):this.each(function(){var e,f,g,h,i=a(this);if(i.data("cycle.opts"))return;if(i.data("cycle-log")===!1||b&&b.log===!1||f&&f.log===!1)c=a.noop;c("--c2 init--"),e=i.data();for(var j in e)e.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(h=e[j],g=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c(g+":",h,"("+typeof h+")"),e[g]=h);f=a.extend({},a.fn.cycle.defaults,e,b||{}),f.timeoutId=0,f.paused=f.paused||!1,f.container=i,f._maxZ=f.maxZ,f.API=a.extend({_container:i},a.fn.cycle.API),f.API.log=c,f.API.trigger=function(a,b){return f.container.trigger(a,b),f.API},i.data("cycle.opts",f),i.data("cycle.API",f.API),f.API.trigger("cycle-bootstrap",[f,f.API]),f.API.addInitialSlides(),f.API.preInitSlideshow(),f.slides.length&&f.API.initSlideshow()})},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.random&&c.sort(function(){return Math.random()-.5}),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b=this.opts(),c=b.container;b.API.calcFirstSlide(),b.container.css("position")=="static"&&b.container.css("position","relative"),a(b.slides[b.currSlide]).css("opacity",1).show(),b.API.stackSlides(b.slides[b.currSlide],b.slides[b.nextSlide],!b.reverse),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.hover(function(){b.hoverPaused=!0,b.paused||b.API.trigger("cycle-paused",[b])},function(){b.hoverPaused=!1,b.paused||b.API.trigger("cycle-resumed",[b])})),b.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},b.timeout+b.delay)),b._initialized=!0,b.API.updateView(!0),b.container.on("cycle-paused cycle-resumed",function(a){b.container[a.type==="cycle-paused"?"addClass":"removeClass"]("cycle-paused")}),b.API.trigger("cycle-initialized",[b]),b.API.postInitSlideshow()},add:function(b,c){var d=this.opts(),e=d.slideCount,f=!1,g;a(b).each(function(b){var e,f=a(this);c?d.container.prepend(f):d.container.append(f),d.slideCount++,e=d.API.buildSlideOpts(f),c?d.slides=a(f).add(d.slides):d.slides=d.slides.add(f),d.API.initSlide(e,f,--d._maxZ),f.data("cycle.opts",e),d.API.trigger("cycle-slide-added",[d,e,f])}),d.API.updateView(!0),f=d._preInitialized&&e<2&&d.slideCount>=1,f&&(d._initialized?d.timeout&&(g=d.slides.length,d.nextSlide=d.reverse?g-1:1):d.API.initSlideshow())},calcFirstSlide:function(){var a=this.opts(),b;b=parseInt(a.startingSlide||0,10);if(b>=a.slides.length||b<0)b=0;a.currSlide=b,a.reverse?(a.nextSlide=b-1,a.nextSlide<0&&(a.nextSlide=a.slides.length-1)):(a.nextSlide=b+1,a.nextSlide==a.slides.length&&(a.nextSlide=0))},calcNextSlide:function(){var a=this.opts(),b;a.reverse?(b=a.nextSlide-1<0,a.nextSlide=b?a.slideCount-1:a.nextSlide-1,a.currSlide=b?0:a.nextSlide+1):(b=a.nextSlide+1==a.slides.length,a.nextSlide=b?0:a.nextSlide+1,a.currSlide=b?a.slides.length-1:a.nextSlide-1)},calcTx:function(b,d){var e=b,f;return d&&e.manualFx&&(f=a.fn.cycle.transitions[e.manualFx]),f||(f=a.fn.cycle.transitions[e.fx]),f||(f=a.fn.cycle.transitions.fade,c('Transition "'+e.fx+'" not found. Using fade.')),f},prepareTx:function(a,b){var c=this.opts(),d,e,f,g,h;if(c.slideCount<2){c.timeoutId=0;return}a&&(c.API.stopTransition(),c.busy=!1,clearTimeout(c.timeoutId),c.timeoutId=0);if(c.busy)return;if(c.timeoutId===0&&!a)return;e=c.slides[c.currSlide],f=c.slides[c.nextSlide],g=c.API.getSlideOpts(c.nextSlide),h=c.API.calcTx(g,a),c._tx=h,a&&g.manualSpeed!==undefined&&(g.speed=g.manualSpeed),c.nextSlide!=c.currSlide&&(a||!c.paused&&!c.hoverPaused&&c.timeout)?(c.API.trigger("cycle-before",[g,e,f,b]),h.before&&h.before(g,e,f,b),d=function(){c.busy=!1,h.after&&h.after(g,e,f,b),c.API.trigger("cycle-after",[g,e,f,b]),c.API.queueTransition(g),c.API.updateView(!0)},c.busy=!0,h.transition?h.transition(g,e,f,b,d):c.API.doTransition(g,e,f,b,d),c.API.calcNextSlide(),c.updateView<0&&c.API.updateView()):c.API.queueTransition(g)},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(a){var b=this.opts();if(b.nextSlide===0&&--b.loop===0){b.API.log("terminating; loop=0"),b.timeout=0,b.API.trigger("cycle-finished",[b]),b.nextSlide=b.currSlide;return}a.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},a.timeout))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(b){var e=this.opts(),f,g,h=b.data()||{};for(var i in h)h.hasOwnProperty(i)&&/^cycle[A-Z]+/.test(i)&&(f=h[i],g=i.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c("["+(e.slideCount-1)+"]",g+":",f,"("+typeof f+")"),h[g]=f);h=a.extend({},a.fn.cycle.defaults,e,h),h.slideNum=e.slideCount;try{delete h.API,delete h.slideCount,delete h.currSlide,delete h.nextSlide,delete h.slides}catch(j){}return h},getSlideOpts:function(b){var c=this.opts();b===undefined&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(a){var b=this.opts();if(!b._initialized)return;var c=b.API.getSlideOpts(),d=b.slides[b.currSlide];b.slideActiveClass&&b.slides.removeClass(b.slideActiveClass).eq(b.currSlide).addClass(b.slideActiveClass),a&&b.hideNonActive&&b.slides.filter(":not(."+b.slideActiveClass+")").hide(),b.API.trigger("cycle-update-view",[b,c,d])},getComponent:function(b){var c=this.opts(),d=c[b];return typeof d=="string"?/^\s*\>/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;f<h;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=c,a.fn.cycle.version=function(){return"Cycle2: "+b},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,display:"block"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,display:"block"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,display:"block"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,display:"block"},a.cssAfter={zIndex:a._maxZ-2,left:0},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:undefined,manualSpeed:undefined,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:-1},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})})(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{autoHeight:0}),a(document).on("cycle-initialized",function(b,c){function h(){c.container.height(c.container.width()/g)}var d=c.autoHeight,e=-1,f,g;d==="calc"||a.type(d)=="number"&&d>=0?(d==="calc"?c.slides.each(function(b){var c=a(this).height();c>e&&(e=c,d=b)}):d>=c.slides.length&&(d=0),f=a(c.slides[d]).clone(),f.removeAttr("id").find("[id]").removeAttr("id"),f.removeAttr("name").find("[name]").removeAttr("name"),f.css({position:"static",visibility:"hidden",display:"block"}).prependTo(c.container).removeClass().addClass("cycle-sentinel cycle-slide"),f.find("*").css("visibility","hidden"),c._sentinel=f):a.type(d)=="string"&&/\d+\:\d+/.test(d)&&(g=d.match(/(\d+)\:(\d+)/),g=g[1]/g[2],a(window).on("resize",h),c._autoHeightOnResize=h,setTimeout(function(){a(window).triggerHandler("resize")},15))}),a(document).on("cycle-destroyed",function(b,c){c._sentinel&&c._sentinel.remove(),c._autoHeightOnResize&&a(window).off("resize",c._autoHeightOnResize)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>"}),a(document).on("cycle-update-view",function(b,c,d,e){var f;a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"],f=c.API.getComponent(a);f.length&&b?(f.html(c.API.tmpl(b,d,c,e)),f.show()):f.hide()})}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return a.type(c)=="number"?this.cycle("goto",c):a.type(c)=="string"?this.each(function(){var h;d=c,f=a(this).data("cycle.opts");if(f===undefined){b.log('slideshow must be initialized before sending commands; "'+d+'" ignored');return}d=d=="goto"?"jump":d,e=f.API[d];if(a.isFunction(e))return h=a.makeArray(g),h.shift(),e.apply(f.API,h);b.log("unknown command: ",d)}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts(),b=a.reverse?-1:1;if(a.allowWrap===!1&&a.currSlide+b>=a.slideCount)return;a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next")},prev:function(){var a=this.opts(),b=a.reverse?1:-1;if(a.allowWrap===!1&&a.currSlide+b<0)return;a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev")},destroy:function(){var a=this.opts();clearTimeout(a.timeoutId),a.timeoutId=0,a.API.stop(),a.API.trigger("cycle-destroyed",[a]).log("cycle-destroyed"),a.container.removeData("cycle.opts")},jump:function(a){var b,c=this.opts(),d=parseInt(a,10);if(isNaN(d)||d<0||d>=c.slides.length){c.API.log("goto: invalid slide index: "+d);return}if(d==c.currSlide){c.API.log("goto: skipping, already on slide",d);return}c.nextSlide=d,clearTimeout(c.timeoutId),c.timeoutId=0,c.API.log("goto: ",d," (zero-index)"),b=c.currSlide<c.nextSlide,c.API.prepareTx(!0,b)},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},pause:function(){var a=this.opts();a.paused=!0,a.API.trigger("cycle-paused",[a]).log("cycle-paused")},resume:function(){var a=this.opts();a.paused=!1,a.API.trigger("cycle-resumed",[a]).log("cycle-resumed")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){var c=this.opts(),d,e,f=[],g=1;for(var h=0;h<c.slides.length;h++)d=c.slides[h],h==b?e=d:(f.push(d),a(d).data("cycle.opts").slideNum=g,g++);e&&(c.slides=a(f),c.slideCount--,a(e).remove(),b==c.currSlide&&c.API.advanceSlide(1),c.API.trigger("cycle-slide-removed",[c,b,e]).log("cycle-slide-removed"),c.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),function(a){function b(b,c){var d;if(b._hashFence){b._hashFence=!1;return}d=window.location.hash.substring(1),b.slides.each(function(e){if(a(this).data("cycle-hash")==d)return c===!0?b.startingSlide=e:(b.nextSlide=e,b.API.prepareTx(!0,!1)),!1})}"use strict",a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function e(b,e){function h(b){var h;c.loader=="wait"?(f.push(b),g===0&&(f.sort(i),d.apply(c.API,[f,e]),c.container.removeClass("cycle-loading"))):(h=a(c.slides[c.currSlide]),d.apply(c.API,[b,e]),h.show(),c.container.removeClass("cycle-loading"))}function i(a,b){return a.data("index")-b.data("index")}var f=[];b=a(b);var g=b.length;b.hide().appendTo("body").each(function(b){function l(){--i===0&&(--g,h(j))}var i=0,j=a(this),k=j.is("img")?j:j.find("img");j.data("index",b),k=k.filter(":not(.cycle-loader-ignore)");if(!k.length){--g,f.push(j);return}i=k.length,k.each(function(){this.complete?l():a(this).load(function(){l()}).error(function(){--i===0&&(c.API.log("slide skipped; img not loaded:",this.src),--g===0&&c.loader=="wait"&&d.apply(c.API,[f,e]))})})}),g&&c.container.addClass("cycle-loading")}var d;if(!c.loader)return;d=c.API.add,c.API.add=e})}(jQuery),function(a){function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,b,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts(),d=a.children().index(b),e=d,f=c.currSlide<e;if(c.currSlide==e)return;c.nextSlide=e,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b])}"use strict",a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:"<span>•</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d,e){if(c.pager){var f=c.API.getComponent("pager");f.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c,d){var e;c.pager&&(e=c.API.getComponent("pager"),e.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c;b.pager&&b.pagerTemplate&&(c=b.API.getComponent("pager"),c.empty())})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){b.API.getComponent("next").off(b.nextEvent).on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").off(b.prevEvent).on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()});if(b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(a){b.API.next()}),b.container.on(d,function(){b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b,c,d){if(b.allowWrap)return;var e=b.disabledClass,f=b.API.getComponent("next"),g=b.API.getComponent("prev"),h=b._prevBoundry||0,i=b._nextBoundry||b.slideCount-1;b.currSlide==i?f.addClass(e).prop("disabled",!0):f.removeClass(e).prop("disabled",!1),b.currSlide===h?g.addClass(e).prop("disabled",!0):g.removeClass(e).prop("disabled",!1)}),a(document).on("cycle-destroyed",function(b,c){a(c.next).off(c.nextEvent),a(c.prev).off(c.prevEvent),c.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(!c.progressive)return;var d=c.API,e=d.next,f=d.prev,g=d.prepareTx,h,i=a.type(c.progressive);if(i=="array")h=c.progressive;else if(a.isFunction(c.progressive))h=c.progressive(c);else if(i=="string"){h=a(c.progressive).html();if(!a.trim(h))return;try{h=a.parseJSON(h)}catch(j){d.log("error parsing progressive slides",j);return}}g&&(d.prepareTx=function(a,b){var d,e;if(a||h.length===0){g.apply(c.API,[a,b]);return}b&&c.currSlide==c.slideCount-1?(e=h[0],h=h.slice(1),c.container.one("cycle-slide-added",function(a,b){b.API.advanceSlide(1)}),c.API.add(e)):!b&&c.currSlide===0?(d=h.length-1,e=h[d],h=h.slice(0,d),c.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1)}),c.API.add(e,!0)):g.apply(c.API,[a,b])}),e&&(d.next=function(){var a=this.opts();if(h.length&&a.currSlide==a.slideCount-1){var b=h[0];h=h.slice(1),a.container.one("cycle-slide-added",function(a,b){e.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else e.apply(a.API)}),f&&(d.prev=function(){var a=this.opts();if(h.length&&a.currSlide===0){var b=h.length-1,c=h[b];h=h.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else f.apply(a.API)})})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(b,c){var d=new RegExp(c.tmplRegex||a.fn.cycle.defaults.tmplRegex,"g"),e=a.makeArray(arguments);return e.shift(),b.replace(d,function(b,c){var d,f,g,h,i=c.split(".");for(d=0;d<e.length;d++){g=e[d];if(i.length>1){h=g;for(f=0;f<i.length;f++)g=h,h=h[i[f]]||c}else h=g[c];if(a.isFunction(h))return h.apply(g,e);if(h!==undefined&&h!==null&&h!=c)return h}return c})}})}(jQuery);
|
js/jquery.cycle2.tile.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver:
|
2 |
-
(function(a){"use strict",a.fn.cycle.transitions.tileSlide=a.fn.cycle.transitions.tileBlind={before:function(b,c,d,e){b.API.stackSlides(c,d,e),a(c).show(),b.container.css("overflow","hidden"),b.tileDelay=b.tileDelay||b.fx=="tileSlide"?100:125,b.tileCount=b.tileCount||7,b.tileVertical=b.tileVertical!==!1,b.container.data("cycleTileInitialized")||(b.container.on("cycle-destroyed",this.onDestroy),b.container.data("cycleTileInitialized",!0))},transition:function(b,c,d,e,f){function w(a){g.eq(a).animate(s,{duration:b.speed,easing:b.easing,complete:function(){(e?o-1===a:0===a)&&b._tileAniCallback()}}),setTimeout(function(){(e?o-1!==a:0!==a)&&w(e?a+1:a-1)},b.tileDelay)}b.slides.not(c).not(d).hide();var g=a(),h=a(c),i=a(d),j,k,l,m,n,o=b.tileCount,p=b.tileVertical,q=b.container.height(),r=b.container.width();p?(k=Math.floor(r/o),m=r-k*(o-1),l=n=q):(k=m=r,l=Math.floor(q/o),n=q-l*(o-1)),b.container.find(".cycle-tiles-container").remove();var s,t={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};p?s=b.fx=="tileSlide"?{top:q}:{width:0}:s=b.fx=="tileSlide"?{left:r}:{height:0};var u=a('<div class="cycle-tiles-container"></div>');u.css({zIndex:h.css("z-index"),overflow:"visible",position:"absolute",top:0}),u.insertBefore(d);for(var v=0;v<o;v++)j=a("<div></div>").css(t).css({width:o-1===v?m:k,height:o-1===v?n:l,marginLeft:p?v*k:0,marginTop:p?0:v*l}).append(h.clone().css({position:"relative",maxWidth:"none",width:h.width(),margin:0,padding:0,marginLeft:p?-(v*k):0,marginTop:p?0:-(v*l)})),g=g.add(j);u.append(g),h.hide(),i.show().css("opacity",1),w(e?0:o-1),b._tileAniCallback=function(){i.show(),h.hide(),u.remove(),f()}},stopTransition:function(a){a.container.find("*").stop(!0,!0),a._tileAniCallback&&a._tileAniCallback()},onDestroy:function(a){var b=this.opts();b.container.find(".cycle-tiles-container").remove()}}})(jQuery);
|
1 |
+
/*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: 20121120 */
|
2 |
+
(function(a){"use strict",a.fn.cycle.transitions.tileSlide=a.fn.cycle.transitions.tileBlind={before:function(b,c,d,e){b.API.stackSlides(c,d,e),a(c).show(),b.container.css("overflow","hidden"),b.tileDelay=b.tileDelay||b.fx=="tileSlide"?100:125,b.tileCount=b.tileCount||7,b.tileVertical=b.tileVertical!==!1,b.container.data("cycleTileInitialized")||(b.container.on("cycle-destroyed",a.proxy(this.onDestroy,b.API)),b.container.data("cycleTileInitialized",!0))},transition:function(b,c,d,e,f){function w(a){g.eq(a).animate(s,{duration:b.speed,easing:b.easing,complete:function(){(e?o-1===a:0===a)&&b._tileAniCallback()}}),setTimeout(function(){(e?o-1!==a:0!==a)&&w(e?a+1:a-1)},b.tileDelay)}b.slides.not(c).not(d).hide();var g=a(),h=a(c),i=a(d),j,k,l,m,n,o=b.tileCount,p=b.tileVertical,q=b.container.height(),r=b.container.width();p?(k=Math.floor(r/o),m=r-k*(o-1),l=n=q):(k=m=r,l=Math.floor(q/o),n=q-l*(o-1)),b.container.find(".cycle-tiles-container").remove();var s,t={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};p?s=b.fx=="tileSlide"?{top:q}:{width:0}:s=b.fx=="tileSlide"?{left:r}:{height:0};var u=a('<div class="cycle-tiles-container"></div>');u.css({zIndex:h.css("z-index"),overflow:"visible",position:"absolute",top:0}),u.insertBefore(d);for(var v=0;v<o;v++)j=a("<div></div>").css(t).css({width:o-1===v?m:k,height:o-1===v?n:l,marginLeft:p?v*k:0,marginTop:p?0:v*l}).append(h.clone().css({position:"relative",maxWidth:"none",width:h.width(),margin:0,padding:0,marginLeft:p?-(v*k):0,marginTop:p?0:-(v*l)})),g=g.add(j);u.append(g),h.hide(),i.show().css("opacity",1),w(e?0:o-1),b._tileAniCallback=function(){i.show(),h.hide(),u.remove(),f()}},stopTransition:function(a){a.container.find("*").stop(!0,!0),a._tileAniCallback&&a._tileAniCallback()},onDestroy:function(a){var b=this.opts();b.container.find(".cycle-tiles-container").remove()}}})(jQuery);
|
lang/cycloneslider-de_DE.mo
CHANGED
Binary file
|
lang/cycloneslider-de_DE.po
CHANGED
@@ -1,219 +1,268 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Cyclone Slider\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: kosinix <kosinix@codefleet.net>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;_x\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-Language: German\n"
|
15 |
-
"X-Poedit-Country: GERMANY\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-SearchPath-0: D:\\webserver\\htdocs\\wp3\\wp-content\\plugins\\cyclone-slider\n"
|
18 |
-
|
19 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
20 |
-
msgid "Cyclone Slider"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
24 |
-
msgid "Slideshow"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
28 |
-
msgid "Add Slideshow"
|
29 |
-
msgstr "Slideshow hinzufügen"
|
30 |
-
|
31 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
32 |
-
msgid "Add New Slideshow"
|
33 |
-
msgstr "Neuer Slideshow"
|
34 |
-
|
35 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
36 |
-
msgid "Edit Slideshow"
|
37 |
-
msgstr "Bearbeiten Slideshow"
|
38 |
-
|
39 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
40 |
-
msgid "New Slideshow"
|
41 |
-
msgstr "Neue Slideshow"
|
42 |
-
|
43 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
44 |
-
msgid "View Slideshow"
|
45 |
-
msgstr "Sehen Slideshow"
|
46 |
-
|
47 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
48 |
-
msgid "Search Slideshows"
|
49 |
-
msgstr "Suchen Slideshows"
|
50 |
-
|
51 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
52 |
-
msgid "No slideshows found"
|
53 |
-
msgstr "Keine Slideshows gefunden"
|
54 |
-
|
55 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
56 |
-
msgid "No slideshows found in Trash"
|
57 |
-
msgstr "Keine Diashows in Trash gefunden"
|
58 |
-
|
59 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
73 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
74 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
75 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/
|
104 |
-
msgid "
|
105 |
-
msgstr "
|
106 |
-
|
107 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
108 |
-
msgid "
|
109 |
-
msgstr "
|
110 |
-
|
111 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
112 |
-
msgid "Transition Effects
|
113 |
-
msgstr "Transition Effects
|
114 |
-
|
115 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
116 |
-
msgid "
|
117 |
-
msgstr "
|
118 |
-
|
119 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
120 |
-
msgid "
|
121 |
-
msgstr "
|
122 |
-
|
123 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
151 |
-
msgid "
|
152 |
-
msgstr "
|
153 |
-
|
154 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
177 |
-
msgid "
|
178 |
-
msgstr "
|
179 |
-
|
180 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
202 |
-
msgid "
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Cyclone Slider\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-12-13 11:09+0800\n"
|
6 |
+
"PO-Revision-Date: 2012-12-13 11:09+0800\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: kosinix <kosinix@codefleet.net>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: German\n"
|
15 |
+
"X-Poedit-Country: GERMANY\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: D:\\webserver\\htdocs\\wp3\\wp-content\\plugins\\cyclone-slider\n"
|
18 |
+
|
19 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:155
|
20 |
+
msgid "Cyclone Slider"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:156
|
24 |
+
msgid "Slideshow"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:157
|
28 |
+
msgid "Add Slideshow"
|
29 |
+
msgstr "Slideshow hinzufügen"
|
30 |
+
|
31 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:158
|
32 |
+
msgid "Add New Slideshow"
|
33 |
+
msgstr "Neuer Slideshow"
|
34 |
+
|
35 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:159
|
36 |
+
msgid "Edit Slideshow"
|
37 |
+
msgstr "Bearbeiten Slideshow"
|
38 |
+
|
39 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:160
|
40 |
+
msgid "New Slideshow"
|
41 |
+
msgstr "Neue Slideshow"
|
42 |
+
|
43 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:161
|
44 |
+
msgid "View Slideshow"
|
45 |
+
msgstr "Sehen Slideshow"
|
46 |
+
|
47 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:162
|
48 |
+
msgid "Search Slideshows"
|
49 |
+
msgstr "Suchen Slideshows"
|
50 |
+
|
51 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:163
|
52 |
+
msgid "No slideshows found"
|
53 |
+
msgstr "Keine Slideshows gefunden"
|
54 |
+
|
55 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:164
|
56 |
+
msgid "No slideshows found in Trash"
|
57 |
+
msgstr "Keine Diashows in Trash gefunden"
|
58 |
+
|
59 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:180
|
60 |
+
#, php-format
|
61 |
+
msgid "Slideshow updated. Shortcode is [cycloneslider id=\"%s\"]"
|
62 |
+
msgstr "Slideshow aktualisiert. Shortcode ist [cycloneslider id=\"%s\"]"
|
63 |
+
|
64 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:181
|
65 |
+
msgid "Custom field updated."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:182
|
69 |
+
msgid "Custom field deleted."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:183
|
73 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:184
|
74 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:187
|
75 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:188
|
76 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:189
|
77 |
+
msgid "Slideshow updated."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:185
|
81 |
+
#, php-format
|
82 |
+
msgid "Slideshow published. Shortcode is [cycloneslider id=\"%s\"]"
|
83 |
+
msgstr "Slideshow veröffentlicht. Shortcode ist [cycloneslider id=\"%s\"]"
|
84 |
+
|
85 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:186
|
86 |
+
msgid "Slideshow saved."
|
87 |
+
msgstr "Slideshow gespeichert."
|
88 |
+
|
89 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:198
|
90 |
+
msgid "Slides"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:206
|
94 |
+
msgid "Slider Settings"
|
95 |
+
msgstr "Slider-Einstellungen"
|
96 |
+
|
97 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:214
|
98 |
+
#, fuzzy
|
99 |
+
msgid "Slider Templates"
|
100 |
+
msgstr "Slider-Einstellungen"
|
101 |
+
|
102 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:270
|
103 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:4
|
104 |
+
msgid "Slide"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:278
|
108 |
+
msgid "Add Slide"
|
109 |
+
msgstr "Folie hinzufügen"
|
110 |
+
|
111 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:299
|
112 |
+
msgid "Transition Effects to Use:"
|
113 |
+
msgstr "Transition Effects zu verwenden:"
|
114 |
+
|
115 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:310
|
116 |
+
msgid "Next Slide Delay:"
|
117 |
+
msgstr "Next Slide Verzögerung:"
|
118 |
+
|
119 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:312
|
120 |
+
msgid "Milliseconds. 0 to disable auto advance."
|
121 |
+
msgstr "Millisekunden. 0 deaktiviert auto Voraus."
|
122 |
+
|
123 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:316
|
124 |
+
msgid "Transition Effects Speed:"
|
125 |
+
msgstr "Transition Effects Speed:"
|
126 |
+
|
127 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:318
|
128 |
+
msgid "Milliseconds"
|
129 |
+
msgstr "Millisekunden"
|
130 |
+
|
131 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:322
|
132 |
+
msgid "Width:"
|
133 |
+
msgstr "Breite:"
|
134 |
+
|
135 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:324
|
136 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:330
|
137 |
+
msgid "pixels."
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:328
|
141 |
+
msgid "Height:"
|
142 |
+
msgstr "Höhe:"
|
143 |
+
|
144 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:334
|
145 |
+
msgid "Pause on Hover?"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:336
|
149 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:344
|
150 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:352
|
151 |
+
msgid "Yes"
|
152 |
+
msgstr "Ja"
|
153 |
+
|
154 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:337
|
155 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:345
|
156 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:353
|
157 |
+
msgid "No"
|
158 |
+
msgstr "Nicht"
|
159 |
+
|
160 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:342
|
161 |
+
msgid "Show Prev/Next Buttons?"
|
162 |
+
msgstr "eige Tasten PREV / NEXT?"
|
163 |
+
|
164 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:350
|
165 |
+
msgid "Show Navigation?"
|
166 |
+
msgstr "Zeige Navigation?"
|
167 |
+
|
168 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:379
|
169 |
+
msgid "Select Template to Use:"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:491
|
173 |
+
msgid "Slideshow Name"
|
174 |
+
msgstr "Slideshow Namen"
|
175 |
+
|
176 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:492
|
177 |
+
msgid "Slideshow ID"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:493
|
181 |
+
msgid "Shortcode"
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:595
|
185 |
+
msgid "[Slideshow not found]"
|
186 |
+
msgstr "[Slideshow nicht gefunden]"
|
187 |
+
|
188 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:620
|
189 |
+
#, php-format
|
190 |
+
msgid "[Template \"%s\" not found]"
|
191 |
+
msgstr "[Template \"%s\" nicht gefunden]"
|
192 |
+
|
193 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:33
|
194 |
+
msgid "NextGEN Integration"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:53
|
198 |
+
msgid "Choose a NextGEN Gallery"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:63
|
202 |
+
msgid "Import"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:65
|
206 |
+
msgid "Select a gallery to import images from. Images will be added as new slides."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:7
|
210 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:7
|
211 |
+
msgid "Drag"
|
212 |
+
msgstr "Ziehen"
|
213 |
+
|
214 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:8
|
215 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:8
|
216 |
+
msgid "Toggle"
|
217 |
+
msgstr "Wechseln"
|
218 |
+
|
219 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:9
|
220 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:9
|
221 |
+
msgid "Delete"
|
222 |
+
msgstr "löschen"
|
223 |
+
|
224 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:18
|
225 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:18
|
226 |
+
msgid "Get Image"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:21
|
230 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:21
|
231 |
+
msgid "Extra slide elements:"
|
232 |
+
msgstr "Zusätzliche Gleitelemente:"
|
233 |
+
|
234 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:25
|
235 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:25
|
236 |
+
msgid "Slide Link"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:28
|
240 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:28
|
241 |
+
msgid "Link:"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:30
|
245 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:30
|
246 |
+
msgid "Open Link in:"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:32
|
250 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:32
|
251 |
+
msgid "Same Window"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:33
|
255 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:33
|
256 |
+
msgid "New Tab or Window"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:39
|
260 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:39
|
261 |
+
msgid "Title"
|
262 |
+
msgstr "Titel"
|
263 |
+
|
264 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:47
|
265 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:47
|
266 |
+
msgid "Description"
|
267 |
+
msgstr "Beschreibung"
|
268 |
+
|
lang/cycloneslider.pot
CHANGED
@@ -1,222 +1,267 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Cyclone Slider 1.0.0\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: kosinix <kosinix@codefleet.net>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;_x\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-Language: English\n"
|
15 |
-
"X-Poedit-Country: UNITED STATES\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-SearchPath-0: D:\\webserver\\htdocs\\wp3\\wp-content\\plugins\\cyclone-slider\n"
|
18 |
-
|
19 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
20 |
-
msgid "Cyclone Slider"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
24 |
-
msgid "Slideshow"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
28 |
-
msgid "Add Slideshow"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
32 |
-
msgid "Add New Slideshow"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
36 |
-
msgid "Edit Slideshow"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
40 |
-
msgid "New Slideshow"
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
44 |
-
msgid "View Slideshow"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
48 |
-
msgid "Search Slideshows"
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
52 |
-
msgid "No slideshows found"
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
56 |
-
msgid "No slideshows found in Trash"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
60 |
-
#, php-format
|
61 |
-
msgid "Slideshow updated. Shortcode is [cycloneslider id=\"%s\"]"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
65 |
-
msgid "Custom field updated."
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
69 |
-
msgid "Custom field deleted."
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
73 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
74 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
75 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
76 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
77 |
-
msgid "Slideshow updated."
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
81 |
-
#, php-format
|
82 |
-
msgid "Slideshow published. Shortcode is [cycloneslider id=\"%s\"]"
|
83 |
-
msgstr ""
|
84 |
-
|
85 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
86 |
-
msgid "Slideshow saved."
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
90 |
-
msgid "Slides"
|
91 |
-
msgstr ""
|
92 |
-
|
93 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
94 |
-
msgid "Slider Settings"
|
95 |
-
msgstr ""
|
96 |
-
|
97 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
98 |
-
msgid "
|
99 |
-
msgstr ""
|
100 |
-
|
101 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
127 |
-
msgid "
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
131 |
-
msgid "
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
140 |
-
msgid "
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
180 |
-
msgid "
|
181 |
-
msgstr ""
|
182 |
-
|
183 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/
|
205 |
-
msgid "
|
206 |
-
msgstr ""
|
207 |
-
|
208 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:
|
209 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:
|
210 |
-
msgid "
|
211 |
-
msgstr ""
|
212 |
-
|
213 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:
|
214 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:
|
215 |
-
msgid "
|
216 |
-
msgstr ""
|
217 |
-
|
218 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:
|
219 |
-
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:
|
220 |
-
msgid "
|
221 |
-
msgstr ""
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Cyclone Slider 1.0.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-12-13 11:10+0800\n"
|
6 |
+
"PO-Revision-Date: 2012-12-13 11:10+0800\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: kosinix <kosinix@codefleet.net>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-Country: UNITED STATES\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: D:\\webserver\\htdocs\\wp3\\wp-content\\plugins\\cyclone-slider\n"
|
18 |
+
|
19 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:155
|
20 |
+
msgid "Cyclone Slider"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:156
|
24 |
+
msgid "Slideshow"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:157
|
28 |
+
msgid "Add Slideshow"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:158
|
32 |
+
msgid "Add New Slideshow"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:159
|
36 |
+
msgid "Edit Slideshow"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:160
|
40 |
+
msgid "New Slideshow"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:161
|
44 |
+
msgid "View Slideshow"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:162
|
48 |
+
msgid "Search Slideshows"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:163
|
52 |
+
msgid "No slideshows found"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:164
|
56 |
+
msgid "No slideshows found in Trash"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:180
|
60 |
+
#, php-format
|
61 |
+
msgid "Slideshow updated. Shortcode is [cycloneslider id=\"%s\"]"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:181
|
65 |
+
msgid "Custom field updated."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:182
|
69 |
+
msgid "Custom field deleted."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:183
|
73 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:184
|
74 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:187
|
75 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:188
|
76 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:189
|
77 |
+
msgid "Slideshow updated."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:185
|
81 |
+
#, php-format
|
82 |
+
msgid "Slideshow published. Shortcode is [cycloneslider id=\"%s\"]"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:186
|
86 |
+
msgid "Slideshow saved."
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:198
|
90 |
+
msgid "Slides"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:206
|
94 |
+
msgid "Slider Settings"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:214
|
98 |
+
msgid "Slider Templates"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:270
|
102 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:4
|
103 |
+
msgid "Slide"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:278
|
107 |
+
msgid "Add Slide"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:299
|
111 |
+
msgid "Transition Effects to Use:"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:310
|
115 |
+
msgid "Next Slide Delay:"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:312
|
119 |
+
msgid "Milliseconds. 0 to disable auto advance."
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:316
|
123 |
+
msgid "Transition Effects Speed:"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:318
|
127 |
+
msgid "Milliseconds"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:322
|
131 |
+
msgid "Width:"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:324
|
135 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:330
|
136 |
+
msgid "pixels."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:328
|
140 |
+
msgid "Height:"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:334
|
144 |
+
msgid "Pause on Hover?"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:336
|
148 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:344
|
149 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:352
|
150 |
+
msgid "Yes"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:337
|
154 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:345
|
155 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:353
|
156 |
+
msgid "No"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:342
|
160 |
+
msgid "Show Prev/Next Buttons?"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:350
|
164 |
+
msgid "Show Navigation?"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:379
|
168 |
+
msgid "Select Template to Use:"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:491
|
172 |
+
msgid "Slideshow Name"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:492
|
176 |
+
msgid "Slideshow ID"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:493
|
180 |
+
msgid "Shortcode"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:595
|
184 |
+
msgid "[Slideshow not found]"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-cyclone-slider.php:620
|
188 |
+
#, php-format
|
189 |
+
msgid "[Template \"%s\" not found]"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:33
|
193 |
+
msgid "NextGEN Integration"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:53
|
197 |
+
msgid "Choose a NextGEN Gallery"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:63
|
201 |
+
msgid "Import"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/class-nextgen-integration.php:65
|
205 |
+
msgid "Select a gallery to import images from. Images will be added as new slides."
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:7
|
209 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:7
|
210 |
+
msgid "Drag"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:8
|
214 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:8
|
215 |
+
msgid "Toggle"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:9
|
219 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:9
|
220 |
+
msgid "Delete"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:18
|
224 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:18
|
225 |
+
msgid "Get Image"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:21
|
229 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:21
|
230 |
+
msgid "Extra slide elements:"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:25
|
234 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:25
|
235 |
+
msgid "Slide Link"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:28
|
239 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:28
|
240 |
+
msgid "Link:"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:30
|
244 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:30
|
245 |
+
msgid "Open Link in:"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:32
|
249 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:32
|
250 |
+
msgid "Same Window"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:33
|
254 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:33
|
255 |
+
msgid "New Tab or Window"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:39
|
259 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:39
|
260 |
+
msgid "Title"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:47
|
264 |
+
#: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:47
|
265 |
+
msgid "Description"
|
266 |
+
msgstr ""
|
267 |
+
|
screenshot-2.jpg
CHANGED
Binary file
|
templates/black/screenshot.jpg
ADDED
Binary file
|
templates/black/slider.php
CHANGED
@@ -1,27 +1,15 @@
|
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-black" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
-
<div class="cycloneslider-slides cycle-slideshow"
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
data-cycle-pager="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-pager"
|
11 |
-
data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
|
12 |
-
data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
|
13 |
-
>
|
14 |
-
<?php foreach($slides as $i=>$slide):
|
15 |
-
|
16 |
-
?>
|
17 |
-
<div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
|
18 |
-
<?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
|
19 |
-
<img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
|
20 |
-
<?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
|
21 |
-
<?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
|
22 |
<div class="cycloneslider-caption">
|
23 |
-
<div class="cycloneslider-caption-title"><?php echo $
|
24 |
-
<div class="cycloneslider-caption-description"><?php echo $
|
25 |
</div>
|
26 |
<?php endif; ?>
|
27 |
</div>
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-black" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
+
<div class="cycloneslider-slides cycle-slideshow" <?php echo cycloneslider_settings($slider_settings, $slider_id); ?>>
|
4 |
+
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
5 |
+
<div class="cycloneslider-slide" <?php echo cycloneslider_slide_settings($slider_meta); ?>>
|
6 |
+
<?php if ($slider_meta['link']!='') : ?><a target="<?php echo ('_blank'==$slider_meta['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_meta['link'];?>"><?php endif; ?>
|
7 |
+
<img src="<?php echo cycloneslider_thumb($slider_meta['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_meta); ?>" alt="<?php echo $slider_meta['img_alt'];?>" title="<?php echo $slider_meta['img_title'];?>" />
|
8 |
+
<?php if ($slider_meta['link']!='') : ?></a><?php endif; ?>
|
9 |
+
<?php if(!empty($slider_meta['title']) or !empty($slider_meta['description'])) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<div class="cycloneslider-caption">
|
11 |
+
<div class="cycloneslider-caption-title"><?php echo $slider_meta['title'];?></div>
|
12 |
+
<div class="cycloneslider-caption-description"><?php echo $slider_meta['description'];?></div>
|
13 |
</div>
|
14 |
<?php endif; ?>
|
15 |
</div>
|
templates/blue/screenshot.jpg
ADDED
Binary file
|
templates/blue/slider.php
CHANGED
@@ -1,27 +1,15 @@
|
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-blue" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
-
<div class="cycloneslider-slides cycle-slideshow"
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
data-cycle-pager="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-pager"
|
11 |
-
data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
|
12 |
-
data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
|
13 |
-
>
|
14 |
-
<?php foreach($slides as $i=>$slide):
|
15 |
-
|
16 |
-
?>
|
17 |
-
<div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
|
18 |
-
<?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
|
19 |
-
<img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
|
20 |
-
<?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
|
21 |
-
<?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
|
22 |
<div class="cycloneslider-caption">
|
23 |
-
<div class="cycloneslider-caption-title"><?php echo $
|
24 |
-
<div class="cycloneslider-caption-description"><?php echo $
|
25 |
</div>
|
26 |
<?php endif; ?>
|
27 |
</div>
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-blue" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
+
<div class="cycloneslider-slides cycle-slideshow" <?php echo cycloneslider_settings($slider_settings, $slider_id); ?>>
|
4 |
+
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
5 |
+
<div class="cycloneslider-slide" <?php echo cycloneslider_slide_settings($slider_meta); ?>>
|
6 |
+
<?php if ($slider_meta['link']!='') : ?><a target="<?php echo ('_blank'==$slider_meta['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_meta['link'];?>"><?php endif; ?>
|
7 |
+
<img src="<?php echo cycloneslider_thumb($slider_meta['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_meta); ?>" alt="<?php echo $slider_meta['img_alt'];?>" title="<?php echo $slider_meta['img_title'];?>" />
|
8 |
+
<?php if ($slider_meta['link']!='') : ?></a><?php endif; ?>
|
9 |
+
<?php if(!empty($slider_meta['title']) or !empty($slider_meta['description'])) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<div class="cycloneslider-caption">
|
11 |
+
<div class="cycloneslider-caption-title"><?php echo $slider_meta['title'];?></div>
|
12 |
+
<div class="cycloneslider-caption-description"><?php echo $slider_meta['description'];?></div>
|
13 |
</div>
|
14 |
<?php endif; ?>
|
15 |
</div>
|
templates/default/screenshot.jpg
ADDED
Binary file
|
templates/default/slider.php
CHANGED
@@ -1,25 +1,15 @@
|
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-default" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
-
<div class="cycloneslider-slides cycle-slideshow"
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
data-cycle-pager="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-pager"
|
11 |
-
data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
|
12 |
-
data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
|
13 |
-
>
|
14 |
-
<?php foreach($slides as $i=>$slide): ?>
|
15 |
-
<div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
|
16 |
-
<?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
|
17 |
-
<img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
|
18 |
-
<?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
|
19 |
-
<?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
|
20 |
<div class="cycloneslider-caption">
|
21 |
-
<div class="cycloneslider-caption-title"><?php echo $
|
22 |
-
<div class="cycloneslider-caption-description"><?php echo $
|
23 |
</div>
|
24 |
<?php endif; ?>
|
25 |
</div>
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-default" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
+
<div class="cycloneslider-slides cycle-slideshow" <?php echo cycloneslider_settings($slider_settings, $slider_id); ?>>
|
4 |
+
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
5 |
+
<div class="cycloneslider-slide" <?php echo cycloneslider_slide_settings($slider_meta); ?>>
|
6 |
+
<?php if ($slider_meta['link']!='') : ?><a target="<?php echo ('_blank'==$slider_meta['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_meta['link'];?>"><?php endif; ?>
|
7 |
+
<img src="<?php echo cycloneslider_thumb($slider_meta['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_meta); ?>" alt="<?php echo $slider_meta['img_alt'];?>" title="<?php echo $slider_meta['img_title'];?>" />
|
8 |
+
<?php if ($slider_meta['link']!='') : ?></a><?php endif; ?>
|
9 |
+
<?php if(!empty($slider_meta['title']) or !empty($slider_meta['description'])) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<div class="cycloneslider-caption">
|
11 |
+
<div class="cycloneslider-caption-title"><?php echo $slider_meta['title'];?></div>
|
12 |
+
<div class="cycloneslider-caption-description"><?php echo $slider_meta['description'];?></div>
|
13 |
</div>
|
14 |
<?php endif; ?>
|
15 |
</div>
|
templates/myrtle/screenshot.jpg
ADDED
Binary file
|
templates/myrtle/slider.php
CHANGED
@@ -1,25 +1,15 @@
|
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-myrtle" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
-
<div class="cycloneslider-slides cycle-slideshow"
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
data-cycle-pager="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-pager"
|
11 |
-
data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
|
12 |
-
data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
|
13 |
-
>
|
14 |
-
<?php foreach($slides as $i=>$slide): ?>
|
15 |
-
<div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
|
16 |
-
<?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
|
17 |
-
<img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
|
18 |
-
<?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
|
19 |
-
<?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
|
20 |
<div class="cycloneslider-caption">
|
21 |
-
<div class="cycloneslider-caption-title"><?php echo $
|
22 |
-
<div class="cycloneslider-caption-description"><?php echo $
|
23 |
</div>
|
24 |
<?php endif; ?>
|
25 |
</div>
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-myrtle" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
+
<div class="cycloneslider-slides cycle-slideshow" <?php echo cycloneslider_settings($slider_settings, $slider_id); ?>>
|
4 |
+
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
5 |
+
<div class="cycloneslider-slide" <?php echo cycloneslider_slide_settings($slider_meta); ?>>
|
6 |
+
<?php if ($slider_meta['link']!='') : ?><a target="<?php echo ('_blank'==$slider_meta['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_meta['link'];?>"><?php endif; ?>
|
7 |
+
<img src="<?php echo cycloneslider_thumb($slider_meta['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_meta); ?>" alt="<?php echo $slider_meta['img_alt'];?>" title="<?php echo $slider_meta['img_title'];?>" />
|
8 |
+
<?php if ($slider_meta['link']!='') : ?></a><?php endif; ?>
|
9 |
+
<?php if(!empty($slider_meta['title']) or !empty($slider_meta['description'])) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<div class="cycloneslider-caption">
|
11 |
+
<div class="cycloneslider-caption-title"><?php echo $slider_meta['title'];?></div>
|
12 |
+
<div class="cycloneslider-caption-description"><?php echo $slider_meta['description'];?></div>
|
13 |
</div>
|
14 |
<?php endif; ?>
|
15 |
</div>
|
templates/myrtle/style.css
CHANGED
@@ -2,10 +2,7 @@
|
|
2 |
.cycloneslider-template-myrtle{
|
3 |
overflow:hidden;
|
4 |
}
|
5 |
-
|
6 |
-
max-width:100%;
|
7 |
-
max-height:100%;
|
8 |
-
}
|
9 |
.cycloneslider-template-myrtle .cycloneslider-prev,
|
10 |
.cycloneslider-template-myrtle .cycloneslider-next{
|
11 |
display:none;
|
2 |
.cycloneslider-template-myrtle{
|
3 |
overflow:hidden;
|
4 |
}
|
5 |
+
|
|
|
|
|
|
|
6 |
.cycloneslider-template-myrtle .cycloneslider-prev,
|
7 |
.cycloneslider-template-myrtle .cycloneslider-next{
|
8 |
display:none;
|
templates/thumbnails/screenshot.jpg
ADDED
Binary file
|
templates/thumbnails/script.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function(){
|
2 |
+
jQuery('.cycloneslider-template-thumbnails').each(function(i,el){
|
3 |
+
|
4 |
+
var main = jQuery(el);
|
5 |
+
var slideshow = main.children('.cycloneslider-slides');
|
6 |
+
var thumbnails = main.next();
|
7 |
+
|
8 |
+
thumbnails.find('li:first').addClass('current');
|
9 |
+
slideshow.on( 'cycle-before', function( event, optionHash ) {
|
10 |
+
var i = optionHash.nextSlide;
|
11 |
+
thumbnails.find('li').removeClass('current').eq(i).addClass('current');
|
12 |
+
});
|
13 |
+
thumbnails.on('click', 'li', function(){
|
14 |
+
var i = jQuery(this).index();
|
15 |
+
slideshow.cycle('goto', i);
|
16 |
+
});
|
17 |
+
});
|
18 |
+
});
|
templates/thumbnails/slider.php
CHANGED
@@ -1,25 +1,15 @@
|
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-thumbnails" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
-
<div class="cycloneslider-slides cycle-slideshow"
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
data-cycle-pager="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-pager"
|
11 |
-
data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
|
12 |
-
data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
|
13 |
-
>
|
14 |
-
<?php foreach($slides as $i=>$slide): ?>
|
15 |
-
<div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
|
16 |
-
<?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
|
17 |
-
<img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
|
18 |
-
<?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
|
19 |
-
<?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
|
20 |
<div class="cycloneslider-caption">
|
21 |
-
<div class="cycloneslider-caption-title"><?php echo $
|
22 |
-
<div class="cycloneslider-caption-description"><?php echo $
|
23 |
</div>
|
24 |
<?php endif; ?>
|
25 |
</div>
|
@@ -35,27 +25,9 @@
|
|
35 |
<ul class="clearfix">
|
36 |
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
37 |
<li>
|
38 |
-
<img src="<?php echo cycloneslider_thumb( $slider_meta['id'], 30, 30, false, $slider_meta ) ?>" alt="" />
|
39 |
</li>
|
40 |
<?php endforeach; ?>
|
41 |
</ul>
|
42 |
</div>
|
43 |
-
<?php endif; ?>
|
44 |
-
<script type="text/javascript">
|
45 |
-
jQuery(document).ready(function(){
|
46 |
-
(function() {
|
47 |
-
var start = true;
|
48 |
-
var slider = jQuery('#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-slides');
|
49 |
-
var thumbnails = jQuery('#cycloneslider-thumbnails-<?php echo $slider_id; ?>');
|
50 |
-
thumbnails.find('li:first').addClass('current');
|
51 |
-
slider.on( 'cycle-before', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
52 |
-
var i = optionHash.nextSlide;
|
53 |
-
thumbnails.find('li').removeClass('current').eq(i).addClass('current');
|
54 |
-
});
|
55 |
-
thumbnails.on('click', 'li', function(){
|
56 |
-
var i = jQuery(this).index();
|
57 |
-
slider.cycle('goto', i);
|
58 |
-
});
|
59 |
-
})();
|
60 |
-
});
|
61 |
-
</script>
|
1 |
<?php if($slider_count>0) $slider_id = $slider_id.'-'.$slider_count; ?>
|
2 |
<div class="cycloneslider cycloneslider-template-thumbnails" id="cycloneslider-<?php echo $slider_id; ?>" style="max-width:<?php echo $slider_settings['width']; ?>px">
|
3 |
+
<div class="cycloneslider-slides cycle-slideshow" <?php echo cycloneslider_settings($slider_settings, $slider_id); ?>>
|
4 |
+
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
5 |
+
<div class="cycloneslider-slide" <?php echo cycloneslider_slide_settings($slider_meta); ?>>
|
6 |
+
<?php if ($slider_meta['link']!='') : ?><a target="<?php echo ('_blank'==$slider_meta['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_meta['link'];?>"><?php endif; ?>
|
7 |
+
<img src="<?php echo cycloneslider_thumb($slider_meta['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_meta); ?>" alt="<?php echo $slider_meta['img_alt'];?>" title="<?php echo $slider_meta['img_title'];?>" />
|
8 |
+
<?php if ($slider_meta['link']!='') : ?></a><?php endif; ?>
|
9 |
+
<?php if(!empty($slider_meta['title']) or !empty($slider_meta['description'])) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<div class="cycloneslider-caption">
|
11 |
+
<div class="cycloneslider-caption-title"><?php echo $slider_meta['title'];?></div>
|
12 |
+
<div class="cycloneslider-caption-description"><?php echo $slider_meta['description'];?></div>
|
13 |
</div>
|
14 |
<?php endif; ?>
|
15 |
</div>
|
25 |
<ul class="clearfix">
|
26 |
<?php foreach($slider_metas as $i=>$slider_meta): ?>
|
27 |
<li>
|
28 |
+
<img src="<?php echo cycloneslider_thumb( $slider_meta['id'], 30, 30, false, $slider_meta ) ?>" alt="<?php echo $slider_meta['img_alt'];?>" title="<?php echo $slider_meta['img_title'];?>" />
|
29 |
</li>
|
30 |
<?php endforeach; ?>
|
31 |
</ul>
|
32 |
</div>
|
33 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|