Cyclone Slider - Version 2.0.0

Version Description

Download this release

Release Info

Developer kosinix
Plugin Icon 128x128 Cyclone Slider
Version 2.0.0
Comparing to
See all releases

Version 2.0.0

Files changed (45) hide show
  1. README.txt +93 -0
  2. css/admin.css +225 -0
  3. css/common.css +28 -0
  4. cyclone-slider.php +86 -0
  5. images/ui-icons.png +0 -0
  6. inc/admin/box-js.php +84 -0
  7. inc/admin/box.php +84 -0
  8. inc/class-cyclone-slider.php +689 -0
  9. inc/class-image-resizer.php +250 -0
  10. js/admin.js +158 -0
  11. js/display.js +0 -0
  12. js/jquery.cookie.js +47 -0
  13. js/jquery.cycle2.min.js +6 -0
  14. js/jquery.cycle2.tile.min.js +2 -0
  15. lang/cycloneslider-de_DE.mo +0 -0
  16. lang/cycloneslider-de_DE.po +219 -0
  17. lang/cycloneslider.pot +222 -0
  18. screenshot-1.jpg +0 -0
  19. screenshot-2.jpg +0 -0
  20. screenshot-3.jpg +0 -0
  21. templates/black/images/bg-caption.png +0 -0
  22. templates/black/images/sprite-arrows.png +0 -0
  23. templates/black/images/sprite-nav.png +0 -0
  24. templates/black/slider.php +37 -0
  25. templates/black/style.css +74 -0
  26. templates/blue/images/bg-caption.png +0 -0
  27. templates/blue/images/sprite-arrows.png +0 -0
  28. templates/blue/images/sprite-nav.png +0 -0
  29. templates/blue/slider.php +37 -0
  30. templates/blue/style.css +74 -0
  31. templates/default/images/bg-caption.png +0 -0
  32. templates/default/images/sprite-arrows.png +0 -0
  33. templates/default/images/sprite-nav.png +0 -0
  34. templates/default/slider.php +37 -0
  35. templates/default/style.css +74 -0
  36. templates/myrtle/images/bg-caption.png +0 -0
  37. templates/myrtle/images/sprite-arrows.png +0 -0
  38. templates/myrtle/images/sprite-nav.png +0 -0
  39. templates/myrtle/slider.php +35 -0
  40. templates/myrtle/style.css +80 -0
  41. templates/thumbnails/images/bg-caption.png +0 -0
  42. templates/thumbnails/images/sprite-arrows.png +0 -0
  43. templates/thumbnails/images/sprite-nav.png +0 -0
  44. templates/thumbnails/slider.php +61 -0
  45. templates/thumbnails/style.css +69 -0
README.txt ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Cyclone Slider 2 ===
2
+ 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.4.2
7
+ Stable tag: trunk
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Create responsive slideshows with ease. Built for both developers and non-developers.
12
+
13
+ == Description ==
14
+
15
+ Features: Uses jQuery Cycle 2 with full responsiveness, easy-to-use interface with drag and drop functionality, multiple slideshows, individual slideshow settings, shortcode, and customizable templates.
16
+
17
+ 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.
18
+
19
+ Note: If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2.
20
+
21
+ = Homepage =
22
+ [Checkout more about Cyclone Slider 2](http://www.codefleet.net/cyclone-slider-2/)
23
+
24
+
25
+ == Installation ==
26
+
27
+ = Install via WordPress Admin =
28
+ 1. Ready the zip file of the plugin
29
+ 1. Go to Admin > Plugins > Add New
30
+ 1. On the upper portion click the Upload link
31
+ 1. Using the file upload field, upload the plugin zip file here and activate the plugin
32
+
33
+ = Install via FTP =
34
+ 1. First unzip the plugin file
35
+ 1. Using FTP go to your server's wp-content/plugins directory
36
+ 1. Upload the unzipped plugin here
37
+ 1. Once finished login into your WP Admin and go to Admin > Plugins
38
+ 1. Look for Cyclone Slider 2 and activate it
39
+
40
+ = Usage =
41
+ 1. Start adding slideshows in 'Cyclone Slider' menu in WordPress
42
+ 1. You can then use a shortcode to display your slideshow. Example: `[cycloneslider id ="my-slideshow"]`
43
+ 1. Function do_shortcode can be used inside template files. Example: `<?php echo do_shortcode('[cycloneslider id ="my-slideshow"]'); ?>`
44
+
45
+
46
+ == Frequently Asked Questions ==
47
+
48
+ = What's the improvement of Cyclone Slider 2 over Cyclone Slider? =
49
+ 1. Uses jQuery Cycle 2 plugin.
50
+ 1. All slideshow templates are responsive.
51
+ 1. Cleaner and faster user interface.
52
+ 1. Per slide settings.
53
+ 1. Tile effects.
54
+
55
+ = Why is my slider not working? =
56
+ Check for javascript errors in your page. This is the most common cause of the slider not running.
57
+ `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.
58
+
59
+ = Why is there is an extra slide that I didn't add? =
60
+ Most probably its wordpress adding paragpraphs on line breaks next to the slides therefore adding a blank `<p>` slide. You can try adding this to functions.php:
61
+ `remove_filter('the_content', 'wpautop');`
62
+
63
+ = How to display it in post/page? =
64
+ Use the shortcode `[cycloneslider id ="my-slideshow"]`
65
+
66
+ = How to display it inside template files (header.php, index.php, page.php, etc.)? =
67
+ Use `<?php echo do_shortcode('[cycloneslider id ="my-slideshow"]'); ?>`
68
+
69
+ = What are the shortcode options? =
70
+ `[cycloneslider id ="my-slideshow" fx="fade" timeout="5000" speed="1000" width="500" height="300" show_prev_next="true" show_nav="true"]`
71
+
72
+ = How can I use templates? =
73
+ `[cycloneslider id ="my-slideshow" template="custom-name"]`
74
+
75
+ = Where do I add my own templates? =
76
+ Inside your theme create a folder named "cycloneslider". Add your templates inside.
77
+
78
+ == Screenshots ==
79
+
80
+ 1. All Slideshow Screen
81
+ 2. Slideshow Editing Screen
82
+ 3. Slideshow in Action
83
+
84
+ == Changelog ==
85
+
86
+ = 1.0.0 - 2012-10-28 =
87
+ * Initial
88
+
89
+
90
+ == Upgrade Notice ==
91
+
92
+ = 1.0.0 =
93
+ * Initial. If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2
css/admin.css ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Slides ***/
2
+ #cyclone-slides-metabox .inside{
3
+ margin:20px;
4
+ padding:0;
5
+ }
6
+ .cycloneslider-sortable{
7
+ margin-bottom:20px;
8
+ }
9
+ .cycloneslider-box{
10
+ margin-bottom:10px;
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 */
17
+ background-image: -o-linear-gradient(top, #f9f9f9, #ececec); /* Opera */
18
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); /* old Webkit */
19
+ background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec); /* new Webkit */
20
+ background-image: linear-gradient(top, #f9f9f9, #ececec); /* proposed W3C Markup */
21
+ }
22
+ .cycloneslider-box-title{
23
+ padding:5px;
24
+ border:1px solid #D3D3D3;
25
+ }
26
+ .cycloneslider-box-title-left{
27
+ float:left;
28
+ }
29
+ .cycloneslider-box-title-right{
30
+ float:right;
31
+ }
32
+
33
+ .cycloneslider-box-title .cycloneslider-box-drag,
34
+ .cycloneslider-box-title a.cycloneslider-box-toggle,
35
+ .cycloneslider-box-title a.cycloneslider-box-delete{
36
+ margin:0 5px;
37
+ display:block;
38
+ float:left;
39
+ text-indent:-99999px;
40
+ width:15px;
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 a.cycloneslider-box-toggle{
49
+ color:#21759B;
50
+ background: url(../images/ui-icons.png) no-repeat -15px 0;
51
+ }
52
+ .cycloneslider-box-title a.cycloneslider-box-delete{
53
+ color:#ff9191;
54
+ background: url(../images/ui-icons.png) no-repeat -30px 0;
55
+ }
56
+ .cycloneslider-box-title a.cycloneslider-box-toggle:hover{
57
+ background-position:-15px -15px;
58
+ color:#fff;
59
+ }
60
+ .cycloneslider-box-title a.cycloneslider-box-delete:hover{
61
+ background-color:#ff9191;
62
+ color:#fff;
63
+ }
64
+
65
+ /*** Slides Body ***/
66
+ .cycloneslider-box-body{
67
+ background:#F5F5F5;
68
+ min-height:1px; /* IE7 - on open disappearing content - bug fix */
69
+ padding:10px 10px 20px 10px;
70
+ border-left:1px solid #D3D3D3;
71
+ border-right:1px solid #D3D3D3;
72
+ border-bottom:1px solid #D3D3D3;
73
+ display:none;
74
+ }
75
+ input[name=cycloneslider_add_slide]{
76
+ margin-bottom:15px;
77
+ }
78
+ .cycloneslider-box-placeholder{
79
+ padding:5px;
80
+ height:20px;
81
+ border:1px dashed #ccc;
82
+ margin-bottom:10px;
83
+ }
84
+ .cycloneslider-body-left{
85
+ float:left;
86
+ width:35%;
87
+ }
88
+ .cycloneslider-body-right{
89
+ float:right;
90
+ width:50%;
91
+ margin-right:20px;
92
+ }
93
+ .cycloneslider-slide-thumb{
94
+ display:block;
95
+ max-width:90%;
96
+ margin-bottom:10px;
97
+ border:3px solid #ccc;
98
+ }
99
+ .cycloneslider-slide-path{
100
+ display:block;
101
+ width:100%;
102
+ margin-bottom:10px;
103
+ }
104
+
105
+ /* accordion */
106
+ .cycloneslider-accordion{
107
+ font-size:12px;
108
+ padding:0 20px;
109
+
110
+ }
111
+ .cycloneslider-accordion .ui-accordion-header{
112
+ padding:5px 8px 5px 8px;
113
+ margin-bottom:1px;
114
+
115
+ }
116
+ .cycloneslider-accordion .ui-accordion-header.ui-state-active{
117
+ border-bottom:0;
118
+ margin-bottom:0;
119
+ background:#F5F5F5;
120
+ }
121
+ .cycloneslider-accordion .ui-accordion-content{
122
+ padding:0px 20px 20px 20px;
123
+ margin-bottom:1px;
124
+ background:#F5F5F5;
125
+ }
126
+ .cycloneslider-accordion .ui-accordion-content-active{
127
+ border-top:0;
128
+ }
129
+
130
+
131
+ /* box template */
132
+ .cycloneslider-box-template{
133
+ display:none;
134
+ }
135
+
136
+ /*** Slide Properties ***/
137
+ .cycloneslider-sub-title{
138
+ font-weight:bold;
139
+ font-size:12px;
140
+ margin-bottom:10px;
141
+ text-transform:capitalize;
142
+ }
143
+ .cycloneslider-slide-metas{
144
+ border-bottom:1px solid #D3D3D3;
145
+ }
146
+ .cycloneslider-field-title.first{
147
+ -webkit-border-radius: 3px 3px 0px 0px;
148
+ border-radius: 3px 3px 0px 0px;
149
+ }
150
+ .cycloneslider-title-checkbox{
151
+ background:none;
152
+ padding:0;
153
+ float:left;
154
+ }
155
+ .cycloneslider-field-title{
156
+ border-left:1px solid #D3D3D3;
157
+ border-right:1px solid #D3D3D3;
158
+ border-top:1px solid #D3D3D3;
159
+ padding:3px 7px;
160
+ font-weight:bold;
161
+ color:#666666;
162
+ background-color: #f1f1f1;
163
+ cursor:pointer;
164
+ }
165
+ .cycloneslider-field-body{
166
+ border-top:1px solid #D3D3D3;
167
+ border-left:1px solid #D3D3D3;
168
+ border-right:1px solid #D3D3D3;
169
+ padding:20px;
170
+ background:#f9f9f9;
171
+
172
+ }
173
+ .cycloneslider-field-body label{
174
+ display:block;
175
+ margin-bottom:3px;
176
+ }
177
+ .cycloneslider-field-body textarea{
178
+ overflow:auto;
179
+ }
180
+ .cycloneslider-field-body input.cycloneslider-slide-meta-link{
181
+ margin-bottom:10px;
182
+ }
183
+ .cycloneslider-slide-meta-speed,
184
+ .cycloneslider-slide-meta-timeout{
185
+ width:50%;
186
+ }
187
+
188
+
189
+
190
+
191
+
192
+ #cyclone-slider-properties-metabox .inside{
193
+ padding:0;
194
+ }
195
+ .cycloneslider-field{
196
+ padding:15px 10px 20px 10px;
197
+ border-bottom:1px solid #DFDFDF;
198
+ }
199
+ .cycloneslider-field.last{
200
+ padding-bottom:10px;
201
+ border-bottom:0;
202
+ }
203
+ .cycloneslider-field label{
204
+ display:block;
205
+ font-weight:bold;
206
+ margin-bottom:5px;
207
+ }
208
+ .cycloneslider-field .note,
209
+ .cycloneslider-meta-field .note{
210
+ font-weight:normal;
211
+ font-size:11px;
212
+ font-style:italic;
213
+ color:#666666;
214
+ }
215
+ .cycloneslider-field input[type="text"],
216
+ .cycloneslider-field select{
217
+ display:block;
218
+ min-width:50%;
219
+ margin-bottom:3px;
220
+ }
221
+
222
+ .cycloneslider-fresh-slide{
223
+ border:1px solid yellow;
224
+ }
225
+
css/common.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Common CSS for all templates ***/
2
+ .cycloneslider{
3
+ position:relative;
4
+ }
5
+ .cycloneslider-slides{
6
+ position:relative;
7
+ overflow:hidden;
8
+ }
9
+ .cycloneslider-slide{
10
+ position:absolute;
11
+ left:0;
12
+ top:0;
13
+ width:100%;
14
+ height:100%;
15
+ z-index:100;
16
+ }
17
+ .cycloneslider-slide img{
18
+ border:0;
19
+ padding:0;
20
+ margin:0;
21
+ max-width:100%;
22
+ }
23
+ .cycloneslider-prev,.cycloneslider-next,.cycloneslider-pager{
24
+ cursor:pointer;
25
+ }
26
+ .cycloneslider-slide:first-child{
27
+ z-index:101;
28
+ }
cyclone-slider.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
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.0.0
7
+ Author: Nico Amarilla
8
+ Author URI: http://www.codefleet.net/
9
+ License:
10
+
11
+ Copyright 2012 (kosinix@codefleet.net)
12
+
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License, version 2, as
15
+ published by the Free Software Foundation.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
+
26
+ */
27
+ require_once('inc/class-cyclone-slider.php');
28
+ require_once('inc/class-image-resizer.php');
29
+
30
+ if(!defined('CYCLONE_PATH')){
31
+ define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
32
+ }
33
+ if(!defined('CYCLONE_URL')){
34
+ define('CYCLONE_URL', plugin_dir_url(__FILE__) );
35
+ }
36
+
37
+
38
+ if(class_exists('Cyclone_Slider')):
39
+ new Cyclone_Slider();
40
+ endif;
41
+
42
+ /**
43
+ * Thumbnailer
44
+ *
45
+ * Creates thumbnail of the slide image using the specified attachment ID, width and height
46
+ *
47
+ *
48
+ * @param int $original_attachment_id Attachment ID.
49
+ * @param int $width Width of thumbnail in pixels.
50
+ * @param int $height Height of thumbnail in pixels.
51
+ * @param bool $refresh Recreate thumbnail if it already exists if set to true. Default to false, will not recreate thumbnails if it already exist.
52
+ * @return string The url to the thumbnail. False on failure.
53
+ */
54
+ //
55
+ function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh = false ){
56
+ $dir = wp_upload_dir();
57
+
58
+ // Get full path to the slide image
59
+ $image_path = get_attached_file($original_attachment_id);
60
+ if(empty($image_path)){
61
+ return false;
62
+ }
63
+
64
+ // Full url to the slide image
65
+ $image_url = wp_get_attachment_url($original_attachment_id);
66
+ if(empty($image_path)){
67
+ return false;
68
+ }
69
+
70
+ $info = pathinfo($image_path);
71
+ $dirname = isset($info['dirname']) ? $info['dirname'] : '';
72
+ $ext = isset($info['extension']) ? $info['extension'] : '';
73
+ $thumb = wp_basename($image_path, ".$ext")."-{$width}x{$height}.{$ext}";
74
+
75
+ // Check if thumb already exists. If it is, return its url, unless refresh is true
76
+ if(file_exists($dirname.'/'.$thumb ) and !$refresh){
77
+ return dirname($image_url).'/'.$thumb;
78
+ }
79
+
80
+ $resizeObj = new Image_Resizer($image_path);
81
+ $resizeObj -> resizeImage($width, $height);
82
+ $resizeObj -> saveImage($dirname.'/'.$thumb, 80);
83
+
84
+ return dirname($image_url).'/'.$thumb;
85
+
86
+ }
images/ui-icons.png ADDED
Binary file
inc/admin/box-js.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
18
+ </div>
19
+ <div class="cycloneslider-body-right">
20
+ <p class="cycloneslider-sub-title"><?php _e('Extra slide elements:', 'cycloneslider'); ?></p>
21
+ <div class="cycloneslider-slide-metas">
22
+ <div class="cycloneslider-meta-field">
23
+ <div class="cycloneslider-field-title first">
24
+ <?php _e('Slide Link', 'cycloneslider'); ?>
25
+ </div>
26
+ <div class="cycloneslider-field-body">
27
+ <label for=""><?php _e('Link:', 'cycloneslider'); ?></label>
28
+ <input class="widefat cycloneslider-slide-meta-link" name="cycloneslider_metas[{id}][link]" type="text" value="" />
29
+ <label for=""><?php _e('Open Link in:', 'cycloneslider'); ?></label>
30
+ <select id="" name="cycloneslider_metas[{id}][link_target]">
31
+ <option value="_self"><?php _e('Same Window', 'cycloneslider'); ?></option>
32
+ <option value="_blank"><?php _e('New Tab or Window', 'cycloneslider'); ?></option>
33
+ </select>
34
+ </div>
35
+ </div>
36
+ <div class="cycloneslider-meta-field">
37
+ <div class="cycloneslider-field-title">
38
+ <?php _e('Title', 'cycloneslider'); ?>
39
+ </div>
40
+ <div class="cycloneslider-field-body">
41
+ <input class="widefat cycloneslider-slide-meta-title" name="cycloneslider_metas[{id}][title]" type="text" value="" />
42
+ </div>
43
+ </div>
44
+ <div class="cycloneslider-meta-field">
45
+ <div class="cycloneslider-field-title">
46
+ <?php _e('Description', 'cycloneslider'); ?>
47
+ </div>
48
+ <div class="cycloneslider-field-body">
49
+ <textarea class="widefat cycloneslider-slide-meta-description" name="cycloneslider_metas[{id}][description]"></textarea>
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <p class="cycloneslider-sub-title"><?php _e('Slide Properties:', 'cycloneslider'); ?></p>
55
+ <div class="cycloneslider-slide-metas">
56
+ <div class="cycloneslider-meta-field">
57
+ <div class="cycloneslider-field-title first">
58
+ <?php _e('Slide Effects', 'cycloneslider'); ?>
59
+ </div>
60
+ <div class="cycloneslider-field-body">
61
+ <label for=""><?php _e('Effects:', 'cycloneslider'); ?></label>
62
+ <select id="" name="cycloneslider_metas[{id}][fx]">
63
+ <option value="default">Default</option>
64
+ <?php foreach($this->effects as $value=>$name): ?>
65
+ <option value="<?php echo $value; ?>"><?php echo $name; ?></option>
66
+ <?php endforeach; ?>
67
+ </select>
68
+ <br /><br />
69
+ <label for=""><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
70
+ <input class="widefat cycloneslider-slide-meta-speed" name="cycloneslider_metas[{id}][speed]" type="text" value="" />
71
+ <span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
72
+ <br /><br />
73
+ <label for=""><?php _e('Next Slide Delay:', 'cycloneslider'); ?></label>
74
+ <input class="widefat cycloneslider-slide-meta-timeout" name="cycloneslider_metas[{id}][timeout]" type="text" value="" />
75
+ <span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
76
+ <br /><br />
77
+ <span class="note"><?php _e('Settings here will override the main slideshow settings. Leave blank to disable.', 'cycloneslider'); ?></span>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div class="clear"></div>
83
+ </div>
84
+ </div>
inc/admin/box.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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="<?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="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
18
+ </div>
19
+ <div class="cycloneslider-body-right">
20
+ <p class="cycloneslider-sub-title"><?php _e('Extra slide elements:', 'cycloneslider'); ?></p>
21
+ <div class="cycloneslider-slide-metas">
22
+ <div class="cycloneslider-meta-field">
23
+ <div class="cycloneslider-field-title first">
24
+ <?php _e('Slide Link', 'cycloneslider'); ?>
25
+ </div>
26
+ <div class="cycloneslider-field-body">
27
+ <label for=""><?php _e('Link:', 'cycloneslider'); ?></label>
28
+ <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']); ?>" />
29
+ <label for=""><?php _e('Open Link in:', 'cycloneslider'); ?></label>
30
+ <select id="" name="cycloneslider_metas[<?php echo $i; ?>][link_target]">
31
+ <option <?php echo ('_self'==$slider_metas[$i]['link_target']) ? 'selected="selected"' : ''; ?> value="_self"><?php _e('Same Window', 'cycloneslider'); ?></option>
32
+ <option <?php echo ('_blank'==$slider_metas[$i]['link_target']) ? 'selected="selected"' : ''; ?> value="_blank"><?php _e('New Tab or Window', 'cycloneslider'); ?></option>
33
+ </select>
34
+ </div>
35
+ </div>
36
+ <div class="cycloneslider-meta-field">
37
+ <div class="cycloneslider-field-title">
38
+ <?php _e('Title', 'cycloneslider'); ?>
39
+ </div>
40
+ <div class="cycloneslider-field-body">
41
+ <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']); ?>" />
42
+ </div>
43
+ </div>
44
+ <div class="cycloneslider-meta-field">
45
+ <div class="cycloneslider-field-title">
46
+ <?php _e('Description', 'cycloneslider'); ?>
47
+ </div>
48
+ <div class="cycloneslider-field-body">
49
+ <textarea class="widefat cycloneslider-slide-meta-description" name="cycloneslider_metas[<?php echo $i; ?>][description]"><?php echo esc_html($slider_metas[$i]['description']); ?></textarea>
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <p class="cycloneslider-sub-title"><?php _e('Slide Properties:', 'cycloneslider'); ?></p>
55
+ <div class="cycloneslider-slide-metas">
56
+ <div class="cycloneslider-meta-field">
57
+ <div class="cycloneslider-field-title first">
58
+ <?php _e('Slide Effects', 'cycloneslider'); ?>
59
+ </div>
60
+ <div class="cycloneslider-field-body">
61
+ <label for=""><?php _e('Effects:', 'cycloneslider'); ?></label>
62
+ <select id="" name="cycloneslider_metas[<?php echo $i; ?>][fx]">
63
+ <option value="default">Default</option>
64
+ <?php foreach($this->effects as $value=>$name): ?>
65
+ <option value="<?php echo $value; ?>" <?php echo ($slider_metas[$i]['fx']==$value) ? 'selected="selected"' : ''; ?>><?php echo $name; ?></option>
66
+ <?php endforeach; ?>
67
+ </select>
68
+ <br /><br />
69
+ <label for=""><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
70
+ <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']); ?>" />
71
+ <span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
72
+ <br /><br />
73
+ <label for=""><?php _e('Next Slide Delay:', 'cycloneslider'); ?></label>
74
+ <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']); ?>" />
75
+ <span class="note"> <?php _e('Milliseconds', 'cycloneslider'); ?></span>
76
+ <br /><br />
77
+ <span class="note"><?php _e('Settings here will override the main slideshow settings. Leave blank to disable.', 'cycloneslider'); ?></span>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div class="clear"></div>
83
+ </div>
84
+ </div>
inc/class-cyclone-slider.php ADDED
@@ -0,0 +1,689 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!class_exists('Cyclone_Slider')):
3
+
4
+ class Cyclone_Slider {
5
+ var $plugin_path;
6
+ var $plugin_url;
7
+ var $template_slide_box;
8
+ var $template_slide_box_js;
9
+ var $template_slider_dir;
10
+ var $slider_count;
11
+ var $effects;
12
+ /*--------------------------------------------*
13
+ * Constructor
14
+ *--------------------------------------------*/
15
+
16
+ /**
17
+ * Initializes the plugin by setting localization, filters, and administration functions.
18
+ */
19
+ function __construct() {
20
+ // Paths and urls init
21
+ $ds = DIRECTORY_SEPARATOR;
22
+ $this->plugin_path = CYCLONE_PATH;
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
+ // Register frontend styles and scripts
43
+ add_action( 'wp_enqueue_scripts', array( &$this, 'register_plugin_scripts' ) );
44
+
45
+
46
+ // Add admin menus
47
+ add_action( 'init', array( &$this, 'create_post_types' ) );
48
+
49
+ // Update the messages for our custom post make it appropriate for slideshow
50
+ add_filter('post_updated_messages', array( &$this, 'post_updated_messages' ) );
51
+
52
+ // Add slider metaboxes
53
+ add_action( 'add_meta_boxes', array( &$this, 'add_meta_boxes' ) );
54
+
55
+ // Save slides
56
+ add_action( 'save_post', array( &$this, 'save_post' ) );
57
+
58
+ // Hacky way to change text in thickbox
59
+ add_filter( 'gettext', array( $this, 'replace_text_in_thickbox' ), 10, 3 );
60
+
61
+ // Modify html of image
62
+ add_filter( 'image_send_to_editor', array( $this, 'image_send_to_editor'), 1, 8 );
63
+
64
+ // Custom columns
65
+ add_action( 'manage_cycloneslider_posts_custom_column', array( $this, 'custom_column' ), 10, 2);
66
+ add_filter( 'manage_edit-cycloneslider_columns', array( $this, 'slideshow_columns') );
67
+
68
+ // Add hook for admin footer
69
+ add_action('admin_footer', array( $this, 'admin_footer') );
70
+
71
+ // Our shortcode
72
+ add_shortcode('cycloneslider', array( $this, 'cycloneslider_shortcode') );
73
+
74
+ // Add query var for so we can access our css via www.mysite.com/?cyclone_templates_css=1
75
+ add_filter('query_vars', array( $this, 'modify_query_vars'));
76
+
77
+ // The magic that shows our css
78
+ add_action('template_redirect', array( $this, 'cyclone_css_hook'));
79
+ } // end constructor
80
+
81
+ /**
82
+ * Registers and enqueues admin-specific JavaScript.
83
+ */
84
+ public function register_admin_scripts() {
85
+ if('cycloneslider' == get_post_type()){ /* Load only scripts here and not on all admin pages */
86
+ //styles
87
+ wp_enqueue_style('thickbox');
88
+
89
+ wp_register_style( 'cycloneslider-admin-styles', $this->plugin_url.'css/admin.css' );
90
+ wp_enqueue_style( 'cycloneslider-admin-styles' );
91
+
92
+ //scripts
93
+ wp_dequeue_script( 'autosave' );//disable autosave
94
+
95
+ wp_enqueue_script('jquery');
96
+ wp_enqueue_script('jquery-ui-sortable');
97
+ wp_enqueue_script('media-upload');
98
+ wp_enqueue_script('thickbox');
99
+
100
+ wp_register_script( 'jquery-cookie', $this->plugin_url.'js/jquery.cookie.js' );
101
+ wp_enqueue_script( 'jquery-cookie' );
102
+ wp_register_script( 'cycloneslider-admin-script', $this->plugin_url.'js/admin.js' );
103
+ wp_enqueue_script( 'cycloneslider-admin-script' );
104
+
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Registers and enqueues frontend-specific scripts.
110
+ */
111
+ public function register_plugin_scripts() {
112
+ /*** Styles ***/
113
+ $cyclone_css = add_query_arg(array('cyclone_templates_css' => 1), home_url( '/' ));
114
+ wp_register_style( 'cyclone-slider-plugin-styles', $cyclone_css );//contains our combined css from ALL templates
115
+ wp_enqueue_style( 'cyclone-slider-plugin-styles' );
116
+
117
+ /*** Scripts ***/
118
+ wp_register_script( 'cycle2', $this->plugin_url.'js/jquery.cycle2.min.js', array('jquery') );
119
+ wp_enqueue_script( 'cycle2' );
120
+
121
+ wp_register_script( 'cycle2-tile', $this->plugin_url.'js/jquery.cycle2.tile.min.js', array('cycle2') );
122
+ wp_enqueue_script( 'cycle2-tile' );
123
+
124
+ wp_register_script( 'display', $this->plugin_url.'js/display.js', array('jquery') );
125
+ wp_enqueue_script( 'display' );
126
+
127
+ }
128
+
129
+ /*--------------------------------------------*
130
+ * Core Functions
131
+ *---------------------------------------------*/
132
+ // Create custom post for slideshows
133
+ function create_post_types() {
134
+ register_post_type( 'cycloneslider',
135
+ array(
136
+ 'labels' => array(
137
+ 'name' => __('Cyclone Slider', 'cycloneslider'),
138
+ 'singular_name' => __('Slideshow', 'cycloneslider'),
139
+ 'add_new' => __('Add Slideshow', 'cycloneslider'),
140
+ 'add_new_item' => __('Add New Slideshow', 'cycloneslider'),
141
+ 'edit_item' => __('Edit Slideshow', 'cycloneslider'),
142
+ 'new_item' => __('New Slideshow', 'cycloneslider'),
143
+ 'view_item' => __('View Slideshow', 'cycloneslider'),
144
+ 'search_items' => __('Search Slideshows', 'cycloneslider'),
145
+ 'not_found' => __('No slideshows found', 'cycloneslider'),
146
+ 'not_found_in_trash' => __('No slideshows found in Trash', 'cycloneslider')
147
+ ),
148
+ 'supports' => array('title'),
149
+ 'public' => false,
150
+ 'exclude_from_search' => true,
151
+ 'show_ui' => true,
152
+ 'menu_position' => 100
153
+ )
154
+ );
155
+ }
156
+
157
+ // Messages
158
+ function post_updated_messages($messages){
159
+ global $post, $post_ID;
160
+ $messages['cycloneslider'] = array(
161
+ 0 => '',
162
+ 1 => sprintf( __( 'Slideshow updated. Shortcode is [cycloneslider id="%s"]', 'cycloneslider' ), $post->post_name),
163
+ 2 => __( 'Custom field updated.', 'cycloneslider' ),
164
+ 3 => __( 'Custom field deleted.', 'cycloneslider' ),
165
+ 4 => __( 'Slideshow updated.', 'cycloneslider' ),
166
+ 5 => __( 'Slideshow updated.', 'cycloneslider' ),
167
+ 6 => sprintf( __( 'Slideshow published. Shortcode is [cycloneslider id="%s"]', 'cycloneslider' ), $post->post_name),
168
+ 7 => __( 'Slideshow saved.', 'cycloneslider' ),
169
+ 8 => __( 'Slideshow updated.', 'cycloneslider' ),
170
+ 9 => __( 'Slideshow updated.', 'cycloneslider' ),
171
+ 10 => __( 'Slideshow updated.', 'cycloneslider' )
172
+ );
173
+ return $messages;
174
+ }
175
+
176
+ // Slides metabox init
177
+ function add_meta_boxes(){
178
+ add_meta_box(
179
+ 'cyclone-slides-metabox',
180
+ __('Slides', 'cycloneslider'),
181
+ array( &$this, 'render_slides_meta_box' ),
182
+ 'cycloneslider' ,
183
+ 'normal',
184
+ 'high'
185
+ );
186
+ add_meta_box(
187
+ 'cyclone-slider-properties-metabox',
188
+ __('Slider Settings', 'cycloneslider'),
189
+ array( &$this, 'render_slider_properties_meta_box' ),
190
+ 'cycloneslider' ,
191
+ 'side',
192
+ 'low'
193
+ );
194
+ add_meta_box(
195
+ 'cyclone-slider-templates-metabox',
196
+ __('Slider Templates', 'cycloneslider'),
197
+ array( &$this, 'render_slider_templates_meta_box' ),
198
+ 'cycloneslider' ,
199
+ 'normal',
200
+ 'low'
201
+ );
202
+ }
203
+
204
+ // Get Image mime type. @param $image - full path to image
205
+ function get_mime_type( $image ){
206
+ if($properties = getimagesize( $image )){
207
+ return $properties['mime'];
208
+ }
209
+ return false;
210
+ }
211
+
212
+ // Slides metabox render
213
+ function render_slides_meta_box($post){
214
+
215
+ // Use nonce for verification
216
+ echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
217
+
218
+ $meta = get_post_custom($post->ID);
219
+
220
+ $slider_metas = $this->get_slider_metas($meta);
221
+ $slider_settings = $this->get_slider_admin_settings($meta);
222
+
223
+ $debug = 0;
224
+ if($debug){
225
+ echo '<pre>';
226
+ print_r($slider_settings);
227
+ print_r($slider_metas);
228
+ echo '</pre>';
229
+ }
230
+ ?>
231
+ <div class="cycloneslider-sortable">
232
+ <?php
233
+ if(is_array($slider_metas) and count($slider_metas)>0):
234
+ foreach($slider_metas as $i=>$slider_meta):
235
+ $attachment_id = (int) $slider_meta['id'];
236
+ $image_url = wp_get_attachment_image_src( $attachment_id, 'medium', true );
237
+ $image_url = (is_array($image_url)) ? $image_url[0] : '';
238
+
239
+ include($this->template_slide_box);
240
+ endforeach;
241
+ endif;
242
+ ?>
243
+ </div><!-- end .cycloneslider-sortable -->
244
+
245
+ <input type="button" value="<?php _e('Add Slide', 'cycloneslider'); ?>" class="button-secondary" name="cycloneslider_add_slide" />
246
+ <?php
247
+ }
248
+
249
+ function render_slider_properties_meta_box($post){
250
+ // Use nonce for verification
251
+ echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
252
+
253
+ $meta = get_post_custom($post->ID);
254
+ $slider_settings = $this->get_slider_admin_settings($meta);
255
+ //default values
256
+ $slider_settings['timeout'] = (!isset($slider_settings['timeout']) || $slider_settings['timeout']===null) ? 4000 : $slider_settings['timeout'];
257
+ $slider_settings['speed'] = (!isset($slider_settings['speed']) || $slider_settings['speed']===null) ? 1000 : $slider_settings['speed'];
258
+ $slider_settings['width'] = (!isset($slider_settings['width']) || $slider_settings['width']===null) ? 960 : $slider_settings['width'];
259
+ $slider_settings['height'] = (!isset($slider_settings['height']) || $slider_settings['height']===null) ? 300 : $slider_settings['height'];
260
+ $slider_settings['show_prev_next'] = (!isset($slider_settings['show_prev_next']) || $slider_settings['show_prev_next']===null) ? 1 : $slider_settings['show_prev_next'];
261
+ $slider_settings['show_nav'] = (!isset($slider_settings['show_nav']) || $slider_settings['show_nav']===null) ? 1 : $slider_settings['show_nav'];
262
+ $slider_settings['hover_pause'] = (!isset($slider_settings['hover_pause']) || $slider_settings['hover_pause']===null) ? 1 : $slider_settings['hover_pause'];
263
+
264
+ ?>
265
+ <div class="cycloneslider-field">
266
+ <label for="cycloneslider_settings_fx"><?php _e('Transition Effects to Use:', 'cycloneslider'); ?></label>
267
+ <select id="cycloneslider_settings_fx" name="cycloneslider_settings[fx]">
268
+ <?php foreach($this->effects as $key=>$fx): ?>
269
+ <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>
270
+ <?php endforeach; ?>
271
+ </select>
272
+ <div class="clear"></div>
273
+ </div>
274
+ <?php
275
+ ?>
276
+ <div class="cycloneslider-field">
277
+ <label for="cycloneslider_settings_timeout"><?php _e('Next Slide Delay:', 'cycloneslider'); ?> </label>
278
+ <input id="cycloneslider_settings_timeout" type="text" name="cycloneslider_settings[timeout]" value="<?php echo esc_attr($slider_settings['timeout']); ?>" />
279
+ <span class="note"><?php _e('Milliseconds. 0 to disable auto advance.', 'cycloneslider'); ?></span>
280
+ <div class="clear"></div>
281
+ </div>
282
+ <div class="cycloneslider-field">
283
+ <label for="cycloneslider_settings_speed"><?php _e('Transition Effects Speed:', 'cycloneslider'); ?></label>
284
+ <input id="cycloneslider_settings_speed" type="text" name="cycloneslider_settings[speed]" value="<?php echo esc_attr($slider_settings['speed']); ?>" />
285
+ <span class="note"><?php _e('Milliseconds', 'cycloneslider'); ?></span>
286
+ <div class="clear"></div>
287
+ </div>
288
+ <div class="cycloneslider-field">
289
+ <label for="cycloneslider_settings_width"><?php _e('Width:', 'cycloneslider'); ?> </label>
290
+ <input id="cycloneslider_settings_width" type="text" name="cycloneslider_settings[width]" value="<?php echo esc_attr($slider_settings['width']); ?>" />
291
+ <span class="note"><?php _e('pixels.', 'cycloneslider'); ?></span>
292
+ <div class="clear"></div>
293
+ </div>
294
+ <div class="cycloneslider-field">
295
+ <label for="cycloneslider_settings_height"><?php _e('Height:', 'cycloneslider'); ?> </label>
296
+ <input id="cycloneslider_settings_height" type="text" name="cycloneslider_settings[height]" value="<?php echo esc_attr($slider_settings['height']); ?>" />
297
+ <span class="note"><?php _e('pixels.', 'cycloneslider'); ?></span>
298
+ <div class="clear"></div>
299
+ </div>
300
+ <div class="cycloneslider-field">
301
+ <label for="cycloneslider_settings_hover_pause"><?php _e('Pause on Hover?', 'cycloneslider'); ?></label>
302
+ <select id="cycloneslider_settings_hover_pause" name="cycloneslider_settings[hover_pause]">
303
+ <option <?php echo (1==$slider_settings['hover_pause']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
304
+ <option <?php echo (0==$slider_settings['hover_pause']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
305
+ </select>
306
+ <div class="clear"></div>
307
+ </div>
308
+ <div class="cycloneslider-field">
309
+ <label for="cycloneslider_settings_show_prev_next"><?php _e('Show Prev/Next Buttons?', 'cycloneslider'); ?></label>
310
+ <select id="cycloneslider_settings_show_prev_next" name="cycloneslider_settings[show_prev_next]">
311
+ <option <?php echo (1==$slider_settings['show_prev_next']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
312
+ <option <?php echo (0==$slider_settings['show_prev_next']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
313
+ </select>
314
+ <div class="clear"></div>
315
+ </div>
316
+ <div class="cycloneslider-field last">
317
+ <label for="cycloneslider_settings_show_nav"><?php _e('Show Navigation?', 'cycloneslider'); ?></label>
318
+ <select id="cycloneslider_settings_show_nav" name="cycloneslider_settings[show_nav]">
319
+ <option <?php echo (1==$slider_settings['show_nav']) ? 'selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'cycloneslider'); ?></option>
320
+ <option <?php echo (0==$slider_settings['show_nav']) ? 'selected="selected"' : ''; ?> value="0"><?php _e('No', 'cycloneslider'); ?></option>
321
+ </select>
322
+ <div class="clear"></div>
323
+ </div>
324
+ <?php
325
+ }
326
+
327
+ function render_slider_templates_meta_box($post){
328
+ // Use nonce for verification
329
+ echo '<input type="hidden" name="cycloneslider_metabox_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
330
+
331
+ $meta = get_post_custom($post->ID);
332
+ $slider_settings = $this->get_slider_admin_settings($meta);
333
+ //default values
334
+ $slider_settings['template'] = ($slider_settings['template']===null) ? 'default' : $slider_settings['template'];
335
+
336
+ $templates = $this->get_all_templates();
337
+ $template_options = array();
338
+ $template_options['default'] = 'Default';
339
+ foreach($templates as $name=>$template){
340
+ if($name!='default'){
341
+ $template_options[$name]= ucwords(str_replace('-',' ',$name));
342
+ }
343
+ }
344
+ ?>
345
+ <div class="cycloneslider-field last">
346
+ <label for="cycloneslider_settings_template"><?php _e('Select Template to Use:', 'cycloneslider'); ?></label>
347
+ <select id="cycloneslider_settings_template" name="cycloneslider_settings[template]">
348
+ <?php foreach($template_options as $key=>$name): ?>
349
+ <option <?php echo ($key==$slider_settings['template']) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr($key); ?>"><?php echo esc_attr($name); ?></option>
350
+ <?php endforeach; ?>
351
+ </select>
352
+ <div class="clear"></div>
353
+ </div>
354
+ <?php
355
+ }
356
+
357
+ function save_post($post_id){
358
+
359
+ // verify nonce
360
+ if (!empty($_POST['cycloneslider_metabox_nonce'])) {
361
+ if (!wp_verify_nonce($_POST['cycloneslider_metabox_nonce'], basename(__FILE__))) {
362
+ return $post_id;
363
+ }
364
+ }
365
+
366
+ // check autosave
367
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
368
+ return $post_id;
369
+ }
370
+
371
+ //slide metas
372
+ $this->save_metas($post_id);
373
+
374
+ //settings
375
+ $this->save_settings($post_id);
376
+
377
+ remove_action( 'save_post', array( &$this, 'save_post' ) );
378
+ }
379
+
380
+ //sanitize and save
381
+ function save_metas($post_id){
382
+
383
+ if(isset($_POST['cycloneslider_metas'])){
384
+
385
+ $slides = array();
386
+ $i=0;//always start from 0
387
+ foreach($_POST['cycloneslider_metas'] as $slide){
388
+ //bord($i.' '.$slide['fx']);
389
+ $slides[$i]['id'] = (int) $slide['id'];
390
+ $slides[$i]['link'] = esc_url_raw($slide['link']);
391
+ $slides[$i]['title'] = sanitize_text_field($slide['title']);
392
+ $slides[$i]['description'] = wp_kses_post($slide['description']);
393
+ $slides[$i]['link_target'] = wp_kses_post($slide['link_target']);
394
+ $slides[$i]['fx'] = wp_kses_post($slide['fx']);
395
+ $slides[$i]['speed'] = sanitize_text_field($slide['speed']);
396
+ $slides[$i]['timeout'] = sanitize_text_field($slide['timeout']);
397
+ $i++;
398
+ }
399
+ delete_post_meta($post_id, '_cycloneslider_metas');
400
+ update_post_meta($post_id, '_cycloneslider_metas', $slides);
401
+ }
402
+ }
403
+
404
+ //sanitize and save
405
+ function save_settings($post_id){
406
+ if(isset($_POST['cycloneslider_settings'])){
407
+ $settings = array();
408
+ $settings['template'] = wp_filter_nohtml_kses($_POST['cycloneslider_settings']['template']);
409
+ $settings['fx'] = wp_filter_nohtml_kses($_POST['cycloneslider_settings']['fx']);
410
+ $settings['timeout'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['timeout']);
411
+ $settings['speed'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['speed']);
412
+ $settings['width'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['width']);
413
+ $settings['height'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['height']);
414
+ $settings['hover_pause'] = wp_filter_nohtml_kses($_POST['cycloneslider_settings']['hover_pause']);
415
+ $settings['show_prev_next'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_prev_next']);
416
+ $settings['show_nav'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_nav']);
417
+
418
+ delete_post_meta($post_id, '_cycloneslider_settings');
419
+ update_post_meta($post_id, '_cycloneslider_settings', $settings);
420
+ }
421
+ }
422
+
423
+ function replace_text_in_thickbox($translation, $text, $domain ) {
424
+ $http_referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
425
+ $req_referrer = isset($_REQUEST['referer']) ? $_REQUEST['referer'] : '';
426
+ if(strpos($http_referrer, 'cycloneslider')!==false or $req_referrer=='cycloneslider') {
427
+ if ( 'default' == $domain and 'Insert into Post' == $text )
428
+ {
429
+ return 'Add to Slide';
430
+ }
431
+ }
432
+ return $translation;
433
+ }
434
+
435
+ // Add attachment ID as html5 data attr in thickbox
436
+ function image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ){
437
+ if(strpos($html, '<img data-id="')===false){
438
+ $html = str_replace('<img', '<img data-id="'.$id.'" ', $html);
439
+ }
440
+ return $html;
441
+ }
442
+
443
+ // Modify columns
444
+ function slideshow_columns($columns) {
445
+ $columns = array();
446
+ $columns['title']= __('Slideshow Name', 'cycloneslider');
447
+ $columns['id']= __('Slideshow ID', 'cycloneslider');
448
+ $columns['shortcode']= __('Shortcode', 'cycloneslider');
449
+ return $columns;
450
+ }
451
+
452
+ // Add content to custom columns
453
+ function custom_column( $column_name, $post_id ){
454
+ if ($column_name == 'id') {
455
+ $post = get_post($post_id);
456
+ echo $post->post_name;
457
+ }
458
+ if ($column_name == 'shortcode') {
459
+ $post = get_post($post_id);
460
+ echo '[cycloneslider id="'.$post->post_name.'"]';
461
+ }
462
+ }
463
+
464
+ // For js adding of box
465
+ function admin_footer() {
466
+ if(get_post_type()=='cycloneslider'){
467
+ ?>
468
+ <div class="cycloneslider-box-template">
469
+ <?php
470
+ include_once($this->template_slide_box_js);
471
+ ?>
472
+ </div><!-- end .cycloneslider-box-template -->
473
+ <?php
474
+ }
475
+ }
476
+
477
+ // Compare the value from admin and shortcode. If shortcode value is present and not empty, use it, otherwise return admin value
478
+ function get_comp_slider_setting($admin_val, $shortcode_val){
479
+ if($shortcode_val!==null){//make sure its really null and not just int zero 0
480
+ return $shortcode_val;
481
+ }
482
+ return $admin_val;
483
+ }
484
+
485
+ /* Our shortcode function.
486
+ Slider settings comes from both admin settings and shortcode attributes.
487
+ Shortcode attributes, if present, will override the admin settings.
488
+ */
489
+ function cycloneslider_shortcode($shortcode_settings) {
490
+ // Process shortcode settings and return only allowed vars
491
+ $shortcode_settings = shortcode_atts(
492
+ array(
493
+ 'id' => 0,
494
+ 'template' => null,
495
+ 'fx' => null,
496
+ 'speed' => null,
497
+ 'timeout' => null,
498
+ 'width' => null,
499
+ 'height' => null,
500
+ 'hover_pause' => null,
501
+ 'show_prev_next' => null,
502
+ 'show_nav' => null
503
+ ),
504
+ $shortcode_settings
505
+ );
506
+ $slider_id = esc_attr($shortcode_settings['id']);
507
+
508
+ $cycle_options = array();
509
+ $this->slider_count++;//make each call to shortcode unique
510
+ // Get slideshow by id
511
+ $my_query = new WP_Query(
512
+ array(
513
+ 'post_type' => 'cycloneslider',
514
+ 'order'=>'ASC',
515
+ 'posts_per_page' => 1,
516
+ 'name'=> $slider_id
517
+ )
518
+ );
519
+ if($my_query->have_posts()):
520
+ while ( $my_query->have_posts() ) : $my_query->the_post();
521
+
522
+ $meta = get_post_custom();
523
+
524
+ $admin_settings = $this->get_slider_admin_settings($meta);
525
+ $slider_metas = $this->get_slider_metas($meta);
526
+ $slides = $this->get_slides_from_meta($slider_metas);
527
+
528
+ $template = $this->get_comp_slider_setting($admin_settings['template'], $shortcode_settings['template']);
529
+ $template = esc_attr($template===null ? 'default' : $template);//fallback to default
530
+ $slider_settings['fx'] = esc_attr($this->get_comp_slider_setting($admin_settings['fx'], $shortcode_settings['fx']));
531
+ $slider_settings['speed'] = (int) $this->get_comp_slider_setting($admin_settings['speed'], $shortcode_settings['speed']);
532
+ $slider_settings['timeout'] = (int) $this->get_comp_slider_setting($admin_settings['timeout'], $shortcode_settings['timeout']);
533
+ $slider_settings['width'] = (int) $this->get_comp_slider_setting($admin_settings['width'], $shortcode_settings['width']);
534
+ $slider_settings['height'] = (int) $this->get_comp_slider_setting($admin_settings['height'], $shortcode_settings['height']);
535
+ $slider_settings['hover_pause'] = (int) $this->get_comp_slider_setting($admin_settings['hover_pause'], $shortcode_settings['hover_pause']);
536
+ $slider_settings['show_prev_next'] = (int) $this->get_comp_slider_setting($admin_settings['show_prev_next'], $shortcode_settings['show_prev_next']);
537
+ $slider_settings['show_nav'] = (int) $this->get_comp_slider_setting($admin_settings['show_nav'], $shortcode_settings['show_nav']);
538
+
539
+ $slider = $this->get_slider_template($slider_id, $template, $slides, $slider_metas, $slider_settings, $this->slider_count);
540
+
541
+ endwhile;
542
+
543
+ wp_reset_postdata();
544
+
545
+ else:
546
+ $slider = __('[Slideshow not found]', 'cycloneslider');
547
+ endif;
548
+
549
+ return $slider;
550
+ }
551
+
552
+ // Process the post meta and return the settings
553
+ function get_slider_admin_settings($meta){
554
+ if(isset($meta['cycloneslider_settings'][0]) and !empty($meta['cycloneslider_settings'][0])){//from version 1.0.0. set for deletion in future releases
555
+ return maybe_unserialize($meta['cycloneslider_settings'][0]);
556
+ }
557
+ if(isset($meta['_cycloneslider_settings'][0]) and !empty($meta['_cycloneslider_settings'][0])){//we have added prefix _ since 1.0.2
558
+ return maybe_unserialize($meta['_cycloneslider_settings'][0]);
559
+ }
560
+ return false;
561
+ }
562
+
563
+ // Process the post meta and return the settings
564
+ function get_slider_metas($meta){
565
+ if(isset($meta['cycloneslider_metas'][0]) and !empty($meta['cycloneslider_metas'][0])){//from version 1.0.0. set for deletion in future releases
566
+ return maybe_unserialize($meta['cycloneslider_metas'][0]);
567
+ }
568
+ if(isset($meta['_cycloneslider_metas'][0]) and !empty($meta['_cycloneslider_metas'][0])){//we have added prefix _ since 1.0.2
569
+ return maybe_unserialize($meta['_cycloneslider_metas'][0]);
570
+ }
571
+ return false;
572
+ }
573
+
574
+ // Get slideshow template
575
+ function get_slider_template($slider_id, $template_name, $slides, $slider_metas, $slider_settings, $slider_count){
576
+
577
+ $template = get_stylesheet_directory()."/cycloneslider/{$template_name}/slider.php";
578
+ if(@is_file($template)){
579
+ ob_start();
580
+ include($template);
581
+ $html = ob_get_clean();
582
+ return $html = $this->trim_white_spaces($html);
583
+ }
584
+
585
+ $template = $this->template_slider_dir."{$template_name}/slider.php";
586
+ if(@is_file($template)) {
587
+ ob_start();
588
+ include($template);
589
+ $html = ob_get_clean();
590
+ return $html = $this->trim_white_spaces($html);
591
+ }
592
+
593
+ return sprintf(__('[Template "%s" not found]', 'cycloneslider'), $template_name);
594
+ }
595
+
596
+ function trim_white_spaces($buffer){
597
+ $search = array(
598
+ '/\>[^\S ]+/s', //strip whitespaces after tags, except space
599
+ '/[^\S ]+\</s', //strip whitespaces before tags, except space
600
+ '/(\s)+/s' // shorten multiple whitespace sequences
601
+ );
602
+ $replace = array(
603
+ '>',
604
+ '<',
605
+ '\\1'
606
+ );
607
+ return preg_replace($search, $replace, $buffer);
608
+ }
609
+
610
+ // Return array of slide urls from meta
611
+ function get_slides_from_meta($slider_metas){
612
+ $slides = array();
613
+ if(is_array($slider_metas)){
614
+ foreach($slider_metas as $slider_meta){
615
+ $attachment_id = (int) $slider_meta['id'];
616
+ $image_url = wp_get_attachment_url($attachment_id);
617
+ $image_url = ($image_url===false) ? '' : $image_url;
618
+ $slides[] = $image_url;
619
+ }
620
+ }
621
+ return $slides;
622
+ }
623
+
624
+ // Add custom query var
625
+ function modify_query_vars($vars) {
626
+ $vars[] = 'cyclone_templates_css';//add our own
627
+ return $vars;
628
+ }
629
+
630
+ // Hook to template redirect
631
+ function cyclone_css_hook() {
632
+ if(intval(get_query_var('cyclone_templates_css')) == 1) {
633
+ $ds = DIRECTORY_SEPARATOR;
634
+ header("Content-type: text/css");
635
+
636
+ if(file_exists($this->plugin_path."css{$ds}common.css")){
637
+ echo file_get_contents($this->plugin_path."css{$ds}common.css");
638
+ }
639
+
640
+ $template_folders = $this->get_all_templates();
641
+ foreach($template_folders as $name=>$folder){
642
+ $style = $folder['path']."{$ds}style.css";
643
+ if(file_exists($style)){
644
+ echo "\n".str_replace('$tpl', $folder['url'], file_get_contents($style));//apply url and print css
645
+ }
646
+ }
647
+ die();
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'=>$this->template_slider_dir, //this resides in the plugin
657
+ 'url'=>$this->plugin_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
+ } // end class
688
+
689
+ endif;
inc/class-image-resizer.php ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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;
24
+ private $height;
25
+ private $imageResized;
26
+
27
+ function __construct($fileName)
28
+ {
29
+ // *** Open up the file
30
+ $this->image = $this->openImage($fileName);
31
+
32
+ // *** Get width and height
33
+ $this->width = imagesx($this->image);
34
+ $this->height = imagesy($this->image);
35
+ }
36
+
37
+ ## --------------------------------------------------------
38
+
39
+ private function openImage($file)
40
+ {
41
+ // *** Get extension
42
+ $extension = strtolower(strrchr($file, '.'));
43
+
44
+ switch($extension)
45
+ {
46
+ case '.jpg':
47
+ case '.jpeg':
48
+ $img = @imagecreatefromjpeg($file);
49
+ break;
50
+ case '.gif':
51
+ $img = @imagecreatefromgif($file);
52
+ break;
53
+ case '.png':
54
+ $img = @imagecreatefrompng($file);
55
+ break;
56
+ default:
57
+ $img = false;
58
+ break;
59
+ }
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
68
+ $optionArray = $this->getDimensions($newWidth, $newHeight, $option);
69
+
70
+ $optimalWidth = $optionArray['optimalWidth'];
71
+ $optimalHeight = $optionArray['optimalHeight'];
72
+
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
+
79
+ // *** if option is 'crop', then crop too
80
+ if ($option == 'crop') {
81
+ $this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight);
82
+ }
83
+ }
84
+
85
+ ## --------------------------------------------------------
86
+
87
+ public function getDimensions($newWidth, $newHeight, $option)
88
+ {
89
+
90
+ switch ($option)
91
+ {
92
+ case 'exact':
93
+ $optimalWidth = $newWidth;
94
+ $optimalHeight= $newHeight;
95
+ break;
96
+ case 'portrait':
97
+ $optimalWidth = $this->getSizeByFixedHeight($newHeight);
98
+ $optimalHeight= $newHeight;
99
+ break;
100
+ case 'landscape':
101
+ $optimalWidth = $newWidth;
102
+ $optimalHeight= $this->getSizeByFixedWidth($newWidth);
103
+ break;
104
+ case 'auto':
105
+ $optionArray = $this->getSizeByAuto($newWidth, $newHeight);
106
+ $optimalWidth = $optionArray['optimalWidth'];
107
+ $optimalHeight = $optionArray['optimalHeight'];
108
+ break;
109
+ case 'crop':
110
+ $optionArray = $this->getOptimalCrop($newWidth, $newHeight);
111
+ $optimalWidth = $optionArray['optimalWidth'];
112
+ $optimalHeight = $optionArray['optimalHeight'];
113
+ break;
114
+ }
115
+ return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
116
+ }
117
+
118
+ ## --------------------------------------------------------
119
+
120
+ private function getSizeByFixedHeight($newHeight)
121
+ {
122
+ $ratio = $this->width / $this->height;
123
+ $newWidth = $newHeight * $ratio;
124
+ return $newWidth;
125
+ }
126
+
127
+ private function getSizeByFixedWidth($newWidth)
128
+ {
129
+ $ratio = $this->height / $this->width;
130
+ $newHeight = $newWidth * $ratio;
131
+ return $newHeight;
132
+ }
133
+
134
+ private function getSizeByAuto($newWidth, $newHeight)
135
+ {
136
+ if ($this->height < $this->width)
137
+ // *** Image to be resized is wider (landscape)
138
+ {
139
+ $optimalWidth = $newWidth;
140
+ $optimalHeight= $this->getSizeByFixedWidth($newWidth);
141
+ }
142
+ elseif ($this->height > $this->width)
143
+ // *** Image to be resized is taller (portrait)
144
+ {
145
+ $optimalWidth = $this->getSizeByFixedHeight($newHeight);
146
+ $optimalHeight= $newHeight;
147
+ }
148
+ else
149
+ // *** Image to be resizerd is a square
150
+ {
151
+ if ($newHeight < $newWidth) {
152
+ $optimalWidth = $newWidth;
153
+ $optimalHeight= $this->getSizeByFixedWidth($newWidth);
154
+ } else if ($newHeight > $newWidth) {
155
+ $optimalWidth = $this->getSizeByFixedHeight($newHeight);
156
+ $optimalHeight= $newHeight;
157
+ } else {
158
+ // *** Sqaure being resized to a square
159
+ $optimalWidth = $newWidth;
160
+ $optimalHeight= $newHeight;
161
+ }
162
+ }
163
+
164
+ return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight);
165
+ }
166
+
167
+ ## --------------------------------------------------------
168
+
169
+ private function getOptimalCrop($newWidth, $newHeight)
170
+ {
171
+
172
+ $heightRatio = $this->height / $newHeight;
173
+ $widthRatio = $this->width / $newWidth;
174
+
175
+ if ($heightRatio < $widthRatio) {
176
+ $optimalRatio = $heightRatio;
177
+ } else {
178
+ $optimalRatio = $widthRatio;
179
+ }
180
+
181
+ $optimalHeight = $this->height / $optimalRatio;
182
+ $optimalWidth = $this->width / $optimalRatio;
183
+
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
192
+ $cropStartX = ( $optimalWidth / 2) - ( $newWidth /2 );
193
+ $cropStartY = ( $optimalHeight/ 2) - ( $newHeight/2 );
194
+
195
+ $crop = $this->imageResized;
196
+ //imagedestroy($this->imageResized);
197
+
198
+ // *** Now crop from center to exact requested size
199
+ $this->imageResized = imagecreatetruecolor($newWidth , $newHeight);
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
208
+ $extension = strrchr($savePath, '.');
209
+ $extension = strtolower($extension);
210
+
211
+ switch($extension)
212
+ {
213
+ case '.jpg':
214
+ case '.jpeg':
215
+ if (imagetypes() & IMG_JPG) {
216
+ imagejpeg($this->imageResized, $savePath, $imageQuality);
217
+ }
218
+ break;
219
+
220
+ case '.gif':
221
+ if (imagetypes() & IMG_GIF) {
222
+ imagegif($this->imageResized, $savePath);
223
+ }
224
+ break;
225
+
226
+ case '.png':
227
+ // *** Scale quality from 0-100 to 0-9
228
+ $scaleQuality = round(($imageQuality/100) * 9);
229
+
230
+ // *** Invert quality setting as 0 is best, not 9
231
+ $invertScaleQuality = 9 - $scaleQuality;
232
+
233
+ if (imagetypes() & IMG_PNG) {
234
+ imagepng($this->imageResized, $savePath, $invertScaleQuality);
235
+ }
236
+ break;
237
+
238
+ // ... etc
239
+
240
+ default:
241
+ // *** No extension - No save.
242
+ break;
243
+ }
244
+
245
+ imagedestroy($this->imageResized);
246
+ }
247
+
248
+ }
249
+
250
+ endif;
js/admin.js ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-drag',
10
+ placeholder: "cycloneslider-box-placeholder",
11
+ forcePlaceholderSize:true,
12
+ update: function(event, ui) {
13
+ $('.cycloneslider-sortable .cycloneslider-box').each(function(i){
14
+ $(this).find('.cycloneslider-slide-meta-id').attr('name', 'cycloneslider_metas['+(i)+'][id]');
15
+ $(this).find('.cycloneslider-slide-meta-link').attr('name', 'cycloneslider_metas['+(i)+'][link]');
16
+ $(this).find('.cycloneslider-slide-meta-title').attr('name', 'cycloneslider_metas['+(i)+'][title]');
17
+ $(this).find('.cycloneslider-slide-meta-description').attr('name', 'cycloneslider_metas['+(i)+'][description]');
18
+ });
19
+ }
20
+ });
21
+
22
+ /*** ID ***/
23
+ $('.cycloneslider-upload-button').each(function(i){
24
+ $(this).data('cycloneslider_id',i);
25
+ });
26
+ $('.cycloneslider-sortable .cycloneslider-box').each(function(i){
27
+ $(this).data('cycloneslider_id',i);
28
+ $(this).find('.cycloneslider-box-title-left').html('Slide '+(i+1));
29
+ });
30
+
31
+
32
+
33
+ /*** Add new slide box ***/
34
+ $('input[name="cycloneslider_add_slide"]').on('click', function(e){
35
+ var id = $('.cycloneslider-sortable .cycloneslider-box').length;
36
+ var html = $('.cycloneslider-box-template').html();
37
+ html = html.replace(/{id}/g, id);/*** replace all occurences of {id} to real id ***/
38
+
39
+ $('.cycloneslider-sortable').append(html);
40
+ $('.cycloneslider-sortable .cycloneslider-box:last').find('.cycloneslider-slide-thumb').hide().end().find('.cycloneslider-box-body').show();
41
+ $('.cycloneslider-upload-button').each(function(i){
42
+ $(this).data('cycloneslider_id',i);
43
+ });
44
+ $('.cycloneslider-sortable .cycloneslider-box').each(function(i){
45
+ $(this).data('cycloneslider_id',i);
46
+ });
47
+ $('.cycloneslider-field-body').each(function(i){
48
+ $(this).data('cycloneslider_id',i);
49
+ });
50
+
51
+ e.preventDefault();
52
+ });
53
+
54
+ /*** Toggle slide visiblity ***/
55
+ $('.cycloneslider-box-toggle').live('click', function(e) {
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('cycloneslider_box_'+box.data('cycloneslider_id'), null);
62
+
63
+ } else {
64
+ body.slideDown(100);
65
+ $.cookie('cycloneslider_box_'+box.data('cycloneslider_id'), 'open', { expires: 7});/*** remember open section ***/
66
+ }
67
+ e.preventDefault();
68
+ });
69
+
70
+ /*** Slide Properties ***/
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('cycloneslider_slide_meta_field_'+id, null);/*** delete cookie ***/
81
+ } else {
82
+ body.slideDown(100);
83
+ $.cookie('cycloneslider_slide_meta_field_'+id, 'open', { expires: 7});/*** remember open section ***/
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('cycloneslider_slide_meta_field_'+id)!='open'){/*** do not close open section ***/
91
+ body.hide();
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('cycloneslider_box_'+id)=='open'){/*** do not close open section ***/
99
+ body.show();
100
+ }
101
+ });
102
+
103
+ /*** Delete Slide ***/
104
+ $('.cycloneslider-box-delete').live('click',function(e) {
105
+
106
+ var box = $(this).parents('.cycloneslider-box');
107
+ box.fadeOut('slow', function(){ box.remove()});
108
+
109
+ e.preventDefault();
110
+ });
111
+ })();
112
+
113
+ (function() {
114
+ /*** Modify WP media uploader ***/
115
+ var current_slide_box = false;/*** we use this var to determine if thickbox is being used in cycloneslider. also saves the field to be updated later. ***/
116
+ $(document).on('click', '.cycloneslider-upload-button', function() {
117
+ var box = $(this).parents('.cycloneslider-box');/*** get current box ***/
118
+
119
+ current_slide_box = box;
120
+ tb_show('', 'media-upload.php?referer=cycloneslider&amp;post_id=0&amp;type=image&amp;TB_iframe=true');/*** referer param needed to change button text ***/
121
+ return false;
122
+ });
123
+
124
+ window.original_send_to_editor = window.send_to_editor;/*** backup original for other parts of admin that uses thickbox to work ***/
125
+ window.send_to_editor = function(html) {
126
+ if (current_slide_box) {
127
+ var slide_thumb = current_slide_box.find('.cycloneslider-slide-thumb');/*** find the thumb ***/
128
+ var slide_attachment_id = current_slide_box.find('.cycloneslider-slide-meta-id');/*** find the hidden field that will hold the attachment id ***/
129
+
130
+ var image = false;
131
+ if(jQuery(html).get(0) != undefined){ /*** Check if its a valid html tag ***/
132
+ if(jQuery(html).get(0).nodeName.toLowerCase()=='img'){/*** Check if html is an img tag ***/
133
+ image = jQuery(html);
134
+ } else { /*** If not may be it contains the img tag ***/
135
+ if(jQuery(html).find('img').length > 0){
136
+ image = jQuery(html).find('img');
137
+ }
138
+ }
139
+ }
140
+ if(image){
141
+ var url = image.attr('src');
142
+ var attachment_id = image.attr('data-id');
143
+
144
+ slide_thumb.attr('src', url).show();
145
+ slide_attachment_id.val(attachment_id);
146
+
147
+ } else {
148
+ alert('Could not insert image.');
149
+ }
150
+
151
+ tb_remove();
152
+ current_slide_box = false;
153
+ } else {
154
+ window.original_send_to_editor(html);
155
+ }
156
+ };
157
+ })();
158
+ });
js/display.js ADDED
File without changes
js/jquery.cookie.js ADDED
@@ -0,0 +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);
js/jquery.cycle2.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Cycle2; ver: BETA-20121002
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-20120923";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.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;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&&(d.timeoutId=setTimeout(function(){var a=d.slides.length;d.nextSlide=d.reverse?a-1:1,d.API.prepareTx(!1,!d.reverse)},d.timeout+d.delay)):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=this.opts(),c=parseInt(a,10);if(isNaN(c)||c<0||c>=b.slides.length){b.API.log("goto: invalid slide index: "+c);return}if(c==b.currSlide){b.API.log("goto: skipping, already on slide",c);return}b.nextSlide=c,clearTimeout(b.timeoutId),b.timeoutId=0,b.API.log("goto: ",c," (zero-index)"),b.API.prepareTx(!0,!b.reverse)},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),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>&bull;</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(c,"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()}),b.swipe&&(b.container.on("swipeleft.cycle",function(){b.API.next()}),b.container.on("swiperight.cycle",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")})}(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.API,{tmpl:function(b,c,d){if(b&&c)return b.replace(/\{\{((\.)?.*?)\}\}/g,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);
js/jquery.cycle2.tile.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: BETA-20120923 */
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);
lang/cycloneslider-de_DE.mo ADDED
Binary file
lang/cycloneslider-de_DE.po ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Cyclone Slider\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-09-03 16:08+0800\n"
6
+ "PO-Revision-Date: 2012-09-03 16:50+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/cyclone-slider.php:170
20
+ msgid "Cyclone Slider"
21
+ msgstr ""
22
+
23
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:171
24
+ msgid "Slideshow"
25
+ msgstr ""
26
+
27
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:172
28
+ msgid "Add Slideshow"
29
+ msgstr "Slideshow hinzufügen"
30
+
31
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:173
32
+ msgid "Add New Slideshow"
33
+ msgstr "Neuer Slideshow"
34
+
35
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:174
36
+ msgid "Edit Slideshow"
37
+ msgstr "Bearbeiten Slideshow"
38
+
39
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:175
40
+ msgid "New Slideshow"
41
+ msgstr "Neue Slideshow"
42
+
43
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:176
44
+ msgid "View Slideshow"
45
+ msgstr "Sehen Slideshow"
46
+
47
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:177
48
+ msgid "Search Slideshows"
49
+ msgstr "Suchen Slideshows"
50
+
51
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:178
52
+ msgid "No slideshows found"
53
+ msgstr "Keine Slideshows gefunden"
54
+
55
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:179
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:195
60
+ msgid "Slideshow updated. Shortcode is [cycloneslider id=\"%s\"]"
61
+ msgstr "Slideshow aktualisiert. Shortcode ist [cycloneslider id=\"%s\"]"
62
+
63
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:196
64
+ msgid "Custom field updated."
65
+ msgstr ""
66
+
67
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:197
68
+ msgid "Custom field deleted."
69
+ msgstr ""
70
+
71
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:198
72
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:199
73
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:202
74
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:203
75
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:204
76
+ msgid "Slideshow updated."
77
+ msgstr ""
78
+
79
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:200
80
+ msgid "Slideshow published. Shortcode is [cycloneslider id=\"%s\"]"
81
+ msgstr "Slideshow veröffentlicht. Shortcode ist [cycloneslider id=\"%s\"]"
82
+
83
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:201
84
+ msgid "Slideshow saved."
85
+ msgstr "Slideshow gespeichert."
86
+
87
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:213
88
+ msgid "Slides"
89
+ msgstr ""
90
+
91
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:221
92
+ msgid "Slider Settings"
93
+ msgstr "Slider-Einstellungen"
94
+
95
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:257
96
+ msgid "Add Slide"
97
+ msgstr "Folie hinzufügen"
98
+
99
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:319
100
+ msgid "Transition Effects to Use:"
101
+ msgstr "Transition Effects zu verwenden:"
102
+
103
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:330
104
+ msgid "Next Slide Delay:"
105
+ msgstr "Next Slide Verzögerung:"
106
+
107
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:332
108
+ msgid "Milliseconds. 0 to disable auto advance."
109
+ msgstr "Millisekunden. 0 deaktiviert auto Voraus."
110
+
111
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:336
112
+ msgid "Transition Effects Speed:"
113
+ msgstr "Transition Effects Speed:"
114
+
115
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:338
116
+ msgid "Milliseconds"
117
+ msgstr "Millisekunden"
118
+
119
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:342
120
+ msgid "Width:"
121
+ msgstr "Breite:"
122
+
123
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:344
124
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:350
125
+ msgid "pixels."
126
+ msgstr ""
127
+
128
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:348
129
+ msgid "Height:"
130
+ msgstr "Höhe:"
131
+
132
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:354
133
+ msgid "Show Prev/Next Buttons?"
134
+ msgstr "eige Tasten PREV / NEXT?"
135
+
136
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:356
137
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:364
138
+ msgid "Yes"
139
+ msgstr "Ja"
140
+
141
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:357
142
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:365
143
+ msgid "No"
144
+ msgstr "Nicht"
145
+
146
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:362
147
+ msgid "Show Navigation?"
148
+ msgstr "Zeige Navigation?"
149
+
150
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:451
151
+ msgid "Slideshow Name"
152
+ msgstr "Slideshow Namen"
153
+
154
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:452
155
+ msgid "Slideshow ID"
156
+ msgstr ""
157
+
158
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:453
159
+ msgid "Shortcode"
160
+ msgstr ""
161
+
162
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:546
163
+ msgid "[Slideshow not found]"
164
+ msgstr "[Slideshow nicht gefunden]"
165
+
166
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:590
167
+ msgid "[Template \"%s\" not found]"
168
+ msgstr "[Template \"%s\" nicht gefunden]"
169
+
170
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:4
171
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:4
172
+ msgid "Slide"
173
+ msgstr ""
174
+
175
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:7
176
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:7
177
+ msgid "Drag"
178
+ msgstr "Ziehen"
179
+
180
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:8
181
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:8
182
+ msgid "Toggle"
183
+ msgstr "Wechseln"
184
+
185
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:9
186
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:9
187
+ msgid "Delete"
188
+ msgstr "löschen"
189
+
190
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:17
191
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:17
192
+ msgid "Get Image"
193
+ msgstr ""
194
+
195
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:20
196
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:20
197
+ msgid "Extra slide elements:"
198
+ msgstr "Zusätzliche Gleitelemente:"
199
+
200
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:22
201
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:22
202
+ msgid "Slide Link"
203
+ msgstr ""
204
+
205
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:24
206
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:24
207
+ msgid "Link:"
208
+ msgstr ""
209
+
210
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:27
211
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:27
212
+ msgid "Title"
213
+ msgstr "Titel"
214
+
215
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:31
216
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:31
217
+ msgid "Description"
218
+ msgstr "Beschreibung"
219
+
lang/cycloneslider.pot ADDED
@@ -0,0 +1,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-09-03 16:08+0800\n"
6
+ "PO-Revision-Date: 2012-09-03 16: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: 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:170
20
+ msgid "Cyclone Slider"
21
+ msgstr ""
22
+
23
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:171
24
+ msgid "Slideshow"
25
+ msgstr ""
26
+
27
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:172
28
+ msgid "Add Slideshow"
29
+ msgstr ""
30
+
31
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:173
32
+ msgid "Add New Slideshow"
33
+ msgstr ""
34
+
35
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:174
36
+ msgid "Edit Slideshow"
37
+ msgstr ""
38
+
39
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:175
40
+ msgid "New Slideshow"
41
+ msgstr ""
42
+
43
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:176
44
+ msgid "View Slideshow"
45
+ msgstr ""
46
+
47
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:177
48
+ msgid "Search Slideshows"
49
+ msgstr ""
50
+
51
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:178
52
+ msgid "No slideshows found"
53
+ msgstr ""
54
+
55
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:179
56
+ msgid "No slideshows found in Trash"
57
+ msgstr ""
58
+
59
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:195
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:196
65
+ msgid "Custom field updated."
66
+ msgstr ""
67
+
68
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:197
69
+ msgid "Custom field deleted."
70
+ msgstr ""
71
+
72
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:198
73
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:199
74
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:202
75
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:203
76
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:204
77
+ msgid "Slideshow updated."
78
+ msgstr ""
79
+
80
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:200
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:201
86
+ msgid "Slideshow saved."
87
+ msgstr ""
88
+
89
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:213
90
+ msgid "Slides"
91
+ msgstr ""
92
+
93
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:221
94
+ msgid "Slider Settings"
95
+ msgstr ""
96
+
97
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:257
98
+ msgid "Add Slide"
99
+ msgstr ""
100
+
101
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:319
102
+ msgid "Transition Effects to Use:"
103
+ msgstr ""
104
+
105
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:330
106
+ msgid "Next Slide Delay:"
107
+ msgstr ""
108
+
109
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:332
110
+ msgid "Milliseconds. 0 to disable auto advance."
111
+ msgstr ""
112
+
113
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:336
114
+ msgid "Transition Effects Speed:"
115
+ msgstr ""
116
+
117
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:338
118
+ msgid "Milliseconds"
119
+ msgstr ""
120
+
121
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:342
122
+ msgid "Width:"
123
+ msgstr ""
124
+
125
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:344
126
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:350
127
+ msgid "pixels."
128
+ msgstr ""
129
+
130
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:348
131
+ msgid "Height:"
132
+ msgstr ""
133
+
134
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:354
135
+ msgid "Show Prev/Next Buttons?"
136
+ msgstr ""
137
+
138
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:356
139
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:364
140
+ msgid "Yes"
141
+ msgstr ""
142
+
143
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:357
144
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:365
145
+ msgid "No"
146
+ msgstr ""
147
+
148
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:362
149
+ msgid "Show Navigation?"
150
+ msgstr ""
151
+
152
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:451
153
+ msgid "Slideshow Name"
154
+ msgstr ""
155
+
156
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:452
157
+ msgid "Slideshow ID"
158
+ msgstr ""
159
+
160
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:453
161
+ msgid "Shortcode"
162
+ msgstr ""
163
+
164
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:546
165
+ msgid "[Slideshow not found]"
166
+ msgstr ""
167
+
168
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/cyclone-slider.php:590
169
+ #, php-format
170
+ msgid "[Template \"%s\" not found]"
171
+ msgstr ""
172
+
173
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:4
174
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:4
175
+ msgid "Slide"
176
+ msgstr ""
177
+
178
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:7
179
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:7
180
+ msgid "Drag"
181
+ msgstr ""
182
+
183
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:8
184
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:8
185
+ msgid "Toggle"
186
+ msgstr ""
187
+
188
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:9
189
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:9
190
+ msgid "Delete"
191
+ msgstr ""
192
+
193
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:17
194
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:17
195
+ msgid "Get Image"
196
+ msgstr ""
197
+
198
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:20
199
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:20
200
+ msgid "Extra slide elements:"
201
+ msgstr ""
202
+
203
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:22
204
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:22
205
+ msgid "Slide Link"
206
+ msgstr ""
207
+
208
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:24
209
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:24
210
+ msgid "Link:"
211
+ msgstr ""
212
+
213
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:27
214
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:27
215
+ msgid "Title"
216
+ msgstr ""
217
+
218
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box-js.php:31
219
+ #: D:\webserver\htdocs\wp3\wp-content\plugins\cyclone-slider/inc/admin/box.php:31
220
+ msgid "Description"
221
+ msgstr ""
222
+
screenshot-1.jpg ADDED
Binary file
screenshot-2.jpg ADDED
Binary file
screenshot-3.jpg ADDED
Binary file
templates/black/images/bg-caption.png ADDED
Binary file
templates/black/images/sprite-arrows.png ADDED
Binary file
templates/black/images/sprite-nav.png ADDED
Binary file
templates/black/slider.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ data-cycle-slides="> div"
5
+ data-cycle-auto-height="<?php echo $slider_settings['width']; ?>:<?php echo $slider_settings['height']; ?>"
6
+ data-cycle-fx="<?php echo $slider_settings['fx']; ?>"
7
+ data-cycle-speed="<?php echo $slider_settings['speed']; ?>"
8
+ data-cycle-timeout="<?php echo $slider_settings['timeout']; ?>"
9
+ data-cycle-pause-on-hover="<?php echo $slider_settings['hover_pause']; ?>"
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']);//$slide; ?>" 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 $slider_metas[$i]['title'];?></div>
24
+ <div class="cycloneslider-caption-description"><?php echo $slider_metas[$i]['description'];?></div>
25
+ </div>
26
+ <?php endif; ?>
27
+ </div>
28
+ <?php endforeach; ?>
29
+ </div>
30
+ <?php if ($slider_settings['show_nav']) : ?>
31
+ <div class="cycloneslider-pager"></div>
32
+ <?php endif; ?>
33
+ <?php if ($slider_settings['show_prev_next']) : ?>
34
+ <div class="cycloneslider-prev">Prev</div>
35
+ <div class="cycloneslider-next">Next</div>
36
+ <?php endif; ?>
37
+ </div>
templates/black/style.css ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Template Black ***/
2
+ .cycloneslider-template-black img{
3
+ display:block;
4
+ }
5
+ .cycloneslider-template-black .cycloneslider-prev,
6
+ .cycloneslider-template-black .cycloneslider-next{
7
+ display:none;
8
+ opacity:0;
9
+ position:absolute;
10
+ top:50%;
11
+ margin-top:-22px;
12
+ z-index:102;
13
+ width:26px;
14
+ height:44px;
15
+ text-indent:-99999px;
16
+ background: url($tpl/images/sprite-arrows.png) no-repeat;
17
+ }
18
+ .cycloneslider-template-black:hover .cycloneslider-prev,
19
+ .cycloneslider-template-black:hover .cycloneslider-next{
20
+ display:block;
21
+ opacity:0.4;
22
+ }
23
+ .cycloneslider-template-black .cycloneslider-prev{
24
+ left:10px;
25
+ background-position:0 0;
26
+ }
27
+ .cycloneslider-template-black .cycloneslider-next{
28
+ right:10px;
29
+ background-position:-29px 0;
30
+ }
31
+ .cycloneslider-template-black .cycloneslider-prev:hover,
32
+ .cycloneslider-template-black .cycloneslider-next:hover{
33
+ opacity:1;
34
+ }
35
+ .cycloneslider-template-black .cycloneslider-pager{
36
+ position:absolute;
37
+ z-index:200;
38
+ top:20px;
39
+ right:20px;
40
+ }
41
+ .cycloneslider-template-black .cycloneslider-pager span {
42
+ background: url($tpl/images/sprite-nav.png) no-repeat scroll 0 0 transparent;
43
+ display: block;
44
+ float: left;
45
+ font-size: 0;
46
+ width: 10px;
47
+ height: 10px;
48
+ line-height: 0;
49
+ margin-right: 6px;
50
+ text-indent: -99999px;
51
+ }
52
+ .cycloneslider-template-black .cycloneslider-pager span.cycle-pager-active {
53
+ background-position: left bottom;
54
+ }
55
+ .cycloneslider-template-black .cycloneslider-caption{
56
+ position:absolute;
57
+ left:0;
58
+ bottom:0;
59
+ width:100%;
60
+ z-index:99;
61
+ background: url($tpl/images/bg-caption.png);
62
+ color:#fff;
63
+ }
64
+ .cycloneslider-template-black .cycloneslider-caption-title{
65
+ padding:10px 20px 5px 20px;
66
+ font-size:22px;
67
+ line-height:1;
68
+ margin-bottom:0;
69
+ }
70
+ .cycloneslider-template-black .cycloneslider-caption-description{
71
+ padding:0 20px 15px 20px;
72
+ line-height:1.5;
73
+ font-size:12px;
74
+ }
templates/blue/images/bg-caption.png ADDED
Binary file
templates/blue/images/sprite-arrows.png ADDED
Binary file
templates/blue/images/sprite-nav.png ADDED
Binary file
templates/blue/slider.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ data-cycle-slides="> div"
5
+ data-cycle-auto-height="<?php echo $slider_settings['width']; ?>:<?php echo $slider_settings['height']; ?>"
6
+ data-cycle-fx="<?php echo $slider_settings['fx']; ?>"
7
+ data-cycle-speed="<?php echo $slider_settings['speed']; ?>"
8
+ data-cycle-timeout="<?php echo $slider_settings['timeout']; ?>"
9
+ data-cycle-pause-on-hover="<?php echo $slider_settings['hover_pause']; ?>"
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']);//$slide; ?>" 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 $slider_metas[$i]['title'];?></div>
24
+ <div class="cycloneslider-caption-description"><?php echo $slider_metas[$i]['description'];?></div>
25
+ </div>
26
+ <?php endif; ?>
27
+ </div>
28
+ <?php endforeach; ?>
29
+ </div>
30
+ <?php if ($slider_settings['show_nav']) : ?>
31
+ <div class="cycloneslider-pager"></div>
32
+ <?php endif; ?>
33
+ <?php if ($slider_settings['show_prev_next']) : ?>
34
+ <div class="cycloneslider-prev">Prev</div>
35
+ <div class="cycloneslider-next">Next</div>
36
+ <?php endif; ?>
37
+ </div>
templates/blue/style.css ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Template Blue ***/
2
+ .cycloneslider-template-blue img{
3
+ display:block;
4
+ }
5
+ .cycloneslider-template-blue .cycloneslider-prev,
6
+ .cycloneslider-template-blue .cycloneslider-next{
7
+ display:none;
8
+ opacity:0;
9
+ position:absolute;
10
+ top:50%;
11
+ margin-top:-22px;
12
+ z-index:102;
13
+ width:26px;
14
+ height:44px;
15
+ text-indent:-99999px;
16
+ background: url($tpl/images/sprite-arrows.png) no-repeat;
17
+ }
18
+ .cycloneslider-template-blue:hover .cycloneslider-prev,
19
+ .cycloneslider-template-blue:hover .cycloneslider-next{
20
+ display:block;
21
+ opacity:0.4;
22
+ }
23
+ .cycloneslider-template-blue .cycloneslider-prev{
24
+ left:10px;
25
+ background-position:0 0;
26
+ }
27
+ .cycloneslider-template-blue .cycloneslider-next{
28
+ right:10px;
29
+ background-position:-29px 0;
30
+ }
31
+ .cycloneslider-template-blue .cycloneslider-prev:hover,
32
+ .cycloneslider-template-blue .cycloneslider-next:hover{
33
+ opacity:1;
34
+ }
35
+ .cycloneslider-template-blue .cycloneslider-pager{
36
+ position:absolute;
37
+ z-index:200;
38
+ top:20px;
39
+ right:20px;
40
+ }
41
+ .cycloneslider-template-blue .cycloneslider-pager span {
42
+ background: url($tpl/images/sprite-nav.png) no-repeat scroll 0 0 transparent;
43
+ display: block;
44
+ float: left;
45
+ font-size: 0;
46
+ width: 10px;
47
+ height: 10px;
48
+ line-height: 0;
49
+ margin-right: 6px;
50
+ text-indent: -99999px;
51
+ }
52
+ .cycloneslider-template-blue .cycloneslider-pager span.cycle-pager-active {
53
+ background-position: left bottom;
54
+ }
55
+ .cycloneslider-template-blue .cycloneslider-caption{
56
+ position:absolute;
57
+ left:0;
58
+ bottom:0;
59
+ width:100%;
60
+ z-index:99;
61
+ background: url($tpl/images/bg-caption.png);
62
+ color:#fff;
63
+ }
64
+ .cycloneslider-template-blue .cycloneslider-caption-title{
65
+ padding:10px 20px 5px 20px;
66
+ font-size:22px;
67
+ line-height:1;
68
+ margin-bottom:0;
69
+ }
70
+ .cycloneslider-template-blue .cycloneslider-caption-description{
71
+ padding:0 20px 15px 20px;
72
+ line-height:1.5;
73
+ font-size:12px;
74
+ }
templates/default/images/bg-caption.png ADDED
Binary file
templates/default/images/sprite-arrows.png ADDED
Binary file
templates/default/images/sprite-nav.png ADDED
Binary file
templates/default/slider.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ data-cycle-slides="> div"
5
+ data-cycle-auto-height="<?php echo $slider_settings['width']; ?>:<?php echo $slider_settings['height']; ?>"
6
+ data-cycle-fx="<?php echo $slider_settings['fx']; ?>"
7
+ data-cycle-speed="<?php echo $slider_settings['speed']; ?>"
8
+ data-cycle-timeout="<?php echo $slider_settings['timeout']; ?>"
9
+ data-cycle-pause-on-hover="<?php echo $slider_settings['hover_pause']; ?>"
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']);//$slide; ?>" 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 $slider_metas[$i]['title'];?></div>
24
+ <div class="cycloneslider-caption-description"><?php echo $slider_metas[$i]['description'];?></div>
25
+ </div>
26
+ <?php endif; ?>
27
+ </div>
28
+ <?php endforeach; ?>
29
+ </div>
30
+ <?php if ($slider_settings['show_nav']) : ?>
31
+ <div class="cycloneslider-pager"></div>
32
+ <?php endif; ?>
33
+ <?php if ($slider_settings['show_prev_next']) : ?>
34
+ <div class="cycloneslider-prev">Prev</div>
35
+ <div class="cycloneslider-next">Next</div>
36
+ <?php endif; ?>
37
+ </div>
templates/default/style.css ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Template Default ***/
2
+ .cycloneslider-template-default img{
3
+ display:block;
4
+ }
5
+ .cycloneslider-template-default .cycloneslider-prev,
6
+ .cycloneslider-template-default .cycloneslider-next{
7
+ display:none;
8
+ opacity:0;
9
+ position:absolute;
10
+ top:50%;
11
+ margin-top:-22px;
12
+ z-index:102;
13
+ width:26px;
14
+ height:44px;
15
+ text-indent:-99999px;
16
+ background: url($tpl/images/sprite-arrows.png) no-repeat;
17
+ }
18
+ .cycloneslider-template-default:hover .cycloneslider-prev,
19
+ .cycloneslider-template-default:hover .cycloneslider-next{
20
+ display:block;
21
+ opacity:0.4;
22
+ }
23
+ .cycloneslider-template-default .cycloneslider-prev{
24
+ left:10px;
25
+ background-position:0 0;
26
+ }
27
+ .cycloneslider-template-default .cycloneslider-next{
28
+ right:10px;
29
+ background-position:-29px 0;
30
+ }
31
+ .cycloneslider-template-default .cycloneslider-prev:hover,
32
+ .cycloneslider-template-default .cycloneslider-next:hover{
33
+ opacity:1;
34
+ }
35
+ .cycloneslider-template-default .cycloneslider-pager{
36
+ position:absolute;
37
+ z-index:200;
38
+ top:20px;
39
+ right:20px;
40
+ }
41
+ .cycloneslider-template-default .cycloneslider-pager span {
42
+ background: url($tpl/images/sprite-nav.png) no-repeat scroll 0 0 transparent;
43
+ display: block;
44
+ float: left;
45
+ font-size: 0;
46
+ width: 10px;
47
+ height: 10px;
48
+ line-height: 0;
49
+ margin-right: 6px;
50
+ text-indent: -99999px;
51
+ }
52
+ .cycloneslider-template-default .cycloneslider-pager span.cycle-pager-active {
53
+ background-position: left bottom;
54
+ }
55
+ .cycloneslider-template-default .cycloneslider-caption{
56
+ position:absolute;
57
+ left:0;
58
+ bottom:0;
59
+ width:100%;
60
+ z-index:99;
61
+ background: url($tpl/images/bg-caption.png);
62
+ color:#fff;
63
+ }
64
+ .cycloneslider-template-default .cycloneslider-caption-title{
65
+ padding:10px 20px 5px 20px;
66
+ font-size:22px;
67
+ line-height:1;
68
+ margin-bottom:0;
69
+ }
70
+ .cycloneslider-template-default .cycloneslider-caption-description{
71
+ padding:0 20px 15px 20px;
72
+ line-height:1.5;
73
+ font-size:12px;
74
+ }
templates/myrtle/images/bg-caption.png ADDED
Binary file
templates/myrtle/images/sprite-arrows.png ADDED
Binary file
templates/myrtle/images/sprite-nav.png ADDED
Binary file
templates/myrtle/slider.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ data-cycle-slides="> div"
5
+ data-cycle-auto-height="<?php echo $slider_settings['width']; ?>:<?php echo $slider_settings['height']; ?>"
6
+ data-cycle-fx="<?php echo $slider_settings['fx']; ?>"
7
+ data-cycle-speed="<?php echo $slider_settings['speed']; ?>"
8
+ data-cycle-timeout="<?php echo $slider_settings['timeout']; ?>"
9
+ data-cycle-pause-on-hover="<?php echo $slider_settings['hover_pause']; ?>"
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']);//$slide; ?>" 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 $slider_metas[$i]['title'];?></div>
22
+ <div class="cycloneslider-caption-description"><?php echo $slider_metas[$i]['description'];?></div>
23
+ </div>
24
+ <?php endif; ?>
25
+ </div>
26
+ <?php endforeach; ?>
27
+ </div>
28
+ <?php if ($slider_settings['show_nav']) : ?>
29
+ <div class="cycloneslider-pager"></div>
30
+ <?php endif; ?>
31
+ <?php if ($slider_settings['show_prev_next']) : ?>
32
+ <div class="cycloneslider-prev">Prev</div>
33
+ <div class="cycloneslider-next">Next</div>
34
+ <?php endif; ?>
35
+ </div>
templates/myrtle/style.css ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Template Myrtle ***/
2
+ .cycloneslider-template-myrtle{
3
+ overflow:hidden;
4
+ }
5
+ .cycloneslider-template-myrtle .cycloneslider-slide img{
6
+ max-width:100%;
7
+ max-height:100%;
8
+ }
9
+ .cycloneslider-template-myrtle .cycloneslider-prev,
10
+ .cycloneslider-template-myrtle .cycloneslider-next{
11
+ display:none;
12
+ position:absolute;
13
+ top:50%;
14
+ margin-top:-19px;
15
+ z-index:102;
16
+ text-indent:-99999px;
17
+ width:45px;
18
+ height:45px;
19
+ background: url($tpl/images/sprite-arrows.png) no-repeat;
20
+ }
21
+ .cycloneslider-template-myrtle:hover .cycloneslider-prev,
22
+ .cycloneslider-template-myrtle:hover .cycloneslider-next{
23
+ display:block;
24
+ }
25
+ .cycloneslider-template-myrtle .cycloneslider-prev{
26
+ left:10px;
27
+ background-position:-45px 0;
28
+ }
29
+ .cycloneslider-template-myrtle .cycloneslider-next{
30
+ right:10px;
31
+ background-position:0 0;
32
+ }
33
+ .cycloneslider-template-myrtle .cycloneslider-prev:hover{
34
+ background-position:-45px -45px;
35
+ }
36
+ .cycloneslider-template-myrtle .cycloneslider-next:hover{
37
+ background-position:0 -45px;
38
+ }
39
+ .cycloneslider-template-myrtle .cycloneslider-pager{
40
+ position:absolute;
41
+ z-index:200;
42
+ top:20px;
43
+ right:20px;
44
+ }
45
+ .cycloneslider-template-myrtle .cycloneslider-pager span {
46
+ background: url($tpl/images/sprite-nav.png) no-repeat scroll 0 0 transparent;
47
+ display: block;
48
+ float: left;
49
+ font-size: 0;
50
+ width: 12px;
51
+ height: 12px;
52
+ line-height: 0;
53
+ margin-right: 6px;
54
+ text-indent: -99999px;
55
+ }
56
+ .cycloneslider-template-myrtle .cycloneslider-pager span.cycle-pager-active {
57
+ background-position: left bottom;
58
+ }
59
+ .cycloneslider-template-myrtle .cycloneslider-caption{
60
+ position:absolute;
61
+ left:0;
62
+ bottom:0;
63
+ width:100%;
64
+ z-index:99;
65
+ background: url($tpl/images/bg-caption.png) right;
66
+ color:#fff;
67
+ }
68
+ .cycloneslider-template-myrtle .cycloneslider-caption-title{
69
+ padding:10px 20px 5px 20px;
70
+ font-size:24px;
71
+ line-height:1;
72
+ margin-bottom:0;
73
+ color:#E62B4E;
74
+ }
75
+ .cycloneslider-template-myrtle .cycloneslider-caption-description{
76
+ padding:0 20px 15px 20px;
77
+ line-height:1.5;
78
+ font-size:12px;
79
+ color:#676761;
80
+ }
templates/thumbnails/images/bg-caption.png ADDED
Binary file
templates/thumbnails/images/sprite-arrows.png ADDED
Binary file
templates/thumbnails/images/sprite-nav.png ADDED
Binary file
templates/thumbnails/slider.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ data-cycle-slides="> div"
5
+ data-cycle-auto-height="<?php echo $slider_settings['width']; ?>:<?php echo $slider_settings['height']; ?>"
6
+ data-cycle-fx="<?php echo $slider_settings['fx']; ?>"
7
+ data-cycle-speed="<?php echo $slider_settings['speed']; ?>"
8
+ data-cycle-timeout="<?php echo $slider_settings['timeout']; ?>"
9
+ data-cycle-pause-on-hover="<?php echo $slider_settings['hover_pause']; ?>"
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']);//$slide; ?>" 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 $slider_metas[$i]['title'];?></div>
22
+ <div class="cycloneslider-caption-description"><?php echo $slider_metas[$i]['description'];?></div>
23
+ </div>
24
+ <?php endif; ?>
25
+ </div>
26
+ <?php endforeach; ?>
27
+ </div>
28
+ <?php if ($slider_settings['show_prev_next']) : ?>
29
+ <div class="cycloneslider-prev">Prev</div>
30
+ <div class="cycloneslider-next">Next</div>
31
+ <?php endif; ?>
32
+ </div>
33
+ <?php if ($slider_settings['show_nav']) : ?>
34
+ <div id="cycloneslider-thumbnails-<?php echo $slider_id; ?>" class="cycloneslider-template-thumbnails cycloneslider-thumbnails" style="max-width:<?php echo $slider_settings['width']; ?>px">
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 ) ?>" 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>
templates/thumbnails/style.css ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*** Template Thumbnails ***/
2
+ .cycloneslider-template-thumbnails img{
3
+ display:block;
4
+ }
5
+ .cycloneslider-template-thumbnails .cycloneslider-prev,
6
+ .cycloneslider-template-thumbnails .cycloneslider-next{
7
+ display:none;
8
+ opacity:0;
9
+ position:absolute;
10
+ top:50%;
11
+ margin-top:-22px;
12
+ z-index:102;
13
+ width:26px;
14
+ height:44px;
15
+ text-indent:-99999px;
16
+ background: url($tpl/images/sprite-arrows.png) no-repeat;
17
+ }
18
+ .cycloneslider-template-thumbnails:hover .cycloneslider-prev,
19
+ .cycloneslider-template-thumbnails:hover .cycloneslider-next{
20
+ display:block;
21
+ opacity:0.4;
22
+ }
23
+ .cycloneslider-template-thumbnails .cycloneslider-prev{
24
+ left:10px;
25
+ background-position:0 0;
26
+ }
27
+ .cycloneslider-template-thumbnails .cycloneslider-next{
28
+ right:10px;
29
+ background-position:-29px 0;
30
+ }
31
+ .cycloneslider-template-thumbnails .cycloneslider-prev:hover,
32
+ .cycloneslider-template-thumbnails .cycloneslider-next:hover{
33
+ opacity:1;
34
+ }
35
+
36
+ .cycloneslider-template-thumbnails .cycloneslider-caption{
37
+ position:absolute;
38
+ left:0;
39
+ bottom:0;
40
+ width:100%;
41
+ z-index:99;
42
+ background: url($tpl/images/bg-caption.png);
43
+ color:#fff;
44
+ }
45
+ .cycloneslider-template-thumbnails .cycloneslider-caption-title{
46
+ padding:10px 20px 5px 20px;
47
+ font-size:22px;
48
+ line-height:1;
49
+ margin-bottom:0;
50
+ }
51
+ .cycloneslider-template-thumbnails .cycloneslider-caption-description{
52
+ padding:0 20px 15px 20px;
53
+ line-height:1.5;
54
+ font-size:12px;
55
+ }
56
+
57
+ .cycloneslider-template-thumbnails.cycloneslider-thumbnails{
58
+ padding:20px 0;
59
+ text-align:center;
60
+ }
61
+ .cycloneslider-template-thumbnails.cycloneslider-thumbnails li{
62
+ display:inline-block;
63
+ margin:0 5px;
64
+ border:5px solid #ccc;
65
+ cursor:pointer;
66
+ }
67
+ .cycloneslider-template-thumbnails.cycloneslider-thumbnails li.current{
68
+ border-color:#333;
69
+ }