Version Description
- First version.
=
Download this release
Release Info
Developer | digontoahsan |
Plugin | Advanced post slider |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- advanced-post-slider.php +544 -0
- advps-admin.php +2441 -0
- advps-style.css +223 -0
- images/advps-bullet-active-two.png +0 -0
- images/advps-bullet-two.png +0 -0
- images/advps-down-arrow.png +0 -0
- images/advps-left-arrow.png +0 -0
- images/advps-right-arrow-two.png +0 -0
- images/advps-right-arrow.png +0 -0
- images/advps-up-arrow.png +0 -0
- images/l1.png +0 -0
- images/pause-two.png +0 -0
- images/pause.png +0 -0
- images/play-two.png +0 -0
- images/play.png +0 -0
- images/r1.png +0 -0
- images/right-arrow.png +0 -0
- js/advps.frnt.script.js +34 -0
- js/advps.script.js +117 -0
- js/jquery.cycle.all.js +1540 -0
- js/jquery.cycle.all_older.js +1545 -0
- js/jquery.easing.1.3.js +205 -0
- readme.txt +83 -0
advanced-post-slider.php
ADDED
@@ -0,0 +1,544 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Advanced post slider
|
4 |
+
Plugin URI: www.wpcue.com
|
5 |
+
Description: Advanced post slider is a slideshow plugin powered with three built-in templates, lots of effect, easy customizable options and many more to explore.
|
6 |
+
Version: 1.0
|
7 |
+
Author: digontoahsan
|
8 |
+
Author URI: www.wpcue.com
|
9 |
+
License: GPL2
|
10 |
+
*/
|
11 |
+
|
12 |
+
function advps_modify_menu(){
|
13 |
+
add_menu_page( 'Advanced post slider', 'Adv. Slider', 'manage_options', 'advps-slideshow', 'advps_options' );
|
14 |
+
}
|
15 |
+
|
16 |
+
add_action('admin_menu','advps_modify_menu');
|
17 |
+
|
18 |
+
function advps_options(){
|
19 |
+
include('advps-admin.php');
|
20 |
+
}
|
21 |
+
|
22 |
+
define('advps_url',WP_PLUGIN_URL."/advanced-post-slider/");
|
23 |
+
|
24 |
+
global $advpsQuery;
|
25 |
+
global $advpsQuery2;
|
26 |
+
global $advpsEffects;
|
27 |
+
global $templateOneDefaultOptions;
|
28 |
+
global $templatetwoDefaultOptions;
|
29 |
+
global $templatethreeDefaultOptions;
|
30 |
+
|
31 |
+
$advpsQuery = array(
|
32 |
+
"advps_post_types" => "post",
|
33 |
+
"advps_maxpost" => "10",
|
34 |
+
"advps_exclude" => "",
|
35 |
+
"advps_order_by" => "date",
|
36 |
+
"advps_order" => "DESC"
|
37 |
+
);
|
38 |
+
$advpsQuery2 = array(
|
39 |
+
"advps_post_types" => "post",
|
40 |
+
"advps_maxpost" => "10",
|
41 |
+
"advps_postperslide" => "1",
|
42 |
+
"advps_exclude" => "",
|
43 |
+
"advps_order_by" => "date",
|
44 |
+
"advps_order" => "DESC"
|
45 |
+
);
|
46 |
+
$advpsEffects = array(
|
47 |
+
"advps_effects" => "uncover",
|
48 |
+
"advps_timeout" => "1500",
|
49 |
+
"advps_easing" => "linear",
|
50 |
+
"advps_speed" => "2000",
|
51 |
+
"advps_ps_hover" => "yes"
|
52 |
+
);
|
53 |
+
|
54 |
+
$templateOneDefaultOptions = array(
|
55 |
+
"advps_thumbnail" => "advps_thumbnail_one",
|
56 |
+
"advps_sld_width" => "820",
|
57 |
+
"advps_sld_height" => "270",
|
58 |
+
"advps_contpad1" => "10",
|
59 |
+
"advps_contpad2" => "10",
|
60 |
+
"advps_contpad3" => "10",
|
61 |
+
"advps_contpad4" => "10",
|
62 |
+
"advps_bgcolor" => "#FFFFFF",
|
63 |
+
"advps_border_size" => "1",
|
64 |
+
"advps_border_type" => "solid",
|
65 |
+
"advps_border_color" => "#444444",
|
66 |
+
"advps_remove_border" => "yes",
|
67 |
+
"advps_bxshad1" => "0",
|
68 |
+
"advps_bxshad2" => "1",
|
69 |
+
"advps_bxshad3" => "4",
|
70 |
+
"advps_bxshadcolor" => "#000000",
|
71 |
+
"advps_remove_shd" => "no",
|
72 |
+
"advps_overlay_width" => "30",
|
73 |
+
"advps_overlay_height" => "100",
|
74 |
+
"advps_overlay_color" => "#000000",
|
75 |
+
"advps_overlay_opacity" => "0.6",
|
76 |
+
"advps_text_opacity" => "1",
|
77 |
+
"advps_titleFcolor" => "#FFFFFF",
|
78 |
+
"advps_titleHcolor" => "#E6E6E6",
|
79 |
+
"advps_titleFsize" => "22",
|
80 |
+
"advps_excptFcolor" => "#FFFFFF",
|
81 |
+
"advps_excptFsize" => "12",
|
82 |
+
"advps_excerptlen" => "30",
|
83 |
+
"advps_excpt_visibility" => "always show",
|
84 |
+
"advps_excpt_position" => "left",
|
85 |
+
"advps_ed_link" => "enable",
|
86 |
+
"advps_link_type" => "permalink",
|
87 |
+
"advps_exclude_pager" => "no",
|
88 |
+
"advps_pager_type" => "bullet",
|
89 |
+
"advps_pager_right" => "8",
|
90 |
+
"advps_pager_bottom" => "6",
|
91 |
+
"advps_exclude_nxtprev" => "no",
|
92 |
+
"advps_exclude_playpause" => "no"
|
93 |
+
);
|
94 |
+
$templatetwoDefaultOptions = array(
|
95 |
+
"advps_thumbnail" => "advps_thumbnail_two",
|
96 |
+
"advps_sld_width" => "644",
|
97 |
+
"advps_sld_height" => "270",
|
98 |
+
"advps_contpad1" => "10",
|
99 |
+
"advps_contpad2" => "10",
|
100 |
+
"advps_contpad3" => "10",
|
101 |
+
"advps_contpad4" => "10",
|
102 |
+
"advps_bgcolor" => "#FFFFFF",
|
103 |
+
"advps_border_size" => "1",
|
104 |
+
"advps_border_type" => "solid",
|
105 |
+
"advps_border_color" => "#444444",
|
106 |
+
"advps_remove_border" => "yes",
|
107 |
+
"advps_bxshad1" => "0",
|
108 |
+
"advps_bxshad2" => "1",
|
109 |
+
"advps_bxshad3" => "4",
|
110 |
+
"advps_bxshadcolor" => "#000000",
|
111 |
+
"advps_remove_shd" => "no",
|
112 |
+
"advps_img_Orientation" => "horizontal",
|
113 |
+
"advps_imagemar" => "10",
|
114 |
+
"advps_ed_link" => "enable",
|
115 |
+
"advps_link_type" => "permalink",
|
116 |
+
"advps_exclude_pager" => "no",
|
117 |
+
"advps_pager_type" => "bullet",
|
118 |
+
"advps_pager_right" => "8",
|
119 |
+
"advps_pager_bottom" => "6",
|
120 |
+
"advps_exclude_nxtprev" => "no",
|
121 |
+
"advps_exclude_playpause" => "no"
|
122 |
+
);
|
123 |
+
$templatethreeDefaultOptions = array(
|
124 |
+
"advps_content_set" => array(0=>"thumb",1=>"title",2=>"excerpt"),
|
125 |
+
"advps_thumbnail" => "medium",
|
126 |
+
"advps_sld_width" => "624",
|
127 |
+
"advps_sld_height" => "225",
|
128 |
+
"advps_contpad1" => "10",
|
129 |
+
"advps_contpad2" => "10",
|
130 |
+
"advps_contpad3" => "10",
|
131 |
+
"advps_contpad4" => "10",
|
132 |
+
"advps_bgcolor" => "#FFFFFF",
|
133 |
+
"advps_border_size" => "1",
|
134 |
+
"advps_border_type" => "solid",
|
135 |
+
"advps_border_color" => "#444444",
|
136 |
+
"advps_remove_border" => "yes",
|
137 |
+
"advps_bxshad1" => "0",
|
138 |
+
"advps_bxshad2" => "1",
|
139 |
+
"advps_bxshad3" => "4",
|
140 |
+
"advps_bxshadcolor" => "#000000",
|
141 |
+
"advps_remove_shd" => "no",
|
142 |
+
"advps_cont_width" => "280",
|
143 |
+
"advps_titleFcolor" => "#000000",
|
144 |
+
"advps_titleHcolor" => "#E6E6E6",
|
145 |
+
"advps_titleFsize" => "22",
|
146 |
+
"advps_excptFcolor" => "#333333",
|
147 |
+
"advps_excptFsize" => "12",
|
148 |
+
"advps_excerptlen" => "30",
|
149 |
+
"advps_ed_link" => "enable",
|
150 |
+
"advps_link_type" => "permalink",
|
151 |
+
"advps_exclude_pager" => "no",
|
152 |
+
"advps_pager_type" => "bullet",
|
153 |
+
"advps_pager_right" => "8",
|
154 |
+
"advps_pager_bottom" => "6",
|
155 |
+
"advps_exclude_nxtprev" => "no",
|
156 |
+
"advps_exclude_playpause" => "no"
|
157 |
+
);
|
158 |
+
/* ---------------------------------------------------------------------------------*/
|
159 |
+
function advps_enqueue() {
|
160 |
+
|
161 |
+
$pluginsURL = WP_PLUGIN_URL."/advanced-post-slider/";
|
162 |
+
wp_register_style('advpsStyleSheet', advps_url.'advps-style.css');
|
163 |
+
wp_enqueue_style( 'advpsStyleSheet');
|
164 |
+
|
165 |
+
wp_enqueue_script('jquery');
|
166 |
+
wp_enqueue_script( 'advps_jcycle',advps_url.'js/jquery.cycle.all.js',array( 'jquery' ) );
|
167 |
+
wp_enqueue_script( 'advps_easing',advps_url.'js/jquery.easing.1.3.js',array( 'jquery' ) );
|
168 |
+
wp_enqueue_script( 'advps_front_script',advps_url.'js/advps.frnt.script.js' );
|
169 |
+
|
170 |
+
}
|
171 |
+
add_action( 'wp_enqueue_scripts', 'advps_enqueue' );
|
172 |
+
|
173 |
+
function load_custom_wp_admin_style() {
|
174 |
+
global $wp_version;
|
175 |
+
if(isset($_GET['page'])){
|
176 |
+
$pgslug = $_GET['page'];
|
177 |
+
$menuslug = array('advps-slideshow');
|
178 |
+
|
179 |
+
if(!in_array($pgslug,$menuslug))
|
180 |
+
return;
|
181 |
+
|
182 |
+
if($wp_version >= '3.5'){
|
183 |
+
wp_enqueue_script( 'wp-color-picker' );
|
184 |
+
wp_enqueue_style( 'wp-color-picker' );
|
185 |
+
}
|
186 |
+
else
|
187 |
+
{
|
188 |
+
wp_enqueue_style( 'farbtastic' );
|
189 |
+
wp_enqueue_script( 'farbtastic' );
|
190 |
+
}
|
191 |
+
wp_enqueue_script( 'advps-js-script', advps_url . 'js/advps.script.js', array( 'jquery' ) );
|
192 |
+
wp_localize_script( 'advps-js-script', 'advpsajx', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ),'advpsAjaxReqChck' => wp_create_nonce( 'advpsauthrequst' )));
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
}
|
197 |
+
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
|
198 |
+
|
199 |
+
/* ---------------------------------------------------------------------------------------*/
|
200 |
+
|
201 |
+
register_activation_hook(WP_PLUGIN_DIR.'/advanced-post-slider/advanced-post-slider.php','set_advps_options');
|
202 |
+
register_deactivation_hook(WP_PLUGIN_DIR.'/advanced-post-slider/advanced-post-slider.php','unset_advps_options');
|
203 |
+
|
204 |
+
function set_advps_options(){
|
205 |
+
global $wpdb;
|
206 |
+
global $advpsQuery;
|
207 |
+
global $advpsQuery2;
|
208 |
+
global $advpsEffects;
|
209 |
+
global $templateOneDefaultOptions;
|
210 |
+
global $templatetwoDefaultOptions;
|
211 |
+
global $templatethreeDefaultOptions;
|
212 |
+
|
213 |
+
$ins_q = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."advps_optionset (
|
214 |
+
`id` int(5) NOT NULL AUTO_INCREMENT,
|
215 |
+
`template` varchar(10) CHARACTER SET utf8 NOT NULL,
|
216 |
+
`opt_data` text CHARACTER SET utf8 NOT NULL,
|
217 |
+
PRIMARY KEY (`id`)
|
218 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
|
219 |
+
$wpdb->query($ins_q);
|
220 |
+
|
221 |
+
$ins_q2 = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."advps_thumbnail (
|
222 |
+
`id` int(2) NOT NULL AUTO_INCREMENT,
|
223 |
+
`thumb_name` varchar(500) NOT NULL,
|
224 |
+
`width` int(4) NOT NULL,
|
225 |
+
`height` int(4) NOT NULL,
|
226 |
+
`crop` varchar(5) NOT NULL,
|
227 |
+
PRIMARY KEY (`id`)
|
228 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
|
229 |
+
$wpdb->query($ins_q2);
|
230 |
+
|
231 |
+
$arrmrg1 = array_merge($advpsQuery,$advpsEffects,$templateOneDefaultOptions);
|
232 |
+
$arrmrg2 = array_merge($advpsQuery2,$advpsEffects,$templatetwoDefaultOptions);
|
233 |
+
$arrmrg3 = array_merge($advpsQuery,$advpsEffects,$templatethreeDefaultOptions);
|
234 |
+
|
235 |
+
$optdt1 = serialize($arrmrg1);
|
236 |
+
$optdt2 = serialize($arrmrg2);
|
237 |
+
$optdt3 = serialize($arrmrg3);
|
238 |
+
|
239 |
+
$q1 = "insert into ".$wpdb->prefix."advps_optionset (template,opt_data) values('one','".$optdt1."')";
|
240 |
+
$q2 = "insert into ".$wpdb->prefix."advps_optionset (template,opt_data) values('two','".$optdt2."')";
|
241 |
+
$q3 = "insert into ".$wpdb->prefix."advps_optionset (template,opt_data) values('three','".$optdt3."')";
|
242 |
+
|
243 |
+
if(!$wpdb->get_results("select id from ".$wpdb->prefix."advps_optionset where template = 'one'")){
|
244 |
+
$wpdb->query($q1);
|
245 |
+
}
|
246 |
+
if(!$wpdb->get_results("select id from ".$wpdb->prefix."advps_optionset where template = 'two'")){
|
247 |
+
$wpdb->query($q2);
|
248 |
+
}
|
249 |
+
if(!$wpdb->get_results("select id from ".$wpdb->prefix."advps_optionset where template = 'three'")){
|
250 |
+
$wpdb->query($q3);
|
251 |
+
}
|
252 |
+
|
253 |
+
if(!$wpdb->get_results("select id from ".$wpdb->prefix."advps_thumbnail where thumb_name = 'advps_thumbnail_one'")){
|
254 |
+
$wpdb->query( "insert into ".$wpdb->prefix."advps_thumbnail (thumb_name,width,height,crop) values('advps_thumbnail_one',800,250,'yes')");
|
255 |
+
}
|
256 |
+
if(!$wpdb->get_results("select id from ".$wpdb->prefix."advps_thumbnail where thumb_name = 'advps_thumbnail_two'")){
|
257 |
+
$wpdb->query( "insert into ".$wpdb->prefix."advps_thumbnail (thumb_name,width,height,crop) values('advps_thumbnail_two',624,250,'no')");
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
function unset_advps_options(){
|
262 |
+
}
|
263 |
+
/* ---------------------------------------------------------------------------------------*/
|
264 |
+
function advps_image_sizes(){
|
265 |
+
if ( function_exists( 'add_image_size' ) ) {
|
266 |
+
global $wpdb;
|
267 |
+
$rth = $wpdb->get_results( "select * from ".$wpdb->prefix."advps_thumbnail");
|
268 |
+
foreach($rth as $th){
|
269 |
+
add_image_size( $th->thumb_name,$th->width,$th->height, true);
|
270 |
+
}
|
271 |
+
}
|
272 |
+
}
|
273 |
+
add_action('wp_loaded', 'advps_image_sizes');
|
274 |
+
|
275 |
+
function advps_excerpt_length_one( $length ) {
|
276 |
+
|
277 |
+
return get_option('advps_excerptlen_one');
|
278 |
+
}
|
279 |
+
//add_filter( 'excerpt_length', 'advps_excerpt_length_one', 999 );
|
280 |
+
|
281 |
+
function advps_excerpt_length( $length ) {
|
282 |
+
return get_option('advps_excerptlen');
|
283 |
+
}
|
284 |
+
add_action( "wp_ajax_chkCaetegory", "chkCaetegory" );
|
285 |
+
|
286 |
+
function chkCaetegory(){
|
287 |
+
$nonce = $_POST['checkReq'];
|
288 |
+
$posttype = $_POST['post_type'];
|
289 |
+
if(!wp_verify_nonce( $nonce, 'advpsauthrequst' )){
|
290 |
+
echo "Unauthorized request.";
|
291 |
+
exit;
|
292 |
+
}
|
293 |
+
$catHtml = '';
|
294 |
+
if($posttype == 'post'){
|
295 |
+
$catHtml = '<th scope="row">Category</th><td><select name="advps_category[]" multiple="multiple">';
|
296 |
+
$catList = get_categories();
|
297 |
+
foreach($catList as $scat){
|
298 |
+
$catHtml .= '<option value="'.$scat->term_id.'">'.$scat->name.'</option>';
|
299 |
+
}
|
300 |
+
$catHtml .= '</select><span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple category ]</span></td>';
|
301 |
+
}
|
302 |
+
else
|
303 |
+
{
|
304 |
+
$posttypeobj = get_post_type_object($posttype);
|
305 |
+
if(in_array('category',$posttypeobj->taxonomies)){
|
306 |
+
$catHtml = '<th scope="row">Category</th><td><select name="advps_category[]" multiple="multiple">';
|
307 |
+
$catList = get_categories();
|
308 |
+
foreach($catList as $scat){
|
309 |
+
$catHtml .= '<option value="'.$scat->term_id.'">'.$scat->name.'</option>';
|
310 |
+
}
|
311 |
+
$catHtml .= '</select><span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple category ]</span></td>';
|
312 |
+
}
|
313 |
+
}
|
314 |
+
echo $catHtml;
|
315 |
+
exit;
|
316 |
+
}
|
317 |
+
/* ---------------------------------------------------------------------------------------*/
|
318 |
+
|
319 |
+
function advps_slideshow($atts) {
|
320 |
+
global $post;
|
321 |
+
global $wpdb;
|
322 |
+
global $_wp_additional_image_sizes;
|
323 |
+
$current = $post->ID;
|
324 |
+
|
325 |
+
if(is_array($atts) && array_key_exists('optset',$atts)){
|
326 |
+
$q1 = "select template,opt_data from ".$wpdb->prefix."advps_optionset where id = ".$atts['optset'];
|
327 |
+
$res1 = $wpdb->get_results($q1);
|
328 |
+
if($res1){
|
329 |
+
$optset = unserialize($res1[0]->opt_data);
|
330 |
+
}
|
331 |
+
else return;
|
332 |
+
}
|
333 |
+
else return;
|
334 |
+
|
335 |
+
if($optset['advps_exclude']){
|
336 |
+
$exclude = explode(',',$optset['advps_exclude']);
|
337 |
+
if(!in_array($current,$exclude)){
|
338 |
+
$exclude[] = $current;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
else
|
342 |
+
{
|
343 |
+
$exclude[] = $current;
|
344 |
+
}
|
345 |
+
|
346 |
+
$query_arg = array(
|
347 |
+
'post_type' => ($optset['advps_post_types']) ? $optset['advps_post_types'] : 'post',
|
348 |
+
'post__not_in' => $exclude,
|
349 |
+
//'cat' => (is_array($atts) && array_key_exists('cat',$atts)) ? $atts['cat'] : 1,
|
350 |
+
'posts_per_page' => ($optset['advps_maxpost']) ? $optset['advps_maxpost'] : 10,
|
351 |
+
'orderby' => ($optset['advps_order_by']) ? $optset['advps_order_by'] : 'date',
|
352 |
+
'order' => ($optset['advps_order']) ? $optset['advps_order'] : 'DESC'
|
353 |
+
);
|
354 |
+
|
355 |
+
if($optset['advps_post_types'] && $optset['advps_post_types'] != "page"){
|
356 |
+
if($optset['advps_post_types'] == "post"){
|
357 |
+
if(isset($optset['advps_category'])){
|
358 |
+
$query_arg['cat'] = implode(',',$optset['advps_category']);
|
359 |
+
}
|
360 |
+
}
|
361 |
+
else
|
362 |
+
{
|
363 |
+
$post_type_obj = get_post_type_object( $optset['advps_post_types'] );
|
364 |
+
if(in_array('category',$post_type_obj->taxonomies)){
|
365 |
+
if(isset($optset['advps_category'])){
|
366 |
+
$query_arg['cat'] = implode(',',$optset['advps_category']);
|
367 |
+
}
|
368 |
+
}
|
369 |
+
}
|
370 |
+
}
|
371 |
+
|
372 |
+
$template = $res1[0]->template; // modify it to overwrite through shortcode
|
373 |
+
if($template == "two"){
|
374 |
+
$postperslide = $optset['advps_postperslide'];
|
375 |
+
}
|
376 |
+
|
377 |
+
if(($template == "one" || $template == "two") && !post_type_supports( $optset['advps_post_types'], 'thumbnail' )){
|
378 |
+
return;
|
379 |
+
}
|
380 |
+
|
381 |
+
if(is_array($atts) && array_key_exists('id',$atts)){
|
382 |
+
$sldshowID = str_replace(' ','',$atts['id']);
|
383 |
+
}
|
384 |
+
else
|
385 |
+
{
|
386 |
+
$sldshowID = substr(time(),8,2).rand(100,9999);
|
387 |
+
}
|
388 |
+
|
389 |
+
if($template != 'two'){
|
390 |
+
if($optset['advps_excerptlen']){
|
391 |
+
update_option('advps_excerptlen',$optset['advps_excerptlen']);
|
392 |
+
}
|
393 |
+
else
|
394 |
+
{
|
395 |
+
update_option('advps_excerptlen',30);
|
396 |
+
}
|
397 |
+
add_filter( 'excerpt_length', 'advps_excerpt_length', 999 );
|
398 |
+
}
|
399 |
+
|
400 |
+
ob_start();
|
401 |
+
?>
|
402 |
+
<script type="text/javascript">
|
403 |
+
jQuery(document).ready(function($){
|
404 |
+
//alert("got");
|
405 |
+
|
406 |
+
$("#advpsslideshow_<?php echo $sldshowID;?>").cycle({
|
407 |
+
fx : '<?php echo $optset['advps_effects'];?>',
|
408 |
+
timeout : <?php echo $optset['advps_timeout'];?>,
|
409 |
+
speed : <?php echo $optset['advps_speed'];?>,
|
410 |
+
easing : '<?php echo $optset['advps_easing'];?>',
|
411 |
+
pager : '<?php if($optset['advps_exclude_pager']=='no'){echo'#slide_nav_'.$sldshowID;}?>',
|
412 |
+
prev : '<?php if($optset['advps_exclude_nxtprev']=='no'){echo'#prev_'.$sldshowID;}?>',
|
413 |
+
next : '<?php if($optset['advps_exclude_nxtprev']=='no'){echo'#next_'.$sldshowID;}?>',
|
414 |
+
pause : <?php if($optset['advps_ps_hover']=='yes'){echo 1;}else{echo 0;}?>,
|
415 |
+
pagerAnchorBuilder : pagerFactory
|
416 |
+
});
|
417 |
+
function pagerFactory(idx, slide) {
|
418 |
+
<?php if($optset['advps_pager_type'] == 'number'): ?>
|
419 |
+
return '<li><a href="#">'+(idx+1)+'</a></li>';
|
420 |
+
<?php elseif($optset['advps_pager_type'] == 'bullet'): ?>
|
421 |
+
return '<li><a href="#"></a></li>';
|
422 |
+
<?php endif;?>
|
423 |
+
}
|
424 |
+
<?php if($template == "one" || $template == "three"):?>
|
425 |
+
$("#advpsslideshow_<?php echo $sldshowID;?> a").hover(function(){
|
426 |
+
//alert('got')
|
427 |
+
$(this).css('color','<?php echo $optset['advps_titleHcolor']?>');
|
428 |
+
},function(){
|
429 |
+
$(this).css('color','<?php echo $optset['advps_titleFcolor']?>');
|
430 |
+
});
|
431 |
+
<?php endif;?>
|
432 |
+
$(".advps-slide-container").hover(function(){
|
433 |
+
if(!$(this).find(".advps-left-arrow, .advps-right-arrow, .advps-play-pause, .advps-left-arrow-two, .advps-right-arrow-two, .advps-play-pause-two").is(":animated")){
|
434 |
+
<?php if($optset['advps_exclude_nxtprev']=='no'):?>
|
435 |
+
$(this).find(".advps-left-arrow, .advps-right-arrow, .advps-left-arrow-two, .advps-right-arrow-two").fadeIn(200,'linear',function(){});<?php endif;?>
|
436 |
+
<?php if($optset['advps_exclude_playpause']=='no'):?>
|
437 |
+
if(!$(this).find(".advps-play-pause,.advps-play-pause-two").is(":animated")){
|
438 |
+
$(this).find(".advps-play-pause,.advps-play-pause-two").fadeIn(200,'linear',function(){});
|
439 |
+
}
|
440 |
+
<?php endif;if($template == 'one' && $optset['advps_excpt_visibility']=='show on hover'):?>
|
441 |
+
if(!$(this).find(".advps-excerpt-one, .advps-excerpt-two").is(":animated")){
|
442 |
+
|
443 |
+
$(this).find(".advps-excerpt-one, .advps-excerpt-two").fadeIn(200,'linear',function(){});
|
444 |
+
}
|
445 |
+
<?php endif;?>
|
446 |
+
}
|
447 |
+
},function(){
|
448 |
+
<?php if($optset['advps_exclude_nxtprev']=='no'):?>
|
449 |
+
$(".advps-left-arrow, .advps-right-arrow,.advps-left-arrow-two, .advps-right-arrow-two").fadeOut(200,'linear',function(){});<?php endif;?>
|
450 |
+
<?php if($optset['advps_exclude_playpause']=='no'):?>
|
451 |
+
$(this).find(".advps-play-pause,.advps-play-pause-two").fadeOut(200,'linear',function(){});
|
452 |
+
<?php endif;if($template == 'one' && $optset['advps_excpt_visibility']=='show on hover'):?>
|
453 |
+
$(this).find(".advps-excerpt-one, .advps-excerpt-two").fadeOut(200,'linear',function(){});
|
454 |
+
<?php endif;?>
|
455 |
+
});
|
456 |
+
});
|
457 |
+
</script>
|
458 |
+
<div class="advps-slide-container" style="width:<?php echo $optset['advps_sld_width'];?>px;height:<?php echo $optset['advps_sld_height'];?>px; <?php if($optset['advps_remove_border'] == 'no'){?>border:<?php echo $optset['advps_border_size'].'px '.$optset['advps_border_type'].' '.$optset['advps_border_color'];?>;<?php }if($optset['advps_remove_shd'] == 'no'){?>box-shadow: <?php echo $optset['advps_bxshad1'].'px '.$optset['advps_bxshad2'].'px '.$optset['advps_bxshad3'].'px '.$optset['advps_bxshadcolor'];?>;<?php }?>background-color:<?php echo $optset['advps_bgcolor'];?>;padding:<?php echo $optset['advps_contpad1'].'px '.$optset['advps_contpad2'].'px '.$optset['advps_contpad3'].'px '.$optset['advps_contpad4'].'px';?>;">
|
459 |
+
|
460 |
+
<div id="<?php echo "advpsslideshow_".$sldshowID;?>" style="width:<?php echo $optset['advps_sld_width'];?>px;height:<?php echo $optset['advps_sld_height'];?>px; overflow:hidden; position:relative;">
|
461 |
+
<?php $count = 1;$the_query = new WP_Query($query_arg); while ($the_query->have_posts()) : $the_query->the_post();if($template == 'one'):
|
462 |
+
|
463 |
+
if(has_post_thumbnail()){
|
464 |
+
$thumbID = get_post_meta($post->ID,'_thumbnail_id',true);
|
465 |
+
$th_metadata = get_post_meta($thumbID,'_wp_attachment_metadata',true);
|
466 |
+
|
467 |
+
if($optset['advps_thumbnail'] == 'full' || !array_key_exists($optset['advps_thumbnail'],$th_metadata['sizes']) ){
|
468 |
+
$th_width = $th_metadata['width'];
|
469 |
+
$th_height = $th_metadata['height'];
|
470 |
+
}
|
471 |
+
else
|
472 |
+
{
|
473 |
+
$th_width = $th_metadata['sizes'][$optset['advps_thumbnail']]['width'];
|
474 |
+
$th_height = $th_metadata['sizes'][$optset['advps_thumbnail']]['height'];
|
475 |
+
}
|
476 |
+
}
|
477 |
+
?>
|
478 |
+
<div class="advps-slide" style="width:<?php if(isset($th_width)){echo $th_width;}?>px; height:<?php if(isset($th_height)){echo $th_height;}?>px;">
|
479 |
+
<?php if( $optset['advps_ed_link']=='enable'){?><a target="_blank" href="<?php if($optset['advps_link_type'] == 'permalink'){the_permalink();}else{echo get_post_meta($post->ID,'advps_custom_link',true);}?>"><?php }?>
|
480 |
+
<?php
|
481 |
+
if(has_post_thumbnail()){the_post_thumbnail($optset['advps_thumbnail']);}
|
482 |
+
?>
|
483 |
+
<?php if( $optset['advps_ed_link']=='enable'){?></a><?php }?>
|
484 |
+
|
485 |
+
<div class="advps-excerpt-<?php echo $template?>" style="width:<?php echo $optset['advps_overlay_width'];?>%;height:<?php echo $optset['advps_overlay_height'];?>%;<?php if($optset['advps_excpt_visibility'] == 'show on hover'){?>display:none;<?php }if($optset['advps_excpt_position'] == 'left'){?>top:0; left:0;<?php }elseif($optset['advps_excpt_position'] == 'right'){?>top:0; right:0;<?php }elseif($optset['advps_excpt_position'] == 'bottom'){?>bottom:0; left:0;<?php }?>">
|
486 |
+
<div class="advps-overlay-<?php echo $template?>" style="background-color:<?php echo $optset['advps_overlay_color'];?>; -moz-opacity:<?php echo $optset['advps_overlay_opacity'];?>;filter:alpha(opacity=<?php echo $optset['advps_overlay_opacity']*100;?>);opacity:<?php echo $optset['advps_overlay_opacity'];?>;"></div>
|
487 |
+
<div class="advps-excerpt-block-<?php echo $template?>" style="color:<?php echo $optset['advps_excptFcolor'];?>;font-size:<?php echo $optset['advps_excptFsize'];?>px;-moz-opacity:<?php echo $optset['advps_text_opacity'];?>;filter:alpha(opacity=<?php echo $optset['advps_text_opacity']*100;?>);opacity:<?php echo $optset['advps_text_opacity'];?>;">
|
488 |
+
<h1 class="advs-title" style="font-size:<?php echo $optset['advps_titleFsize'];?>px !important;margin:5px 0px 10px 0px !important;color:<?php echo $optset['advps_titleFcolor'];?>"><?php if( $optset['advps_ed_link']=='enable'){?><a target="_blank" href="<?php if($optset['advps_link_type'] == 'permalink'){the_permalink();}else{echo get_post_meta($post->ID,'advps_custom_link',true);}?>" style="color:<?php echo $optset['advps_titleFcolor'];?>"><?php }?><?php the_title();?><?php if( $optset['advps_ed_link']=='enable'){?></a><?php }?></h1>
|
489 |
+
|
490 |
+
<?php the_excerpt();?>
|
491 |
+
</div>
|
492 |
+
</div>
|
493 |
+
</div>
|
494 |
+
<?php elseif($template == 'two'):?>
|
495 |
+
<?php if($count % $postperslide == 1 || $postperslide == 1){?><ul class="advps-slide" style="overflow:hidden;"><?php }?><li style="width:<?php if(get_option($optset['advps_thumbnail'].'_size_w')){echo get_option($optset['advps_thumbnail'].'_size_w');}else{echo $_wp_additional_image_sizes[$optset['advps_thumbnail']]['width'];}?>px;height:<?php if(get_option($optset['advps_thumbnail'].'_size_h')){echo get_option($optset['advps_thumbnail'].'_size_h');}else{echo $_wp_additional_image_sizes[$optset['advps_thumbnail']]['height'];}?>px;<?php if($optset['advps_img_Orientation'] == 'horizontal'){{echo 'float:left'.';';}echo 'margin-right:'.$optset['advps_imagemar'].'px;';}else{echo 'margin-bottom:'.$optset['advps_imagemar'].'px;';}?>list-style:none;position:relative;"><?php if( $optset['advps_ed_link']=='enable'){?><a target="_blank" href="<?php if($optset['advps_link_type'] == 'permalink'){the_permalink();}else{echo get_post_meta($post->ID,'advps_custom_link',true);}?>"><?php }?>
|
496 |
+
<?php
|
497 |
+
/*echo $count .'and'. $postperslide*/;if(has_post_thumbnail()){the_post_thumbnail($optset['advps_thumbnail']);}
|
498 |
+
?>
|
499 |
+
<?php if( $optset['advps_ed_link']=='enable'){?></a><?php }?></li>
|
500 |
+
<?php if($count%$postperslide == 0 || $count == $the_query->post_count){?></ul><?php }?>
|
501 |
+
<?php elseif($template == 'three'):?>
|
502 |
+
<div class="advps-slide">
|
503 |
+
<div class="advps-slide-field-three" style="position:relative; float:left;width:<?php echo $optset['advps_sld_width'];?>px; height:<?php echo $optset['advps_sld_height'];?>px; overflow:hidden;">
|
504 |
+
<?php if(in_array('thumb',$optset['advps_content_set'])):if( $optset['advps_ed_link']=='enable'){?><a target="_blank" href="<?php if($optset['advps_link_type'] == 'permalink'){the_permalink();}else{echo get_post_meta($post->ID,'advps_custom_link',true);};?>"><?php }?>
|
505 |
+
<?php if(has_post_thumbnail()){the_post_thumbnail($optset['advps_thumbnail']);}?>
|
506 |
+
<?php if( $optset['advps_ed_link']=='enable'){?></a><?php }endif;?>
|
507 |
+
<div class="advps-excerpt-<?php echo $template?>" style="position:relative;float:left;width:<?php echo $optset['advps_cont_width'];?>px;z-index:0; color:<?php echo $optset['advps_excptFcolor'];?>; font-size:<?php echo $optset['advps_excptFsize'];?>px;">
|
508 |
+
<?php if(in_array('title',$optset['advps_content_set'])){?><h1 class="advs-title" style="font-size:<?php echo $optset['advps_titleFsize'];?>px;margin:0px 0px 10px 0px;"> <?php if( $optset['advps_ed_link']=='enable'){?><a target="_blank" href="<?php if($optset['advps_link_type'] == 'permalink'){the_permalink();}else{echo get_post_meta($post->ID,'advps_custom_link',true);}?>" style="color:<?php echo $optset['advps_titleFcolor'];?>;"><?php }?>
|
509 |
+
<?php the_title();?>
|
510 |
+
<?php if( $optset['advps_ed_link']=='enable'){?></a><?php }?></h1><?php }?>
|
511 |
+
<?php if(in_array('content',$optset['advps_content_set'])){
|
512 |
+
the_content();
|
513 |
+
}
|
514 |
+
elseif(in_array('excerpt',$optset['advps_content_set'])){
|
515 |
+
the_excerpt();
|
516 |
+
}
|
517 |
+
?>
|
518 |
+
</div>
|
519 |
+
</div>
|
520 |
+
</div>
|
521 |
+
|
522 |
+
<?php endif;$count++;endwhile; wp_reset_query(); ?>
|
523 |
+
</div>
|
524 |
+
<div class="advps-<?php echo $optset['advps_pager_type']?>" style="right:<?php echo $optset['advps_pager_right'];?>px;bottom:<?php echo $optset['advps_pager_bottom'];?>px;">
|
525 |
+
<ul id="slide_nav_<?php echo $sldshowID;?>">
|
526 |
+
</ul>
|
527 |
+
</div>
|
528 |
+
<?php if($optset['advps_exclude_nxtprev']=='no'){?>
|
529 |
+
<div id="prev_<?php echo $sldshowID;?>" class="<?php if($template == 'two'){if($optset['advps_img_Orientation'] == 'vertical'){echo "advps-down-arrow";}else{echo 'advps-left-arrow-two';}}else{echo 'advps-left-arrow';}?>">Down<?php /*?><a href="#"><img src="<?php echo advps_url;?>images/<?php if($template == 'two'){echo 'l1';}else{echo 'advps-left-arrow';}?>.png" alt="Left Arrow" /></a><?php */?></div>
|
530 |
+
<?php }?>
|
531 |
+
<?php if($optset['advps_exclude_playpause'] == 'no' && $optset['advps_timeout'] != 0):?>
|
532 |
+
<div class="<?php if($template == 'two'){echo 'advps-play-pause-two';}else{echo 'advps-play-pause';}?> advps-flip" temp="<?php echo $template;?>" sts="played" sel="advpsslideshow_<?php echo $sldshowID;?>" iuri="<?php echo advps_url;?>"><a href="javascript:void(0)"><img src="<?php echo advps_url;?>images/<?php if($template == 'two'){echo 'pause-two';}else{echo 'pause';}?>.png" alt="pause" /></a></div>
|
533 |
+
<?php endif;?>
|
534 |
+
<?php if($optset['advps_exclude_nxtprev']=='no'){?>
|
535 |
+
<div id="next_<?php echo $sldshowID;?>" class="<?php if($template == 'two'){if($optset['advps_img_Orientation'] == 'vertical'){echo "advps-up-arrow";}else{echo 'advps-right-arrow-two';}}else{echo 'advps-right-arrow';}?>">Up<?php /*?><img src="<?php echo advps_url;?>images/<?php if($template == 'two'){echo 'r1';}else{echo 'advps-right-arrow';}?>.png" alt="Right Arrow" /><?php */?></div>
|
536 |
+
<?php }?>
|
537 |
+
</div>
|
538 |
+
<?php
|
539 |
+
$advps_res = ob_get_contents();
|
540 |
+
ob_end_clean();
|
541 |
+
return $advps_res;
|
542 |
+
}
|
543 |
+
|
544 |
+
add_shortcode('advps-slideshow', 'advps_slideshow');
|
advps-admin.php
ADDED
@@ -0,0 +1,2441 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) ) exit;
|
3 |
+
|
4 |
+
function advpsSanit($str){
|
5 |
+
return sanitize_text_field($str);
|
6 |
+
}
|
7 |
+
|
8 |
+
global $wpdb;
|
9 |
+
global $wp_version;
|
10 |
+
$stsMgs = '';
|
11 |
+
$flg = 0;
|
12 |
+
|
13 |
+
if(isset($_GET['tab'])){
|
14 |
+
$currTab = $_GET['tab'];
|
15 |
+
}
|
16 |
+
else
|
17 |
+
{
|
18 |
+
$currTab = 'one';
|
19 |
+
}
|
20 |
+
if(isset($_POST['advps_submit'])){
|
21 |
+
|
22 |
+
if($_POST['advps_submit'] == 'Save changes'){
|
23 |
+
|
24 |
+
if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') )
|
25 |
+
{
|
26 |
+
print 'Sorry, your nonce did not verify.';
|
27 |
+
exit;
|
28 |
+
}
|
29 |
+
|
30 |
+
$all_field = $_POST;
|
31 |
+
$optID = sanitize_text_field($_POST['opt_id']);
|
32 |
+
unset($all_field['opt_id']);
|
33 |
+
unset($all_field['advps_submit']);
|
34 |
+
unset($all_field['advps_wpnonce']);
|
35 |
+
unset($all_field['_wp_http_referer']);
|
36 |
+
|
37 |
+
$update_data = array();
|
38 |
+
foreach($all_field as $fkey => $fval){
|
39 |
+
if(is_array($fval)){
|
40 |
+
$update_data[$fkey] = array_map('advpsSanit',$fval);
|
41 |
+
}
|
42 |
+
else
|
43 |
+
{
|
44 |
+
$update_data[$fkey] = sanitize_text_field($fval);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$update_data = serialize($update_data);
|
49 |
+
//$q_upd = "update ".$wpdb->prefix."advps_optionset set opt_data = '".$update_data ."' where id =".$optID;
|
50 |
+
$q_upd = $wpdb->prepare("update ".$wpdb->prefix."advps_optionset set opt_data = '%s' where id = %d",$update_data,$optID);
|
51 |
+
|
52 |
+
if($wpdb->query($q_upd)){
|
53 |
+
$stsMgs = "Updated successfully.";
|
54 |
+
}
|
55 |
+
}
|
56 |
+
elseif($_POST['advps_submit'] == 'Add'){
|
57 |
+
|
58 |
+
if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') )
|
59 |
+
{
|
60 |
+
print 'Sorry, your nonce did not verify.';
|
61 |
+
exit;
|
62 |
+
}
|
63 |
+
|
64 |
+
$all_field = $_POST;
|
65 |
+
$tem_list = array('one','two','three');
|
66 |
+
$template = sanitize_text_field($_POST['template']);
|
67 |
+
if( ! in_array( $template, $tem_list )){
|
68 |
+
exit;
|
69 |
+
}
|
70 |
+
unset($all_field['template']);
|
71 |
+
unset($all_field['advps_submit']);
|
72 |
+
unset($all_field['advps_wpnonce']);
|
73 |
+
unset($all_field['_wp_http_referer']);
|
74 |
+
|
75 |
+
$postdata = array();
|
76 |
+
foreach($all_field as $fkey => $fval){
|
77 |
+
if(is_array($fval)){
|
78 |
+
$postdata[$fkey] = array_map('advpsSanit',$fval);
|
79 |
+
}
|
80 |
+
else
|
81 |
+
{
|
82 |
+
$postdata[$fkey] = sanitize_text_field($fval);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
$postdata = serialize($postdata);
|
86 |
+
|
87 |
+
$q_add = $wpdb->prepare("insert into ".$wpdb->prefix."advps_optionset (template,opt_data) values(%s,%s)",$template,$postdata);
|
88 |
+
if($wpdb->query($q_add)){
|
89 |
+
$stsMgs = "Added successfully.";
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
if(isset($_POST['advps_add_thumb'])){
|
96 |
+
if($_POST['advps_add_thumb'] == 'Add'){
|
97 |
+
|
98 |
+
if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') )
|
99 |
+
{
|
100 |
+
print 'Sorry, your nonce did not verify.';
|
101 |
+
exit;
|
102 |
+
}
|
103 |
+
|
104 |
+
$thumb_name = sanitize_text_field($_POST['advps_thumb_name']);
|
105 |
+
$width = sanitize_text_field($_POST['advps_thumb_width']);
|
106 |
+
$height = sanitize_text_field($_POST['advps_thumb_height']);
|
107 |
+
$crop = sanitize_text_field($_POST['advps_crop']);
|
108 |
+
|
109 |
+
$q = $wpdb->prepare("insert into ".$wpdb->prefix."advps_thumbnail (thumb_name,width,height,crop) values(%s,%d,%d,%s)",$thumb_name,$width,$height,$crop);
|
110 |
+
if($wpdb->query($q)){
|
111 |
+
$stsMgs = "Added successfully.";
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
if(isset($_POST['update_thumb'])){
|
116 |
+
|
117 |
+
if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') )
|
118 |
+
{
|
119 |
+
print 'Sorry, your nonce did not verify.';
|
120 |
+
exit;
|
121 |
+
}
|
122 |
+
|
123 |
+
$thumb_id = sanitize_text_field($_POST['thumb_id']);
|
124 |
+
$thumb_name = sanitize_text_field($_POST['advps_thumb_name']);
|
125 |
+
$width = sanitize_text_field($_POST['advps_thumb_width']);
|
126 |
+
$height = sanitize_text_field($_POST['advps_thumb_height']);
|
127 |
+
$crop = sanitize_text_field($_POST['advps_crop']);
|
128 |
+
|
129 |
+
$q = $wpdb->prepare("update ".$wpdb->prefix."advps_thumbnail set thumb_name = '%s',width = %d, height = %d, crop = '%s' where id = %d",$thumb_name,$width,$height,$crop,$thumb_id);
|
130 |
+
if($wpdb->query($q)){
|
131 |
+
$stsMgs = "Updated successfully.";
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
$q1 = "select id,opt_data from ".$wpdb->prefix."advps_optionset where template = 'one'";
|
136 |
+
$q2 = "select id,opt_data from ".$wpdb->prefix."advps_optionset where template = 'two'";
|
137 |
+
$q3 = "select id,opt_data from ".$wpdb->prefix."advps_optionset where template = 'three'";
|
138 |
+
$res1 = $wpdb->get_results($q1);
|
139 |
+
$res2 = $wpdb->get_results($q2);
|
140 |
+
$res3 = $wpdb->get_results($q3);
|
141 |
+
|
142 |
+
$q_thumb = "select * from ".$wpdb->prefix."advps_thumbnail";
|
143 |
+
$res_thumb = $wpdb->get_results($q_thumb);
|
144 |
+
$catList = get_categories();
|
145 |
+
$customPostTypes = get_post_types(array('public' => true, '_builtin' => false));
|
146 |
+
?>
|
147 |
+
<style>
|
148 |
+
fieldset {
|
149 |
+
border:1px solid #D9D9D9;
|
150 |
+
border-radius:2px;
|
151 |
+
margin-bottom:10px;
|
152 |
+
padding:0px 5px 10px 5px;
|
153 |
+
}
|
154 |
+
.inside {
|
155 |
+
position:relative;
|
156 |
+
}
|
157 |
+
.wp-admin select[multiple], #wpcontent select[multiple] {
|
158 |
+
height: auto;
|
159 |
+
}
|
160 |
+
</style>
|
161 |
+
<div class="wrap">
|
162 |
+
<?php if($stsMgs != ''){?>
|
163 |
+
<div id="message" class="updated below-h2">
|
164 |
+
<p><?php echo $stsMgs;?></p>
|
165 |
+
</div>
|
166 |
+
<?php }?>
|
167 |
+
<h2 class="nav-tab-wrapper"> <a href="?page=advps-slideshow&tab=one" class="nav-tab <?php if($currTab == 'one'){echo 'nav-tab-active';}?>">Template One</a> <a href="?page=advps-slideshow&tab=two" class="nav-tab <?php if($currTab == 'two'){echo 'nav-tab-active';}?>">Template Two</a> <a href="?page=advps-slideshow&tab=three" class="nav-tab <?php if($currTab == 'three'){echo 'nav-tab-active';}?>">Template Three</a><a href="?page=advps-slideshow&tab=thumb" class="nav-tab <?php if($currTab == 'thumb'){echo 'nav-tab-active';}?>">Thumbnails</a>
|
168 |
+
<?php /*?><a href="?page=advps-slideshow&tab=styling" class="nav-tab <?php if($currTab == 'styling'){echo 'nav-tab-active';}?>">Styling</a> <?php */?>
|
169 |
+
</h2>
|
170 |
+
<?php if($currTab == 'one'){foreach( $res1 as $dset){ $dataSet = unserialize($dset->opt_data);?>
|
171 |
+
|
172 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
173 |
+
<div class="postbox-container" style="width:65%">
|
174 |
+
<div class="postbox <?php if(!isset($_POST['opt_id']) || $_POST['opt_id'] != $dset->id){echo 'closed';}?>">
|
175 |
+
<div class="handlediv" title=""> <br>
|
176 |
+
</div>
|
177 |
+
<h3 style="cursor:pointer; text-align:center" class="advps-expand"> <span>Option Set</span> </h3>
|
178 |
+
<div class="inside">
|
179 |
+
<div style="position:absolute; top:1.2%; right:4%; font-weight:bold; border:1px solid #393;padding:2px 15px;">ID = <?php echo $dset->id;?></div>
|
180 |
+
<form method="post">
|
181 |
+
<fieldset>
|
182 |
+
<legend style="margin-left:10px;"><strong>Query</strong></legend>
|
183 |
+
<table class="form-table">
|
184 |
+
<tr>
|
185 |
+
<th scope="row">Post Type</th>
|
186 |
+
<td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo $dset->id;?>)">
|
187 |
+
<option value="post" <?php if($dataSet['advps_post_types'] == 'post'){echo 'selected="selected"';}?>>post</option>
|
188 |
+
<option value="page" <?php if($dataSet['advps_post_types'] == 'page'){echo 'selected="selected"';}?>>page</option>
|
189 |
+
<?php
|
190 |
+
foreach ($customPostTypes as $post_type ) {
|
191 |
+
?>
|
192 |
+
<option value="<?php echo $post_type;?>" <?php if($dataSet['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
|
193 |
+
<?php
|
194 |
+
}
|
195 |
+
?>
|
196 |
+
</select></td>
|
197 |
+
</tr>
|
198 |
+
<tr id="advps-cat-field<?php echo $dset->id;?>">
|
199 |
+
<?php if($dataSet['advps_post_types'] != "page"){?>
|
200 |
+
<th scope="row">Category</th>
|
201 |
+
<td><!--<input type="text" name="advps_category" value="<?php //echo get_option('advps_category');?>" style="width:100px;" />-->
|
202 |
+
|
203 |
+
<select name="advps_category[]" multiple="multiple">
|
204 |
+
<?php
|
205 |
+
$catList = get_categories();
|
206 |
+
foreach($catList as $scat){
|
207 |
+
?>
|
208 |
+
<option value="<?php echo $scat->term_id;?>" <?php if(isset($dataSet['advps_category']) && in_array($scat->term_id,$dataSet['advps_category'])){echo 'selected="selected"';}?>><?php echo $scat->name;?></option>
|
209 |
+
<?php }?>
|
210 |
+
</select>
|
211 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple category ]</span></td>
|
212 |
+
<?php }?>
|
213 |
+
</tr>
|
214 |
+
<tr>
|
215 |
+
<th scope="row">Max. Number of post</th>
|
216 |
+
<td><input type="text" name="advps_maxpost" value="<?php echo $dataSet['advps_maxpost'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
217 |
+
</tr>
|
218 |
+
<tr>
|
219 |
+
<th scope="row">Exclude</th>
|
220 |
+
<td><input type="text" name="advps_exclude" value="<?php echo $dataSet['advps_exclude'];?>" style="width:100px;" />
|
221 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
|
222 |
+
</tr>
|
223 |
+
<tr>
|
224 |
+
<th scope="row">Order by</th>
|
225 |
+
<td><select name="advps_order_by">
|
226 |
+
<option value="date" <?php if($dataSet['advps_order_by'] == 'date'){echo 'selected="selected"';}?>>Date</option>
|
227 |
+
<option value="ID" <?php if($dataSet['advps_order_by'] == 'ID'){echo 'selected="selected"';}?>>ID</option>
|
228 |
+
<option value="author" <?php if($dataSet['advps_order_by'] == 'author'){echo 'selected="selected"';}?>>Author</option>
|
229 |
+
<option value="title" <?php if($dataSet['advps_order_by'] == 'title'){echo 'selected="selected"';}?>>Title</option>
|
230 |
+
<option value="name" <?php if($dataSet['advps_order_by'] == 'name'){echo 'selected="selected"';}?>>Name</option>
|
231 |
+
<option value="rand" <?php if($dataSet['advps_order_by'] == 'rand'){echo 'selected="selected"';}?>>Random</option>
|
232 |
+
<option value="menu_order" <?php if($dataSet['advps_order_by'] == 'menu_order'){echo 'selected="selected"';}?>>Menu order</option>
|
233 |
+
</select></td>
|
234 |
+
</tr>
|
235 |
+
<tr>
|
236 |
+
<th scope="row">Order</th>
|
237 |
+
<td><select name="advps_order">
|
238 |
+
<option value="ASC" <?php if($dataSet['advps_order'] == 'ASC'){echo 'selected="selected"';}?>>Ascending</option>
|
239 |
+
<option value="DESC" <?php if($dataSet['advps_order'] == 'DESC'){echo 'selected="selected"';}?>>Descending</option>
|
240 |
+
</select></td>
|
241 |
+
</tr>
|
242 |
+
</table>
|
243 |
+
</fieldset>
|
244 |
+
<fieldset>
|
245 |
+
<legend style="margin-left:10px;"><strong>Effects</strong></legend>
|
246 |
+
<table class="form-table">
|
247 |
+
<tr>
|
248 |
+
<th scope="row">Effect</th>
|
249 |
+
<td><select name="advps_effects">
|
250 |
+
<option value="blindX" <?php if($dataSet['advps_effects'] == 'blindX'){echo 'selected="selected"';}?>>blindX</option>
|
251 |
+
<option value="blindY" <?php if($dataSet['advps_effects'] == 'blindY'){echo 'selected="selected"';}?>>blindY</option>
|
252 |
+
<option value="blindZ" <?php if($dataSet['advps_effects'] == 'blindZ'){echo 'selected="selected"';}?>>blindZ</option>
|
253 |
+
<option value="cover" <?php if($dataSet['advps_effects'] == 'cover'){echo 'selected="selected"';}?>>cover</option>
|
254 |
+
<option value="curtainX" <?php if($dataSet['advps_effects'] == 'curtainX'){echo 'selected="selected"';}?>>curtainX</option>
|
255 |
+
<option value="curtainY" <?php if($dataSet['advps_effects'] == 'curtainY'){echo 'selected="selected"';}?>>curtainY</option>
|
256 |
+
<option value="fade" <?php if($dataSet['advps_effects'] == 'fade'){echo 'selected="selected"';}?>>fade</option>
|
257 |
+
<option value="fadeZoom" <?php if($dataSet['advps_effects'] == 'fadeZoom'){echo 'selected="selected"';}?>>fadeZoom</option>
|
258 |
+
<option value="growX" <?php if($dataSet['advps_effects'] == 'growX'){echo 'selected="selected"';}?>>growX</option>
|
259 |
+
<option value="growY" <?php if($dataSet['advps_effects'] == 'growY'){echo 'selected="selected"';}?>>growY</option>
|
260 |
+
<option value="none" <?php if($dataSet['advps_effects'] == 'none'){echo 'selected="selected"';}?>>none</option>
|
261 |
+
<option value="scrollUp" <?php if($dataSet['advps_effects'] == 'scrollUp'){echo 'selected="selected"';}?>>scrollUp</option>
|
262 |
+
<option value="scrollDown" <?php if($dataSet['advps_effects'] == 'scrollDown'){echo 'selected="selected"';}?>>scrollDown</option>
|
263 |
+
<option value="scrollLeft" <?php if($dataSet['advps_effects'] == 'scrollLeft'){echo 'selected="selected"';}?>>scrollLeft</option>
|
264 |
+
<option value="scrollRight" <?php if($dataSet['advps_effects'] == 'scrollRight'){echo 'selected="selected"';}?>>scrollRight</option>
|
265 |
+
<option value="scrollHorz" <?php if($dataSet['advps_effects'] == 'scrollHorz'){echo 'selected="selected"';}?>>scrollHorz</option>
|
266 |
+
<option value="scrollVert" <?php if($dataSet['advps_effects'] == 'scrollVert'){echo 'selected="selected"';}?>>scrollVert</option>
|
267 |
+
<option value="shuffle" <?php if($dataSet['advps_effects'] == 'shuffle'){echo 'selected="selected"';}?>>shuffle</option>
|
268 |
+
<option value="slideX" <?php if($dataSet['advps_effects'] == 'slideX'){echo 'selected="selected"';}?>>slideX</option>
|
269 |
+
<option value="slideY" <?php if($dataSet['advps_effects'] == 'slideY'){echo 'selected="selected"';}?>>slideY</option>
|
270 |
+
<option value="toss" <?php if($dataSet['advps_effects'] == 'toss'){echo 'selected="selected"';}?>>toss</option>
|
271 |
+
<option value="turnUp" <?php if($dataSet['advps_effects'] == 'turnUp'){echo 'selected="selected"';}?>>turnUp</option>
|
272 |
+
<option value="turnDown" <?php if($dataSet['advps_effects'] == 'turnDown'){echo 'selected="selected"';}?>>turnDown</option>
|
273 |
+
<option value="turnLeft" <?php if($dataSet['advps_effects'] == 'turnLeft'){echo 'selected="selected"';}?>>turnLeft</option>
|
274 |
+
<option value="turnRight" <?php if($dataSet['advps_effects'] == 'turnRight'){echo 'selected="selected"';}?>>turnRight</option>
|
275 |
+
<option value="uncover" <?php if($dataSet['advps_effects'] == 'uncover'){echo 'selected="selected"';}?>>uncover</option>
|
276 |
+
<option value="wipe" <?php if($dataSet['advps_effects'] == 'wipe'){echo 'selected="selected"';}?>>wipe</option>
|
277 |
+
<option value="zoom" <?php if($dataSet['advps_effects'] == 'zoom'){echo 'selected="selected"';}?>>zoom</option>
|
278 |
+
</select></td>
|
279 |
+
</tr>
|
280 |
+
<tr>
|
281 |
+
<th scope="row">Timeout</th>
|
282 |
+
<td><input type="text" name="advps_timeout" value="<?php echo $dataSet['advps_timeout'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
|
283 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;"> [ 0 to disable auto advance.]</span></td>
|
284 |
+
</tr>
|
285 |
+
<tr>
|
286 |
+
<th scope="row">Easing</th>
|
287 |
+
<td><select name="advps_easing">
|
288 |
+
<option value="linear" <?php if($dataSet['advps_easing'] == 'linear'){echo 'selected="selected"';}?>>linear</option>
|
289 |
+
<option value="swing" <?php if($dataSet['advps_easing'] == 'swing'){echo 'selected="selected"';}?>>swing</option>
|
290 |
+
<option value="jswing" <?php if($dataSet['advps_easing'] == 'jswing'){echo 'selected="selected"';}?>>jswing</option>
|
291 |
+
<option value="easeInQuad" <?php if($dataSet['advps_easing'] == 'easeInQuad'){echo 'selected="selected"';}?>>easeInQuad</option>
|
292 |
+
<option value="easeOutQuad" <?php if($dataSet['advps_easing'] == 'easeOutQuad'){echo 'selected="selected"';}?>>easeOutQuad</option>
|
293 |
+
<option value="easeInOutQuad" <?php if($dataSet['advps_easing'] == 'easeInOutQuad'){echo 'selected="selected"';}?>>easeInOutQuad</option>
|
294 |
+
<option value="easeInCubic" <?php if($dataSet['advps_easing'] == 'easeInCubic'){echo 'selected="selected"';}?>>easeInCubic</option>
|
295 |
+
<option value="easeOutCubic" <?php if($dataSet['advps_easing'] == 'easeOutCubic'){echo 'selected="selected"';}?>>easeOutCubic</option>
|
296 |
+
<option value="easeInOutCubic" <?php if($dataSet['advps_easing'] == 'easeInOutCubic'){echo 'selected="selected"';}?>>easeInOutCubic</option>
|
297 |
+
<option value="easeInQuart" <?php if($dataSet['advps_easing'] == 'easeInQuart'){echo 'selected="selected"';}?>>easeInQuart</option>
|
298 |
+
<option value="easeOutQuart" <?php if($dataSet['advps_easing'] == 'easeOutQuart'){echo 'selected="selected"';}?>>easeOutQuart</option>
|
299 |
+
<option value="easeInOutQuart" <?php if($dataSet['advps_easing'] == 'easeInOutQuart'){echo 'selected="selected"';}?>>easeInOutQuart</option>
|
300 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeInQuint'){echo 'selected="selected"';}?>>easeInQuint</option>
|
301 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeOutQuint'){echo 'selected="selected"';}?>>easeOutQuint</option>
|
302 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeInOutQuint'){echo 'selected="selected"';}?>>easeInOutQuint</option>
|
303 |
+
<option value="easeInSine" <?php if($dataSet['advps_easing'] == 'easeInSine'){echo 'selected="selected"';}?>>easeInSine</option>
|
304 |
+
<option value="easeOutSine" <?php if($dataSet['advps_easing'] == 'easeOutSine'){echo 'selected="selected"';}?>>easeOutSine</option>
|
305 |
+
<option value="easeInOutSine" <?php if($dataSet['advps_easing'] == 'easeInOutSine'){echo 'selected="selected"';}?>>easeInOutSine</option>
|
306 |
+
<option value="easeInExpo" <?php if($dataSet['advps_easing'] == 'easeInExpo'){echo 'selected="selected"';}?>>easeInExpo</option>
|
307 |
+
<option value="easeOutExpo" <?php if($dataSet['advps_easing'] == 'easeOutExpo'){echo 'selected="selected"';}?>>easeOutExpo</option>
|
308 |
+
<option value="easeInOutExpo" <?php if($dataSet['advps_easing'] == 'easeInOutExpo'){echo 'selected="selected"';}?>>easeInOutExpo</option>
|
309 |
+
<option value="easeInCirc" <?php if($dataSet['advps_easing'] == 'easeInCirc'){echo 'selected="selected"';}?>>easeInCirc</option>
|
310 |
+
<option value="easeOutCirc" <?php if($dataSet['advps_easing'] == 'easeOutCirc'){echo 'selected="selected"';}?>>easeOutCirc</option>
|
311 |
+
<option value="easeInOutCirc" <?php if($dataSet['advps_easing'] == 'easeInOutCirc'){echo 'selected="selected"';}?>>easeInOutCirc</option>
|
312 |
+
<option value="easeInBounce" <?php if($dataSet['advps_easing'] == 'easeInBounce'){echo 'selected="selected"';}?>>easeInBounce</option>
|
313 |
+
<option value="easeOutBounce" <?php if($dataSet['advps_easing'] == 'easeOutBounce'){echo 'selected="selected"';}?>>easeOutBounce</option>
|
314 |
+
<option value="easeInOutBounce" <?php if($dataSet['advps_easing'] == 'easeInOutBounce'){echo 'selected="selected"';}?>>easeInOutBounce</option>
|
315 |
+
<option value="easeInElastic" <?php if($dataSet['advps_easing'] == 'easeInElastic'){echo 'selected="selected"';}?>>easeInElastic</option>
|
316 |
+
<option value="easeOutElastic" <?php if($dataSet['advps_easing'] == 'easeOutElastic'){echo 'selected="selected"';}?>>easeOutElastic</option>
|
317 |
+
<option value="easeInOutElastic" <?php if($dataSet['advps_easing'] == 'easeInOutElastic'){echo 'selected="selected"';}?>>easeInOutElastic</option>
|
318 |
+
<option value="easeInBack" <?php if($dataSet['advps_easing'] == 'easeInBack'){echo 'selected="selected"';}?>>easeInBack</option>
|
319 |
+
<option value="easeOutBack" <?php if($dataSet['advps_easing'] == 'easeOutBack'){echo 'selected="selected"';}?>>easeOutBack</option>
|
320 |
+
<option value="easeInOutBack" <?php if($dataSet['advps_easing'] == 'easeInOutBack'){echo 'selected="selected"';}?>>easeInOutBack</option>
|
321 |
+
</select></td>
|
322 |
+
</tr>
|
323 |
+
<tr>
|
324 |
+
<th scope="row">Speed</th>
|
325 |
+
<td><input type="text" name="advps_speed" value="<?php echo $dataSet['advps_speed'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
326 |
+
</tr>
|
327 |
+
<tr>
|
328 |
+
<th scope="row">Enable pause on hover</th>
|
329 |
+
<td><select name="advps_ps_hover">
|
330 |
+
<option value="yes" <?php if($dataSet['advps_ps_hover'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
331 |
+
<option value="no" <?php if($dataSet['advps_ps_hover'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
332 |
+
</select></td>
|
333 |
+
</tr>
|
334 |
+
</table>
|
335 |
+
</fieldset>
|
336 |
+
<fieldset>
|
337 |
+
<legend style="margin-left:10px;"><strong>Container & Thumbnail</strong></legend>
|
338 |
+
<table class="form-table">
|
339 |
+
<tr>
|
340 |
+
<th scope="row">Select Thumbnail</th>
|
341 |
+
<td><select name="advps_thumbnail">
|
342 |
+
<option value="thumbnail" <?php if($dataSet['advps_thumbnail'] == 'thumbnail'){echo 'selected="selected"';}?>>thumbnail</option>
|
343 |
+
<option value="medium" <?php if($dataSet['advps_thumbnail'] == 'medium'){echo 'selected="selected"';}?>>medium</option>
|
344 |
+
<option value="large" <?php if($dataSet['advps_thumbnail'] == 'large'){echo 'selected="selected"';}?>>large</option>
|
345 |
+
<option value="full" <?php if($dataSet['advps_thumbnail'] == 'full'){echo 'selected="selected"';}?>>full</option>
|
346 |
+
<?php
|
347 |
+
global $_wp_additional_image_sizes;
|
348 |
+
unset($_wp_additional_image_sizes['post-thumbnail']);
|
349 |
+
foreach($_wp_additional_image_sizes as $tkey => $tval){
|
350 |
+
?>
|
351 |
+
<option value="<?php echo $tkey;?>" <?php if($dataSet['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
|
352 |
+
<?php
|
353 |
+
}
|
354 |
+
?>
|
355 |
+
</select></td>
|
356 |
+
</tr>
|
357 |
+
<tr>
|
358 |
+
<th scope="row">Slide Container</th>
|
359 |
+
<td>Width
|
360 |
+
<input type="text" name="advps_sld_width" value="<?php echo $dataSet['advps_sld_width'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
361 |
+
px Height
|
362 |
+
<input type="text" name="advps_sld_height" value="<?php echo $dataSet['advps_sld_height'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
363 |
+
px</td>
|
364 |
+
</tr>
|
365 |
+
<tr>
|
366 |
+
<th scope="row">Padding</th>
|
367 |
+
<td><input type="text" name="advps_contpad1" value="<?php echo $dataSet['advps_contpad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
368 |
+
px
|
369 |
+
<input type="text" name="advps_contpad2" value="<?php echo $dataSet['advps_contpad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
370 |
+
px
|
371 |
+
<input type="text" name="advps_contpad3" value="<?php echo $dataSet['advps_contpad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
372 |
+
px
|
373 |
+
<input type="text" name="advps_contpad4" value="<?php echo $dataSet['advps_contpad4'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
374 |
+
px </td>
|
375 |
+
</tr>
|
376 |
+
<tr>
|
377 |
+
<th scope="row">Background Color</th>
|
378 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo $dataSet['advps_bgcolor'];?>" style="width:100px;" />
|
379 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
380 |
+
</tr>
|
381 |
+
<tr>
|
382 |
+
<th scope="row">Border</th>
|
383 |
+
<td><span style="vertical-align:top">
|
384 |
+
<input type="text" name="advps_border_size" value="<?php echo $dataSet['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
385 |
+
px
|
386 |
+
<select name="advps_border_type">
|
387 |
+
<option value="dashed" <?php if($dataSet['advps_border_type'] == 'dashed'){echo 'selected="selected"';}?>>dashed</option>
|
388 |
+
<option value="dotted" <?php if($dataSet['advps_border_type'] == 'dotted'){echo 'selected="selected"';}?>>dotted</option>
|
389 |
+
<option value="double" <?php if($dataSet['advps_border_type'] == 'double'){echo 'selected="selected"';}?>>double</option>
|
390 |
+
<option value="solid" <?php if($dataSet['advps_border_type'] == 'solid'){echo 'selected="selected"';}?>>solid</option>
|
391 |
+
<option value="inset" <?php if($dataSet['advps_border_type'] == 'inset'){echo 'selected="selected"';}?>>inset</option>
|
392 |
+
<option value="outset" <?php if($dataSet['advps_border_type'] == 'outset'){echo 'selected="selected"';}?>>outset</option>
|
393 |
+
</select>
|
394 |
+
</span>
|
395 |
+
<input class="advps-color-picker" type="text" name="advps_border_color" id="advpscolor<?php echo ++$flg?>" value="<?php echo $dataSet['advps_border_color'];?>" style="width:100px;" />
|
396 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
397 |
+
</tr>
|
398 |
+
<tr>
|
399 |
+
<th scope="row">Remove Border</th>
|
400 |
+
<td><select name="advps_remove_border">
|
401 |
+
<option value="yes" <?php if($dataSet['advps_remove_border'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
402 |
+
<option value="no" <?php if($dataSet['advps_remove_border'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
403 |
+
</select></td>
|
404 |
+
</tr>
|
405 |
+
<tr>
|
406 |
+
<th scope="row">Box Shadow</th>
|
407 |
+
<td><span style="vertical-align:top">
|
408 |
+
<input type="text" name="advps_bxshad1" value="<?php echo $dataSet['advps_bxshad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
409 |
+
px
|
410 |
+
<input type="text" name="advps_bxshad2" value="<?php echo $dataSet['advps_bxshad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
411 |
+
px
|
412 |
+
<input type="text" name="advps_bxshad3" value="<?php echo $dataSet['advps_bxshad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
413 |
+
px </span>
|
414 |
+
<input class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo $dataSet['advps_bxshadcolor'];?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
|
415 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
416 |
+
</tr>
|
417 |
+
<tr>
|
418 |
+
<th scope="row">Remove Shadow</th>
|
419 |
+
<td><select name="advps_remove_shd">
|
420 |
+
<option value="yes" <?php if($dataSet['advps_remove_shd'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
421 |
+
<option value="no" <?php if($dataSet['advps_remove_shd'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
422 |
+
</select></td>
|
423 |
+
</tr>
|
424 |
+
</table>
|
425 |
+
</fieldset>
|
426 |
+
<fieldset>
|
427 |
+
<legend style="margin-left:10px;"><strong>Title & Excerpt</strong></legend>
|
428 |
+
<table class="form-table">
|
429 |
+
<tr>
|
430 |
+
<th scope="row">Overlay size</th>
|
431 |
+
<td>Width
|
432 |
+
<input type="text" name="advps_overlay_width" value="<?php echo $dataSet['advps_overlay_width'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
433 |
+
% Height
|
434 |
+
<input type="text" name="advps_overlay_height" value="<?php echo $dataSet['advps_overlay_height'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
435 |
+
%</td>
|
436 |
+
</tr>
|
437 |
+
<tr>
|
438 |
+
<th scope="row">Overlay color</th>
|
439 |
+
<td><input type="text" name="advps_overlay_color" value="<?php echo $dataSet['advps_overlay_color'];?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
|
440 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
441 |
+
</tr>
|
442 |
+
<tr>
|
443 |
+
<th scope="row">Overlay opacity</th>
|
444 |
+
<td><input type="text" name="advps_overlay_opacity" value="<?php echo $dataSet['advps_overlay_opacity'];?>" style="width:50px;" />
|
445 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ 0 - 1 ]</span></td>
|
446 |
+
</tr>
|
447 |
+
<tr>
|
448 |
+
<th scope="row">Text opacity</th>
|
449 |
+
<td><input type="text" name="advps_text_opacity" value="<?php echo $dataSet['advps_text_opacity'];?>" style="width:50px;" />
|
450 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ 0 - 1 ]</span></td>
|
451 |
+
</tr>
|
452 |
+
<tr>
|
453 |
+
<th scope="row">Title font Color</th>
|
454 |
+
<td><input type="text" name="advps_titleFcolor" value="<?php echo $dataSet['advps_titleFcolor'];?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
|
455 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
456 |
+
</tr>
|
457 |
+
<tr>
|
458 |
+
<th scope="row">Title hover Color</th>
|
459 |
+
<td><input type="text" name="advps_titleHcolor" value="<?php echo $dataSet['advps_titleHcolor'];?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
|
460 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
461 |
+
</tr>
|
462 |
+
<tr>
|
463 |
+
<th scope="row">Title font size</th>
|
464 |
+
<td><input type="text" name="advps_titleFsize" value="<?php echo $dataSet['advps_titleFsize'];?>" style="width:60px;" />
|
465 |
+
px</td>
|
466 |
+
</tr>
|
467 |
+
<tr>
|
468 |
+
<th scope="row">Excerpt font color</th>
|
469 |
+
<td><input class="advps-color-picker" type="text" name="advps_excptFcolor" value="<?php echo $dataSet['advps_excptFcolor'];?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
|
470 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
471 |
+
</tr>
|
472 |
+
<tr>
|
473 |
+
<th scope="row">Excerpt font size</th>
|
474 |
+
<td><input type="text" name="advps_excptFsize" value="<?php echo $dataSet['advps_excptFsize'];?>" style="width:60px;" />
|
475 |
+
px</td>
|
476 |
+
</tr>
|
477 |
+
<tr>
|
478 |
+
<th scope="row">Excerpt length</th>
|
479 |
+
<td><input type="text" name="advps_excerptlen" value="<?php echo $dataSet['advps_excerptlen'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
|
480 |
+
words</td>
|
481 |
+
</tr>
|
482 |
+
<tr>
|
483 |
+
<th scope="row">Excerpt visibility</th>
|
484 |
+
<td><select name="advps_excpt_visibility">
|
485 |
+
<option value="show on hover" <?php if($dataSet['advps_excpt_visibility'] == 'show on hover'){echo 'selected="selected"';}?>>Show on hover</option>
|
486 |
+
<option value="always show" <?php if($dataSet['advps_excpt_visibility'] == 'always show'){echo 'selected="selected"';}?>>Always show</option>
|
487 |
+
</select></td>
|
488 |
+
</tr>
|
489 |
+
<tr>
|
490 |
+
<th scope="row">Excerpt Position</th>
|
491 |
+
<td><select name="advps_excpt_position">
|
492 |
+
<option value="left" <?php if($dataSet['advps_excpt_position'] == 'left'){echo 'selected="selected"';}?>>Left</option>
|
493 |
+
<option value="right" <?php if($dataSet['advps_excpt_position'] == 'right'){echo 'selected="selected"';}?>>Right</option>
|
494 |
+
<option value="bottom" <?php if($dataSet['advps_excpt_position'] == 'bottom'){echo 'selected="selected"';}?>>Bottom</option>
|
495 |
+
</select></td>
|
496 |
+
</tr>
|
497 |
+
<tr>
|
498 |
+
<th scope="row">Enable/Disable link</th>
|
499 |
+
<td><select name="advps_ed_link">
|
500 |
+
<option value="enable" <?php if($dataSet['advps_ed_link'] == 'enable'){echo 'selected="selected"';}?>>Enable</option>
|
501 |
+
<option value="disable" <?php if($dataSet['advps_ed_link'] == 'disable'){echo 'selected="selected"';}?>>Disable</option>
|
502 |
+
</select></td>
|
503 |
+
</tr>
|
504 |
+
<tr>
|
505 |
+
<th scope="row">link type</th>
|
506 |
+
<td><select name="advps_link_type">
|
507 |
+
<option value="permalink" <?php if($dataSet['advps_link_type'] == 'permalink'){echo 'selected="selected"';}?>>Permalink</option>
|
508 |
+
<option value="custom" <?php if($dataSet['advps_link_type'] == 'custom'){echo 'selected="selected"';}?>>Custom</option>
|
509 |
+
</select>
|
510 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For custom link create a custom field with name 'advps_custom_link' ]</span>
|
511 |
+
</td>
|
512 |
+
</tr>
|
513 |
+
</table>
|
514 |
+
</fieldset>
|
515 |
+
<fieldset>
|
516 |
+
<legend style="margin-left:10px;"><strong>Navigation</strong></legend>
|
517 |
+
<table class="form-table">
|
518 |
+
<tr>
|
519 |
+
<th scope="row">Exclude pager</th>
|
520 |
+
<td><select name="advps_exclude_pager">
|
521 |
+
<option value="yes" <?php if($dataSet['advps_exclude_pager'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
522 |
+
<option value="no" <?php if($dataSet['advps_exclude_pager'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
523 |
+
</select></td>
|
524 |
+
</tr>
|
525 |
+
<tr>
|
526 |
+
<th scope="row">Pager type</th>
|
527 |
+
<td><span style="padding-right:5px;">Number</span>
|
528 |
+
<input type="radio" name="advps_pager_type" value="number" <?php if($dataSet['advps_pager_type'] == 'number'){echo 'checked="checked"';}?>>
|
529 |
+
<span style="padding:0px 5px 0px 10px;">Bullet</span>
|
530 |
+
<input type="radio" name="advps_pager_type" value="bullet" <?php if($dataSet['advps_pager_type'] == 'bullet'){echo 'checked="checked"';}?>></td>
|
531 |
+
</tr>
|
532 |
+
<tr>
|
533 |
+
<th scope="row">Pager position</th>
|
534 |
+
<td>Right
|
535 |
+
<input type="text" name="advps_pager_right" value="<?php echo $dataSet['advps_pager_right'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
|
536 |
+
px Bottom
|
537 |
+
<input type="text" name="advps_pager_bottom" value="<?php echo $dataSet['advps_pager_bottom'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
|
538 |
+
px</td>
|
539 |
+
</tr>
|
540 |
+
<tr>
|
541 |
+
<th scope="row">Exclude Next/Previous</th>
|
542 |
+
<td><select name="advps_exclude_nxtprev">
|
543 |
+
<option value="yes" <?php if($dataSet['advps_exclude_nxtprev'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
544 |
+
<option value="no" <?php if($dataSet['advps_exclude_nxtprev'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
545 |
+
</select></td>
|
546 |
+
</tr>
|
547 |
+
<tr>
|
548 |
+
<th scope="row">Exclude Play/Pause</th>
|
549 |
+
<td><select name="advps_exclude_playpause">
|
550 |
+
<option value="yes" <?php if($dataSet['advps_exclude_playpause'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
551 |
+
<option value="no" <?php if($dataSet['advps_exclude_playpause'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
552 |
+
</select></td>
|
553 |
+
</tr>
|
554 |
+
</table>
|
555 |
+
</fieldset>
|
556 |
+
<input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
|
557 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
558 |
+
<p>
|
559 |
+
<input type="submit" name="advps_submit" value="Save changes" class="button-primary" />
|
560 |
+
</p>
|
561 |
+
</form>
|
562 |
+
</div>
|
563 |
+
</div>
|
564 |
+
</div>
|
565 |
+
</div>
|
566 |
+
<?php }?>
|
567 |
+
<?php if(isset($_POST['advps_add'])){?>
|
568 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
569 |
+
<div class="postbox-container" style="width:65%">
|
570 |
+
<div class="postbox">
|
571 |
+
<div class="handlediv" title=""> <br>
|
572 |
+
</div>
|
573 |
+
<h3 style="cursor:pointer; text-align:center" class="advps-expand"> <span>Add new option set</span> </h3>
|
574 |
+
<div class="inside">
|
575 |
+
<form method="post">
|
576 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px; margin-bottom:10px;">
|
577 |
+
<legend style="margin-left:10px;"><strong>Query</strong></legend>
|
578 |
+
<table class="form-table">
|
579 |
+
<tr>
|
580 |
+
<th scope="row">Post Type</th>
|
581 |
+
<td><select name="advps_post_types" onchange="advpsCheckCat(this.value,'add')">
|
582 |
+
<option value="post" selected="selected">post</option>
|
583 |
+
<option value="page">page</option>
|
584 |
+
<?php
|
585 |
+
foreach ($customPostTypes as $post_type ) {
|
586 |
+
?>
|
587 |
+
<option value="<?php echo $post_type;?>"><?php echo $post_type;?></option>
|
588 |
+
<?php
|
589 |
+
}
|
590 |
+
?>
|
591 |
+
</select></td>
|
592 |
+
</tr>
|
593 |
+
<tr id="advps-cat-fieldadd">
|
594 |
+
<th scope="row">Category</th>
|
595 |
+
<td><select name="advps_category[]" multiple="multiple">
|
596 |
+
<?php
|
597 |
+
$catList = get_categories();
|
598 |
+
foreach($catList as $scat){
|
599 |
+
?>
|
600 |
+
<option value="<?php echo $scat->term_id;?>"><?php echo $scat->name;?></option>
|
601 |
+
<?php }?>
|
602 |
+
</select>
|
603 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple category ]</span></td>
|
604 |
+
</tr>
|
605 |
+
<tr>
|
606 |
+
<th scope="row">Max. Number of post</th>
|
607 |
+
<td><input type="text" name="advps_maxpost" value="10" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
608 |
+
</tr>
|
609 |
+
<tr>
|
610 |
+
<th scope="row">Exclude</th>
|
611 |
+
<td><input type="text" name="advps_exclude" value="" style="width:100px;" />
|
612 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
|
613 |
+
</tr>
|
614 |
+
<tr>
|
615 |
+
<th scope="row">Order by</th>
|
616 |
+
<td><select name="advps_order_by">
|
617 |
+
<option value="date" selected="selected">Date</option>
|
618 |
+
<option value="ID">ID</option>
|
619 |
+
<option value="author">Author</option>
|
620 |
+
<option value="title">Title</option>
|
621 |
+
<option value="name">Name</option>
|
622 |
+
<option value="rand">Random</option>
|
623 |
+
<option value="menu_order">Menu order</option>
|
624 |
+
</select></td>
|
625 |
+
</tr>
|
626 |
+
<tr>
|
627 |
+
<th scope="row">Order</th>
|
628 |
+
<td><select name="advps_order">
|
629 |
+
<option value="ASC">Ascending</option>
|
630 |
+
<option value="DESC" selected="selected">Descending</option>
|
631 |
+
</select></td>
|
632 |
+
</tr>
|
633 |
+
</table>
|
634 |
+
</fieldset>
|
635 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
636 |
+
<legend style="margin-left:10px;"><strong>Effects</strong></legend>
|
637 |
+
<table class="form-table">
|
638 |
+
<tr>
|
639 |
+
<th scope="row">Effect</th>
|
640 |
+
<td><select name="advps_effects">
|
641 |
+
<option value="blindX">blindX</option>
|
642 |
+
<option value="blindY">blindY</option>
|
643 |
+
<option value="blindZ">blindZ</option>
|
644 |
+
<option value="cover">cover</option>
|
645 |
+
<option value="curtainX">curtainX</option>
|
646 |
+
<option value="curtainY">curtainY</option>
|
647 |
+
<option value="fade">fade</option>
|
648 |
+
<option value="fadeZoom">fadeZoom</option>
|
649 |
+
<option value="growX">growX</option>
|
650 |
+
<option value="growY">growY</option>
|
651 |
+
<option value="none">none</option>
|
652 |
+
<option value="scrollUp">scrollUp</option>
|
653 |
+
<option value="scrollDown">scrollDown</option>
|
654 |
+
<option value="scrollLeft">scrollLeft</option>
|
655 |
+
<option value="scrollRight">scrollRight</option>
|
656 |
+
<option value="scrollHorz">scrollHorz</option>
|
657 |
+
<option value="scrollVert">scrollVert</option>
|
658 |
+
<option value="shuffle">shuffle</option>
|
659 |
+
<option value="slideX">slideX</option>
|
660 |
+
<option value="slideY">slideY</option>
|
661 |
+
<option value="toss">toss</option>
|
662 |
+
<option value="turnUp">turnUp</option>
|
663 |
+
<option value="turnDown">turnDown</option>
|
664 |
+
<option value="turnLeft">turnLeft</option>
|
665 |
+
<option value="turnRight">turnRight</option>
|
666 |
+
<option value="uncover" selected="selected">uncover</option>
|
667 |
+
<option value="wipe">wipe</option>
|
668 |
+
<option value="zoom">zoom</option>
|
669 |
+
</select></td>
|
670 |
+
</tr>
|
671 |
+
<tr>
|
672 |
+
<th scope="row">Timeout</th>
|
673 |
+
<td><input type="text" name="advps_timeout" value="2000" style="width:60px;" onkeypress="return onlyNum(event);" />
|
674 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;"> [ 0 to disable auto advance.]</span></td>
|
675 |
+
</tr>
|
676 |
+
<tr>
|
677 |
+
<th scope="row">Easing</th>
|
678 |
+
<td><select name="advps_easing">
|
679 |
+
<option value="linear" selected="selected">linear</option>
|
680 |
+
<option value="swing">swing</option>
|
681 |
+
<option value="jswing">jswing</option>
|
682 |
+
<option value="easeInQuad">easeInQuad</option>
|
683 |
+
<option value="easeOutQuad">easeOutQuad</option>
|
684 |
+
<option value="easeInOutQuad">easeInOutQuad</option>
|
685 |
+
<option value="easeInCubic">easeInCubic</option>
|
686 |
+
<option value="easeOutCubic">easeOutCubic</option>
|
687 |
+
<option value="easeInOutCubic">easeInOutCubic</option>
|
688 |
+
<option value="easeInQuart">easeInQuart</option>
|
689 |
+
<option value="easeOutQuart">easeOutQuart</option>
|
690 |
+
<option value="easeInOutQuart">easeInOutQuart</option>
|
691 |
+
<option value="easeInQuint">easeInQuint</option>
|
692 |
+
<option value="easeInQuint">easeOutQuint</option>
|
693 |
+
<option value="easeInQuint">easeInOutQuint</option>
|
694 |
+
<option value="easeInSine">easeInSine</option>
|
695 |
+
<option value="easeOutSine">easeOutSine</option>
|
696 |
+
<option value="easeInOutSine">easeInOutSine</option>
|
697 |
+
<option value="easeInExpo">easeInExpo</option>
|
698 |
+
<option value="easeOutExpo">easeOutExpo</option>
|
699 |
+
<option value="easeInOutExpo">easeInOutExpo</option>
|
700 |
+
<option value="easeInCirc">easeInCirc</option>
|
701 |
+
<option value="easeOutCirc">easeOutCirc</option>
|
702 |
+
<option value="easeInOutCirc">easeInOutCirc</option>
|
703 |
+
<option value="easeInBounce">easeInBounce</option>
|
704 |
+
<option value="easeOutBounce">easeOutBounce</option>
|
705 |
+
<option value="easeInOutBounce">easeInOutBounce</option>
|
706 |
+
<option value="easeInElastic">easeInElastic</option>
|
707 |
+
<option value="easeOutElastic">easeOutElastic</option>
|
708 |
+
<option value="easeInOutElastic">easeInOutElastic</option>
|
709 |
+
<option value="easeInBack">easeInBack</option>
|
710 |
+
<option value="easeOutBack">easeOutBack</option>
|
711 |
+
<option value="easeInOutBack">easeInOutBack</option>
|
712 |
+
</select></td>
|
713 |
+
</tr>
|
714 |
+
<tr>
|
715 |
+
<th scope="row">Speed</th>
|
716 |
+
<td><input type="text" name="advps_speed" value="1500" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
717 |
+
</tr>
|
718 |
+
<tr>
|
719 |
+
<th scope="row">Enable pause on hover</th>
|
720 |
+
<td><select name="advps_ps_hover">
|
721 |
+
<option value="yes" selected="selected">Yes</option>
|
722 |
+
<option value="no">No</option>
|
723 |
+
</select></td>
|
724 |
+
</tr>
|
725 |
+
</table>
|
726 |
+
</fieldset>
|
727 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
728 |
+
<legend style="margin-left:10px;"><strong>Container & Thumbnail</strong></legend>
|
729 |
+
<table class="form-table">
|
730 |
+
<tr>
|
731 |
+
<th scope="row">Select Thumbnail</th>
|
732 |
+
<td><select name="advps_thumbnail">
|
733 |
+
<option value="thumbnail">thumbnail</option>
|
734 |
+
<option value="medium">medium</option>
|
735 |
+
<option value="large">large</option>
|
736 |
+
<option value="full">full</option>
|
737 |
+
<?php
|
738 |
+
global $_wp_additional_image_sizes;
|
739 |
+
unset($_wp_additional_image_sizes['post-thumbnail']);
|
740 |
+
foreach($_wp_additional_image_sizes as $tkey => $tval){
|
741 |
+
?>
|
742 |
+
<option value="<?php echo $tkey;?>"><?php echo $tkey;?></option>
|
743 |
+
<?php
|
744 |
+
}
|
745 |
+
?>
|
746 |
+
</select></td>
|
747 |
+
</tr>
|
748 |
+
<tr>
|
749 |
+
<th scope="row">Slide Container</th>
|
750 |
+
<td>Width
|
751 |
+
<input type="text" name="advps_sld_width" value="820" style="width:80px;" onkeypress="return onlyNum(event);" />
|
752 |
+
px Height
|
753 |
+
<input type="text" name="advps_sld_height" value="270" style="width:80px;" onkeypress="return onlyNum(event);" />
|
754 |
+
px</td>
|
755 |
+
</tr>
|
756 |
+
|
757 |
+
<tr>
|
758 |
+
<th scope="row">Padding</th>
|
759 |
+
<td><input type="text" name="advps_contpad1" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
760 |
+
px
|
761 |
+
<input type="text" name="advps_contpad2" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
762 |
+
px
|
763 |
+
<input type="text" name="advps_contpad3" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
764 |
+
px
|
765 |
+
<input type="text" name="advps_contpad4" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
766 |
+
px </td>
|
767 |
+
</tr>
|
768 |
+
<tr>
|
769 |
+
<th scope="row">Background Color</th>
|
770 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="#FFFFFF" style="width:100px;" />
|
771 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
772 |
+
</tr>
|
773 |
+
<tr>
|
774 |
+
<th scope="row">Border</th>
|
775 |
+
<td><span style="vertical-align:top">
|
776 |
+
<input type="text" name="advps_border_size" value="<?php echo $dataSet['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
777 |
+
px
|
778 |
+
<select name="advps_border_type">
|
779 |
+
<option value="dashed">dashed</option>
|
780 |
+
<option value="dotted">dotted</option>
|
781 |
+
<option value="double">double</option>
|
782 |
+
<option value="solid">solid</option>
|
783 |
+
<option value="inset">inset</option>
|
784 |
+
<option value="outset">outset</option>
|
785 |
+
</select>
|
786 |
+
</span>
|
787 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="#444444" style="width:100px;" />
|
788 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
789 |
+
</tr>
|
790 |
+
<tr>
|
791 |
+
<th scope="row">Remove Border</th>
|
792 |
+
<td><select name="advps_remove_border">
|
793 |
+
<option value="yes" selected="selected">Yes</option>
|
794 |
+
<option value="no">No</option>
|
795 |
+
</select></td>
|
796 |
+
</tr>
|
797 |
+
<tr>
|
798 |
+
<th scope="row">Box Shadow</th>
|
799 |
+
<td><span style="vertical-align:top">
|
800 |
+
<input type="text" name="advps_bxshad1" value="0" style="width:40px;" onkeypress="return onlyNum(event);" />
|
801 |
+
px
|
802 |
+
<input type="text" name="advps_bxshad2" value="1" style="width:40px;" onkeypress="return onlyNum(event);" />
|
803 |
+
px
|
804 |
+
<input type="text" name="advps_bxshad3" value="4" style="width:40px;" onkeypress="return onlyNum(event);" />
|
805 |
+
px </span>
|
806 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="#000000" style="width:100px;" />
|
807 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
808 |
+
</tr>
|
809 |
+
<tr>
|
810 |
+
<th scope="row">Remove Shadow</th>
|
811 |
+
<td><select name="advps_remove_shd">
|
812 |
+
<option value="yes">Yes</option>
|
813 |
+
<option value="no" selected="selected">No</option>
|
814 |
+
</select></td>
|
815 |
+
</tr>
|
816 |
+
</table>
|
817 |
+
</fieldset>
|
818 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
819 |
+
<legend style="margin-left:10px;"><strong>Title & Excerpt</strong></legend>
|
820 |
+
<table class="form-table">
|
821 |
+
<tr>
|
822 |
+
<th scope="row">Overlay size</th>
|
823 |
+
<td>Width
|
824 |
+
<input type="text" name="advps_overlay_width" value="30" style="width:80px;" onkeypress="return onlyNum(event);" />
|
825 |
+
% Height
|
826 |
+
<input type="text" name="advps_overlay_height" value="100" style="width:80px;" onkeypress="return onlyNum(event);" />
|
827 |
+
%</td>
|
828 |
+
</tr>
|
829 |
+
<tr>
|
830 |
+
<th scope="row">Overlay color</th>
|
831 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_overlay_color" value="#000000" style="width:100px;" class="advps-color-picker" />
|
832 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
833 |
+
</tr>
|
834 |
+
<tr>
|
835 |
+
<th scope="row">Overlay opacity</th>
|
836 |
+
<td><input type="text" name="advps_overlay_opacity" value="0.6" style="width:50px;" />
|
837 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ 0 - 1 ]</span></td>
|
838 |
+
</tr>
|
839 |
+
<tr>
|
840 |
+
<th scope="row">Text opacity</th>
|
841 |
+
<td><input type="text" name="advps_text_opacity" value="1" style="width:50px;" />
|
842 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ 0 - 1 ]</span></td>
|
843 |
+
</tr>
|
844 |
+
<tr>
|
845 |
+
<th scope="row">Title font Color</th>
|
846 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleFcolor" value="#FFFFFF" style="width:100px;" class="advps-color-picker" />
|
847 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
848 |
+
</tr>
|
849 |
+
<tr>
|
850 |
+
<th scope="row">Title hover Color</th>
|
851 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleHcolor" value="#E6E6E6" style="width:100px;" class="advps-color-picker" />
|
852 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
853 |
+
</tr>
|
854 |
+
<tr>
|
855 |
+
<th scope="row">Title font size</th>
|
856 |
+
<td><input type="text" name="advps_titleFsize" value="22" style="width:60px;" />
|
857 |
+
px</td>
|
858 |
+
</tr>
|
859 |
+
<tr>
|
860 |
+
<th scope="row">Excerpt font color</th>
|
861 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_excptFcolor" value="#FFFFFF" style="width:100px;" />
|
862 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
863 |
+
</tr>
|
864 |
+
<tr>
|
865 |
+
<th scope="row">Excerpt font size</th>
|
866 |
+
<td><input type="text" name="advps_excptFsize" value="12" style="width:60px;" />
|
867 |
+
px</td>
|
868 |
+
</tr>
|
869 |
+
<tr>
|
870 |
+
<th scope="row">Excerpt length</th>
|
871 |
+
<td><input type="text" name="advps_excerptlen" value="30" style="width:60px;" onkeypress="return onlyNum(event);" />
|
872 |
+
words</td>
|
873 |
+
</tr>
|
874 |
+
<tr>
|
875 |
+
<th scope="row">Excerpt visibility</th>
|
876 |
+
<td><select name="advps_excpt_visibility">
|
877 |
+
<option value="show on hover">Show on hover</option>
|
878 |
+
<option value="always show" selected="selected">Always show</option>
|
879 |
+
</select></td>
|
880 |
+
</tr>
|
881 |
+
<tr>
|
882 |
+
<th scope="row">Excerpt Position</th>
|
883 |
+
<td><select name="advps_excpt_position">
|
884 |
+
<option value="left" selected="selected">Left</option>
|
885 |
+
<option value="right">Right</option>
|
886 |
+
<option value="bottom">Bottom</option>
|
887 |
+
</select></td>
|
888 |
+
</tr>
|
889 |
+
<tr>
|
890 |
+
<th scope="row">Enable/Disable link</th>
|
891 |
+
<td><select name="advps_ed_link">
|
892 |
+
<option value="enable">Enable</option>
|
893 |
+
<option value="disable" selected="selected">Disable</option>
|
894 |
+
</select></td>
|
895 |
+
</tr>
|
896 |
+
<tr>
|
897 |
+
<th scope="row">link type</th>
|
898 |
+
<td><select name="advps_link_type">
|
899 |
+
<option value="permalink" selected="selected">Permalink</option>
|
900 |
+
<option value="custom">Custom</option>
|
901 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For custom link create a custom field with name 'advps_custom_link' ]</span></td>
|
902 |
+
</tr>
|
903 |
+
</table>
|
904 |
+
</fieldset>
|
905 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
906 |
+
<legend style="margin-left:10px;"><strong>Navigation</strong></legend>
|
907 |
+
<table class="form-table">
|
908 |
+
<tr>
|
909 |
+
<th scope="row">Exclude pager</th>
|
910 |
+
<td><select name="advps_exclude_pager">
|
911 |
+
<option value="yes">Yes</option>
|
912 |
+
<option value="no" selected="selected">No</option>
|
913 |
+
</select></td>
|
914 |
+
</tr>
|
915 |
+
<tr>
|
916 |
+
<th scope="row">Pager type</th>
|
917 |
+
<td><span style="padding-right:5px;">Number</span>
|
918 |
+
<input type="radio" name="advps_pager_type" value="number">
|
919 |
+
<span style="padding:0px 5px 0px 10px;">Bullet</span>
|
920 |
+
<input type="radio" name="advps_pager_type" value="bullet" checked="checked"></td>
|
921 |
+
</tr>
|
922 |
+
<tr>
|
923 |
+
<th scope="row">Pager position</th>
|
924 |
+
<td>Right
|
925 |
+
<input type="text" name="advps_pager_right" value="8" style="width:50px;" onkeypress="return onlyNum(event);" />
|
926 |
+
px Bottom
|
927 |
+
<input type="text" name="advps_pager_bottom" value="6" style="width:50px;" onkeypress="return onlyNum(event);" />
|
928 |
+
px</td>
|
929 |
+
</tr>
|
930 |
+
<tr>
|
931 |
+
<th scope="row">Exclude Next/Previous</th>
|
932 |
+
<td><select name="advps_exclude_nxtprev">
|
933 |
+
<option value="yes">Yes</option>
|
934 |
+
<option value="no" selected="selected">No</option>
|
935 |
+
</select></td>
|
936 |
+
</tr>
|
937 |
+
<tr>
|
938 |
+
<th scope="row">Exclude Play/Pause</th>
|
939 |
+
<td><select name="advps_exclude_playpause">
|
940 |
+
<option value="yes">Yes</option>
|
941 |
+
<option value="no" selected="selected">No</option>
|
942 |
+
</select></td>
|
943 |
+
</tr>
|
944 |
+
</table>
|
945 |
+
</fieldset>
|
946 |
+
<input type="hidden" name="template" value="one" />
|
947 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
948 |
+
<p>
|
949 |
+
<input type="submit" name="advps_submit" value="Add" class="button-primary" style="width:90px; font-weight:bold" />
|
950 |
+
<span style="margin-left:10px;">
|
951 |
+
<button class="button-secondary" style="width:90px; height:25px;">Cancel</button>
|
952 |
+
</span></p>
|
953 |
+
</form>
|
954 |
+
</div>
|
955 |
+
</div>
|
956 |
+
</div>
|
957 |
+
</div>
|
958 |
+
<?php }else{?>
|
959 |
+
<div style="position:relative; float:left; width:100%">
|
960 |
+
<form method="post">
|
961 |
+
<input type="submit" class="button-secondary" value="Add New" name="advps_add" />
|
962 |
+
</form>
|
963 |
+
</div>
|
964 |
+
<?php }}elseif($currTab == 'two'){foreach( $res2 as $dset){ $dataSet = unserialize($dset->opt_data);?>
|
965 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
966 |
+
<div class="postbox-container" style="width:65%">
|
967 |
+
<div class="postbox <?php if(!isset($_POST['opt_id']) || $_POST['opt_id'] != $dset->id){echo 'closed';}?>">
|
968 |
+
<div class="handlediv" title=""> <br>
|
969 |
+
</div>
|
970 |
+
<h3 style="cursor:pointer; text-align:center" class="advps-expand"> <span>Option Set</span> </h3>
|
971 |
+
<div class="inside">
|
972 |
+
<div style="position:absolute; top:1.2%; right:4%; font-weight:bold; border:1px solid #393;padding:2px 15px;">ID = <?php echo $dset->id;?></div>
|
973 |
+
<form method="post">
|
974 |
+
<fieldset>
|
975 |
+
<legend style="margin-left:10px;"><strong>Query</strong></legend>
|
976 |
+
<table class="form-table">
|
977 |
+
<tr>
|
978 |
+
<th scope="row">Post Type</th>
|
979 |
+
<td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo $dset->id;?>)">
|
980 |
+
<option value="post" <?php if($dataSet['advps_post_types'] == 'post'){echo 'selected="selected"';}?>>post</option>
|
981 |
+
<option value="page" <?php if($dataSet['advps_post_types'] == 'page'){echo 'selected="selected"';}?>>page</option>
|
982 |
+
<?php
|
983 |
+
foreach ($customPostTypes as $post_type ) {
|
984 |
+
?>
|
985 |
+
<option value="<?php echo $post_type;?>" <?php if($dataSet['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
|
986 |
+
<?php
|
987 |
+
}
|
988 |
+
?>
|
989 |
+
</select></td>
|
990 |
+
</tr>
|
991 |
+
<tr id="advps-cat-field<?php echo $dset->id;?>">
|
992 |
+
<?php if($dataSet['advps_post_types'] != "page"){?>
|
993 |
+
<th scope="row">Category</th>
|
994 |
+
<td><select name="advps_category[]" multiple="multiple">
|
995 |
+
<?php
|
996 |
+
$catList = get_categories();
|
997 |
+
foreach($catList as $scat){
|
998 |
+
?>
|
999 |
+
<option value="<?php echo $scat->term_id;?>" <?php if(isset($dataSet['advps_category']) && in_array($scat->term_id,$dataSet['advps_category'])){echo 'selected="selected"';}?>><?php echo $scat->name;?></option>
|
1000 |
+
<?php }?>
|
1001 |
+
</select>
|
1002 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple category ]</span></td>
|
1003 |
+
<?php }?>
|
1004 |
+
</tr>
|
1005 |
+
<tr>
|
1006 |
+
<th scope="row">Max. Number of post</th>
|
1007 |
+
<td><input type="text" name="advps_maxpost" value="<?php echo $dataSet['advps_maxpost'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /> <span style="padding-left:10px; font-size:10px; font-style:italic;">[ * Maximum Slides]</span></td>
|
1008 |
+
</tr>
|
1009 |
+
<tr>
|
1010 |
+
<th scope="row">Post per Slide</th>
|
1011 |
+
<td><input type="text" name="advps_postperslide" value="<?php echo $dataSet['advps_postperslide'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1012 |
+
</tr>
|
1013 |
+
<tr>
|
1014 |
+
<th scope="row">Exclude</th>
|
1015 |
+
<td><input type="text" name="advps_exclude" value="<?php echo $dataSet['advps_exclude'];?>" style="width:100px;" />
|
1016 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
|
1017 |
+
</tr>
|
1018 |
+
<tr>
|
1019 |
+
<th scope="row">Order by</th>
|
1020 |
+
<td><select name="advps_order_by">
|
1021 |
+
<option value="date" <?php if($dataSet['advps_order_by'] == 'date'){echo 'selected="selected"';}?>>Date</option>
|
1022 |
+
<option value="ID" <?php if($dataSet['advps_order_by'] == 'ID'){echo 'selected="selected"';}?>>ID</option>
|
1023 |
+
<option value="author" <?php if($dataSet['advps_order_by'] == 'author'){echo 'selected="selected"';}?>>Author</option>
|
1024 |
+
<option value="title" <?php if($dataSet['advps_order_by'] == 'title'){echo 'selected="selected"';}?>>Title</option>
|
1025 |
+
<option value="name" <?php if($dataSet['advps_order_by'] == 'name'){echo 'selected="selected"';}?>>Name</option>
|
1026 |
+
<option value="rand" <?php if($dataSet['advps_order_by'] == 'rand'){echo 'selected="selected"';}?>>Random</option>
|
1027 |
+
<option value="menu_order" <?php if($dataSet['advps_order_by'] == 'menu_order'){echo 'selected="selected"';}?>>Menu order</option>
|
1028 |
+
</select></td>
|
1029 |
+
</tr>
|
1030 |
+
<tr>
|
1031 |
+
<th scope="row">Order</th>
|
1032 |
+
<td><select name="advps_order">
|
1033 |
+
<option value="ASC" <?php if($dataSet['advps_order'] == 'ASC'){echo 'selected="selected"';}?>>Ascending</option>
|
1034 |
+
<option value="DESC" <?php if($dataSet['advps_order'] == 'DESC'){echo 'selected="selected"';}?>>Descending</option>
|
1035 |
+
</select></td>
|
1036 |
+
</tr>
|
1037 |
+
</table>
|
1038 |
+
</fieldset>
|
1039 |
+
<fieldset>
|
1040 |
+
<legend style="margin-left:10px;"><strong>Effects</strong></legend>
|
1041 |
+
<table class="form-table">
|
1042 |
+
<tr>
|
1043 |
+
<th scope="row">Effect</th>
|
1044 |
+
<td><select name="advps_effects">
|
1045 |
+
<option value="blindX" <?php if($dataSet['advps_effects'] == 'blindX'){echo 'selected="selected"';}?>>blindX</option>
|
1046 |
+
<option value="blindY" <?php if($dataSet['advps_effects'] == 'blindY'){echo 'selected="selected"';}?>>blindY</option>
|
1047 |
+
<option value="blindZ" <?php if($dataSet['advps_effects'] == 'blindZ'){echo 'selected="selected"';}?>>blindZ</option>
|
1048 |
+
<option value="cover" <?php if($dataSet['advps_effects'] == 'cover'){echo 'selected="selected"';}?>>cover</option>
|
1049 |
+
<option value="curtainX" <?php if($dataSet['advps_effects'] == 'curtainX'){echo 'selected="selected"';}?>>curtainX</option>
|
1050 |
+
<option value="curtainY" <?php if($dataSet['advps_effects'] == 'curtainY'){echo 'selected="selected"';}?>>curtainY</option>
|
1051 |
+
<option value="fade" <?php if($dataSet['advps_effects'] == 'fade'){echo 'selected="selected"';}?>>fade</option>
|
1052 |
+
<option value="fadeZoom" <?php if($dataSet['advps_effects'] == 'fadeZoom'){echo 'selected="selected"';}?>>fadeZoom</option>
|
1053 |
+
<option value="growX" <?php if($dataSet['advps_effects'] == 'growX'){echo 'selected="selected"';}?>>growX</option>
|
1054 |
+
<option value="growY" <?php if($dataSet['advps_effects'] == 'growY'){echo 'selected="selected"';}?>>growY</option>
|
1055 |
+
<option value="none" <?php if($dataSet['advps_effects'] == 'none'){echo 'selected="selected"';}?>>none</option>
|
1056 |
+
<option value="scrollUp" <?php if($dataSet['advps_effects'] == 'scrollUp'){echo 'selected="selected"';}?>>scrollUp</option>
|
1057 |
+
<option value="scrollDown" <?php if($dataSet['advps_effects'] == 'scrollDown'){echo 'selected="selected"';}?>>scrollDown</option>
|
1058 |
+
<option value="scrollLeft" <?php if($dataSet['advps_effects'] == 'scrollLeft'){echo 'selected="selected"';}?>>scrollLeft</option>
|
1059 |
+
<option value="scrollRight" <?php if($dataSet['advps_effects'] == 'scrollRight'){echo 'selected="selected"';}?>>scrollRight</option>
|
1060 |
+
<option value="scrollHorz" <?php if($dataSet['advps_effects'] == 'scrollHorz'){echo 'selected="selected"';}?>>scrollHorz</option>
|
1061 |
+
<option value="scrollVert" <?php if($dataSet['advps_effects'] == 'scrollVert'){echo 'selected="selected"';}?>>scrollVert</option>
|
1062 |
+
<option value="shuffle" <?php if($dataSet['advps_effects'] == 'shuffle'){echo 'selected="selected"';}?>>shuffle</option>
|
1063 |
+
<option value="slideX" <?php if($dataSet['advps_effects'] == 'slideX'){echo 'selected="selected"';}?>>slideX</option>
|
1064 |
+
<option value="slideY" <?php if($dataSet['advps_effects'] == 'slideY'){echo 'selected="selected"';}?>>slideY</option>
|
1065 |
+
<option value="toss" <?php if($dataSet['advps_effects'] == 'toss'){echo 'selected="selected"';}?>>toss</option>
|
1066 |
+
<option value="turnUp" <?php if($dataSet['advps_effects'] == 'turnUp'){echo 'selected="selected"';}?>>turnUp</option>
|
1067 |
+
<option value="turnDown" <?php if($dataSet['advps_effects'] == 'turnDown'){echo 'selected="selected"';}?>>turnDown</option>
|
1068 |
+
<option value="turnLeft" <?php if($dataSet['advps_effects'] == 'turnLeft'){echo 'selected="selected"';}?>>turnLeft</option>
|
1069 |
+
<option value="turnRight" <?php if($dataSet['advps_effects'] == 'turnRight'){echo 'selected="selected"';}?>>turnRight</option>
|
1070 |
+
<option value="uncover" <?php if($dataSet['advps_effects'] == 'uncover'){echo 'selected="selected"';}?>>uncover</option>
|
1071 |
+
<option value="wipe" <?php if($dataSet['advps_effects'] == 'wipe'){echo 'selected="selected"';}?>>wipe</option>
|
1072 |
+
<option value="zoom" <?php if($dataSet['advps_effects'] == 'zoom'){echo 'selected="selected"';}?>>zoom</option>
|
1073 |
+
</select></td>
|
1074 |
+
</tr>
|
1075 |
+
<tr>
|
1076 |
+
<th scope="row">Timeout</th>
|
1077 |
+
<td><input type="text" name="advps_timeout" value="<?php echo $dataSet['advps_timeout'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
|
1078 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;"> [ 0 to disable auto advance.]</span></td>
|
1079 |
+
</tr>
|
1080 |
+
<tr>
|
1081 |
+
<th scope="row">Easing</th>
|
1082 |
+
<td><select name="advps_easing">
|
1083 |
+
<option value="linear" <?php if($dataSet['advps_easing'] == 'linear'){echo 'selected="selected"';}?>>linear</option>
|
1084 |
+
<option value="swing" <?php if($dataSet['advps_easing'] == 'swing'){echo 'selected="selected"';}?>>swing</option>
|
1085 |
+
<option value="jswing" <?php if($dataSet['advps_easing'] == 'jswing'){echo 'selected="selected"';}?>>jswing</option>
|
1086 |
+
<option value="easeInQuad" <?php if($dataSet['advps_easing'] == 'easeInQuad'){echo 'selected="selected"';}?>>easeInQuad</option>
|
1087 |
+
<option value="easeOutQuad" <?php if($dataSet['advps_easing'] == 'easeOutQuad'){echo 'selected="selected"';}?>>easeOutQuad</option>
|
1088 |
+
<option value="easeInOutQuad" <?php if($dataSet['advps_easing'] == 'easeInOutQuad'){echo 'selected="selected"';}?>>easeInOutQuad</option>
|
1089 |
+
<option value="easeInCubic" <?php if($dataSet['advps_easing'] == 'easeInCubic'){echo 'selected="selected"';}?>>easeInCubic</option>
|
1090 |
+
<option value="easeOutCubic" <?php if($dataSet['advps_easing'] == 'easeOutCubic'){echo 'selected="selected"';}?>>easeOutCubic</option>
|
1091 |
+
<option value="easeInOutCubic" <?php if($dataSet['advps_easing'] == 'easeInOutCubic'){echo 'selected="selected"';}?>>easeInOutCubic</option>
|
1092 |
+
<option value="easeInQuart" <?php if($dataSet['advps_easing'] == 'easeInQuart'){echo 'selected="selected"';}?>>easeInQuart</option>
|
1093 |
+
<option value="easeOutQuart" <?php if($dataSet['advps_easing'] == 'easeOutQuart'){echo 'selected="selected"';}?>>easeOutQuart</option>
|
1094 |
+
<option value="easeInOutQuart" <?php if($dataSet['advps_easing'] == 'easeInOutQuart'){echo 'selected="selected"';}?>>easeInOutQuart</option>
|
1095 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeInQuint'){echo 'selected="selected"';}?>>easeInQuint</option>
|
1096 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeOutQuint'){echo 'selected="selected"';}?>>easeOutQuint</option>
|
1097 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeInOutQuint'){echo 'selected="selected"';}?>>easeInOutQuint</option>
|
1098 |
+
<option value="easeInSine" <?php if($dataSet['advps_easing'] == 'easeInSine'){echo 'selected="selected"';}?>>easeInSine</option>
|
1099 |
+
<option value="easeOutSine" <?php if($dataSet['advps_easing'] == 'easeOutSine'){echo 'selected="selected"';}?>>easeOutSine</option>
|
1100 |
+
<option value="easeInOutSine" <?php if($dataSet['advps_easing'] == 'easeInOutSine'){echo 'selected="selected"';}?>>easeInOutSine</option>
|
1101 |
+
<option value="easeInExpo" <?php if($dataSet['advps_easing'] == 'easeInExpo'){echo 'selected="selected"';}?>>easeInExpo</option>
|
1102 |
+
<option value="easeOutExpo" <?php if($dataSet['advps_easing'] == 'easeOutExpo'){echo 'selected="selected"';}?>>easeOutExpo</option>
|
1103 |
+
<option value="easeInOutExpo" <?php if($dataSet['advps_easing'] == 'easeInOutExpo'){echo 'selected="selected"';}?>>easeInOutExpo</option>
|
1104 |
+
<option value="easeInCirc" <?php if($dataSet['advps_easing'] == 'easeInCirc'){echo 'selected="selected"';}?>>easeInCirc</option>
|
1105 |
+
<option value="easeOutCirc" <?php if($dataSet['advps_easing'] == 'easeOutCirc'){echo 'selected="selected"';}?>>easeOutCirc</option>
|
1106 |
+
<option value="easeInOutCirc" <?php if($dataSet['advps_easing'] == 'easeInOutCirc'){echo 'selected="selected"';}?>>easeInOutCirc</option>
|
1107 |
+
<option value="easeInBounce" <?php if($dataSet['advps_easing'] == 'easeInBounce'){echo 'selected="selected"';}?>>easeInBounce</option>
|
1108 |
+
<option value="easeOutBounce" <?php if($dataSet['advps_easing'] == 'easeOutBounce'){echo 'selected="selected"';}?>>easeOutBounce</option>
|
1109 |
+
<option value="easeInOutBounce" <?php if($dataSet['advps_easing'] == 'easeInOutBounce'){echo 'selected="selected"';}?>>easeInOutBounce</option>
|
1110 |
+
<option value="easeInElastic" <?php if($dataSet['advps_easing'] == 'easeInElastic'){echo 'selected="selected"';}?>>easeInElastic</option>
|
1111 |
+
<option value="easeOutElastic" <?php if($dataSet['advps_easing'] == 'easeOutElastic'){echo 'selected="selected"';}?>>easeOutElastic</option>
|
1112 |
+
<option value="easeInOutElastic" <?php if($dataSet['advps_easing'] == 'easeInOutElastic'){echo 'selected="selected"';}?>>easeInOutElastic</option>
|
1113 |
+
<option value="easeInBack" <?php if($dataSet['advps_easing'] == 'easeInBack'){echo 'selected="selected"';}?>>easeInBack</option>
|
1114 |
+
<option value="easeOutBack" <?php if($dataSet['advps_easing'] == 'easeOutBack'){echo 'selected="selected"';}?>>easeOutBack</option>
|
1115 |
+
<option value="easeInOutBack" <?php if($dataSet['advps_easing'] == 'easeInOutBack'){echo 'selected="selected"';}?>>easeInOutBack</option>
|
1116 |
+
</select></td>
|
1117 |
+
</tr>
|
1118 |
+
<tr>
|
1119 |
+
<th scope="row">Speed</th>
|
1120 |
+
<td><input type="text" name="advps_speed" value="<?php echo $dataSet['advps_speed'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1121 |
+
</tr>
|
1122 |
+
<tr>
|
1123 |
+
<th scope="row">Enable pause on hover</th>
|
1124 |
+
<td><select name="advps_ps_hover">
|
1125 |
+
<option value="yes" <?php if($dataSet['advps_ps_hover'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1126 |
+
<option value="no" <?php if($dataSet['advps_ps_hover'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1127 |
+
</select></td>
|
1128 |
+
</tr>
|
1129 |
+
</table>
|
1130 |
+
</fieldset>
|
1131 |
+
<fieldset>
|
1132 |
+
<legend style="margin-left:10px;"><strong>Container & Thumbnail</strong></legend>
|
1133 |
+
<table class="form-table">
|
1134 |
+
<tr>
|
1135 |
+
<th scope="row">Select Thumbnail</th>
|
1136 |
+
<td><select name="advps_thumbnail">
|
1137 |
+
<option value="thumbnail" <?php if($dataSet['advps_thumbnail'] == 'thumbnail'){echo 'selected="selected"';}?>>thumbnail</option>
|
1138 |
+
<option value="medium" <?php if($dataSet['advps_thumbnail'] == 'medium'){echo 'selected="selected"';}?>>medium</option>
|
1139 |
+
<option value="large" <?php if($dataSet['advps_thumbnail'] == 'large'){echo 'selected="selected"';}?>>large</option>
|
1140 |
+
<option value="full" <?php if($dataSet['advps_thumbnail'] == 'full'){echo 'selected="selected"';}?>>full</option>
|
1141 |
+
<?php
|
1142 |
+
global $_wp_additional_image_sizes;
|
1143 |
+
unset($_wp_additional_image_sizes['post-thumbnail']);
|
1144 |
+
foreach($_wp_additional_image_sizes as $tkey => $tval){
|
1145 |
+
?>
|
1146 |
+
<option value="<?php echo $tkey;?>" <?php if($dataSet['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
|
1147 |
+
<?php
|
1148 |
+
}
|
1149 |
+
?>
|
1150 |
+
</select></td>
|
1151 |
+
</tr>
|
1152 |
+
<tr>
|
1153 |
+
<th scope="row">Slide Container</th>
|
1154 |
+
<td>Width
|
1155 |
+
<input type="text" name="advps_sld_width" value="<?php echo $dataSet['advps_sld_width'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
1156 |
+
px Height
|
1157 |
+
<input type="text" name="advps_sld_height" value="<?php echo $dataSet['advps_sld_height'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
1158 |
+
px</td>
|
1159 |
+
</tr>
|
1160 |
+
<tr>
|
1161 |
+
<th scope="row">Padding</th>
|
1162 |
+
<td><input type="text" name="advps_contpad1" value="<?php echo $dataSet['advps_contpad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1163 |
+
px
|
1164 |
+
<input type="text" name="advps_contpad2" value="<?php echo $dataSet['advps_contpad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1165 |
+
px
|
1166 |
+
<input type="text" name="advps_contpad3" value="<?php echo $dataSet['advps_contpad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1167 |
+
px
|
1168 |
+
<input type="text" name="advps_contpad4" value="<?php echo $dataSet['advps_contpad4'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1169 |
+
px </td>
|
1170 |
+
</tr>
|
1171 |
+
<tr>
|
1172 |
+
<th scope="row">Background Color</th>
|
1173 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo $dataSet['advps_bgcolor'];?>" style="width:100px;" />
|
1174 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1175 |
+
</tr>
|
1176 |
+
<tr>
|
1177 |
+
<th scope="row">Border</th>
|
1178 |
+
<td><span style="vertical-align:top">
|
1179 |
+
<input type="text" name="advps_border_size" value="<?php echo $dataSet['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1180 |
+
px
|
1181 |
+
<select name="advps_border_type">
|
1182 |
+
<option value="dashed" <?php if($dataSet['advps_border_type'] == 'dashed'){echo 'selected="selected"';}?>>dashed</option>
|
1183 |
+
<option value="dotted" <?php if($dataSet['advps_border_type'] == 'dotted'){echo 'selected="selected"';}?>>dotted</option>
|
1184 |
+
<option value="double" <?php if($dataSet['advps_border_type'] == 'double'){echo 'selected="selected"';}?>>double</option>
|
1185 |
+
<option value="solid" <?php if($dataSet['advps_border_type'] == 'solid'){echo 'selected="selected"';}?>>solid</option>
|
1186 |
+
<option value="inset" <?php if($dataSet['advps_border_type'] == 'inset'){echo 'selected="selected"';}?>>inset</option>
|
1187 |
+
<option value="outset" <?php if($dataSet['advps_border_type'] == 'outset'){echo 'selected="selected"';}?>>outset</option>
|
1188 |
+
</select>
|
1189 |
+
</span>
|
1190 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="<?php echo $dataSet['advps_border_color'];?>" style="width:100px;" />
|
1191 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1192 |
+
</tr>
|
1193 |
+
<tr>
|
1194 |
+
<th scope="row">Remove Border</th>
|
1195 |
+
<td><select name="advps_remove_border">
|
1196 |
+
<option value="yes" <?php if($dataSet['advps_remove_border'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1197 |
+
<option value="no" <?php if($dataSet['advps_remove_border'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1198 |
+
</select></td>
|
1199 |
+
</tr>
|
1200 |
+
<tr>
|
1201 |
+
<th scope="row">Box Shadow</th>
|
1202 |
+
<td><span style="vertical-align:top">
|
1203 |
+
<input type="text" name="advps_bxshad1" value="<?php echo $dataSet['advps_bxshad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1204 |
+
px
|
1205 |
+
<input type="text" name="advps_bxshad2" value="<?php echo $dataSet['advps_bxshad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1206 |
+
px
|
1207 |
+
<input type="text" name="advps_bxshad3" value="<?php echo $dataSet['advps_bxshad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1208 |
+
px </span>
|
1209 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo $dataSet['advps_bxshadcolor'];?>" style="width:100px;" />
|
1210 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1211 |
+
</tr>
|
1212 |
+
<tr>
|
1213 |
+
<th scope="row">Remove Shadow</th>
|
1214 |
+
<td><select name="advps_remove_shd">
|
1215 |
+
<option value="yes" <?php if($dataSet['advps_remove_shd'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1216 |
+
<option value="no" <?php if($dataSet['advps_remove_shd'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1217 |
+
</select></td>
|
1218 |
+
</tr>
|
1219 |
+
<tr>
|
1220 |
+
<th scope="row">Image Orientation</th>
|
1221 |
+
<td><select name="advps_img_Orientation">
|
1222 |
+
<option value="horizontal" <?php if($dataSet['advps_img_Orientation'] == 'horizontal'){echo 'selected="selected"';}?>>Horizontal</option>
|
1223 |
+
<option value="vertical" <?php if($dataSet['advps_img_Orientation'] == 'vertical'){echo 'selected="selected"';}?>>Vertical</option>
|
1224 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ * Skip this if you want to show single image per slide.]</span></td>
|
1225 |
+
</tr>
|
1226 |
+
<tr>
|
1227 |
+
<th scope="row">Margin between Images</th>
|
1228 |
+
<td><input type="text" name="advps_imagemar" value="<?php echo $dataSet['advps_imagemar'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1229 |
+
px <span style="padding-left:10px; font-size:10px; font-style:italic;">[ * Skip this if you want to show single image per slide.]</span>
|
1230 |
+
</td>
|
1231 |
+
</tr>
|
1232 |
+
<tr>
|
1233 |
+
<th scope="row">Enable/Disable link</th>
|
1234 |
+
<td><select name="advps_ed_link">
|
1235 |
+
<option value="enable" <?php if($dataSet['advps_ed_link'] == 'enable'){echo 'selected="selected"';}?>>Enable</option>
|
1236 |
+
<option value="disable" <?php if($dataSet['advps_ed_link'] == 'disable'){echo 'selected="selected"';}?>>Disable</option>
|
1237 |
+
</select></td>
|
1238 |
+
</tr>
|
1239 |
+
<tr>
|
1240 |
+
<th scope="row">link type</th>
|
1241 |
+
<td><select name="advps_link_type">
|
1242 |
+
<option value="permalink" <?php if($dataSet['advps_link_type'] == 'permalink'){echo 'selected="selected"';}?>>Permalink</option>
|
1243 |
+
<option value="custom" <?php if($dataSet['advps_link_type'] == 'custom'){echo 'selected="selected"';}?>>Custom</option>
|
1244 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For custom link create a custom field with name 'advps_custom_link' ]</span></td>
|
1245 |
+
</tr>
|
1246 |
+
</table>
|
1247 |
+
</fieldset>
|
1248 |
+
<fieldset>
|
1249 |
+
<legend style="margin-left:10px;"><strong>Navigation</strong></legend>
|
1250 |
+
<table class="form-table">
|
1251 |
+
<tr>
|
1252 |
+
<th scope="row">Exclude pager</th>
|
1253 |
+
<td><select name="advps_exclude_pager">
|
1254 |
+
<option value="yes" <?php if($dataSet['advps_exclude_pager'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1255 |
+
<option value="no" <?php if($dataSet['advps_exclude_pager'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1256 |
+
</select></td>
|
1257 |
+
</tr>
|
1258 |
+
<tr>
|
1259 |
+
<th scope="row">Pager type</th>
|
1260 |
+
<td><span style="padding-right:5px;">Number</span>
|
1261 |
+
<input type="radio" name="advps_pager_type" value="number" <?php if($dataSet['advps_pager_type'] == 'number'){echo 'checked="checked"';}?>>
|
1262 |
+
<span style="padding:0px 5px 0px 10px;">Bullet</span>
|
1263 |
+
<input type="radio" name="advps_pager_type" value="bullet" <?php if($dataSet['advps_pager_type'] == 'bullet'){echo 'checked="checked"';}?>></td>
|
1264 |
+
</tr>
|
1265 |
+
<tr>
|
1266 |
+
<th scope="row">Pager position</th>
|
1267 |
+
<td>Right
|
1268 |
+
<input type="text" name="advps_pager_right" value="<?php echo $dataSet['advps_pager_right'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
|
1269 |
+
px Bottom
|
1270 |
+
<input type="text" name="advps_pager_bottom" value="<?php echo $dataSet['advps_pager_bottom'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
|
1271 |
+
px</td>
|
1272 |
+
</tr>
|
1273 |
+
<tr>
|
1274 |
+
<th scope="row">Exclude Next/Previous</th>
|
1275 |
+
<td><select name="advps_exclude_nxtprev">
|
1276 |
+
<option value="yes" <?php if($dataSet['advps_exclude_nxtprev'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1277 |
+
<option value="no" <?php if($dataSet['advps_exclude_nxtprev'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1278 |
+
</select></td>
|
1279 |
+
</tr>
|
1280 |
+
<tr>
|
1281 |
+
<th scope="row">Exclude Play/Pause</th>
|
1282 |
+
<td><select name="advps_exclude_playpause">
|
1283 |
+
<option value="yes" <?php if($dataSet['advps_exclude_playpause'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1284 |
+
<option value="no" <?php if($dataSet['advps_exclude_playpause'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1285 |
+
</select></td>
|
1286 |
+
</tr>
|
1287 |
+
</table>
|
1288 |
+
</fieldset>
|
1289 |
+
<input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
|
1290 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
1291 |
+
<p>
|
1292 |
+
<input type="submit" name="advps_submit" value="Save changes" class="button-primary" />
|
1293 |
+
</p>
|
1294 |
+
</form>
|
1295 |
+
</div>
|
1296 |
+
</div>
|
1297 |
+
</div>
|
1298 |
+
</div>
|
1299 |
+
<?php }?>
|
1300 |
+
<?php if(isset($_POST['advps_add'])){?>
|
1301 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
1302 |
+
<div class="postbox-container" style="width:65%">
|
1303 |
+
<div class="postbox">
|
1304 |
+
<div class="handlediv" title=""> <br>
|
1305 |
+
</div>
|
1306 |
+
<h3 style="cursor:pointer; text-align:center" class="advps-expand"> <span>Add new option set</span> </h3>
|
1307 |
+
<div class="inside">
|
1308 |
+
<form method="post">
|
1309 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px; margin-bottom:10px;">
|
1310 |
+
<legend style="margin-left:10px;"><strong>Query</strong></legend>
|
1311 |
+
<table class="form-table">
|
1312 |
+
<tr>
|
1313 |
+
<th scope="row">Post Type</th>
|
1314 |
+
<td><select name="advps_post_types" onchange="advpsCheckCat(this.value,'add')">
|
1315 |
+
<option value="post" selected="selected">post</option>
|
1316 |
+
<option value="page">page</option>
|
1317 |
+
<?php
|
1318 |
+
foreach ($customPostTypes as $post_type ) {
|
1319 |
+
?>
|
1320 |
+
<option value="<?php echo $post_type;?>"><?php echo $post_type;?></option>
|
1321 |
+
<?php
|
1322 |
+
}
|
1323 |
+
?>
|
1324 |
+
</select></td>
|
1325 |
+
</tr>
|
1326 |
+
<tr id="advps-cat-fieldadd">
|
1327 |
+
<th scope="row">Category</th>
|
1328 |
+
<td><select name="advps_category[]" multiple="multiple">
|
1329 |
+
<?php
|
1330 |
+
$catList = get_categories();
|
1331 |
+
foreach($catList as $scat){
|
1332 |
+
?>
|
1333 |
+
<option value="<?php echo $scat->term_id;?>"><?php echo $scat->name;?></option>
|
1334 |
+
<?php }?>
|
1335 |
+
</select>
|
1336 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top;">[ * You can select multiple category ]</span></td>
|
1337 |
+
</tr>
|
1338 |
+
<tr>
|
1339 |
+
<th scope="row">Max. Number of post</th>
|
1340 |
+
<td><input type="text" name="advps_maxpost" value="10" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1341 |
+
</tr>
|
1342 |
+
<tr>
|
1343 |
+
<th scope="row">Post per Slide</th>
|
1344 |
+
<td><input type="text" name="advps_postperslide" value="1" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1345 |
+
</tr>
|
1346 |
+
<tr>
|
1347 |
+
<th scope="row">Exclude</th>
|
1348 |
+
<td><input type="text" name="advps_exclude" value="" style="width:100px;" />
|
1349 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
|
1350 |
+
</tr>
|
1351 |
+
<tr>
|
1352 |
+
<th scope="row">Order by</th>
|
1353 |
+
<td><select name="advps_order_by">
|
1354 |
+
<option value="date" selected="selected">Date</option>
|
1355 |
+
<option value="ID">ID</option>
|
1356 |
+
<option value="author">Author</option>
|
1357 |
+
<option value="title">Title</option>
|
1358 |
+
<option value="name">>Name</option>
|
1359 |
+
<option value="rand">Random</option>
|
1360 |
+
<option value="menu_order">Menu order</option>
|
1361 |
+
</select></td>
|
1362 |
+
</tr>
|
1363 |
+
<tr>
|
1364 |
+
<th scope="row">Order</th>
|
1365 |
+
<td><select name="advps_order">
|
1366 |
+
<option value="ASC">Ascending</option>
|
1367 |
+
<option value="DESC" selected="selected">Descending</option>
|
1368 |
+
</select></td>
|
1369 |
+
</tr>
|
1370 |
+
</table>
|
1371 |
+
</fieldset>
|
1372 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
1373 |
+
<legend style="margin-left:10px;"><strong>Effects</strong></legend>
|
1374 |
+
<table class="form-table">
|
1375 |
+
<tr>
|
1376 |
+
<th scope="row">Effect</th>
|
1377 |
+
<td><select name="advps_effects">
|
1378 |
+
<option value="blindX">blindX</option>
|
1379 |
+
<option value="blindY">blindY</option>
|
1380 |
+
<option value="blindZ">blindZ</option>
|
1381 |
+
<option value="cover">cover</option>
|
1382 |
+
<option value="curtainX">curtainX</option>
|
1383 |
+
<option value="curtainY">curtainY</option>
|
1384 |
+
<option value="fade">fade</option>
|
1385 |
+
<option value="fadeZoom">fadeZoom</option>
|
1386 |
+
<option value="growX">growX</option>
|
1387 |
+
<option value="growY">growY</option>
|
1388 |
+
<option value="none">none</option>
|
1389 |
+
<option value="scrollUp">scrollUp</option>
|
1390 |
+
<option value="scrollDown">scrollDown</option>
|
1391 |
+
<option value="scrollLeft">scrollLeft</option>
|
1392 |
+
<option value="scrollRight">scrollRight</option>
|
1393 |
+
<option value="scrollHorz">scrollHorz</option>
|
1394 |
+
<option value="scrollVert">scrollVert</option>
|
1395 |
+
<option value="shuffle">shuffle</option>
|
1396 |
+
<option value="slideX">slideX</option>
|
1397 |
+
<option value="slideY">slideY</option>
|
1398 |
+
<option value="toss">toss</option>
|
1399 |
+
<option value="turnUp">turnUp</option>
|
1400 |
+
<option value="turnDown">turnDown</option>
|
1401 |
+
<option value="turnLeft">turnLeft</option>
|
1402 |
+
<option value="turnRight">turnRight</option>
|
1403 |
+
<option value="uncover" selected="selected">uncover</option>
|
1404 |
+
<option value="wipe">wipe</option>
|
1405 |
+
<option value="zoom">zoom</option>
|
1406 |
+
</select></td>
|
1407 |
+
</tr>
|
1408 |
+
<tr>
|
1409 |
+
<th scope="row">Timeout</th>
|
1410 |
+
<td><input type="text" name="advps_timeout" value="2000" style="width:60px;" onkeypress="return onlyNum(event);" />
|
1411 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;"> [ 0 to disable auto advance.]</span></td>
|
1412 |
+
</tr>
|
1413 |
+
<tr>
|
1414 |
+
<th scope="row">Easing</th>
|
1415 |
+
<td><select name="advps_easing">
|
1416 |
+
<option value="linear" selected="selected">linear</option>
|
1417 |
+
<option value="swing">swing</option>
|
1418 |
+
<option value="jswing">jswing</option>
|
1419 |
+
<option value="easeInQuad">easeInQuad</option>
|
1420 |
+
<option value="easeOutQuad">easeOutQuad</option>
|
1421 |
+
<option value="easeInOutQuad">easeInOutQuad</option>
|
1422 |
+
<option value="easeInCubic">easeInCubic</option>
|
1423 |
+
<option value="easeOutCubic">easeOutCubic</option>
|
1424 |
+
<option value="easeInOutCubic">easeInOutCubic</option>
|
1425 |
+
<option value="easeInQuart">easeInQuart</option>
|
1426 |
+
<option value="easeOutQuart">easeOutQuart</option>
|
1427 |
+
<option value="easeInOutQuart">easeInOutQuart</option>
|
1428 |
+
<option value="easeInQuint">easeInQuint</option>
|
1429 |
+
<option value="easeInQuint">easeOutQuint</option>
|
1430 |
+
<option value="easeInQuint">easeInOutQuint</option>
|
1431 |
+
<option value="easeInSine">easeInSine</option>
|
1432 |
+
<option value="easeOutSine">easeOutSine</option>
|
1433 |
+
<option value="easeInOutSine">easeInOutSine</option>
|
1434 |
+
<option value="easeInExpo">easeInExpo</option>
|
1435 |
+
<option value="easeOutExpo">easeOutExpo</option>
|
1436 |
+
<option value="easeInOutExpo">easeInOutExpo</option>
|
1437 |
+
<option value="easeInCirc">easeInCirc</option>
|
1438 |
+
<option value="easeOutCirc">easeOutCirc</option>
|
1439 |
+
<option value="easeInOutCirc">easeInOutCirc</option>
|
1440 |
+
<option value="easeInBounce">easeInBounce</option>
|
1441 |
+
<option value="easeOutBounce">easeOutBounce</option>
|
1442 |
+
<option value="easeInOutBounce">easeInOutBounce</option>
|
1443 |
+
<option value="easeInElastic">easeInElastic</option>
|
1444 |
+
<option value="easeOutElastic">easeOutElastic</option>
|
1445 |
+
<option value="easeInOutElastic">easeInOutElastic</option>
|
1446 |
+
<option value="easeInBack">easeInBack</option>
|
1447 |
+
<option value="easeOutBack">easeOutBack</option>
|
1448 |
+
<option value="easeInOutBack">easeInOutBack</option>
|
1449 |
+
</select></td>
|
1450 |
+
</tr>
|
1451 |
+
<tr>
|
1452 |
+
<th scope="row">Speed</th>
|
1453 |
+
<td><input type="text" name="advps_speed" value="1500" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1454 |
+
</tr>
|
1455 |
+
<tr>
|
1456 |
+
<th scope="row">Enable pause on hover</th>
|
1457 |
+
<td><select name="advps_ps_hover">
|
1458 |
+
<option value="yes" selected="selected">Yes</option>
|
1459 |
+
<option value="no">No</option>
|
1460 |
+
</select></td>
|
1461 |
+
</tr>
|
1462 |
+
</table>
|
1463 |
+
</fieldset>
|
1464 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
1465 |
+
<legend style="margin-left:10px;"><strong>Container & Thumbnail</strong></legend>
|
1466 |
+
<table class="form-table">
|
1467 |
+
<tr>
|
1468 |
+
<th scope="row">Select Thumbnail</th>
|
1469 |
+
<td><select name="advps_thumbnail">
|
1470 |
+
<option value="thumbnail">thumbnail</option>
|
1471 |
+
<option value="medium">medium</option>
|
1472 |
+
<option value="large">large</option>
|
1473 |
+
<option value="full">full</option>
|
1474 |
+
<?php
|
1475 |
+
global $_wp_additional_image_sizes;
|
1476 |
+
unset($_wp_additional_image_sizes['post-thumbnail']);
|
1477 |
+
foreach($_wp_additional_image_sizes as $tkey => $tval){
|
1478 |
+
?>
|
1479 |
+
<option value="<?php echo $tkey;?>" <?php if('advps-thumb-one' == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
|
1480 |
+
<?php
|
1481 |
+
}
|
1482 |
+
?>
|
1483 |
+
</select></td>
|
1484 |
+
</tr>
|
1485 |
+
<tr>
|
1486 |
+
<th scope="row">Slide Container</th>
|
1487 |
+
<td>Width
|
1488 |
+
<input type="text" name="advps_sld_width" value="624" style="width:80px;" onkeypress="return onlyNum(event);" />
|
1489 |
+
px Height
|
1490 |
+
<input type="text" name="advps_sld_height" value="225" style="width:80px;" onkeypress="return onlyNum(event);" />
|
1491 |
+
px</td>
|
1492 |
+
</tr>
|
1493 |
+
|
1494 |
+
<tr>
|
1495 |
+
<th scope="row">Padding</th>
|
1496 |
+
<td><input type="text" name="advps_contpad1" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1497 |
+
px
|
1498 |
+
<input type="text" name="advps_contpad2" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1499 |
+
px
|
1500 |
+
<input type="text" name="advps_contpad3" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1501 |
+
px
|
1502 |
+
<input type="text" name="advps_contpad4" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1503 |
+
px </td>
|
1504 |
+
</tr>
|
1505 |
+
<tr>
|
1506 |
+
<th scope="row">Background Color</th>
|
1507 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="#FFFFFF" style="width:100px;" />
|
1508 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1509 |
+
</tr>
|
1510 |
+
<tr>
|
1511 |
+
<th scope="row">Border</th>
|
1512 |
+
<td><span style="vertical-align:top">
|
1513 |
+
<input type="text" name="advps_border_size" value="<?php echo $dataSet['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1514 |
+
px
|
1515 |
+
<select name="advps_border_type">
|
1516 |
+
<option value="dashed">dashed</option>
|
1517 |
+
<option value="dotted">dotted</option>
|
1518 |
+
<option value="double">double</option>
|
1519 |
+
<option value="solid">solid</option>
|
1520 |
+
<option value="inset">inset</option>
|
1521 |
+
<option value="outset">outset</option>
|
1522 |
+
</select>
|
1523 |
+
</span>
|
1524 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="#444444" style="width:100px;" />
|
1525 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1526 |
+
</tr>
|
1527 |
+
<tr>
|
1528 |
+
<th scope="row">Remove Border</th>
|
1529 |
+
<td><select name="advps_remove_border">
|
1530 |
+
<option value="yes" selected="selected">Yes</option>
|
1531 |
+
<option value="no">No</option>
|
1532 |
+
</select></td>
|
1533 |
+
</tr>
|
1534 |
+
<tr>
|
1535 |
+
<th scope="row">Box Shadow</th>
|
1536 |
+
<td><span style="vertical-align:top">
|
1537 |
+
<input type="text" name="advps_bxshad1" value="0" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1538 |
+
px
|
1539 |
+
<input type="text" name="advps_bxshad2" value="1" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1540 |
+
px
|
1541 |
+
<input type="text" name="advps_bxshad3" value="4" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1542 |
+
px </span>
|
1543 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="#000000" style="width:100px;" />
|
1544 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1545 |
+
</tr>
|
1546 |
+
<tr>
|
1547 |
+
<th scope="row">Remove Shadow</th>
|
1548 |
+
<td><select name="advps_remove_shd">
|
1549 |
+
<option value="yes">Yes</option>
|
1550 |
+
<option value="no" selected="selected">No</option>
|
1551 |
+
</select></td>
|
1552 |
+
</tr>
|
1553 |
+
<tr>
|
1554 |
+
<th scope="row">Image Orientation</th>
|
1555 |
+
<td><select name="advps_img_Orientation">
|
1556 |
+
<option value="horizontal" selected="selected">Horizontal</option>
|
1557 |
+
<option value="vertical">Vertical</option>
|
1558 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ * Skip this if you want to show single image per slide.]</span></td>
|
1559 |
+
</tr>
|
1560 |
+
<tr>
|
1561 |
+
<th scope="row">Margin between Images</th>
|
1562 |
+
<td><input type="text" name="advps_imagemar" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1563 |
+
px <span style="padding-left:10px; font-size:10px; font-style:italic;">[ * Skip this if you want to show single image per slide.]</span>
|
1564 |
+
</td>
|
1565 |
+
</tr>
|
1566 |
+
<tr>
|
1567 |
+
<th scope="row">Enable/Disable link</th>
|
1568 |
+
<td><select name="advps_ed_link">
|
1569 |
+
<option value="enable">Enable</option>
|
1570 |
+
<option value="disable" selected="selected">Disable</option>
|
1571 |
+
</select></td>
|
1572 |
+
</tr>
|
1573 |
+
<tr>
|
1574 |
+
<th scope="row">link type</th>
|
1575 |
+
<td><select name="advps_link_type">
|
1576 |
+
<option value="permalink" selected="selected">Permalink</option>
|
1577 |
+
<option value="custom">Custom</option>
|
1578 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For custom link create a custom field with name 'advps_custom_link' ]</span></td>
|
1579 |
+
</tr>
|
1580 |
+
</table>
|
1581 |
+
</fieldset>
|
1582 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
1583 |
+
<legend style="margin-left:10px;"><strong>Navigation</strong></legend>
|
1584 |
+
<table class="form-table">
|
1585 |
+
<tr>
|
1586 |
+
<th scope="row">Exclude pager</th>
|
1587 |
+
<td><select name="advps_exclude_pager">
|
1588 |
+
<option value="yes">Yes</option>
|
1589 |
+
<option value="no" selected="selected">No</option>
|
1590 |
+
</select></td>
|
1591 |
+
</tr>
|
1592 |
+
<tr>
|
1593 |
+
<th scope="row">Pager type</th>
|
1594 |
+
<td><span style="padding-right:5px;">Number</span>
|
1595 |
+
<input type="radio" name="advps_pager_type" value="number">
|
1596 |
+
<span style="padding:0px 5px 0px 10px;">Bullet</span>
|
1597 |
+
<input type="radio" name="advps_pager_type" value="bullet" checked="checked"></td>
|
1598 |
+
</tr>
|
1599 |
+
<tr>
|
1600 |
+
<th scope="row">Pager position</th>
|
1601 |
+
<td>Right
|
1602 |
+
<input type="text" name="advps_pager_right" value="8" style="width:50px;" onkeypress="return onlyNum(event);" />
|
1603 |
+
px Bottom
|
1604 |
+
<input type="text" name="advps_pager_bottom" value="6" style="width:50px;" onkeypress="return onlyNum(event);" />
|
1605 |
+
px</td>
|
1606 |
+
</tr>
|
1607 |
+
<tr>
|
1608 |
+
<th scope="row">Exclude Next/Previous</th>
|
1609 |
+
<td><select name="advps_exclude_nxtprev">
|
1610 |
+
<option value="yes">Yes</option>
|
1611 |
+
<option value="no" selected="selected">No</option>
|
1612 |
+
</select></td>
|
1613 |
+
</tr>
|
1614 |
+
<tr>
|
1615 |
+
<th scope="row">Exclude Play/Pause</th>
|
1616 |
+
<td><select name="advps_exclude_playpause">
|
1617 |
+
<option value="yes">Yes</option>
|
1618 |
+
<option value="no" selected="selected">No</option>
|
1619 |
+
</select></td>
|
1620 |
+
</tr>
|
1621 |
+
</table>
|
1622 |
+
</fieldset>
|
1623 |
+
<input type="hidden" name="template" value="two" />
|
1624 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
1625 |
+
<p>
|
1626 |
+
<input type="submit" name="advps_submit" value="Add" class="button-primary" style="width:90px; font-weight:bold" />
|
1627 |
+
<span style="margin-left:10px;">
|
1628 |
+
<button class="button-secondary" style="width:90px; height:25px;">Cancel</button>
|
1629 |
+
</span></p>
|
1630 |
+
</form>
|
1631 |
+
</div>
|
1632 |
+
</div>
|
1633 |
+
</div>
|
1634 |
+
</div>
|
1635 |
+
<?php }else{?>
|
1636 |
+
<div style="position:relative; float:left; width:100%">
|
1637 |
+
<form method="post">
|
1638 |
+
<input type="submit" class="button-secondary" value="Add New" name="advps_add" />
|
1639 |
+
</form>
|
1640 |
+
</div>
|
1641 |
+
<?php }}elseif($currTab == 'three'){foreach( $res3 as $dset){ $dataSet = unserialize($dset->opt_data)?>
|
1642 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
1643 |
+
<div class="postbox-container" style="width:65%">
|
1644 |
+
<div class="postbox <?php if(!isset($_POST['opt_id']) || $_POST['opt_id'] != $dset->id){echo 'closed';}?>">
|
1645 |
+
<div class="handlediv" title=""> <br>
|
1646 |
+
</div>
|
1647 |
+
<h3 style="cursor:pointer; text-align:center" class="advps-expand"> <span>Option Set</span> </h3>
|
1648 |
+
<div class="inside">
|
1649 |
+
<div style="position:absolute; top:1.2%; right:4%; font-weight:bold; border:1px solid #393;padding:2px 15px;">ID = <?php echo $dset->id;?></div>
|
1650 |
+
<form method="post">
|
1651 |
+
<fieldset>
|
1652 |
+
<legend style="margin-left:10px;"><strong>Query</strong></legend>
|
1653 |
+
<table class="form-table">
|
1654 |
+
<tr>
|
1655 |
+
<th scope="row">Post Type</th>
|
1656 |
+
<td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo $dset->id;?>)">
|
1657 |
+
<option value="post" <?php if($dataSet['advps_post_types'] == 'post'){echo 'selected="selected"';}?>>post</option>
|
1658 |
+
<option value="page" <?php if($dataSet['advps_post_types'] == 'page'){echo 'selected="selected"';}?>>page</option>
|
1659 |
+
<?php
|
1660 |
+
foreach ($customPostTypes as $post_type ) {
|
1661 |
+
?>
|
1662 |
+
<option value="<?php echo $post_type;?>" <?php if($dataSet['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
|
1663 |
+
<?php
|
1664 |
+
}
|
1665 |
+
?>
|
1666 |
+
</select></td>
|
1667 |
+
</tr>
|
1668 |
+
<tr id="advps-cat-field<?php echo $dset->id;?>">
|
1669 |
+
<?php if($dataSet['advps_post_types'] != "page"){?>
|
1670 |
+
<th scope="row">Category</th>
|
1671 |
+
<td><select name="advps_category[]" multiple="multiple">
|
1672 |
+
<?php
|
1673 |
+
$catList = get_categories();
|
1674 |
+
foreach($catList as $scat){
|
1675 |
+
?>
|
1676 |
+
<option value="<?php echo $scat->term_id;?>" <?php if(isset($dataSet['advps_category']) && in_array($scat->term_id,$dataSet['advps_category'])){echo 'selected="selected"';}?>><?php echo $scat->name;?></option>
|
1677 |
+
<?php }?>
|
1678 |
+
</select>
|
1679 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top">[ * You can select multiple category ]</span></td>
|
1680 |
+
<?php }?>
|
1681 |
+
</tr>
|
1682 |
+
<tr>
|
1683 |
+
<th scope="row">Max. Number of post</th>
|
1684 |
+
<td><input type="text" name="advps_maxpost" value="<?php echo $dataSet['advps_maxpost'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1685 |
+
</tr>
|
1686 |
+
<tr>
|
1687 |
+
<th scope="row">Exclude</th>
|
1688 |
+
<td><input type="text" name="advps_exclude" value="<?php echo $dataSet['advps_exclude'];?>" style="width:100px;" />
|
1689 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
|
1690 |
+
</tr>
|
1691 |
+
<tr>
|
1692 |
+
<th scope="row">Order by</th>
|
1693 |
+
<td><select name="advps_order_by">
|
1694 |
+
<option value="date" <?php if($dataSet['advps_order_by'] == 'date'){echo 'selected="selected"';}?>>Date</option>
|
1695 |
+
<option value="ID" <?php if($dataSet['advps_order_by'] == 'ID'){echo 'selected="selected"';}?>>ID</option>
|
1696 |
+
<option value="author" <?php if($dataSet['advps_order_by'] == 'author'){echo 'selected="selected"';}?>>Author</option>
|
1697 |
+
<option value="title" <?php if($dataSet['advps_order_by'] == 'title'){echo 'selected="selected"';}?>>Title</option>
|
1698 |
+
<option value="name" <?php if($dataSet['advps_order_by'] == 'name'){echo 'selected="selected"';}?>>Name</option>
|
1699 |
+
<option value="rand" <?php if($dataSet['advps_order_by'] == 'rand'){echo 'selected="selected"';}?>>Random</option>
|
1700 |
+
<option value="menu_order" <?php if($dataSet['advps_order_by'] == 'menu_order'){echo 'selected="selected"';}?>>Menu order</option>
|
1701 |
+
</select></td>
|
1702 |
+
</tr>
|
1703 |
+
<tr>
|
1704 |
+
<th scope="row">Order</th>
|
1705 |
+
<td><select name="advps_order">
|
1706 |
+
<option value="ASC" <?php if($dataSet['advps_order'] == 'ASC'){echo 'selected="selected"';}?>>Ascending</option>
|
1707 |
+
<option value="DESC" <?php if($dataSet['advps_order'] == 'DESC'){echo 'selected="selected"';}?>>Descending</option>
|
1708 |
+
</select></td>
|
1709 |
+
</tr>
|
1710 |
+
</table>
|
1711 |
+
</fieldset>
|
1712 |
+
<fieldset>
|
1713 |
+
<legend style="margin-left:10px;"><strong>Effects</strong></legend>
|
1714 |
+
<table class="form-table">
|
1715 |
+
<tr>
|
1716 |
+
<th scope="row">Effect</th>
|
1717 |
+
<td><select name="advps_effects">
|
1718 |
+
<option value="blindX" <?php if($dataSet['advps_effects'] == 'blindX'){echo 'selected="selected"';}?>>blindX</option>
|
1719 |
+
<option value="blindY" <?php if($dataSet['advps_effects'] == 'blindY'){echo 'selected="selected"';}?>>blindY</option>
|
1720 |
+
<option value="blindZ" <?php if($dataSet['advps_effects'] == 'blindZ'){echo 'selected="selected"';}?>>blindZ</option>
|
1721 |
+
<option value="cover" <?php if($dataSet['advps_effects'] == 'cover'){echo 'selected="selected"';}?>>cover</option>
|
1722 |
+
<option value="curtainX" <?php if($dataSet['advps_effects'] == 'curtainX'){echo 'selected="selected"';}?>>curtainX</option>
|
1723 |
+
<option value="curtainY" <?php if($dataSet['advps_effects'] == 'curtainY'){echo 'selected="selected"';}?>>curtainY</option>
|
1724 |
+
<option value="fade" <?php if($dataSet['advps_effects'] == 'fade'){echo 'selected="selected"';}?>>fade</option>
|
1725 |
+
<option value="fadeZoom" <?php if($dataSet['advps_effects'] == 'fadeZoom'){echo 'selected="selected"';}?>>fadeZoom</option>
|
1726 |
+
<option value="growX" <?php if($dataSet['advps_effects'] == 'growX'){echo 'selected="selected"';}?>>growX</option>
|
1727 |
+
<option value="growY" <?php if($dataSet['advps_effects'] == 'growY'){echo 'selected="selected"';}?>>growY</option>
|
1728 |
+
<option value="none" <?php if($dataSet['advps_effects'] == 'none'){echo 'selected="selected"';}?>>none</option>
|
1729 |
+
<option value="scrollUp" <?php if($dataSet['advps_effects'] == 'scrollUp'){echo 'selected="selected"';}?>>scrollUp</option>
|
1730 |
+
<option value="scrollDown" <?php if($dataSet['advps_effects'] == 'scrollDown'){echo 'selected="selected"';}?>>scrollDown</option>
|
1731 |
+
<option value="scrollLeft" <?php if($dataSet['advps_effects'] == 'scrollLeft'){echo 'selected="selected"';}?>>scrollLeft</option>
|
1732 |
+
<option value="scrollRight" <?php if($dataSet['advps_effects'] == 'scrollRight'){echo 'selected="selected"';}?>>scrollRight</option>
|
1733 |
+
<option value="scrollHorz" <?php if($dataSet['advps_effects'] == 'scrollHorz'){echo 'selected="selected"';}?>>scrollHorz</option>
|
1734 |
+
<option value="scrollVert" <?php if($dataSet['advps_effects'] == 'scrollVert'){echo 'selected="selected"';}?>>scrollVert</option>
|
1735 |
+
<option value="shuffle" <?php if($dataSet['advps_effects'] == 'shuffle'){echo 'selected="selected"';}?>>shuffle</option>
|
1736 |
+
<option value="slideX" <?php if($dataSet['advps_effects'] == 'slideX'){echo 'selected="selected"';}?>>slideX</option>
|
1737 |
+
<option value="slideY" <?php if($dataSet['advps_effects'] == 'slideY'){echo 'selected="selected"';}?>>slideY</option>
|
1738 |
+
<option value="toss" <?php if($dataSet['advps_effects'] == 'toss'){echo 'selected="selected"';}?>>toss</option>
|
1739 |
+
<option value="turnUp" <?php if($dataSet['advps_effects'] == 'turnUp'){echo 'selected="selected"';}?>>turnUp</option>
|
1740 |
+
<option value="turnDown" <?php if($dataSet['advps_effects'] == 'turnDown'){echo 'selected="selected"';}?>>turnDown</option>
|
1741 |
+
<option value="turnLeft" <?php if($dataSet['advps_effects'] == 'turnLeft'){echo 'selected="selected"';}?>>turnLeft</option>
|
1742 |
+
<option value="turnRight" <?php if($dataSet['advps_effects'] == 'turnRight'){echo 'selected="selected"';}?>>turnRight</option>
|
1743 |
+
<option value="uncover" <?php if($dataSet['advps_effects'] == 'uncover'){echo 'selected="selected"';}?>>uncover</option>
|
1744 |
+
<option value="wipe" <?php if($dataSet['advps_effects'] == 'wipe'){echo 'selected="selected"';}?>>wipe</option>
|
1745 |
+
<option value="zoom" <?php if($dataSet['advps_effects'] == 'zoom'){echo 'selected="selected"';}?>>zoom</option>
|
1746 |
+
</select></td>
|
1747 |
+
</tr>
|
1748 |
+
<tr>
|
1749 |
+
<th scope="row">Timeout</th>
|
1750 |
+
<td><input type="text" name="advps_timeout" value="<?php echo $dataSet['advps_timeout'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
|
1751 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;"> [ 0 to disable auto advance.]</span></td>
|
1752 |
+
</tr>
|
1753 |
+
<tr>
|
1754 |
+
<th scope="row">Easing</th>
|
1755 |
+
<td><select name="advps_easing">
|
1756 |
+
<option value="linear" <?php if($dataSet['advps_easing'] == 'linear'){echo 'selected="selected"';}?>>linear</option>
|
1757 |
+
<option value="swing" <?php if($dataSet['advps_easing'] == 'swing'){echo 'selected="selected"';}?>>swing</option>
|
1758 |
+
<option value="jswing" <?php if($dataSet['advps_easing'] == 'jswing'){echo 'selected="selected"';}?>>jswing</option>
|
1759 |
+
<option value="easeInQuad" <?php if($dataSet['advps_easing'] == 'easeInQuad'){echo 'selected="selected"';}?>>easeInQuad</option>
|
1760 |
+
<option value="easeOutQuad" <?php if($dataSet['advps_easing'] == 'easeOutQuad'){echo 'selected="selected"';}?>>easeOutQuad</option>
|
1761 |
+
<option value="easeInOutQuad" <?php if($dataSet['advps_easing'] == 'easeInOutQuad'){echo 'selected="selected"';}?>>easeInOutQuad</option>
|
1762 |
+
<option value="easeInCubic" <?php if($dataSet['advps_easing'] == 'easeInCubic'){echo 'selected="selected"';}?>>easeInCubic</option>
|
1763 |
+
<option value="easeOutCubic" <?php if($dataSet['advps_easing'] == 'easeOutCubic'){echo 'selected="selected"';}?>>easeOutCubic</option>
|
1764 |
+
<option value="easeInOutCubic" <?php if($dataSet['advps_easing'] == 'easeInOutCubic'){echo 'selected="selected"';}?>>easeInOutCubic</option>
|
1765 |
+
<option value="easeInQuart" <?php if($dataSet['advps_easing'] == 'easeInQuart'){echo 'selected="selected"';}?>>easeInQuart</option>
|
1766 |
+
<option value="easeOutQuart" <?php if($dataSet['advps_easing'] == 'easeOutQuart'){echo 'selected="selected"';}?>>easeOutQuart</option>
|
1767 |
+
<option value="easeInOutQuart" <?php if($dataSet['advps_easing'] == 'easeInOutQuart'){echo 'selected="selected"';}?>>easeInOutQuart</option>
|
1768 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeInQuint'){echo 'selected="selected"';}?>>easeInQuint</option>
|
1769 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeOutQuint'){echo 'selected="selected"';}?>>easeOutQuint</option>
|
1770 |
+
<option value="easeInQuint" <?php if($dataSet['advps_easing'] == 'easeInOutQuint'){echo 'selected="selected"';}?>>easeInOutQuint</option>
|
1771 |
+
<option value="easeInSine" <?php if($dataSet['advps_easing'] == 'easeInSine'){echo 'selected="selected"';}?>>easeInSine</option>
|
1772 |
+
<option value="easeOutSine" <?php if($dataSet['advps_easing'] == 'easeOutSine'){echo 'selected="selected"';}?>>easeOutSine</option>
|
1773 |
+
<option value="easeInOutSine" <?php if($dataSet['advps_easing'] == 'easeInOutSine'){echo 'selected="selected"';}?>>easeInOutSine</option>
|
1774 |
+
<option value="easeInExpo" <?php if($dataSet['advps_easing'] == 'easeInExpo'){echo 'selected="selected"';}?>>easeInExpo</option>
|
1775 |
+
<option value="easeOutExpo" <?php if($dataSet['advps_easing'] == 'easeOutExpo'){echo 'selected="selected"';}?>>easeOutExpo</option>
|
1776 |
+
<option value="easeInOutExpo" <?php if($dataSet['advps_easing'] == 'easeInOutExpo'){echo 'selected="selected"';}?>>easeInOutExpo</option>
|
1777 |
+
<option value="easeInCirc" <?php if($dataSet['advps_easing'] == 'easeInCirc'){echo 'selected="selected"';}?>>easeInCirc</option>
|
1778 |
+
<option value="easeOutCirc" <?php if($dataSet['advps_easing'] == 'easeOutCirc'){echo 'selected="selected"';}?>>easeOutCirc</option>
|
1779 |
+
<option value="easeInOutCirc" <?php if($dataSet['advps_easing'] == 'easeInOutCirc'){echo 'selected="selected"';}?>>easeInOutCirc</option>
|
1780 |
+
<option value="easeInBounce" <?php if($dataSet['advps_easing'] == 'easeInBounce'){echo 'selected="selected"';}?>>easeInBounce</option>
|
1781 |
+
<option value="easeOutBounce" <?php if($dataSet['advps_easing'] == 'easeOutBounce'){echo 'selected="selected"';}?>>easeOutBounce</option>
|
1782 |
+
<option value="easeInOutBounce" <?php if($dataSet['advps_easing'] == 'easeInOutBounce'){echo 'selected="selected"';}?>>easeInOutBounce</option>
|
1783 |
+
<option value="easeInElastic" <?php if($dataSet['advps_easing'] == 'easeInElastic'){echo 'selected="selected"';}?>>easeInElastic</option>
|
1784 |
+
<option value="easeOutElastic" <?php if($dataSet['advps_easing'] == 'easeOutElastic'){echo 'selected="selected"';}?>>easeOutElastic</option>
|
1785 |
+
<option value="easeInOutElastic" <?php if($dataSet['advps_easing'] == 'easeInOutElastic'){echo 'selected="selected"';}?>>easeInOutElastic</option>
|
1786 |
+
<option value="easeInBack" <?php if($dataSet['advps_easing'] == 'easeInBack'){echo 'selected="selected"';}?>>easeInBack</option>
|
1787 |
+
<option value="easeOutBack" <?php if($dataSet['advps_easing'] == 'easeOutBack'){echo 'selected="selected"';}?>>easeOutBack</option>
|
1788 |
+
<option value="easeInOutBack" <?php if($dataSet['advps_easing'] == 'easeInOutBack'){echo 'selected="selected"';}?>>easeInOutBack</option>
|
1789 |
+
</select></td>
|
1790 |
+
</tr>
|
1791 |
+
<tr>
|
1792 |
+
<th scope="row">Speed</th>
|
1793 |
+
<td><input type="text" name="advps_speed" value="<?php echo $dataSet['advps_speed'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
1794 |
+
</tr>
|
1795 |
+
<tr>
|
1796 |
+
<th scope="row">Enable pause on hover</th>
|
1797 |
+
<td><select name="advps_ps_hover">
|
1798 |
+
<option value="yes" <?php if($dataSet['advps_ps_hover'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1799 |
+
<option value="no" <?php if($dataSet['advps_ps_hover'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1800 |
+
</select></td>
|
1801 |
+
</tr>
|
1802 |
+
</table>
|
1803 |
+
</fieldset>
|
1804 |
+
<fieldset>
|
1805 |
+
<legend style="margin-left:10px;"><strong>Content</strong></legend>
|
1806 |
+
<table class="form-table">
|
1807 |
+
<tr>
|
1808 |
+
<th scope="row">Show on slide</th>
|
1809 |
+
<td><select name="advps_content_set[]" multiple="multiple">
|
1810 |
+
<option value="thumb" <?php if(in_array('thumb',$dataSet['advps_content_set'])){echo 'selected="selected"';}?>>Thumbnail</option>
|
1811 |
+
<option value="title" <?php if(in_array('title',$dataSet['advps_content_set'])){echo 'selected="selected"';}?>>Title</option>
|
1812 |
+
<option value="excerpt" <?php if(in_array('excerpt',$dataSet['advps_content_set'])){echo 'selected="selected"';}?>>Excerpt</option>
|
1813 |
+
<option value="content" <?php if(in_array('content',$dataSet['advps_content_set'])){echo 'selected="selected"';}?>>Content</option>
|
1814 |
+
</select>
|
1815 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top">[ * You can select multiple ]</span></td>
|
1816 |
+
</tr>
|
1817 |
+
<tr>
|
1818 |
+
<th scope="row">Select Thumbnail</th>
|
1819 |
+
<td><select name="advps_thumbnail">
|
1820 |
+
<option value="thumbnail" <?php if($dataSet['advps_thumbnail'] == 'thumbnail'){echo 'selected="selected"';}?>>thumbnail</option>
|
1821 |
+
<option value="medium" <?php if($dataSet['advps_thumbnail'] == 'medium'){echo 'selected="selected"';}?>>medium</option>
|
1822 |
+
<option value="large" <?php if($dataSet['advps_thumbnail'] == 'large'){echo 'selected="selected"';}?>>large</option>
|
1823 |
+
<option value="full" <?php if($dataSet['advps_thumbnail'] == 'full'){echo 'selected="selected"';}?>>full</option>
|
1824 |
+
<?php
|
1825 |
+
global $_wp_additional_image_sizes;
|
1826 |
+
unset($_wp_additional_image_sizes['post-thumbnail']);
|
1827 |
+
foreach($_wp_additional_image_sizes as $tkey => $tval){
|
1828 |
+
?>
|
1829 |
+
<option value="<?php echo $tkey;?>" <?php if($dataSet['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
|
1830 |
+
<?php
|
1831 |
+
}
|
1832 |
+
?>
|
1833 |
+
</select></td>
|
1834 |
+
</tr>
|
1835 |
+
<tr>
|
1836 |
+
<th scope="row">Slide Container</th>
|
1837 |
+
<td>Width
|
1838 |
+
<input type="text" name="advps_sld_width" value="<?php echo $dataSet['advps_sld_width'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
1839 |
+
px Height
|
1840 |
+
<input type="text" name="advps_sld_height" value="<?php echo $dataSet['advps_sld_height'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
1841 |
+
px</td>
|
1842 |
+
</tr>
|
1843 |
+
<tr>
|
1844 |
+
<th scope="row">Padding</th>
|
1845 |
+
<td><input type="text" name="advps_contpad1" value="<?php echo $dataSet['advps_contpad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1846 |
+
px
|
1847 |
+
<input type="text" name="advps_contpad2" value="<?php echo $dataSet['advps_contpad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1848 |
+
px
|
1849 |
+
<input type="text" name="advps_contpad3" value="<?php echo $dataSet['advps_contpad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1850 |
+
px
|
1851 |
+
<input type="text" name="advps_contpad4" value="<?php echo $dataSet['advps_contpad4'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1852 |
+
px </td>
|
1853 |
+
</tr>
|
1854 |
+
<tr>
|
1855 |
+
<th scope="row">Background Color</th>
|
1856 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo $dataSet['advps_bgcolor'];?>" style="width:100px;" />
|
1857 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1858 |
+
</tr>
|
1859 |
+
<tr>
|
1860 |
+
<th scope="row">Border</th>
|
1861 |
+
<td><span style="vertical-align:top">
|
1862 |
+
<input type="text" name="advps_border_size" value="<?php echo $dataSet['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1863 |
+
px
|
1864 |
+
<select name="advps_border_type">
|
1865 |
+
<option value="dashed" <?php if($dataSet['advps_border_type'] == 'dashed'){echo 'selected="selected"';}?>>dashed</option>
|
1866 |
+
<option value="dotted" <?php if($dataSet['advps_border_type'] == 'dotted'){echo 'selected="selected"';}?>>dotted</option>
|
1867 |
+
<option value="double" <?php if($dataSet['advps_border_type'] == 'double'){echo 'selected="selected"';}?>>double</option>
|
1868 |
+
<option value="solid" <?php if($dataSet['advps_border_type'] == 'solid'){echo 'selected="selected"';}?>>solid</option>
|
1869 |
+
<option value="inset" <?php if($dataSet['advps_border_type'] == 'inset'){echo 'selected="selected"';}?>>inset</option>
|
1870 |
+
<option value="outset" <?php if($dataSet['advps_border_type'] == 'outset'){echo 'selected="selected"';}?>>outset</option>
|
1871 |
+
</select>
|
1872 |
+
</span>
|
1873 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="<?php echo $dataSet['advps_border_color'];?>" style="width:100px;" />
|
1874 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1875 |
+
</tr>
|
1876 |
+
<tr>
|
1877 |
+
<th scope="row">Remove Border</th>
|
1878 |
+
<td><select name="advps_remove_border">
|
1879 |
+
<option value="yes" <?php if($dataSet['advps_remove_border'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1880 |
+
<option value="no" <?php if($dataSet['advps_remove_border'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1881 |
+
</select></td>
|
1882 |
+
</tr>
|
1883 |
+
<tr>
|
1884 |
+
<th scope="row">Box Shadow</th>
|
1885 |
+
<td><span style="vertical-align:top">
|
1886 |
+
<input type="text" name="advps_bxshad1" value="<?php echo $dataSet['advps_bxshad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1887 |
+
px
|
1888 |
+
<input type="text" name="advps_bxshad2" value="<?php echo $dataSet['advps_bxshad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1889 |
+
px
|
1890 |
+
<input type="text" name="advps_bxshad3" value="<?php echo $dataSet['advps_bxshad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
|
1891 |
+
px </span>
|
1892 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo $dataSet['advps_bxshadcolor'];?>" style="width:100px;" />
|
1893 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1894 |
+
</tr>
|
1895 |
+
<tr>
|
1896 |
+
<th scope="row">Remove Shadow</th>
|
1897 |
+
<td><select name="advps_remove_shd">
|
1898 |
+
<option value="yes" <?php if($dataSet['advps_remove_shd'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1899 |
+
<option value="no" <?php if($dataSet['advps_remove_shd'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1900 |
+
</select></td>
|
1901 |
+
</tr>
|
1902 |
+
<tr>
|
1903 |
+
<th scope="row">Content width</th>
|
1904 |
+
<td><input type="text" name="advps_cont_width" value="<?php echo $dataSet['advps_cont_width'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
|
1905 |
+
px</td>
|
1906 |
+
</tr>
|
1907 |
+
<tr>
|
1908 |
+
<th scope="row">Title font Color</th>
|
1909 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleFcolor" value="<?php echo $dataSet['advps_titleFcolor'];?>" style="width:100px;" class="advps-color-picker" />
|
1910 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1911 |
+
</tr>
|
1912 |
+
<tr>
|
1913 |
+
<th scope="row">Title hover Color</th>
|
1914 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleHcolor" value="<?php echo $dataSet['advps_titleHcolor'];?>" style="width:100px;" class="advps-color-picker" />
|
1915 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1916 |
+
</tr>
|
1917 |
+
<tr>
|
1918 |
+
<th scope="row">Title font size</th>
|
1919 |
+
<td><input type="text" name="advps_titleFsize" value="<?php echo $dataSet['advps_titleFsize'];?>" style="width:60px;" />
|
1920 |
+
px</td>
|
1921 |
+
</tr>
|
1922 |
+
<tr>
|
1923 |
+
<th scope="row">Excerpt/Content font color</th>
|
1924 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_excptFcolor" value="<?php echo $dataSet['advps_excptFcolor'];?>" style="width:100px;" />
|
1925 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
1926 |
+
</tr>
|
1927 |
+
<tr>
|
1928 |
+
<th scope="row">Excerpt/Content font size</th>
|
1929 |
+
<td><input type="text" name="advps_excptFsize" value="<?php echo $dataSet['advps_excptFsize'];?>" style="width:60px;" />
|
1930 |
+
px</td>
|
1931 |
+
</tr>
|
1932 |
+
<tr>
|
1933 |
+
<th scope="row">Excerpt length</th>
|
1934 |
+
<td><input type="text" name="advps_excerptlen" value="<?php echo $dataSet['advps_excerptlen'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
|
1935 |
+
words</td>
|
1936 |
+
</tr>
|
1937 |
+
<tr>
|
1938 |
+
<th scope="row">Enable/Disable link</th>
|
1939 |
+
<td><select name="advps_ed_link">
|
1940 |
+
<option value="enable" <?php if($dataSet['advps_ed_link'] == 'enable'){echo 'selected="selected"';}?>>Enable</option>
|
1941 |
+
<option value="disable" <?php if($dataSet['advps_ed_link'] == 'disable'){echo 'selected="selected"';}?>>Disable</option>
|
1942 |
+
</select></td>
|
1943 |
+
</tr>
|
1944 |
+
<tr>
|
1945 |
+
<th scope="row">link type</th>
|
1946 |
+
<td><select name="advps_link_type">
|
1947 |
+
<option value="permalink" <?php if($dataSet['advps_link_type'] == 'permalink'){echo 'selected="selected"';}?>>Permalink</option>
|
1948 |
+
<option value="custom" <?php if($dataSet['advps_link_type'] == 'custom'){echo 'selected="selected"';}?>>Custom</option>
|
1949 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For custom link create a custom field with name 'advps_custom_link' ]</span></td>
|
1950 |
+
</tr>
|
1951 |
+
</table>
|
1952 |
+
</fieldset>
|
1953 |
+
<fieldset>
|
1954 |
+
<legend style="margin-left:10px;"><strong>Navigation</strong></legend>
|
1955 |
+
<table class="form-table">
|
1956 |
+
<tr>
|
1957 |
+
<th scope="row">Exclude pager</th>
|
1958 |
+
<td><select name="advps_exclude_pager">
|
1959 |
+
<option value="yes" <?php if($dataSet['advps_exclude_pager'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1960 |
+
<option value="no" <?php if($dataSet['advps_exclude_pager'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1961 |
+
</select></td>
|
1962 |
+
</tr>
|
1963 |
+
<tr>
|
1964 |
+
<th scope="row">Pager type</th>
|
1965 |
+
<td><span style="padding-right:5px;">Number</span>
|
1966 |
+
<input type="radio" name="advps_pager_type" value="number" <?php if($dataSet['advps_pager_type'] == 'number'){echo 'checked="checked"';}?>>
|
1967 |
+
<span style="padding:0px 5px 0px 10px;">Bullet</span>
|
1968 |
+
<input type="radio" name="advps_pager_type" value="bullet" <?php if($dataSet['advps_pager_type'] == 'bullet'){echo 'checked="checked"';}?>></td>
|
1969 |
+
</tr>
|
1970 |
+
<tr>
|
1971 |
+
<th scope="row">Pager position</th>
|
1972 |
+
<td>Right
|
1973 |
+
<input type="text" name="advps_pager_right" value="<?php echo $dataSet['advps_pager_right'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
|
1974 |
+
px Bottom
|
1975 |
+
<input type="text" name="advps_pager_bottom" value="<?php echo $dataSet['advps_pager_bottom'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
|
1976 |
+
px</td>
|
1977 |
+
</tr>
|
1978 |
+
<tr>
|
1979 |
+
<th scope="row">Exclude Next/Previous</th>
|
1980 |
+
<td><select name="advps_exclude_nxtprev">
|
1981 |
+
<option value="yes" <?php if($dataSet['advps_exclude_nxtprev'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1982 |
+
<option value="no" <?php if($dataSet['advps_exclude_nxtprev'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1983 |
+
</select></td>
|
1984 |
+
</tr>
|
1985 |
+
<tr>
|
1986 |
+
<th scope="row">Exclude Play/Pause</th>
|
1987 |
+
<td><select name="advps_exclude_playpause">
|
1988 |
+
<option value="yes" <?php if($dataSet['advps_exclude_playpause'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
|
1989 |
+
<option value="no" <?php if($dataSet['advps_exclude_playpause'] == 'no'){echo 'selected="selected"';}?>>No</option>
|
1990 |
+
</select></td>
|
1991 |
+
</tr>
|
1992 |
+
</table>
|
1993 |
+
</fieldset>
|
1994 |
+
<input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
|
1995 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
1996 |
+
<p>
|
1997 |
+
<input type="submit" name="advps_submit" value="Save changes" class="button-primary" />
|
1998 |
+
</p>
|
1999 |
+
</form>
|
2000 |
+
</div>
|
2001 |
+
</div>
|
2002 |
+
</div>
|
2003 |
+
</div>
|
2004 |
+
<?php }?>
|
2005 |
+
<?php if(isset($_POST['advps_add'])){?>
|
2006 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
2007 |
+
<div class="postbox-container" style="width:65%">
|
2008 |
+
<div class="postbox">
|
2009 |
+
<div class="handlediv" title=""> <br>
|
2010 |
+
</div>
|
2011 |
+
<h3 style="cursor:pointer; text-align:center" class="advps-expand"> <span>Add new option set</span> </h3>
|
2012 |
+
<div class="inside">
|
2013 |
+
<form method="post">
|
2014 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px; margin-bottom:10px;">
|
2015 |
+
<legend style="margin-left:10px;"><strong>Query</strong></legend>
|
2016 |
+
<table class="form-table">
|
2017 |
+
<tr>
|
2018 |
+
<th scope="row">Post Type</th>
|
2019 |
+
<td><select name="advps_post_types" onchange="advpsCheckCat(this.value,'add')">
|
2020 |
+
<option value="post" selected="selected">post</option>
|
2021 |
+
<option value="page">page</option>
|
2022 |
+
<?php
|
2023 |
+
foreach ($customPostTypes as $post_type ) {
|
2024 |
+
?>
|
2025 |
+
<option value="<?php echo $post_type;?>"><?php echo $post_type;?></option>
|
2026 |
+
<?php
|
2027 |
+
}
|
2028 |
+
?>
|
2029 |
+
</select></td>
|
2030 |
+
</tr>
|
2031 |
+
<tr id="advps-cat-fieldadd">
|
2032 |
+
<th scope="row">Category</th>
|
2033 |
+
<td><select name="advps_category[]" multiple="multiple">
|
2034 |
+
<?php
|
2035 |
+
$catList = get_categories();
|
2036 |
+
foreach($catList as $scat){
|
2037 |
+
?>
|
2038 |
+
<option value="<?php echo $scat->term_id;?>"><?php echo $scat->name;?></option>
|
2039 |
+
<?php }?>
|
2040 |
+
</select>
|
2041 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ * You can select multiple category ]</span></td>
|
2042 |
+
</tr>
|
2043 |
+
<tr>
|
2044 |
+
<th scope="row">Max. Number of post</th>
|
2045 |
+
<td><input type="text" name="advps_maxpost" value="10" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
2046 |
+
</tr>
|
2047 |
+
<tr>
|
2048 |
+
<th scope="row">Exclude</th>
|
2049 |
+
<td><input type="text" name="advps_exclude" value="" style="width:100px;" />
|
2050 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
|
2051 |
+
</tr>
|
2052 |
+
<tr>
|
2053 |
+
<th scope="row">Order by</th>
|
2054 |
+
<td><select name="advps_order_by">
|
2055 |
+
<option value="date" selected="selected">Date</option>
|
2056 |
+
<option value="ID">ID</option>
|
2057 |
+
<option value="author">Author</option>
|
2058 |
+
<option value="title">Title</option>
|
2059 |
+
<option value="name">>Name</option>
|
2060 |
+
<option value="rand">Random</option>
|
2061 |
+
<option value="menu_order">Menu order</option>
|
2062 |
+
</select></td>
|
2063 |
+
</tr>
|
2064 |
+
<tr>
|
2065 |
+
<th scope="row">Order</th>
|
2066 |
+
<td><select name="advps_order">
|
2067 |
+
<option value="ASC">Ascending</option>
|
2068 |
+
<option value="DESC" selected="selected">Descending</option>
|
2069 |
+
</select></td>
|
2070 |
+
</tr>
|
2071 |
+
</table>
|
2072 |
+
</fieldset>
|
2073 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
2074 |
+
<legend style="margin-left:10px;"><strong>Effects</strong></legend>
|
2075 |
+
<table class="form-table">
|
2076 |
+
<tr>
|
2077 |
+
<th scope="row">Effect</th>
|
2078 |
+
<td><select name="advps_effects">
|
2079 |
+
<option value="blindX">blindX</option>
|
2080 |
+
<option value="blindY">blindY</option>
|
2081 |
+
<option value="blindZ">blindZ</option>
|
2082 |
+
<option value="cover">cover</option>
|
2083 |
+
<option value="curtainX">curtainX</option>
|
2084 |
+
<option value="curtainY">curtainY</option>
|
2085 |
+
<option value="fade">fade</option>
|
2086 |
+
<option value="fadeZoom">fadeZoom</option>
|
2087 |
+
<option value="growX">growX</option>
|
2088 |
+
<option value="growY">growY</option>
|
2089 |
+
<option value="none">none</option>
|
2090 |
+
<option value="scrollUp">scrollUp</option>
|
2091 |
+
<option value="scrollDown">scrollDown</option>
|
2092 |
+
<option value="scrollLeft">scrollLeft</option>
|
2093 |
+
<option value="scrollRight">scrollRight</option>
|
2094 |
+
<option value="scrollHorz">scrollHorz</option>
|
2095 |
+
<option value="scrollVert">scrollVert</option>
|
2096 |
+
<option value="shuffle">shuffle</option>
|
2097 |
+
<option value="slideX">slideX</option>
|
2098 |
+
<option value="slideY">slideY</option>
|
2099 |
+
<option value="toss">toss</option>
|
2100 |
+
<option value="turnUp">turnUp</option>
|
2101 |
+
<option value="turnDown">turnDown</option>
|
2102 |
+
<option value="turnLeft">turnLeft</option>
|
2103 |
+
<option value="turnRight">turnRight</option>
|
2104 |
+
<option value="uncover" selected="selected">uncover</option>
|
2105 |
+
<option value="wipe">wipe</option>
|
2106 |
+
<option value="zoom">zoom</option>
|
2107 |
+
</select></td>
|
2108 |
+
</tr>
|
2109 |
+
<tr>
|
2110 |
+
<th scope="row">Timeout</th>
|
2111 |
+
<td><input type="text" name="advps_timeout" value="2000" style="width:60px;" onkeypress="return onlyNum(event);" />
|
2112 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic;"> [ 0 to disable auto advance.]</span></td>
|
2113 |
+
</tr>
|
2114 |
+
<tr>
|
2115 |
+
<th scope="row">Easing</th>
|
2116 |
+
<td><select name="advps_easing">
|
2117 |
+
<option value="linear" selected="selected">linear</option>
|
2118 |
+
<option value="swing">swing</option>
|
2119 |
+
<option value="jswing">jswing</option>
|
2120 |
+
<option value="easeInQuad">easeInQuad</option>
|
2121 |
+
<option value="easeOutQuad">easeOutQuad</option>
|
2122 |
+
<option value="easeInOutQuad">easeInOutQuad</option>
|
2123 |
+
<option value="easeInCubic">easeInCubic</option>
|
2124 |
+
<option value="easeOutCubic">easeOutCubic</option>
|
2125 |
+
<option value="easeInOutCubic">easeInOutCubic</option>
|
2126 |
+
<option value="easeInQuart">easeInQuart</option>
|
2127 |
+
<option value="easeOutQuart">easeOutQuart</option>
|
2128 |
+
<option value="easeInOutQuart">easeInOutQuart</option>
|
2129 |
+
<option value="easeInQuint">easeInQuint</option>
|
2130 |
+
<option value="easeInQuint">easeOutQuint</option>
|
2131 |
+
<option value="easeInQuint">easeInOutQuint</option>
|
2132 |
+
<option value="easeInSine">easeInSine</option>
|
2133 |
+
<option value="easeOutSine">easeOutSine</option>
|
2134 |
+
<option value="easeInOutSine">easeInOutSine</option>
|
2135 |
+
<option value="easeInExpo">easeInExpo</option>
|
2136 |
+
<option value="easeOutExpo">easeOutExpo</option>
|
2137 |
+
<option value="easeInOutExpo">easeInOutExpo</option>
|
2138 |
+
<option value="easeInCirc">easeInCirc</option>
|
2139 |
+
<option value="easeOutCirc">easeOutCirc</option>
|
2140 |
+
<option value="easeInOutCirc">easeInOutCirc</option>
|
2141 |
+
<option value="easeInBounce">easeInBounce</option>
|
2142 |
+
<option value="easeOutBounce">easeOutBounce</option>
|
2143 |
+
<option value="easeInOutBounce">easeInOutBounce</option>
|
2144 |
+
<option value="easeInElastic">easeInElastic</option>
|
2145 |
+
<option value="easeOutElastic">easeOutElastic</option>
|
2146 |
+
<option value="easeInOutElastic">easeInOutElastic</option>
|
2147 |
+
<option value="easeInBack">easeInBack</option>
|
2148 |
+
<option value="easeOutBack">easeOutBack</option>
|
2149 |
+
<option value="easeInOutBack">easeInOutBack</option>
|
2150 |
+
</select></td>
|
2151 |
+
</tr>
|
2152 |
+
<tr>
|
2153 |
+
<th scope="row">Speed</th>
|
2154 |
+
<td><input type="text" name="advps_speed" value="1500" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
|
2155 |
+
</tr>
|
2156 |
+
<tr>
|
2157 |
+
<th scope="row">Enable pause on hover</th>
|
2158 |
+
<td><select name="advps_ps_hover">
|
2159 |
+
<option value="yes" selected="selected">Yes</option>
|
2160 |
+
<option value="no">No</option>
|
2161 |
+
</select></td>
|
2162 |
+
</tr>
|
2163 |
+
</table>
|
2164 |
+
</fieldset>
|
2165 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
2166 |
+
<legend style="margin-left:10px;"><strong>Content</strong></legend>
|
2167 |
+
<table class="form-table">
|
2168 |
+
<tr>
|
2169 |
+
<th scope="row">Show on slide</th>
|
2170 |
+
<td><select name="advps_content_set[]" multiple="multiple">
|
2171 |
+
<option value="thumb" selected="selected">Thumbnail</option>
|
2172 |
+
<option value="title" selected="selected">Title</option>
|
2173 |
+
<option value="excerpt" selected="selected">Excerpt</option>
|
2174 |
+
<option value="content">Content</option>
|
2175 |
+
</select>
|
2176 |
+
<span style="padding-left:10px; font-size:10px; font-style:italic; vertical-align:top">[ * You can select multiple ]</span></td>
|
2177 |
+
</tr>
|
2178 |
+
<tr>
|
2179 |
+
<th scope="row">Select Thumbnail</th>
|
2180 |
+
<td><select name="advps_thumbnail">
|
2181 |
+
<option value="thumbnail">thumbnail</option>
|
2182 |
+
<option value="medium"selected="selected">medium</option>
|
2183 |
+
<option value="large">large</option>
|
2184 |
+
<option value="full">full</option>
|
2185 |
+
<?php
|
2186 |
+
global $_wp_additional_image_sizes;
|
2187 |
+
unset($_wp_additional_image_sizes['post-thumbnail']);
|
2188 |
+
foreach($_wp_additional_image_sizes as $tkey => $tval){
|
2189 |
+
?>
|
2190 |
+
<option value="<?php echo $tkey;?>"><?php echo $tkey;?></option>
|
2191 |
+
<?php
|
2192 |
+
}
|
2193 |
+
?>
|
2194 |
+
</select></td>
|
2195 |
+
</tr>
|
2196 |
+
<tr>
|
2197 |
+
<th scope="row">Slide Container</th>
|
2198 |
+
<td>Width
|
2199 |
+
<input type="text" name="advps_sld_width" value="624" style="width:80px;" onkeypress="return onlyNum(event);" />
|
2200 |
+
px Height
|
2201 |
+
<input type="text" name="advps_sld_height" value="225" style="width:80px;" onkeypress="return onlyNum(event);" />
|
2202 |
+
px</td>
|
2203 |
+
</tr>
|
2204 |
+
<tr>
|
2205 |
+
<th scope="row">Padding</th>
|
2206 |
+
<td><input type="text" name="advps_contpad1" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2207 |
+
px
|
2208 |
+
<input type="text" name="advps_contpad2" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2209 |
+
px
|
2210 |
+
<input type="text" name="advps_contpad3" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2211 |
+
px
|
2212 |
+
<input type="text" name="advps_contpad4" value="10" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2213 |
+
px </td>
|
2214 |
+
</tr>
|
2215 |
+
<tr>
|
2216 |
+
<th scope="row">Background Color</th>
|
2217 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="#FFFFFF" style="width:100px;" />
|
2218 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
2219 |
+
</tr>
|
2220 |
+
<tr>
|
2221 |
+
<th scope="row">Border</th>
|
2222 |
+
<td><span style="vertical-align:top">
|
2223 |
+
<input type="text" name="advps_border_size" value="1" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2224 |
+
px
|
2225 |
+
<select name="advps_border_type">
|
2226 |
+
<option value="dashed">dashed</option>
|
2227 |
+
<option value="dotted">dotted</option>
|
2228 |
+
<option value="double">double</option>
|
2229 |
+
<option value="solid"selected="selected">solid</option>
|
2230 |
+
<option value="inset">inset</option>
|
2231 |
+
<option value="outset">outset</option>
|
2232 |
+
</select>
|
2233 |
+
</span>
|
2234 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="#444444" style="width:100px;" />
|
2235 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
2236 |
+
</tr>
|
2237 |
+
<tr>
|
2238 |
+
<th scope="row">Remove Border</th>
|
2239 |
+
<td><select name="advps_remove_border">
|
2240 |
+
<option value="yes" selected="selected">Yes</option>
|
2241 |
+
<option value="no">No</option>
|
2242 |
+
</select></td>
|
2243 |
+
</tr>
|
2244 |
+
<tr>
|
2245 |
+
<th scope="row">Box Shadow</th>
|
2246 |
+
<td><span style="vertical-align:top">
|
2247 |
+
<input type="text" name="advps_bxshad1" value="0" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2248 |
+
px
|
2249 |
+
<input type="text" name="advps_bxshad2" value="1" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2250 |
+
px
|
2251 |
+
<input type="text" name="advps_bxshad3" value="4" style="width:40px;" onkeypress="return onlyNum(event);" />
|
2252 |
+
px </span>
|
2253 |
+
<input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="#000000" style="width:100px;" />
|
2254 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
2255 |
+
</tr>
|
2256 |
+
<tr>
|
2257 |
+
<th scope="row">Remove Shadow</th>
|
2258 |
+
<td><select name="advps_remove_shd">
|
2259 |
+
<option value="yes">Yes</option>
|
2260 |
+
<option value="no" selected="selected">No</option>
|
2261 |
+
</select></td>
|
2262 |
+
</tr>
|
2263 |
+
<tr>
|
2264 |
+
<th scope="row">Content width</th>
|
2265 |
+
<td><input type="text" name="advps_cont_width" value="280" style="width:60px;" onkeypress="return onlyNum(event);" />
|
2266 |
+
px</td>
|
2267 |
+
</tr>
|
2268 |
+
<tr>
|
2269 |
+
<th scope="row">Title font Color</th>
|
2270 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleFcolor" value="#000000" style="width:100px;" class="advps-color-picker" />
|
2271 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
2272 |
+
</tr>
|
2273 |
+
<tr>
|
2274 |
+
<th scope="row">Title hover Color</th>
|
2275 |
+
<td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleHcolor" value="#E6E6E6" style="width:100px;" class="advps-color-picker" />
|
2276 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
2277 |
+
</tr>
|
2278 |
+
<tr>
|
2279 |
+
<th scope="row">Title font size</th>
|
2280 |
+
<td><input type="text" name="advps_titleFsize" value="22" style="width:60px;" />
|
2281 |
+
px</td>
|
2282 |
+
</tr>
|
2283 |
+
<tr>
|
2284 |
+
<th scope="row">Excerpt/Content font color</th>
|
2285 |
+
<td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_excptFcolor" value="#333333" style="width:100px;" />
|
2286 |
+
<div class="advpsfarb" style="padding-left:22%"></div></td>
|
2287 |
+
</tr>
|
2288 |
+
<tr>
|
2289 |
+
<th scope="row">Excerpt/Content font size</th>
|
2290 |
+
<td><input type="text" name="advps_excptFsize" value="12" style="width:60px;" />
|
2291 |
+
px</td>
|
2292 |
+
</tr>
|
2293 |
+
<tr>
|
2294 |
+
<th scope="row">Excerpt length</th>
|
2295 |
+
<td><input type="text" name="advps_excerptlen" value="30" style="width:60px;" onkeypress="return onlyNum(event);" />
|
2296 |
+
words</td>
|
2297 |
+
</tr>
|
2298 |
+
<tr>
|
2299 |
+
<th scope="row">Enable/Disable link</th>
|
2300 |
+
<td><select name="advps_ed_link">
|
2301 |
+
<option value="enable" selected="selected">Enable</option>
|
2302 |
+
<option value="disable">Disable</option>
|
2303 |
+
</select></td>
|
2304 |
+
</tr>
|
2305 |
+
<tr>
|
2306 |
+
<th scope="row">link type</th>
|
2307 |
+
<td><select name="advps_link_type">
|
2308 |
+
<option value="permalink" selected="selected">Permalink</option>
|
2309 |
+
<option value="custom">Custom</option>
|
2310 |
+
</select><span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For custom link create a custom field with name 'advps_custom_link' ]</span></td>
|
2311 |
+
</tr>
|
2312 |
+
</table>
|
2313 |
+
</fieldset>
|
2314 |
+
<fieldset style="border:1px solid #D9D9D9; border-radius:2px;margin-bottom:10px;">
|
2315 |
+
<legend style="margin-left:10px;"><strong>Navigation</strong></legend>
|
2316 |
+
<table class="form-table">
|
2317 |
+
<tr>
|
2318 |
+
<th scope="row">Exclude pager</th>
|
2319 |
+
<td><select name="advps_exclude_pager">
|
2320 |
+
<option value="yes">Yes</option>
|
2321 |
+
<option value="no" selected="selected">No</option>
|
2322 |
+
</select></td>
|
2323 |
+
</tr>
|
2324 |
+
<tr>
|
2325 |
+
<th scope="row">Pager type</th>
|
2326 |
+
<td><span style="padding-right:5px;">Number</span>
|
2327 |
+
<input type="radio" name="advps_pager_type" value="number">
|
2328 |
+
<span style="padding:0px 5px 0px 10px;">Bullet</span>
|
2329 |
+
<input type="radio" name="advps_pager_type" value="bullet" checked="checked"></td>
|
2330 |
+
</tr>
|
2331 |
+
<tr>
|
2332 |
+
<th scope="row">Pager position</th>
|
2333 |
+
<td>Right
|
2334 |
+
<input type="text" name="advps_pager_right" value="8" style="width:50px;" onkeypress="return onlyNum(event);" />
|
2335 |
+
px Bottom
|
2336 |
+
<input type="text" name="advps_pager_bottom" value="6" style="width:50px;" onkeypress="return onlyNum(event);" />
|
2337 |
+
px</td>
|
2338 |
+
</tr>
|
2339 |
+
<tr>
|
2340 |
+
<th scope="row">Exclude Next/Previous</th>
|
2341 |
+
<td><select name="advps_exclude_nxtprev">
|
2342 |
+
<option value="yes">Yes</option>
|
2343 |
+
<option value="no" selected="selected">No</option>
|
2344 |
+
</select></td>
|
2345 |
+
</tr>
|
2346 |
+
<tr>
|
2347 |
+
<th scope="row">Exclude Play/Pause</th>
|
2348 |
+
<td><select name="advps_exclude_playpause">
|
2349 |
+
<option value="yes">Yes</option>
|
2350 |
+
<option value="no" selected="selected">No</option>
|
2351 |
+
</select></td>
|
2352 |
+
</tr>
|
2353 |
+
</table>
|
2354 |
+
</fieldset>
|
2355 |
+
<input type="hidden" name="template" value="three" />
|
2356 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
2357 |
+
<p>
|
2358 |
+
<input type="submit" name="advps_submit" value="Add" class="button-primary" style="width:90px; font-weight:bold" />
|
2359 |
+
<span style="margin-left:10px;">
|
2360 |
+
<button class="button-secondary" style="width:90px; height:25px;">Cancel</button>
|
2361 |
+
</span></p>
|
2362 |
+
</form>
|
2363 |
+
</div>
|
2364 |
+
</div>
|
2365 |
+
</div>
|
2366 |
+
</div>
|
2367 |
+
<?php }else{?>
|
2368 |
+
<div style="position:relative; float:left; width:100%">
|
2369 |
+
<form method="post">
|
2370 |
+
<input type="submit" class="button-secondary" value="Add New" name="advps_add" />
|
2371 |
+
</form>
|
2372 |
+
</div>
|
2373 |
+
<?php }}elseif($currTab == 'thumb'){?>
|
2374 |
+
<div class="metabox-holder" style="margin-top:20px;">
|
2375 |
+
<div class="postbox-container" style="width:65%">
|
2376 |
+
<div class="postbox" style="margin-bottom:15px;">
|
2377 |
+
<h3><strong>Thumbnail settings</strong></h3>
|
2378 |
+
<table class="form-table">
|
2379 |
+
<?php foreach( $res_thumb as $thmb){?>
|
2380 |
+
<tr>
|
2381 |
+
<form method="post">
|
2382 |
+
<th scope="row">Name
|
2383 |
+
<input type="text" name="advps_thumb_name" value="<?php echo $thmb->thumb_name;?>" style="width:140px" /></th>
|
2384 |
+
<td>Width
|
2385 |
+
<input type="text" name="advps_thumb_width" value="<?php echo $thmb->width;?>" style="width:80px;" onkeypress="return onlyNum(event);" />
|
2386 |
+
px Height
|
2387 |
+
<input type="text" name="advps_thumb_height" value="<?php echo $thmb->height;?>" style="width:80px;" onkeypress="return onlyNum(event);" />px
|
2388 |
+
<span style="margin-left:20px;">Crop
|
2389 |
+
<select name="advps_crop">
|
2390 |
+
<option value="yes" <?php if($thmb->crop == 'yes'){echo 'selected="selected"';}?>>true</option>
|
2391 |
+
<option value="no" <?php if($thmb->crop == 'no'){echo 'selected="selected"';}?>>false</option>
|
2392 |
+
</select>
|
2393 |
+
</span>
|
2394 |
+
<span style="margin-left:20px;">
|
2395 |
+
<input type="submit" value="Save" class="button-secondary" name="update_thumb" />
|
2396 |
+
</span></td>
|
2397 |
+
<input type="hidden" value="<?php echo $thmb->id;?>" name="thumb_id" />
|
2398 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
2399 |
+
</form>
|
2400 |
+
</tr>
|
2401 |
+
<?php }?>
|
2402 |
+
</table>
|
2403 |
+
</div>
|
2404 |
+
<?php if(!isset($_POST['advps_add_thumb']) || $_POST['advps_add_thumb'] != 'Add New'){?>
|
2405 |
+
<div style="position:relative; float:left; width:100%;">
|
2406 |
+
<form method="post">
|
2407 |
+
<input type="submit" class="button-secondary" value="Add New" name="advps_add_thumb" style="width:80px;" />
|
2408 |
+
</form>
|
2409 |
+
</div>
|
2410 |
+
<?php }else{?>
|
2411 |
+
<div class="postbox">
|
2412 |
+
<h3><strong>Add thumbnail</strong></h3>
|
2413 |
+
<form method="post">
|
2414 |
+
<table class="form-table">
|
2415 |
+
<tr>
|
2416 |
+
<th scope="row">Name
|
2417 |
+
<input type="text" name="advps_thumb_name" value="" style="width:140px" /></th>
|
2418 |
+
<td>Width
|
2419 |
+
<input type="text" name="advps_thumb_width" value="" style="width:80px;" onkeypress="return onlyNum(event);" />
|
2420 |
+
px Height
|
2421 |
+
<input type="text" name="advps_thumb_height" value="" style="width:80px;" onkeypress="return onlyNum(event);" />
|
2422 |
+
px <span style="margin-left:20px;">Crop
|
2423 |
+
<select name="advps_crop">
|
2424 |
+
<option value="yes">true</option>
|
2425 |
+
<option value="no" selected="selected">false</option>
|
2426 |
+
</select>
|
2427 |
+
</span>
|
2428 |
+
<span style="margin-left:20px;">
|
2429 |
+
<?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
|
2430 |
+
<input type="submit" value="Add" class="button-secondary" name="advps_add_thumb" />
|
2431 |
+
</span></td>
|
2432 |
+
</tr>
|
2433 |
+
</table>
|
2434 |
+
</form>
|
2435 |
+
</div>
|
2436 |
+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1 |
+
.advps-slide-container{
|
2 |
+
position:relative;
|
3 |
+
}
|
4 |
+
.advps-slide-container ul
|
5 |
+
{
|
6 |
+
margin:0;
|
7 |
+
padding:0;
|
8 |
+
}
|
9 |
+
.advps-excerpt-one{
|
10 |
+
position:absolute;
|
11 |
+
-moz-opacity:1;
|
12 |
+
filter:alpha(opacity=100);
|
13 |
+
opacity:1;
|
14 |
+
z-index:1;
|
15 |
+
}
|
16 |
+
.advps-overlay-one
|
17 |
+
{
|
18 |
+
width:100%;
|
19 |
+
height:100%;
|
20 |
+
position: absolute;
|
21 |
+
top: 0;
|
22 |
+
left: 0;
|
23 |
+
z-index: 0;
|
24 |
+
}
|
25 |
+
.advps-excerpt-block-one{
|
26 |
+
position:relative;
|
27 |
+
padding:10px;
|
28 |
+
width:auto;
|
29 |
+
height:auto;
|
30 |
+
z-index:9;
|
31 |
+
}
|
32 |
+
.advps-slide-field-three img
|
33 |
+
{
|
34 |
+
float:left;
|
35 |
+
margin-right:20px;
|
36 |
+
}
|
37 |
+
|
38 |
+
.advs-title a{
|
39 |
+
font-weight:bold;
|
40 |
+
text-decoration:none;
|
41 |
+
}
|
42 |
+
/* --------------------- navigation -----------------*/
|
43 |
+
.advps-number{
|
44 |
+
position:absolute;
|
45 |
+
font-size:11px;
|
46 |
+
font-family:Arial, Helvetica, sans-serif;
|
47 |
+
z-index:9999;
|
48 |
+
}
|
49 |
+
.advps-number ul{
|
50 |
+
margin:0;
|
51 |
+
padding:0;
|
52 |
+
}
|
53 |
+
.advps-number ul li{
|
54 |
+
position:relative;
|
55 |
+
list-style:none;
|
56 |
+
float:left;
|
57 |
+
display:inline;
|
58 |
+
margin:0;
|
59 |
+
}
|
60 |
+
.advps-number li a {
|
61 |
+
margin: 2px 2px 2px 0;
|
62 |
+
padding:5px 8px 5px 8px;
|
63 |
+
text-decoration:none;
|
64 |
+
width:auto;
|
65 |
+
display:block;
|
66 |
+
color:#FFFFFF;
|
67 |
+
font-size:12px;
|
68 |
+
font-weight:bold;
|
69 |
+
text-shadow: 0px 1px 1px #666666;
|
70 |
+
background-color:#333333;
|
71 |
+
background: -webkit-gradient(linear, 0 top, 0 bottom, from(#666666), to(#000000));
|
72 |
+
background: -moz-linear-gradient(#555555, #000000);
|
73 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#666666', endColorstr='#000000',GradientType=0 );
|
74 |
+
background-image: -ms-linear-gradient(top, #666666 0%, #000000 100%);
|
75 |
+
background-image: -o-linear-gradient(top, #666666 0%, #000000 100%);
|
76 |
+
background-repeat:no-repeat !important;
|
77 |
+
background-position:center !important;
|
78 |
+
-moz-border-radius:2px;
|
79 |
+
-webkit-border-radius:2px;
|
80 |
+
border-radius:2px;
|
81 |
+
}
|
82 |
+
.advps-number li a:hover {
|
83 |
+
color:#000000;
|
84 |
+
text-shadow: 0 1px 0 #FFFFFF;
|
85 |
+
background-color:#FFFFFF;
|
86 |
+
background:-moz-linear-gradient(#FFFFFF, #E0E0E0);
|
87 |
+
background:-webkit-gradient(linear, 0 top, 0 bottom, from(#FFFFFF), to(#E0E0E0));
|
88 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#E0E0E0',GradientType=0 );
|
89 |
+
background-image: -ms-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
|
90 |
+
background-image: -o-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
|
91 |
+
}
|
92 |
+
.advps-number li.activeSlide a{
|
93 |
+
color:#000000;
|
94 |
+
text-shadow: 0 1px 0 #FFFFFF;
|
95 |
+
background-color:#FFFFFF;
|
96 |
+
background:-moz-linear-gradient(#FFFFFF, #E0E0E0);
|
97 |
+
background:-webkit-gradient(linear, 0 top, 0 bottom, from(#FFFFFF), to(#E0E0E0));
|
98 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#E0E0E0',GradientType=0 );
|
99 |
+
background-image: -ms-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
|
100 |
+
background-image: -o-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
|
101 |
+
cursor:default;
|
102 |
+
}
|
103 |
+
.advps-bullet{
|
104 |
+
width:auto;
|
105 |
+
position:absolute;
|
106 |
+
z-index:9999;
|
107 |
+
}
|
108 |
+
.advps-bullet li
|
109 |
+
{
|
110 |
+
display:inline;
|
111 |
+
list-style:none;
|
112 |
+
margin:0px !important;
|
113 |
+
}
|
114 |
+
.advps-bullet li a{
|
115 |
+
display:block;
|
116 |
+
width:18px;
|
117 |
+
height:18px;
|
118 |
+
float:left;
|
119 |
+
background:url(images/advps-bullet-two.png) no-repeat;
|
120 |
+
margin-left:2px;
|
121 |
+
}
|
122 |
+
.advps-bullet li a:hover{
|
123 |
+
background:url(images/advps-bullet-active-two.png) no-repeat;
|
124 |
+
cursor:pointer;
|
125 |
+
}
|
126 |
+
.advps-bullet li.activeSlide a{
|
127 |
+
background:url(images/advps-bullet-active-two.png) no-repeat;
|
128 |
+
}
|
129 |
+
/* ------------------- next previous ----------------------*/
|
130 |
+
.advps-left-arrow{
|
131 |
+
width:55px;
|
132 |
+
height:55px;
|
133 |
+
position:absolute;
|
134 |
+
left:0%;
|
135 |
+
top:39%;
|
136 |
+
z-index:100;
|
137 |
+
display:none;
|
138 |
+
background:url(images/advps-left-arrow.png) no-repeat;
|
139 |
+
text-indent:-9999px;
|
140 |
+
cursor:pointer;
|
141 |
+
}
|
142 |
+
.advps-right-arrow{
|
143 |
+
width:55px;
|
144 |
+
height:55px;
|
145 |
+
position:absolute;
|
146 |
+
right:0%;
|
147 |
+
top:39%;
|
148 |
+
z-index:100;
|
149 |
+
display:none;
|
150 |
+
background:url(images/advps-right-arrow.png) no-repeat;
|
151 |
+
text-indent:-9999px;
|
152 |
+
cursor:pointer;
|
153 |
+
}
|
154 |
+
.advps-play-pause
|
155 |
+
{
|
156 |
+
width:50px;
|
157 |
+
position:absolute;
|
158 |
+
right:46%;
|
159 |
+
top:39%;
|
160 |
+
z-index:100;
|
161 |
+
display:none;
|
162 |
+
}
|
163 |
+
.advps-left-arrow-two{
|
164 |
+
width:20px;
|
165 |
+
height:29px;
|
166 |
+
position:absolute;
|
167 |
+
left:1%;
|
168 |
+
top:39%;
|
169 |
+
z-index:100;
|
170 |
+
display:none;
|
171 |
+
background:url(images/l1.png) no-repeat;
|
172 |
+
text-indent:-9999px;
|
173 |
+
cursor:pointer;
|
174 |
+
}
|
175 |
+
.advps-right-arrow-two{
|
176 |
+
width:20px;
|
177 |
+
height:29px;
|
178 |
+
position:absolute;
|
179 |
+
right:1%;
|
180 |
+
top:39%;
|
181 |
+
background:url(images/r1.png) no-repeat;
|
182 |
+
z-index:100;
|
183 |
+
text-indent:-9999px;
|
184 |
+
cursor:pointer;
|
185 |
+
display:none;
|
186 |
+
}
|
187 |
+
.advps-play-pause-two
|
188 |
+
{
|
189 |
+
width:25px;
|
190 |
+
position:absolute;
|
191 |
+
right:48%;
|
192 |
+
top:39%;
|
193 |
+
z-index:100;
|
194 |
+
display:none;
|
195 |
+
}
|
196 |
+
.advps-down-arrow{
|
197 |
+
width:55px;
|
198 |
+
height:21px;
|
199 |
+
position:absolute;
|
200 |
+
left:36%;
|
201 |
+
bottom:0;
|
202 |
+
z-index:100;
|
203 |
+
background:url(images/advps-down-arrow.png) no-repeat;
|
204 |
+
text-indent:-9999px;
|
205 |
+
cursor:pointer;
|
206 |
+
|
207 |
+
}
|
208 |
+
.advps-up-arrow{
|
209 |
+
width:55px;
|
210 |
+
height:21px;
|
211 |
+
position:absolute;
|
212 |
+
left:36%;
|
213 |
+
top:0;
|
214 |
+
z-index:100;
|
215 |
+
background:url(images/advps-up-arrow.png) no-repeat;
|
216 |
+
text-indent:-9999px;
|
217 |
+
cursor:pointer;
|
218 |
+
}
|
219 |
+
|
220 |
+
.advps-slide-container h1
|
221 |
+
{
|
222 |
+
line-height:30px;
|
223 |
+
}
|
images/advps-bullet-active-two.png
ADDED
Binary file
|
images/advps-bullet-two.png
ADDED
Binary file
|
images/advps-down-arrow.png
ADDED
Binary file
|
images/advps-left-arrow.png
ADDED
Binary file
|
images/advps-right-arrow-two.png
ADDED
Binary file
|
images/advps-right-arrow.png
ADDED
Binary file
|
images/advps-up-arrow.png
ADDED
Binary file
|
images/l1.png
ADDED
Binary file
|
images/pause-two.png
ADDED
Binary file
|
images/pause.png
ADDED
Binary file
|
images/play-two.png
ADDED
Binary file
|
images/play.png
ADDED
Binary file
|
images/r1.png
ADDED
Binary file
|
images/right-arrow.png
ADDED
Binary file
|
js/advps.frnt.script.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
$(".advps-flip").click(function(){
|
3 |
+
var $selector = $(this).attr('sel');
|
4 |
+
var $status = $(this).attr('sts');
|
5 |
+
var $pl_uri = $(this).attr('iuri');
|
6 |
+
var $template = $(this).attr('temp');
|
7 |
+
//alert($selector)
|
8 |
+
|
9 |
+
if($status == 'played'){
|
10 |
+
$('#'+$selector).cycle('pause');
|
11 |
+
if($template == 'two'){
|
12 |
+
$(this).find('img').attr('src',$pl_uri+'images/play-two.png');
|
13 |
+
}
|
14 |
+
else{
|
15 |
+
$(this).find('img').attr('src',$pl_uri+'images/play.png');
|
16 |
+
}
|
17 |
+
$(this).attr('sts','stop');
|
18 |
+
$(this).find('img').attr('alt','play');
|
19 |
+
}
|
20 |
+
else
|
21 |
+
{
|
22 |
+
$('#'+$selector).cycle('resume');
|
23 |
+
if($template == 'two'){
|
24 |
+
$(this).find('img').attr('src',$pl_uri+'images/pause-two.png');
|
25 |
+
}
|
26 |
+
else
|
27 |
+
{
|
28 |
+
$(this).find('img').attr('src',$pl_uri+'images/pause.png');
|
29 |
+
}
|
30 |
+
$(this).attr('sts','played');
|
31 |
+
$(this).find('img').attr('alt','pause');
|
32 |
+
}
|
33 |
+
});
|
34 |
+
});
|
js/advps.script.js
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var wpversion;
|
2 |
+
jQuery(document).ready(function($) {
|
3 |
+
//alert('got');
|
4 |
+
var wpversion = $('meta[name=wpversion]').attr("content");
|
5 |
+
//alert($('meta[name=wpversion]').attr("content"));
|
6 |
+
$(".postbox h3.advps-expand").click(function(){
|
7 |
+
//alert($(this).parent().attr('class'));
|
8 |
+
if($(this).parent().hasClass('closed')){
|
9 |
+
$(this).parent().removeClass('closed')
|
10 |
+
}
|
11 |
+
else
|
12 |
+
{
|
13 |
+
$(this).parent().addClass('closed')
|
14 |
+
}
|
15 |
+
});
|
16 |
+
|
17 |
+
if(wpversion >= '3.5'){
|
18 |
+
$(".advps-color-picker").wpColorPicker();
|
19 |
+
}
|
20 |
+
else{
|
21 |
+
jQuery('.advpsfarb').hide();
|
22 |
+
$('.advpsfarb').each(function() {
|
23 |
+
//alert();
|
24 |
+
var sell = $(this).parent().find('.advps-color-picker').attr('id');
|
25 |
+
//alert(sell);
|
26 |
+
jQuery(this).farbtastic("#"+sell);
|
27 |
+
});
|
28 |
+
|
29 |
+
$('.advps-color-picker').click(function() {
|
30 |
+
$(this).parent().find('.advpsfarb').fadeIn();
|
31 |
+
});
|
32 |
+
|
33 |
+
$(document).mousedown(function() {
|
34 |
+
$('.advpsfarb').each(function() {
|
35 |
+
var display = $(this).css('display');
|
36 |
+
if ( display == 'block' )
|
37 |
+
$(this).fadeOut();
|
38 |
+
});
|
39 |
+
});
|
40 |
+
}//
|
41 |
+
});
|
42 |
+
|
43 |
+
/*function checkPager(){
|
44 |
+
var pagerVal = jQuery("#ex_pager").val();
|
45 |
+
//alert(pagerVal);
|
46 |
+
if(pagerVal == 'yes'){
|
47 |
+
jQuery(".pagerfld").fadeOut(500,'linear',function(){});
|
48 |
+
}
|
49 |
+
else
|
50 |
+
{
|
51 |
+
jQuery(".pagerfld").fadeIn(500,'linear',function(){});
|
52 |
+
}
|
53 |
+
}
|
54 |
+
function checkNextPrev(){
|
55 |
+
var nxtprvVal = jQuery("#ex_nxtprv").val();
|
56 |
+
//alert(pagerVal);
|
57 |
+
if(nxtprvVal == 'yes'){
|
58 |
+
jQuery(".nxtprvfld").fadeOut(500,'linear',function(){});
|
59 |
+
}
|
60 |
+
else
|
61 |
+
{
|
62 |
+
jQuery(".nxtprvfld").fadeIn(500,'linear',function(){});
|
63 |
+
}
|
64 |
+
}*/
|
65 |
+
function onlyNum(evt)
|
66 |
+
{
|
67 |
+
var e = window.event || evt;
|
68 |
+
var charCode = e.which || e.keyCode;
|
69 |
+
|
70 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
71 |
+
return false;
|
72 |
+
|
73 |
+
return true;
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
/*function advpsUpdateOpt(a,f){
|
78 |
+
//alert(n);
|
79 |
+
if(a==2){
|
80 |
+
var chkConf = confirm("Do you realy want to dele this option set ?");
|
81 |
+
if(chkConf){
|
82 |
+
jQuery("#advps_ack"+f).val('delete');
|
83 |
+
jQuery("#updateOptFrm"+f).submit();
|
84 |
+
}
|
85 |
+
}
|
86 |
+
else{
|
87 |
+
jQuery("#advps_ack").val('update');
|
88 |
+
jQuery("#updateOptFrm").submit();
|
89 |
+
}
|
90 |
+
}*/
|
91 |
+
function advpsCheckCat(p,n){
|
92 |
+
//alert(jQuery('#advps-cat-field').html());
|
93 |
+
//alert(p);
|
94 |
+
//return;
|
95 |
+
var fldSel = 'advps-cat-field'+n;
|
96 |
+
if(p != "page"){
|
97 |
+
jQuery.ajax({
|
98 |
+
type : "post",
|
99 |
+
context: this,
|
100 |
+
dataType : "html",
|
101 |
+
url : advpsajx.ajaxurl,
|
102 |
+
data : {action: "chkCaetegory",post_type:p,checkReq:advpsajx.advpsAjaxReqChck},
|
103 |
+
success: function(response) {
|
104 |
+
//alert(response);return;
|
105 |
+
jQuery('#'+fldSel).html(response);
|
106 |
+
},
|
107 |
+
complete : function(){
|
108 |
+
|
109 |
+
}
|
110 |
+
});///
|
111 |
+
}
|
112 |
+
else
|
113 |
+
{
|
114 |
+
jQuery('#'+fldSel).html('');
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
js/jquery.cycle.all.js
ADDED
@@ -0,0 +1,1540 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Cycle Plugin (with Transition Definitions)
|
3 |
+
* Examples and documentation at: http://jquery.malsup.com/cycle/
|
4 |
+
* Copyright (c) 2007-2013 M. Alsup
|
5 |
+
* Version: 3.0.2 (19-APR-2013)
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* http://jquery.malsup.com/license.html
|
8 |
+
* Requires: jQuery v1.7.1 or later
|
9 |
+
*/
|
10 |
+
;(function($, undefined) {
|
11 |
+
"use strict";
|
12 |
+
|
13 |
+
var ver = '3.0.2';
|
14 |
+
|
15 |
+
function debug(s) {
|
16 |
+
if ($.fn.cycle.debug)
|
17 |
+
log(s);
|
18 |
+
}
|
19 |
+
function log() {
|
20 |
+
if (window.console && console.log)
|
21 |
+
console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
|
22 |
+
}
|
23 |
+
$.expr[':'].paused = function(el) {
|
24 |
+
return el.cyclePause;
|
25 |
+
};
|
26 |
+
|
27 |
+
|
28 |
+
// the options arg can be...
|
29 |
+
// a number - indicates an immediate transition should occur to the given slide index
|
30 |
+
// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
|
31 |
+
// an object - properties to control the slideshow
|
32 |
+
//
|
33 |
+
// the arg2 arg can be...
|
34 |
+
// the name of an fx (only used in conjunction with a numeric value for 'options')
|
35 |
+
// the value true (only used in first arg == 'resume') and indicates
|
36 |
+
// that the resume should occur immediately (not wait for next timeout)
|
37 |
+
|
38 |
+
$.fn.cycle = function(options, arg2) {
|
39 |
+
var o = { s: this.selector, c: this.context };
|
40 |
+
|
41 |
+
// in 1.3+ we can fix mistakes with the ready state
|
42 |
+
if (this.length === 0 && options != 'stop') {
|
43 |
+
if (!$.isReady && o.s) {
|
44 |
+
log('DOM not ready, queuing slideshow');
|
45 |
+
$(function() {
|
46 |
+
$(o.s,o.c).cycle(options,arg2);
|
47 |
+
});
|
48 |
+
return this;
|
49 |
+
}
|
50 |
+
// is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
|
51 |
+
log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
|
52 |
+
return this;
|
53 |
+
}
|
54 |
+
|
55 |
+
// iterate the matched nodeset
|
56 |
+
return this.each(function() {
|
57 |
+
var opts = handleArguments(this, options, arg2);
|
58 |
+
if (opts === false)
|
59 |
+
return;
|
60 |
+
|
61 |
+
opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
|
62 |
+
|
63 |
+
// stop existing slideshow for this container (if there is one)
|
64 |
+
if (this.cycleTimeout)
|
65 |
+
clearTimeout(this.cycleTimeout);
|
66 |
+
this.cycleTimeout = this.cyclePause = 0;
|
67 |
+
this.cycleStop = 0; // issue #108
|
68 |
+
|
69 |
+
var $cont = $(this);
|
70 |
+
var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
|
71 |
+
var els = $slides.get();
|
72 |
+
|
73 |
+
if (els.length < 2) {
|
74 |
+
log('terminating; too few slides: ' + els.length);
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
|
78 |
+
var opts2 = buildOptions($cont, $slides, els, opts, o);
|
79 |
+
if (opts2 === false)
|
80 |
+
return;
|
81 |
+
|
82 |
+
var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
|
83 |
+
|
84 |
+
// if it's an auto slideshow, kick it off
|
85 |
+
if (startTime) {
|
86 |
+
startTime += (opts2.delay || 0);
|
87 |
+
if (startTime < 10)
|
88 |
+
startTime = 10;
|
89 |
+
debug('first timeout: ' + startTime);
|
90 |
+
this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
|
91 |
+
}
|
92 |
+
});
|
93 |
+
};
|
94 |
+
|
95 |
+
function triggerPause(cont, byHover, onPager) {
|
96 |
+
var opts = $(cont).data('cycle.opts');
|
97 |
+
if (!opts)
|
98 |
+
return;
|
99 |
+
var paused = !!cont.cyclePause;
|
100 |
+
if (paused && opts.paused)
|
101 |
+
opts.paused(cont, opts, byHover, onPager);
|
102 |
+
else if (!paused && opts.resumed)
|
103 |
+
opts.resumed(cont, opts, byHover, onPager);
|
104 |
+
}
|
105 |
+
|
106 |
+
// process the args that were passed to the plugin fn
|
107 |
+
function handleArguments(cont, options, arg2) {
|
108 |
+
if (cont.cycleStop === undefined)
|
109 |
+
cont.cycleStop = 0;
|
110 |
+
if (options === undefined || options === null)
|
111 |
+
options = {};
|
112 |
+
if (options.constructor == String) {
|
113 |
+
switch(options) {
|
114 |
+
case 'destroy':
|
115 |
+
case 'stop':
|
116 |
+
var opts = $(cont).data('cycle.opts');
|
117 |
+
if (!opts)
|
118 |
+
return false;
|
119 |
+
cont.cycleStop++; // callbacks look for change
|
120 |
+
if (cont.cycleTimeout)
|
121 |
+
clearTimeout(cont.cycleTimeout);
|
122 |
+
cont.cycleTimeout = 0;
|
123 |
+
if (opts.elements)
|
124 |
+
$(opts.elements).stop();
|
125 |
+
$(cont).removeData('cycle.opts');
|
126 |
+
if (options == 'destroy')
|
127 |
+
destroy(cont, opts);
|
128 |
+
return false;
|
129 |
+
case 'toggle':
|
130 |
+
cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
|
131 |
+
checkInstantResume(cont.cyclePause, arg2, cont);
|
132 |
+
triggerPause(cont);
|
133 |
+
return false;
|
134 |
+
case 'pause':
|
135 |
+
cont.cyclePause = 1;
|
136 |
+
triggerPause(cont);
|
137 |
+
return false;
|
138 |
+
case 'resume':
|
139 |
+
cont.cyclePause = 0;
|
140 |
+
checkInstantResume(false, arg2, cont);
|
141 |
+
triggerPause(cont);
|
142 |
+
return false;
|
143 |
+
case 'prev':
|
144 |
+
case 'next':
|
145 |
+
opts = $(cont).data('cycle.opts');
|
146 |
+
if (!opts) {
|
147 |
+
log('options not found, "prev/next" ignored');
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
if (typeof arg2 == 'string')
|
151 |
+
opts.oneTimeFx = arg2;
|
152 |
+
$.fn.cycle[options](opts);
|
153 |
+
return false;
|
154 |
+
default:
|
155 |
+
options = { fx: options };
|
156 |
+
}
|
157 |
+
return options;
|
158 |
+
}
|
159 |
+
else if (options.constructor == Number) {
|
160 |
+
// go to the requested slide
|
161 |
+
var num = options;
|
162 |
+
options = $(cont).data('cycle.opts');
|
163 |
+
if (!options) {
|
164 |
+
log('options not found, can not advance slide');
|
165 |
+
return false;
|
166 |
+
}
|
167 |
+
if (num < 0 || num >= options.elements.length) {
|
168 |
+
log('invalid slide index: ' + num);
|
169 |
+
return false;
|
170 |
+
}
|
171 |
+
options.nextSlide = num;
|
172 |
+
if (cont.cycleTimeout) {
|
173 |
+
clearTimeout(cont.cycleTimeout);
|
174 |
+
cont.cycleTimeout = 0;
|
175 |
+
}
|
176 |
+
if (typeof arg2 == 'string')
|
177 |
+
options.oneTimeFx = arg2;
|
178 |
+
go(options.elements, options, 1, num >= options.currSlide);
|
179 |
+
return false;
|
180 |
+
}
|
181 |
+
return options;
|
182 |
+
|
183 |
+
function checkInstantResume(isPaused, arg2, cont) {
|
184 |
+
if (!isPaused && arg2 === true) { // resume now!
|
185 |
+
var options = $(cont).data('cycle.opts');
|
186 |
+
if (!options) {
|
187 |
+
log('options not found, can not resume');
|
188 |
+
return false;
|
189 |
+
}
|
190 |
+
if (cont.cycleTimeout) {
|
191 |
+
clearTimeout(cont.cycleTimeout);
|
192 |
+
cont.cycleTimeout = 0;
|
193 |
+
}
|
194 |
+
go(options.elements, options, 1, !options.backwards);
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
function removeFilter(el, opts) {
|
200 |
+
if (!$.support.opacity && opts.cleartype && el.style.filter) {
|
201 |
+
try { el.style.removeAttribute('filter'); }
|
202 |
+
catch(smother) {} // handle old opera versions
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
// unbind event handlers
|
207 |
+
function destroy(cont, opts) {
|
208 |
+
if (opts.next)
|
209 |
+
$(opts.next).unbind(opts.prevNextEvent);
|
210 |
+
if (opts.prev)
|
211 |
+
$(opts.prev).unbind(opts.prevNextEvent);
|
212 |
+
|
213 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
214 |
+
$.each(opts.pagerAnchors || [], function() {
|
215 |
+
this.unbind().remove();
|
216 |
+
});
|
217 |
+
opts.pagerAnchors = null;
|
218 |
+
$(cont).unbind('mouseenter.cycle mouseleave.cycle');
|
219 |
+
if (opts.destroy) // callback
|
220 |
+
opts.destroy(opts);
|
221 |
+
}
|
222 |
+
|
223 |
+
// one-time initialization
|
224 |
+
function buildOptions($cont, $slides, els, options, o) {
|
225 |
+
var startingSlideSpecified;
|
226 |
+
// support metadata plugin (v1.0 and v2.0)
|
227 |
+
var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
|
228 |
+
var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
|
229 |
+
if (meta)
|
230 |
+
opts = $.extend(opts, meta);
|
231 |
+
if (opts.autostop)
|
232 |
+
opts.countdown = opts.autostopCount || els.length;
|
233 |
+
|
234 |
+
var cont = $cont[0];
|
235 |
+
$cont.data('cycle.opts', opts);
|
236 |
+
opts.$cont = $cont;
|
237 |
+
opts.stopCount = cont.cycleStop;
|
238 |
+
opts.elements = els;
|
239 |
+
opts.before = opts.before ? [opts.before] : [];
|
240 |
+
opts.after = opts.after ? [opts.after] : [];
|
241 |
+
|
242 |
+
// push some after callbacks
|
243 |
+
if (!$.support.opacity && opts.cleartype)
|
244 |
+
opts.after.push(function() { removeFilter(this, opts); });
|
245 |
+
if (opts.continuous)
|
246 |
+
opts.after.push(function() { go(els,opts,0,!opts.backwards); });
|
247 |
+
|
248 |
+
saveOriginalOpts(opts);
|
249 |
+
|
250 |
+
// clearType corrections
|
251 |
+
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
252 |
+
clearTypeFix($slides);
|
253 |
+
|
254 |
+
// container requires non-static position so that slides can be position within
|
255 |
+
if ($cont.css('position') == 'static')
|
256 |
+
$cont.css('position', 'relative');
|
257 |
+
if (opts.width)
|
258 |
+
$cont.width(opts.width);
|
259 |
+
if (opts.height && opts.height != 'auto')
|
260 |
+
$cont.height(opts.height);
|
261 |
+
|
262 |
+
if (opts.startingSlide !== undefined) {
|
263 |
+
opts.startingSlide = parseInt(opts.startingSlide,10);
|
264 |
+
if (opts.startingSlide >= els.length || opts.startSlide < 0)
|
265 |
+
opts.startingSlide = 0; // catch bogus input
|
266 |
+
else
|
267 |
+
startingSlideSpecified = true;
|
268 |
+
}
|
269 |
+
else if (opts.backwards)
|
270 |
+
opts.startingSlide = els.length - 1;
|
271 |
+
else
|
272 |
+
opts.startingSlide = 0;
|
273 |
+
|
274 |
+
// if random, mix up the slide array
|
275 |
+
if (opts.random) {
|
276 |
+
opts.randomMap = [];
|
277 |
+
for (var i = 0; i < els.length; i++)
|
278 |
+
opts.randomMap.push(i);
|
279 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
280 |
+
if (startingSlideSpecified) {
|
281 |
+
// try to find the specified starting slide and if found set start slide index in the map accordingly
|
282 |
+
for ( var cnt = 0; cnt < els.length; cnt++ ) {
|
283 |
+
if ( opts.startingSlide == opts.randomMap[cnt] ) {
|
284 |
+
opts.randomIndex = cnt;
|
285 |
+
}
|
286 |
+
}
|
287 |
+
}
|
288 |
+
else {
|
289 |
+
opts.randomIndex = 1;
|
290 |
+
opts.startingSlide = opts.randomMap[1];
|
291 |
+
}
|
292 |
+
}
|
293 |
+
else if (opts.startingSlide >= els.length)
|
294 |
+
opts.startingSlide = 0; // catch bogus input
|
295 |
+
opts.currSlide = opts.startingSlide || 0;
|
296 |
+
var first = opts.startingSlide;
|
297 |
+
|
298 |
+
// set position and zIndex on all the slides
|
299 |
+
$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
|
300 |
+
var z;
|
301 |
+
if (opts.backwards)
|
302 |
+
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
|
303 |
+
else
|
304 |
+
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
|
305 |
+
$(this).css('z-index', z);
|
306 |
+
});
|
307 |
+
|
308 |
+
// make sure first slide is visible
|
309 |
+
$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
|
310 |
+
removeFilter(els[first], opts);
|
311 |
+
|
312 |
+
// stretch slides
|
313 |
+
if (opts.fit) {
|
314 |
+
if (!opts.aspect) {
|
315 |
+
if (opts.width)
|
316 |
+
$slides.width(opts.width);
|
317 |
+
if (opts.height && opts.height != 'auto')
|
318 |
+
$slides.height(opts.height);
|
319 |
+
} else {
|
320 |
+
$slides.each(function(){
|
321 |
+
var $slide = $(this);
|
322 |
+
var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
|
323 |
+
if( opts.width && $slide.width() != opts.width ) {
|
324 |
+
$slide.width( opts.width );
|
325 |
+
$slide.height( opts.width / ratio );
|
326 |
+
}
|
327 |
+
|
328 |
+
if( opts.height && $slide.height() < opts.height ) {
|
329 |
+
$slide.height( opts.height );
|
330 |
+
$slide.width( opts.height * ratio );
|
331 |
+
}
|
332 |
+
});
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
if (opts.center && ((!opts.fit) || opts.aspect)) {
|
337 |
+
$slides.each(function(){
|
338 |
+
var $slide = $(this);
|
339 |
+
$slide.css({
|
340 |
+
"margin-left": opts.width ?
|
341 |
+
((opts.width - $slide.width()) / 2) + "px" :
|
342 |
+
0,
|
343 |
+
"margin-top": opts.height ?
|
344 |
+
((opts.height - $slide.height()) / 2) + "px" :
|
345 |
+
0
|
346 |
+
});
|
347 |
+
});
|
348 |
+
}
|
349 |
+
|
350 |
+
if (opts.center && !opts.fit && !opts.slideResize) {
|
351 |
+
$slides.each(function(){
|
352 |
+
var $slide = $(this);
|
353 |
+
$slide.css({
|
354 |
+
"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
|
355 |
+
"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
|
356 |
+
});
|
357 |
+
});
|
358 |
+
}
|
359 |
+
|
360 |
+
// stretch container
|
361 |
+
var reshape = (opts.containerResize || opts.containerResizeHeight) && $cont.innerHeight() < 1;
|
362 |
+
if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
|
363 |
+
var maxw = 0, maxh = 0;
|
364 |
+
for(var j=0; j < els.length; j++) {
|
365 |
+
var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
|
366 |
+
if (!w) w = e.offsetWidth || e.width || $e.attr('width');
|
367 |
+
if (!h) h = e.offsetHeight || e.height || $e.attr('height');
|
368 |
+
maxw = w > maxw ? w : maxw;
|
369 |
+
maxh = h > maxh ? h : maxh;
|
370 |
+
}
|
371 |
+
if (opts.containerResize && maxw > 0 && maxh > 0)
|
372 |
+
$cont.css({width:maxw+'px',height:maxh+'px'});
|
373 |
+
if (opts.containerResizeHeight && maxh > 0)
|
374 |
+
$cont.css({height:maxh+'px'});
|
375 |
+
}
|
376 |
+
|
377 |
+
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
378 |
+
if (opts.pause)
|
379 |
+
$cont.bind('mouseenter.cycle', function(){
|
380 |
+
pauseFlag = true;
|
381 |
+
this.cyclePause++;
|
382 |
+
triggerPause(cont, true);
|
383 |
+
}).bind('mouseleave.cycle', function(){
|
384 |
+
if (pauseFlag)
|
385 |
+
this.cyclePause--;
|
386 |
+
triggerPause(cont, true);
|
387 |
+
});
|
388 |
+
|
389 |
+
if (supportMultiTransitions(opts) === false)
|
390 |
+
return false;
|
391 |
+
|
392 |
+
// apparently a lot of people use image slideshows without height/width attributes on the images.
|
393 |
+
// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
|
394 |
+
var requeue = false;
|
395 |
+
options.requeueAttempts = options.requeueAttempts || 0;
|
396 |
+
$slides.each(function() {
|
397 |
+
// try to get height/width of each slide
|
398 |
+
var $el = $(this);
|
399 |
+
this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
|
400 |
+
this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
|
401 |
+
|
402 |
+
if ( $el.is('img') ) {
|
403 |
+
var loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
|
404 |
+
// don't requeue for images that are still loading but have a valid size
|
405 |
+
if (loading) {
|
406 |
+
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
|
407 |
+
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
|
408 |
+
setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
|
409 |
+
requeue = true;
|
410 |
+
return false; // break each loop
|
411 |
+
}
|
412 |
+
else {
|
413 |
+
log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
|
414 |
+
}
|
415 |
+
}
|
416 |
+
}
|
417 |
+
return true;
|
418 |
+
});
|
419 |
+
|
420 |
+
if (requeue)
|
421 |
+
return false;
|
422 |
+
|
423 |
+
opts.cssBefore = opts.cssBefore || {};
|
424 |
+
opts.cssAfter = opts.cssAfter || {};
|
425 |
+
opts.cssFirst = opts.cssFirst || {};
|
426 |
+
opts.animIn = opts.animIn || {};
|
427 |
+
opts.animOut = opts.animOut || {};
|
428 |
+
|
429 |
+
$slides.not(':eq('+first+')').css(opts.cssBefore);
|
430 |
+
$($slides[first]).css(opts.cssFirst);
|
431 |
+
|
432 |
+
if (opts.timeout) {
|
433 |
+
opts.timeout = parseInt(opts.timeout,10);
|
434 |
+
// ensure that timeout and speed settings are sane
|
435 |
+
if (opts.speed.constructor == String)
|
436 |
+
opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
|
437 |
+
if (!opts.sync)
|
438 |
+
opts.speed = opts.speed / 2;
|
439 |
+
|
440 |
+
var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
|
441 |
+
while((opts.timeout - opts.speed) < buffer) // sanitize timeout
|
442 |
+
opts.timeout += opts.speed;
|
443 |
+
}
|
444 |
+
if (opts.easing)
|
445 |
+
opts.easeIn = opts.easeOut = opts.easing;
|
446 |
+
if (!opts.speedIn)
|
447 |
+
opts.speedIn = opts.speed;
|
448 |
+
if (!opts.speedOut)
|
449 |
+
opts.speedOut = opts.speed;
|
450 |
+
|
451 |
+
opts.slideCount = els.length;
|
452 |
+
opts.currSlide = opts.lastSlide = first;
|
453 |
+
if (opts.random) {
|
454 |
+
if (++opts.randomIndex == els.length)
|
455 |
+
opts.randomIndex = 0;
|
456 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
457 |
+
}
|
458 |
+
else if (opts.backwards)
|
459 |
+
opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
|
460 |
+
else
|
461 |
+
opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
|
462 |
+
|
463 |
+
// run transition init fn
|
464 |
+
if (!opts.multiFx) {
|
465 |
+
var init = $.fn.cycle.transitions[opts.fx];
|
466 |
+
if ($.isFunction(init))
|
467 |
+
init($cont, $slides, opts);
|
468 |
+
else if (opts.fx != 'custom' && !opts.multiFx) {
|
469 |
+
log('unknown transition: ' + opts.fx,'; slideshow terminating');
|
470 |
+
return false;
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
// fire artificial events
|
475 |
+
var e0 = $slides[first];
|
476 |
+
if (!opts.skipInitializationCallbacks) {
|
477 |
+
if (opts.before.length)
|
478 |
+
opts.before[0].apply(e0, [e0, e0, opts, true]);
|
479 |
+
if (opts.after.length)
|
480 |
+
opts.after[0].apply(e0, [e0, e0, opts, true]);
|
481 |
+
}
|
482 |
+
if (opts.next)
|
483 |
+
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
|
484 |
+
if (opts.prev)
|
485 |
+
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
|
486 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
487 |
+
buildPager(els,opts);
|
488 |
+
|
489 |
+
exposeAddSlide(opts, els);
|
490 |
+
|
491 |
+
return opts;
|
492 |
+
}
|
493 |
+
|
494 |
+
// save off original opts so we can restore after clearing state
|
495 |
+
function saveOriginalOpts(opts) {
|
496 |
+
opts.original = { before: [], after: [] };
|
497 |
+
opts.original.cssBefore = $.extend({}, opts.cssBefore);
|
498 |
+
opts.original.cssAfter = $.extend({}, opts.cssAfter);
|
499 |
+
opts.original.animIn = $.extend({}, opts.animIn);
|
500 |
+
opts.original.animOut = $.extend({}, opts.animOut);
|
501 |
+
$.each(opts.before, function() { opts.original.before.push(this); });
|
502 |
+
$.each(opts.after, function() { opts.original.after.push(this); });
|
503 |
+
}
|
504 |
+
|
505 |
+
function supportMultiTransitions(opts) {
|
506 |
+
var i, tx, txs = $.fn.cycle.transitions;
|
507 |
+
// look for multiple effects
|
508 |
+
if (opts.fx.indexOf(',') > 0) {
|
509 |
+
opts.multiFx = true;
|
510 |
+
opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
|
511 |
+
// discard any bogus effect names
|
512 |
+
for (i=0; i < opts.fxs.length; i++) {
|
513 |
+
var fx = opts.fxs[i];
|
514 |
+
tx = txs[fx];
|
515 |
+
if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
|
516 |
+
log('discarding unknown transition: ',fx);
|
517 |
+
opts.fxs.splice(i,1);
|
518 |
+
i--;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
// if we have an empty list then we threw everything away!
|
522 |
+
if (!opts.fxs.length) {
|
523 |
+
log('No valid transitions named; slideshow terminating.');
|
524 |
+
return false;
|
525 |
+
}
|
526 |
+
}
|
527 |
+
else if (opts.fx == 'all') { // auto-gen the list of transitions
|
528 |
+
opts.multiFx = true;
|
529 |
+
opts.fxs = [];
|
530 |
+
for (var p in txs) {
|
531 |
+
if (txs.hasOwnProperty(p)) {
|
532 |
+
tx = txs[p];
|
533 |
+
if (txs.hasOwnProperty(p) && $.isFunction(tx))
|
534 |
+
opts.fxs.push(p);
|
535 |
+
}
|
536 |
+
}
|
537 |
+
}
|
538 |
+
if (opts.multiFx && opts.randomizeEffects) {
|
539 |
+
// munge the fxs array to make effect selection random
|
540 |
+
var r1 = Math.floor(Math.random() * 20) + 30;
|
541 |
+
for (i = 0; i < r1; i++) {
|
542 |
+
var r2 = Math.floor(Math.random() * opts.fxs.length);
|
543 |
+
opts.fxs.push(opts.fxs.splice(r2,1)[0]);
|
544 |
+
}
|
545 |
+
debug('randomized fx sequence: ',opts.fxs);
|
546 |
+
}
|
547 |
+
return true;
|
548 |
+
}
|
549 |
+
|
550 |
+
// provide a mechanism for adding slides after the slideshow has started
|
551 |
+
function exposeAddSlide(opts, els) {
|
552 |
+
opts.addSlide = function(newSlide, prepend) {
|
553 |
+
var $s = $(newSlide), s = $s[0];
|
554 |
+
if (!opts.autostopCount)
|
555 |
+
opts.countdown++;
|
556 |
+
els[prepend?'unshift':'push'](s);
|
557 |
+
if (opts.els)
|
558 |
+
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
|
559 |
+
opts.slideCount = els.length;
|
560 |
+
|
561 |
+
// add the slide to the random map and resort
|
562 |
+
if (opts.random) {
|
563 |
+
opts.randomMap.push(opts.slideCount-1);
|
564 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
565 |
+
}
|
566 |
+
|
567 |
+
$s.css('position','absolute');
|
568 |
+
$s[prepend?'prependTo':'appendTo'](opts.$cont);
|
569 |
+
|
570 |
+
if (prepend) {
|
571 |
+
opts.currSlide++;
|
572 |
+
opts.nextSlide++;
|
573 |
+
}
|
574 |
+
|
575 |
+
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
576 |
+
clearTypeFix($s);
|
577 |
+
|
578 |
+
if (opts.fit && opts.width)
|
579 |
+
$s.width(opts.width);
|
580 |
+
if (opts.fit && opts.height && opts.height != 'auto')
|
581 |
+
$s.height(opts.height);
|
582 |
+
s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
|
583 |
+
s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
|
584 |
+
|
585 |
+
$s.css(opts.cssBefore);
|
586 |
+
|
587 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
588 |
+
$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
|
589 |
+
|
590 |
+
if ($.isFunction(opts.onAddSlide))
|
591 |
+
opts.onAddSlide($s);
|
592 |
+
else
|
593 |
+
$s.hide(); // default behavior
|
594 |
+
};
|
595 |
+
}
|
596 |
+
|
597 |
+
// reset internal state; we do this on every pass in order to support multiple effects
|
598 |
+
$.fn.cycle.resetState = function(opts, fx) {
|
599 |
+
fx = fx || opts.fx;
|
600 |
+
opts.before = []; opts.after = [];
|
601 |
+
opts.cssBefore = $.extend({}, opts.original.cssBefore);
|
602 |
+
opts.cssAfter = $.extend({}, opts.original.cssAfter);
|
603 |
+
opts.animIn = $.extend({}, opts.original.animIn);
|
604 |
+
opts.animOut = $.extend({}, opts.original.animOut);
|
605 |
+
opts.fxFn = null;
|
606 |
+
$.each(opts.original.before, function() { opts.before.push(this); });
|
607 |
+
$.each(opts.original.after, function() { opts.after.push(this); });
|
608 |
+
|
609 |
+
// re-init
|
610 |
+
var init = $.fn.cycle.transitions[fx];
|
611 |
+
if ($.isFunction(init))
|
612 |
+
init(opts.$cont, $(opts.elements), opts);
|
613 |
+
};
|
614 |
+
|
615 |
+
// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
|
616 |
+
function go(els, opts, manual, fwd) {
|
617 |
+
var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
|
618 |
+
|
619 |
+
// opts.busy is true if we're in the middle of an animation
|
620 |
+
if (manual && opts.busy && opts.manualTrump) {
|
621 |
+
// let manual transitions requests trump active ones
|
622 |
+
debug('manualTrump in go(), stopping active transition');
|
623 |
+
$(els).stop(true,true);
|
624 |
+
opts.busy = 0;
|
625 |
+
clearTimeout(p.cycleTimeout);
|
626 |
+
}
|
627 |
+
|
628 |
+
// don't begin another timeout-based transition if there is one active
|
629 |
+
if (opts.busy) {
|
630 |
+
debug('transition active, ignoring new tx request');
|
631 |
+
return;
|
632 |
+
}
|
633 |
+
|
634 |
+
|
635 |
+
// stop cycling if we have an outstanding stop request
|
636 |
+
if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
|
637 |
+
return;
|
638 |
+
|
639 |
+
// check to see if we should stop cycling based on autostop options
|
640 |
+
if (!manual && !p.cyclePause && !opts.bounce &&
|
641 |
+
((opts.autostop && (--opts.countdown <= 0)) ||
|
642 |
+
(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
|
643 |
+
if (opts.end)
|
644 |
+
opts.end(opts);
|
645 |
+
return;
|
646 |
+
}
|
647 |
+
|
648 |
+
// if slideshow is paused, only transition on a manual trigger
|
649 |
+
var changed = false;
|
650 |
+
if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
|
651 |
+
changed = true;
|
652 |
+
var fx = opts.fx;
|
653 |
+
// keep trying to get the slide size if we don't have it yet
|
654 |
+
curr.cycleH = curr.cycleH || $(curr).height();
|
655 |
+
curr.cycleW = curr.cycleW || $(curr).width();
|
656 |
+
next.cycleH = next.cycleH || $(next).height();
|
657 |
+
next.cycleW = next.cycleW || $(next).width();
|
658 |
+
|
659 |
+
// support multiple transition types
|
660 |
+
if (opts.multiFx) {
|
661 |
+
if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
|
662 |
+
opts.lastFx = 0;
|
663 |
+
else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
|
664 |
+
opts.lastFx = opts.fxs.length - 1;
|
665 |
+
fx = opts.fxs[opts.lastFx];
|
666 |
+
}
|
667 |
+
|
668 |
+
// one-time fx overrides apply to: $('div').cycle(3,'zoom');
|
669 |
+
if (opts.oneTimeFx) {
|
670 |
+
fx = opts.oneTimeFx;
|
671 |
+
opts.oneTimeFx = null;
|
672 |
+
}
|
673 |
+
|
674 |
+
$.fn.cycle.resetState(opts, fx);
|
675 |
+
|
676 |
+
// run the before callbacks
|
677 |
+
if (opts.before.length)
|
678 |
+
$.each(opts.before, function(i,o) {
|
679 |
+
if (p.cycleStop != opts.stopCount) return;
|
680 |
+
o.apply(next, [curr, next, opts, fwd]);
|
681 |
+
});
|
682 |
+
|
683 |
+
// stage the after callacks
|
684 |
+
var after = function() {
|
685 |
+
opts.busy = 0;
|
686 |
+
$.each(opts.after, function(i,o) {
|
687 |
+
if (p.cycleStop != opts.stopCount) return;
|
688 |
+
o.apply(next, [curr, next, opts, fwd]);
|
689 |
+
});
|
690 |
+
if (!p.cycleStop) {
|
691 |
+
// queue next transition
|
692 |
+
queueNext();
|
693 |
+
}
|
694 |
+
};
|
695 |
+
|
696 |
+
debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
|
697 |
+
|
698 |
+
// get ready to perform the transition
|
699 |
+
opts.busy = 1;
|
700 |
+
if (opts.fxFn) // fx function provided?
|
701 |
+
opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
702 |
+
else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
|
703 |
+
$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
704 |
+
else
|
705 |
+
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
706 |
+
}
|
707 |
+
else {
|
708 |
+
queueNext();
|
709 |
+
}
|
710 |
+
|
711 |
+
if (changed || opts.nextSlide == opts.currSlide) {
|
712 |
+
// calculate the next slide
|
713 |
+
var roll;
|
714 |
+
opts.lastSlide = opts.currSlide;
|
715 |
+
if (opts.random) {
|
716 |
+
opts.currSlide = opts.nextSlide;
|
717 |
+
if (++opts.randomIndex == els.length) {
|
718 |
+
opts.randomIndex = 0;
|
719 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
720 |
+
}
|
721 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
722 |
+
if (opts.nextSlide == opts.currSlide)
|
723 |
+
opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
|
724 |
+
}
|
725 |
+
else if (opts.backwards) {
|
726 |
+
roll = (opts.nextSlide - 1) < 0;
|
727 |
+
if (roll && opts.bounce) {
|
728 |
+
opts.backwards = !opts.backwards;
|
729 |
+
opts.nextSlide = 1;
|
730 |
+
opts.currSlide = 0;
|
731 |
+
}
|
732 |
+
else {
|
733 |
+
opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
|
734 |
+
opts.currSlide = roll ? 0 : opts.nextSlide+1;
|
735 |
+
}
|
736 |
+
}
|
737 |
+
else { // sequence
|
738 |
+
roll = (opts.nextSlide + 1) == els.length;
|
739 |
+
if (roll && opts.bounce) {
|
740 |
+
opts.backwards = !opts.backwards;
|
741 |
+
opts.nextSlide = els.length-2;
|
742 |
+
opts.currSlide = els.length-1;
|
743 |
+
}
|
744 |
+
else {
|
745 |
+
opts.nextSlide = roll ? 0 : opts.nextSlide+1;
|
746 |
+
opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
|
747 |
+
}
|
748 |
+
}
|
749 |
+
}
|
750 |
+
if (changed && opts.pager)
|
751 |
+
opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
|
752 |
+
|
753 |
+
function queueNext() {
|
754 |
+
// stage the next transition
|
755 |
+
var ms = 0, timeout = opts.timeout;
|
756 |
+
if (opts.timeout && !opts.continuous) {
|
757 |
+
ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
|
758 |
+
if (opts.fx == 'shuffle')
|
759 |
+
ms -= opts.speedOut;
|
760 |
+
}
|
761 |
+
else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
|
762 |
+
ms = 10;
|
763 |
+
if (ms > 0)
|
764 |
+
p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
// invoked after transition
|
769 |
+
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
|
770 |
+
$(pager).each(function() {
|
771 |
+
$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
|
772 |
+
});
|
773 |
+
};
|
774 |
+
|
775 |
+
// calculate timeout value for current transition
|
776 |
+
function getTimeout(curr, next, opts, fwd) {
|
777 |
+
if (opts.timeoutFn) {
|
778 |
+
// call user provided calc fn
|
779 |
+
var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
|
780 |
+
while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
|
781 |
+
t += opts.speed;
|
782 |
+
debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
|
783 |
+
if (t !== false)
|
784 |
+
return t;
|
785 |
+
}
|
786 |
+
return opts.timeout;
|
787 |
+
}
|
788 |
+
|
789 |
+
// expose next/prev function, caller must pass in state
|
790 |
+
$.fn.cycle.next = function(opts) { advance(opts,1); };
|
791 |
+
$.fn.cycle.prev = function(opts) { advance(opts,0);};
|
792 |
+
|
793 |
+
// advance slide forward or back
|
794 |
+
function advance(opts, moveForward) {
|
795 |
+
var val = moveForward ? 1 : -1;
|
796 |
+
var els = opts.elements;
|
797 |
+
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
798 |
+
if (timeout) {
|
799 |
+
clearTimeout(timeout);
|
800 |
+
p.cycleTimeout = 0;
|
801 |
+
}
|
802 |
+
if (opts.random && val < 0) {
|
803 |
+
// move back to the previously display slide
|
804 |
+
opts.randomIndex--;
|
805 |
+
if (--opts.randomIndex == -2)
|
806 |
+
opts.randomIndex = els.length-2;
|
807 |
+
else if (opts.randomIndex == -1)
|
808 |
+
opts.randomIndex = els.length-1;
|
809 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
810 |
+
}
|
811 |
+
else if (opts.random) {
|
812 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
813 |
+
}
|
814 |
+
else {
|
815 |
+
opts.nextSlide = opts.currSlide + val;
|
816 |
+
if (opts.nextSlide < 0) {
|
817 |
+
if (opts.nowrap) return false;
|
818 |
+
opts.nextSlide = els.length - 1;
|
819 |
+
}
|
820 |
+
else if (opts.nextSlide >= els.length) {
|
821 |
+
if (opts.nowrap) return false;
|
822 |
+
opts.nextSlide = 0;
|
823 |
+
}
|
824 |
+
}
|
825 |
+
|
826 |
+
var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
|
827 |
+
if ($.isFunction(cb))
|
828 |
+
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
|
829 |
+
go(els, opts, 1, moveForward);
|
830 |
+
return false;
|
831 |
+
}
|
832 |
+
|
833 |
+
function buildPager(els, opts) {
|
834 |
+
var $p = $(opts.pager);
|
835 |
+
$.each(els, function(i,o) {
|
836 |
+
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
|
837 |
+
});
|
838 |
+
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
|
839 |
+
}
|
840 |
+
|
841 |
+
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
842 |
+
var a;
|
843 |
+
if ($.isFunction(opts.pagerAnchorBuilder)) {
|
844 |
+
a = opts.pagerAnchorBuilder(i,el);
|
845 |
+
debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
|
846 |
+
}
|
847 |
+
else
|
848 |
+
a = '<a href="#">'+(i+1)+'</a>';
|
849 |
+
|
850 |
+
if (!a)
|
851 |
+
return;
|
852 |
+
var $a = $(a);
|
853 |
+
// don't reparent if anchor is in the dom
|
854 |
+
if ($a.parents('body').length === 0) {
|
855 |
+
var arr = [];
|
856 |
+
if ($p.length > 1) {
|
857 |
+
$p.each(function() {
|
858 |
+
var $clone = $a.clone(true);
|
859 |
+
$(this).append($clone);
|
860 |
+
arr.push($clone[0]);
|
861 |
+
});
|
862 |
+
$a = $(arr);
|
863 |
+
}
|
864 |
+
else {
|
865 |
+
$a.appendTo($p);
|
866 |
+
}
|
867 |
+
}
|
868 |
+
|
869 |
+
opts.pagerAnchors = opts.pagerAnchors || [];
|
870 |
+
opts.pagerAnchors.push($a);
|
871 |
+
|
872 |
+
var pagerFn = function(e) {
|
873 |
+
e.preventDefault();
|
874 |
+
opts.nextSlide = i;
|
875 |
+
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
876 |
+
if (timeout) {
|
877 |
+
clearTimeout(timeout);
|
878 |
+
p.cycleTimeout = 0;
|
879 |
+
}
|
880 |
+
var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
|
881 |
+
if ($.isFunction(cb))
|
882 |
+
cb(opts.nextSlide, els[opts.nextSlide]);
|
883 |
+
go(els,opts,1,opts.currSlide < i); // trigger the trans
|
884 |
+
// return false; // <== allow bubble
|
885 |
+
};
|
886 |
+
|
887 |
+
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
|
888 |
+
$a.hover(pagerFn, function(){/* no-op */} );
|
889 |
+
}
|
890 |
+
else {
|
891 |
+
$a.bind(opts.pagerEvent, pagerFn);
|
892 |
+
}
|
893 |
+
|
894 |
+
if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
|
895 |
+
$a.bind('click.cycle', function(){return false;}); // suppress click
|
896 |
+
|
897 |
+
var cont = opts.$cont[0];
|
898 |
+
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
899 |
+
if (opts.pauseOnPagerHover) {
|
900 |
+
$a.hover(
|
901 |
+
function() {
|
902 |
+
pauseFlag = true;
|
903 |
+
cont.cyclePause++;
|
904 |
+
triggerPause(cont,true,true);
|
905 |
+
}, function() {
|
906 |
+
if (pauseFlag)
|
907 |
+
cont.cyclePause--;
|
908 |
+
triggerPause(cont,true,true);
|
909 |
+
}
|
910 |
+
);
|
911 |
+
}
|
912 |
+
};
|
913 |
+
|
914 |
+
// helper fn to calculate the number of slides between the current and the next
|
915 |
+
$.fn.cycle.hopsFromLast = function(opts, fwd) {
|
916 |
+
var hops, l = opts.lastSlide, c = opts.currSlide;
|
917 |
+
if (fwd)
|
918 |
+
hops = c > l ? c - l : opts.slideCount - l;
|
919 |
+
else
|
920 |
+
hops = c < l ? l - c : l + opts.slideCount - c;
|
921 |
+
return hops;
|
922 |
+
};
|
923 |
+
|
924 |
+
// fix clearType problems in ie6 by setting an explicit bg color
|
925 |
+
// (otherwise text slides look horrible during a fade transition)
|
926 |
+
function clearTypeFix($slides) {
|
927 |
+
debug('applying clearType background-color hack');
|
928 |
+
function hex(s) {
|
929 |
+
s = parseInt(s,10).toString(16);
|
930 |
+
return s.length < 2 ? '0'+s : s;
|
931 |
+
}
|
932 |
+
function getBg(e) {
|
933 |
+
for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
|
934 |
+
var v = $.css(e,'background-color');
|
935 |
+
if (v && v.indexOf('rgb') >= 0 ) {
|
936 |
+
var rgb = v.match(/\d+/g);
|
937 |
+
return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
|
938 |
+
}
|
939 |
+
if (v && v != 'transparent')
|
940 |
+
return v;
|
941 |
+
}
|
942 |
+
return '#ffffff';
|
943 |
+
}
|
944 |
+
$slides.each(function() { $(this).css('background-color', getBg(this)); });
|
945 |
+
}
|
946 |
+
|
947 |
+
// reset common props before the next transition
|
948 |
+
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
949 |
+
$(opts.elements).not(curr).hide();
|
950 |
+
if (typeof opts.cssBefore.opacity == 'undefined')
|
951 |
+
opts.cssBefore.opacity = 1;
|
952 |
+
opts.cssBefore.display = 'block';
|
953 |
+
if (opts.slideResize && w !== false && next.cycleW > 0)
|
954 |
+
opts.cssBefore.width = next.cycleW;
|
955 |
+
if (opts.slideResize && h !== false && next.cycleH > 0)
|
956 |
+
opts.cssBefore.height = next.cycleH;
|
957 |
+
opts.cssAfter = opts.cssAfter || {};
|
958 |
+
opts.cssAfter.display = 'none';
|
959 |
+
$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
|
960 |
+
$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
|
961 |
+
};
|
962 |
+
|
963 |
+
// the actual fn for effecting a transition
|
964 |
+
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
965 |
+
var $l = $(curr), $n = $(next);
|
966 |
+
var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
|
967 |
+
$n.css(opts.cssBefore);
|
968 |
+
if (speedOverride) {
|
969 |
+
if (typeof speedOverride == 'number')
|
970 |
+
speedIn = speedOut = speedOverride;
|
971 |
+
else
|
972 |
+
speedIn = speedOut = 1;
|
973 |
+
easeIn = easeOut = null;
|
974 |
+
}
|
975 |
+
var fn = function() {
|
976 |
+
$n.animate(opts.animIn, speedIn, easeIn, function() {
|
977 |
+
cb();
|
978 |
+
});
|
979 |
+
};
|
980 |
+
$l.animate(opts.animOut, speedOut, easeOut, function() {
|
981 |
+
$l.css(opts.cssAfter);
|
982 |
+
if (!opts.sync)
|
983 |
+
fn();
|
984 |
+
});
|
985 |
+
if (opts.sync) fn();
|
986 |
+
};
|
987 |
+
|
988 |
+
// transition definitions - only fade is defined here, transition pack defines the rest
|
989 |
+
$.fn.cycle.transitions = {
|
990 |
+
fade: function($cont, $slides, opts) {
|
991 |
+
$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
|
992 |
+
opts.before.push(function(curr,next,opts) {
|
993 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
994 |
+
opts.cssBefore.opacity = 0;
|
995 |
+
});
|
996 |
+
opts.animIn = { opacity: 1 };
|
997 |
+
opts.animOut = { opacity: 0 };
|
998 |
+
opts.cssBefore = { top: 0, left: 0 };
|
999 |
+
}
|
1000 |
+
};
|
1001 |
+
|
1002 |
+
$.fn.cycle.ver = function() { return ver; };
|
1003 |
+
|
1004 |
+
// override these globally if you like (they are all optional)
|
1005 |
+
$.fn.cycle.defaults = {
|
1006 |
+
activePagerClass: 'activeSlide', // class name used for the active pager link
|
1007 |
+
after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1008 |
+
allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
|
1009 |
+
animIn: null, // properties that define how the slide animates in
|
1010 |
+
animOut: null, // properties that define how the slide animates out
|
1011 |
+
aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
|
1012 |
+
autostop: 0, // true to end slideshow after X transitions (where X == slide count)
|
1013 |
+
autostopCount: 0, // number of transitions (optionally used with autostop to define X)
|
1014 |
+
backwards: false, // true to start slideshow at last slide and move backwards through the stack
|
1015 |
+
before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1016 |
+
center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
|
1017 |
+
cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
|
1018 |
+
cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
|
1019 |
+
containerResize: 1, // resize container to fit largest slide
|
1020 |
+
containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic
|
1021 |
+
continuous: 0, // true to start next transition immediately after current one completes
|
1022 |
+
cssAfter: null, // properties that defined the state of the slide after transitioning out
|
1023 |
+
cssBefore: null, // properties that define the initial state of the slide before transitioning in
|
1024 |
+
delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
|
1025 |
+
easeIn: null, // easing for "in" transition
|
1026 |
+
easeOut: null, // easing for "out" transition
|
1027 |
+
easing: null, // easing method for both in and out transitions
|
1028 |
+
end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
|
1029 |
+
fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
|
1030 |
+
fit: 0, // force slides to fit container
|
1031 |
+
fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
|
1032 |
+
fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
|
1033 |
+
height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
|
1034 |
+
manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
|
1035 |
+
metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
|
1036 |
+
next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
|
1037 |
+
nowrap: 0, // true to prevent slideshow from wrapping
|
1038 |
+
onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
|
1039 |
+
onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
|
1040 |
+
pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
|
1041 |
+
pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
|
1042 |
+
pagerEvent: 'click.cycle', // name of event which drives the pager navigation
|
1043 |
+
pause: 0, // true to enable "pause on hover"
|
1044 |
+
pauseOnPagerHover: 0, // true to pause when hovering over pager link
|
1045 |
+
prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
|
1046 |
+
prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
|
1047 |
+
random: 0, // true for random, false for sequence (not applicable to shuffle fx)
|
1048 |
+
randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
|
1049 |
+
requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
|
1050 |
+
requeueTimeout: 250, // ms delay for requeue
|
1051 |
+
rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
|
1052 |
+
shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
|
1053 |
+
skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
|
1054 |
+
slideExpr: null, // expression for selecting slides (if something other than all children is required)
|
1055 |
+
slideResize: 1, // force slide width/height to fixed size before every transition
|
1056 |
+
speed: 1000, // speed of the transition (any valid fx speed value)
|
1057 |
+
speedIn: null, // speed of the 'in' transition
|
1058 |
+
speedOut: null, // speed of the 'out' transition
|
1059 |
+
startingSlide: undefined,// zero-based index of the first slide to be displayed
|
1060 |
+
sync: 1, // true if in/out transitions should occur simultaneously
|
1061 |
+
timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
|
1062 |
+
timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1063 |
+
updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
|
1064 |
+
width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
|
1065 |
+
};
|
1066 |
+
|
1067 |
+
})(jQuery);
|
1068 |
+
|
1069 |
+
|
1070 |
+
/*!
|
1071 |
+
* jQuery Cycle Plugin Transition Definitions
|
1072 |
+
* This script is a plugin for the jQuery Cycle Plugin
|
1073 |
+
* Examples and documentation at: http://malsup.com/jquery/cycle/
|
1074 |
+
* Copyright (c) 2007-2010 M. Alsup
|
1075 |
+
* Version: 2.73
|
1076 |
+
* Dual licensed under the MIT and GPL licenses:
|
1077 |
+
* http://www.opensource.org/licenses/mit-license.php
|
1078 |
+
* http://www.gnu.org/licenses/gpl.html
|
1079 |
+
*/
|
1080 |
+
(function($) {
|
1081 |
+
"use strict";
|
1082 |
+
|
1083 |
+
//
|
1084 |
+
// These functions define slide initialization and properties for the named
|
1085 |
+
// transitions. To save file size feel free to remove any of these that you
|
1086 |
+
// don't need.
|
1087 |
+
//
|
1088 |
+
$.fn.cycle.transitions.none = function($cont, $slides, opts) {
|
1089 |
+
opts.fxFn = function(curr,next,opts,after){
|
1090 |
+
$(next).show();
|
1091 |
+
$(curr).hide();
|
1092 |
+
after();
|
1093 |
+
};
|
1094 |
+
};
|
1095 |
+
|
1096 |
+
// not a cross-fade, fadeout only fades out the top slide
|
1097 |
+
$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
|
1098 |
+
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
|
1099 |
+
opts.before.push(function(curr,next,opts,w,h,rev) {
|
1100 |
+
$(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
|
1101 |
+
$(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
|
1102 |
+
});
|
1103 |
+
opts.animIn.opacity = 1;
|
1104 |
+
opts.animOut.opacity = 0;
|
1105 |
+
opts.cssBefore.opacity = 1;
|
1106 |
+
opts.cssBefore.display = 'block';
|
1107 |
+
opts.cssAfter.zIndex = 0;
|
1108 |
+
};
|
1109 |
+
|
1110 |
+
// scrollUp/Down/Left/Right
|
1111 |
+
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
|
1112 |
+
$cont.css('overflow','hidden');
|
1113 |
+
opts.before.push($.fn.cycle.commonReset);
|
1114 |
+
var h = $cont.height();
|
1115 |
+
opts.cssBefore.top = h;
|
1116 |
+
opts.cssBefore.left = 0;
|
1117 |
+
opts.cssFirst.top = 0;
|
1118 |
+
opts.animIn.top = 0;
|
1119 |
+
opts.animOut.top = -h;
|
1120 |
+
};
|
1121 |
+
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
|
1122 |
+
$cont.css('overflow','hidden');
|
1123 |
+
opts.before.push($.fn.cycle.commonReset);
|
1124 |
+
var h = $cont.height();
|
1125 |
+
opts.cssFirst.top = 0;
|
1126 |
+
opts.cssBefore.top = -h;
|
1127 |
+
opts.cssBefore.left = 0;
|
1128 |
+
opts.animIn.top = 0;
|
1129 |
+
opts.animOut.top = h;
|
1130 |
+
};
|
1131 |
+
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
|
1132 |
+
$cont.css('overflow','hidden');
|
1133 |
+
opts.before.push($.fn.cycle.commonReset);
|
1134 |
+
var w = $cont.width();
|
1135 |
+
opts.cssFirst.left = 0;
|
1136 |
+
opts.cssBefore.left = w;
|
1137 |
+
opts.cssBefore.top = 0;
|
1138 |
+
opts.animIn.left = 0;
|
1139 |
+
opts.animOut.left = 0-w;
|
1140 |
+
};
|
1141 |
+
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
|
1142 |
+
$cont.css('overflow','hidden');
|
1143 |
+
opts.before.push($.fn.cycle.commonReset);
|
1144 |
+
var w = $cont.width();
|
1145 |
+
opts.cssFirst.left = 0;
|
1146 |
+
opts.cssBefore.left = -w;
|
1147 |
+
opts.cssBefore.top = 0;
|
1148 |
+
opts.animIn.left = 0;
|
1149 |
+
opts.animOut.left = w;
|
1150 |
+
};
|
1151 |
+
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
|
1152 |
+
$cont.css('overflow','hidden').width();
|
1153 |
+
opts.before.push(function(curr, next, opts, fwd) {
|
1154 |
+
if (opts.rev)
|
1155 |
+
fwd = !fwd;
|
1156 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1157 |
+
opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
|
1158 |
+
opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
|
1159 |
+
});
|
1160 |
+
opts.cssFirst.left = 0;
|
1161 |
+
opts.cssBefore.top = 0;
|
1162 |
+
opts.animIn.left = 0;
|
1163 |
+
opts.animOut.top = 0;
|
1164 |
+
};
|
1165 |
+
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
|
1166 |
+
$cont.css('overflow','hidden');
|
1167 |
+
opts.before.push(function(curr, next, opts, fwd) {
|
1168 |
+
if (opts.rev)
|
1169 |
+
fwd = !fwd;
|
1170 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1171 |
+
opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
|
1172 |
+
opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
|
1173 |
+
});
|
1174 |
+
opts.cssFirst.top = 0;
|
1175 |
+
opts.cssBefore.left = 0;
|
1176 |
+
opts.animIn.top = 0;
|
1177 |
+
opts.animOut.left = 0;
|
1178 |
+
};
|
1179 |
+
|
1180 |
+
// slideX/slideY
|
1181 |
+
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
|
1182 |
+
opts.before.push(function(curr, next, opts) {
|
1183 |
+
$(opts.elements).not(curr).hide();
|
1184 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1185 |
+
opts.animIn.width = next.cycleW;
|
1186 |
+
});
|
1187 |
+
opts.cssBefore.left = 0;
|
1188 |
+
opts.cssBefore.top = 0;
|
1189 |
+
opts.cssBefore.width = 0;
|
1190 |
+
opts.animIn.width = 'show';
|
1191 |
+
opts.animOut.width = 0;
|
1192 |
+
};
|
1193 |
+
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
|
1194 |
+
opts.before.push(function(curr, next, opts) {
|
1195 |
+
$(opts.elements).not(curr).hide();
|
1196 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1197 |
+
opts.animIn.height = next.cycleH;
|
1198 |
+
});
|
1199 |
+
opts.cssBefore.left = 0;
|
1200 |
+
opts.cssBefore.top = 0;
|
1201 |
+
opts.cssBefore.height = 0;
|
1202 |
+
opts.animIn.height = 'show';
|
1203 |
+
opts.animOut.height = 0;
|
1204 |
+
};
|
1205 |
+
|
1206 |
+
// shuffle
|
1207 |
+
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
|
1208 |
+
var i, w = $cont.css('overflow', 'visible').width();
|
1209 |
+
$slides.css({left: 0, top: 0});
|
1210 |
+
opts.before.push(function(curr,next,opts) {
|
1211 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1212 |
+
});
|
1213 |
+
// only adjust speed once!
|
1214 |
+
if (!opts.speedAdjusted) {
|
1215 |
+
opts.speed = opts.speed / 2; // shuffle has 2 transitions
|
1216 |
+
opts.speedAdjusted = true;
|
1217 |
+
}
|
1218 |
+
opts.random = 0;
|
1219 |
+
opts.shuffle = opts.shuffle || {left:-w, top:15};
|
1220 |
+
opts.els = [];
|
1221 |
+
for (i=0; i < $slides.length; i++)
|
1222 |
+
opts.els.push($slides[i]);
|
1223 |
+
|
1224 |
+
for (i=0; i < opts.currSlide; i++)
|
1225 |
+
opts.els.push(opts.els.shift());
|
1226 |
+
|
1227 |
+
// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
|
1228 |
+
opts.fxFn = function(curr, next, opts, cb, fwd) {
|
1229 |
+
if (opts.rev)
|
1230 |
+
fwd = !fwd;
|
1231 |
+
var $el = fwd ? $(curr) : $(next);
|
1232 |
+
$(next).css(opts.cssBefore);
|
1233 |
+
var count = opts.slideCount;
|
1234 |
+
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
|
1235 |
+
var hops = $.fn.cycle.hopsFromLast(opts, fwd);
|
1236 |
+
for (var k=0; k < hops; k++) {
|
1237 |
+
if (fwd)
|
1238 |
+
opts.els.push(opts.els.shift());
|
1239 |
+
else
|
1240 |
+
opts.els.unshift(opts.els.pop());
|
1241 |
+
}
|
1242 |
+
if (fwd) {
|
1243 |
+
for (var i=0, len=opts.els.length; i < len; i++)
|
1244 |
+
$(opts.els[i]).css('z-index', len-i+count);
|
1245 |
+
}
|
1246 |
+
else {
|
1247 |
+
var z = $(curr).css('z-index');
|
1248 |
+
$el.css('z-index', parseInt(z,10)+1+count);
|
1249 |
+
}
|
1250 |
+
$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
|
1251 |
+
$(fwd ? this : curr).hide();
|
1252 |
+
if (cb) cb();
|
1253 |
+
});
|
1254 |
+
});
|
1255 |
+
};
|
1256 |
+
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1257 |
+
};
|
1258 |
+
|
1259 |
+
// turnUp/Down/Left/Right
|
1260 |
+
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
|
1261 |
+
opts.before.push(function(curr, next, opts) {
|
1262 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1263 |
+
opts.cssBefore.top = next.cycleH;
|
1264 |
+
opts.animIn.height = next.cycleH;
|
1265 |
+
opts.animOut.width = next.cycleW;
|
1266 |
+
});
|
1267 |
+
opts.cssFirst.top = 0;
|
1268 |
+
opts.cssBefore.left = 0;
|
1269 |
+
opts.cssBefore.height = 0;
|
1270 |
+
opts.animIn.top = 0;
|
1271 |
+
opts.animOut.height = 0;
|
1272 |
+
};
|
1273 |
+
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
|
1274 |
+
opts.before.push(function(curr, next, opts) {
|
1275 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1276 |
+
opts.animIn.height = next.cycleH;
|
1277 |
+
opts.animOut.top = curr.cycleH;
|
1278 |
+
});
|
1279 |
+
opts.cssFirst.top = 0;
|
1280 |
+
opts.cssBefore.left = 0;
|
1281 |
+
opts.cssBefore.top = 0;
|
1282 |
+
opts.cssBefore.height = 0;
|
1283 |
+
opts.animOut.height = 0;
|
1284 |
+
};
|
1285 |
+
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
|
1286 |
+
opts.before.push(function(curr, next, opts) {
|
1287 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1288 |
+
opts.cssBefore.left = next.cycleW;
|
1289 |
+
opts.animIn.width = next.cycleW;
|
1290 |
+
});
|
1291 |
+
opts.cssBefore.top = 0;
|
1292 |
+
opts.cssBefore.width = 0;
|
1293 |
+
opts.animIn.left = 0;
|
1294 |
+
opts.animOut.width = 0;
|
1295 |
+
};
|
1296 |
+
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
|
1297 |
+
opts.before.push(function(curr, next, opts) {
|
1298 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1299 |
+
opts.animIn.width = next.cycleW;
|
1300 |
+
opts.animOut.left = curr.cycleW;
|
1301 |
+
});
|
1302 |
+
$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
|
1303 |
+
opts.animIn.left = 0;
|
1304 |
+
opts.animOut.width = 0;
|
1305 |
+
};
|
1306 |
+
|
1307 |
+
// zoom
|
1308 |
+
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
|
1309 |
+
opts.before.push(function(curr, next, opts) {
|
1310 |
+
$.fn.cycle.commonReset(curr,next,opts,false,false,true);
|
1311 |
+
opts.cssBefore.top = next.cycleH/2;
|
1312 |
+
opts.cssBefore.left = next.cycleW/2;
|
1313 |
+
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
|
1314 |
+
$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
|
1315 |
+
});
|
1316 |
+
opts.cssFirst.top = 0;
|
1317 |
+
opts.cssFirst.left = 0;
|
1318 |
+
opts.cssBefore.width = 0;
|
1319 |
+
opts.cssBefore.height = 0;
|
1320 |
+
};
|
1321 |
+
|
1322 |
+
// fadeZoom
|
1323 |
+
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
|
1324 |
+
opts.before.push(function(curr, next, opts) {
|
1325 |
+
$.fn.cycle.commonReset(curr,next,opts,false,false);
|
1326 |
+
opts.cssBefore.left = next.cycleW/2;
|
1327 |
+
opts.cssBefore.top = next.cycleH/2;
|
1328 |
+
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
|
1329 |
+
});
|
1330 |
+
opts.cssBefore.width = 0;
|
1331 |
+
opts.cssBefore.height = 0;
|
1332 |
+
opts.animOut.opacity = 0;
|
1333 |
+
};
|
1334 |
+
|
1335 |
+
// blindX
|
1336 |
+
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
|
1337 |
+
var w = $cont.css('overflow','hidden').width();
|
1338 |
+
opts.before.push(function(curr, next, opts) {
|
1339 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1340 |
+
opts.animIn.width = next.cycleW;
|
1341 |
+
opts.animOut.left = curr.cycleW;
|
1342 |
+
});
|
1343 |
+
opts.cssBefore.left = w;
|
1344 |
+
opts.cssBefore.top = 0;
|
1345 |
+
opts.animIn.left = 0;
|
1346 |
+
opts.animOut.left = w;
|
1347 |
+
};
|
1348 |
+
// blindY
|
1349 |
+
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
|
1350 |
+
var h = $cont.css('overflow','hidden').height();
|
1351 |
+
opts.before.push(function(curr, next, opts) {
|
1352 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1353 |
+
opts.animIn.height = next.cycleH;
|
1354 |
+
opts.animOut.top = curr.cycleH;
|
1355 |
+
});
|
1356 |
+
opts.cssBefore.top = h;
|
1357 |
+
opts.cssBefore.left = 0;
|
1358 |
+
opts.animIn.top = 0;
|
1359 |
+
opts.animOut.top = h;
|
1360 |
+
};
|
1361 |
+
// blindZ
|
1362 |
+
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
|
1363 |
+
var h = $cont.css('overflow','hidden').height();
|
1364 |
+
var w = $cont.width();
|
1365 |
+
opts.before.push(function(curr, next, opts) {
|
1366 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1367 |
+
opts.animIn.height = next.cycleH;
|
1368 |
+
opts.animOut.top = curr.cycleH;
|
1369 |
+
});
|
1370 |
+
opts.cssBefore.top = h;
|
1371 |
+
opts.cssBefore.left = w;
|
1372 |
+
opts.animIn.top = 0;
|
1373 |
+
opts.animIn.left = 0;
|
1374 |
+
opts.animOut.top = h;
|
1375 |
+
opts.animOut.left = w;
|
1376 |
+
};
|
1377 |
+
|
1378 |
+
// growX - grow horizontally from centered 0 width
|
1379 |
+
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
|
1380 |
+
opts.before.push(function(curr, next, opts) {
|
1381 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1382 |
+
opts.cssBefore.left = this.cycleW/2;
|
1383 |
+
opts.animIn.left = 0;
|
1384 |
+
opts.animIn.width = this.cycleW;
|
1385 |
+
opts.animOut.left = 0;
|
1386 |
+
});
|
1387 |
+
opts.cssBefore.top = 0;
|
1388 |
+
opts.cssBefore.width = 0;
|
1389 |
+
};
|
1390 |
+
// growY - grow vertically from centered 0 height
|
1391 |
+
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
|
1392 |
+
opts.before.push(function(curr, next, opts) {
|
1393 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1394 |
+
opts.cssBefore.top = this.cycleH/2;
|
1395 |
+
opts.animIn.top = 0;
|
1396 |
+
opts.animIn.height = this.cycleH;
|
1397 |
+
opts.animOut.top = 0;
|
1398 |
+
});
|
1399 |
+
opts.cssBefore.height = 0;
|
1400 |
+
opts.cssBefore.left = 0;
|
1401 |
+
};
|
1402 |
+
|
1403 |
+
// curtainX - squeeze in both edges horizontally
|
1404 |
+
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
|
1405 |
+
opts.before.push(function(curr, next, opts) {
|
1406 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true,true);
|
1407 |
+
opts.cssBefore.left = next.cycleW/2;
|
1408 |
+
opts.animIn.left = 0;
|
1409 |
+
opts.animIn.width = this.cycleW;
|
1410 |
+
opts.animOut.left = curr.cycleW/2;
|
1411 |
+
opts.animOut.width = 0;
|
1412 |
+
});
|
1413 |
+
opts.cssBefore.top = 0;
|
1414 |
+
opts.cssBefore.width = 0;
|
1415 |
+
};
|
1416 |
+
// curtainY - squeeze in both edges vertically
|
1417 |
+
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
|
1418 |
+
opts.before.push(function(curr, next, opts) {
|
1419 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false,true);
|
1420 |
+
opts.cssBefore.top = next.cycleH/2;
|
1421 |
+
opts.animIn.top = 0;
|
1422 |
+
opts.animIn.height = next.cycleH;
|
1423 |
+
opts.animOut.top = curr.cycleH/2;
|
1424 |
+
opts.animOut.height = 0;
|
1425 |
+
});
|
1426 |
+
opts.cssBefore.height = 0;
|
1427 |
+
opts.cssBefore.left = 0;
|
1428 |
+
};
|
1429 |
+
|
1430 |
+
// cover - curr slide covered by next slide
|
1431 |
+
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
|
1432 |
+
var d = opts.direction || 'left';
|
1433 |
+
var w = $cont.css('overflow','hidden').width();
|
1434 |
+
var h = $cont.height();
|
1435 |
+
opts.before.push(function(curr, next, opts) {
|
1436 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1437 |
+
opts.cssAfter.display = '';
|
1438 |
+
if (d == 'right')
|
1439 |
+
opts.cssBefore.left = -w;
|
1440 |
+
else if (d == 'up')
|
1441 |
+
opts.cssBefore.top = h;
|
1442 |
+
else if (d == 'down')
|
1443 |
+
opts.cssBefore.top = -h;
|
1444 |
+
else
|
1445 |
+
opts.cssBefore.left = w;
|
1446 |
+
});
|
1447 |
+
opts.animIn.left = 0;
|
1448 |
+
opts.animIn.top = 0;
|
1449 |
+
opts.cssBefore.top = 0;
|
1450 |
+
opts.cssBefore.left = 0;
|
1451 |
+
};
|
1452 |
+
|
1453 |
+
// uncover - curr slide moves off next slide
|
1454 |
+
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
|
1455 |
+
var d = opts.direction || 'left';
|
1456 |
+
var w = $cont.css('overflow','hidden').width();
|
1457 |
+
var h = $cont.height();
|
1458 |
+
opts.before.push(function(curr, next, opts) {
|
1459 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1460 |
+
if (d == 'right')
|
1461 |
+
opts.animOut.left = w;
|
1462 |
+
else if (d == 'up')
|
1463 |
+
opts.animOut.top = -h;
|
1464 |
+
else if (d == 'down')
|
1465 |
+
opts.animOut.top = h;
|
1466 |
+
else
|
1467 |
+
opts.animOut.left = -w;
|
1468 |
+
});
|
1469 |
+
opts.animIn.left = 0;
|
1470 |
+
opts.animIn.top = 0;
|
1471 |
+
opts.cssBefore.top = 0;
|
1472 |
+
opts.cssBefore.left = 0;
|
1473 |
+
};
|
1474 |
+
|
1475 |
+
// toss - move top slide and fade away
|
1476 |
+
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
|
1477 |
+
var w = $cont.css('overflow','visible').width();
|
1478 |
+
var h = $cont.height();
|
1479 |
+
opts.before.push(function(curr, next, opts) {
|
1480 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1481 |
+
// provide default toss settings if animOut not provided
|
1482 |
+
if (!opts.animOut.left && !opts.animOut.top)
|
1483 |
+
$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
|
1484 |
+
else
|
1485 |
+
opts.animOut.opacity = 0;
|
1486 |
+
});
|
1487 |
+
opts.cssBefore.left = 0;
|
1488 |
+
opts.cssBefore.top = 0;
|
1489 |
+
opts.animIn.left = 0;
|
1490 |
+
};
|
1491 |
+
|
1492 |
+
// wipe - clip animation
|
1493 |
+
$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
|
1494 |
+
var w = $cont.css('overflow','hidden').width();
|
1495 |
+
var h = $cont.height();
|
1496 |
+
opts.cssBefore = opts.cssBefore || {};
|
1497 |
+
var clip;
|
1498 |
+
if (opts.clip) {
|
1499 |
+
if (/l2r/.test(opts.clip))
|
1500 |
+
clip = 'rect(0px 0px '+h+'px 0px)';
|
1501 |
+
else if (/r2l/.test(opts.clip))
|
1502 |
+
clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
|
1503 |
+
else if (/t2b/.test(opts.clip))
|
1504 |
+
clip = 'rect(0px '+w+'px 0px 0px)';
|
1505 |
+
else if (/b2t/.test(opts.clip))
|
1506 |
+
clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
|
1507 |
+
else if (/zoom/.test(opts.clip)) {
|
1508 |
+
var top = parseInt(h/2,10);
|
1509 |
+
var left = parseInt(w/2,10);
|
1510 |
+
clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
|
1511 |
+
}
|
1512 |
+
}
|
1513 |
+
|
1514 |
+
opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
|
1515 |
+
|
1516 |
+
var d = opts.cssBefore.clip.match(/(\d+)/g);
|
1517 |
+
var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
|
1518 |
+
|
1519 |
+
opts.before.push(function(curr, next, opts) {
|
1520 |
+
if (curr == next) return;
|
1521 |
+
var $curr = $(curr), $next = $(next);
|
1522 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,false);
|
1523 |
+
opts.cssAfter.display = 'block';
|
1524 |
+
|
1525 |
+
var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
|
1526 |
+
(function f() {
|
1527 |
+
var tt = t ? t - parseInt(step * (t/count),10) : 0;
|
1528 |
+
var ll = l ? l - parseInt(step * (l/count),10) : 0;
|
1529 |
+
var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
|
1530 |
+
var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
|
1531 |
+
$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
|
1532 |
+
(step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
|
1533 |
+
})();
|
1534 |
+
});
|
1535 |
+
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1536 |
+
opts.animIn = { left: 0 };
|
1537 |
+
opts.animOut = { left: 0 };
|
1538 |
+
};
|
1539 |
+
|
1540 |
+
})(jQuery);
|
js/jquery.cycle.all_older.js
ADDED
@@ -0,0 +1,1545 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Cycle Plugin (with Transition Definitions)
|
3 |
+
* Examples and documentation at: http://jquery.malsup.com/cycle/
|
4 |
+
* Copyright (c) 2007-2010 M. Alsup
|
5 |
+
* Version: 2.9999.5 (10-APR-2012)
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* http://jquery.malsup.com/license.html
|
8 |
+
* Requires: jQuery v1.3.2 or later
|
9 |
+
*/
|
10 |
+
;(function($, undefined) {
|
11 |
+
"use strict";
|
12 |
+
|
13 |
+
var ver = '2.9999.5';
|
14 |
+
|
15 |
+
// if $.support is not defined (pre jQuery 1.3) add what I need
|
16 |
+
if ($.support === undefined) {
|
17 |
+
$.support = {
|
18 |
+
opacity: !($.browser.msie)
|
19 |
+
};
|
20 |
+
}
|
21 |
+
|
22 |
+
function debug(s) {
|
23 |
+
if ($.fn.cycle.debug)
|
24 |
+
log(s);
|
25 |
+
}
|
26 |
+
function log() {
|
27 |
+
if (window.console && console.log)
|
28 |
+
console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
|
29 |
+
}
|
30 |
+
$.expr[':'].paused = function(el) {
|
31 |
+
return el.cyclePause;
|
32 |
+
};
|
33 |
+
|
34 |
+
|
35 |
+
// the options arg can be...
|
36 |
+
// a number - indicates an immediate transition should occur to the given slide index
|
37 |
+
// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
|
38 |
+
// an object - properties to control the slideshow
|
39 |
+
//
|
40 |
+
// the arg2 arg can be...
|
41 |
+
// the name of an fx (only used in conjunction with a numeric value for 'options')
|
42 |
+
// the value true (only used in first arg == 'resume') and indicates
|
43 |
+
// that the resume should occur immediately (not wait for next timeout)
|
44 |
+
|
45 |
+
$.fn.cycle = function(options, arg2) {
|
46 |
+
var o = { s: this.selector, c: this.context };
|
47 |
+
|
48 |
+
// in 1.3+ we can fix mistakes with the ready state
|
49 |
+
if (this.length === 0 && options != 'stop') {
|
50 |
+
if (!$.isReady && o.s) {
|
51 |
+
log('DOM not ready, queuing slideshow');
|
52 |
+
$(function() {
|
53 |
+
$(o.s,o.c).cycle(options,arg2);
|
54 |
+
});
|
55 |
+
return this;
|
56 |
+
}
|
57 |
+
// is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
|
58 |
+
log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
|
59 |
+
return this;
|
60 |
+
}
|
61 |
+
|
62 |
+
// iterate the matched nodeset
|
63 |
+
return this.each(function() {
|
64 |
+
var opts = handleArguments(this, options, arg2);
|
65 |
+
if (opts === false)
|
66 |
+
return;
|
67 |
+
|
68 |
+
opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
|
69 |
+
|
70 |
+
// stop existing slideshow for this container (if there is one)
|
71 |
+
if (this.cycleTimeout)
|
72 |
+
clearTimeout(this.cycleTimeout);
|
73 |
+
this.cycleTimeout = this.cyclePause = 0;
|
74 |
+
this.cycleStop = 0; // issue #108
|
75 |
+
|
76 |
+
var $cont = $(this);
|
77 |
+
var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
|
78 |
+
var els = $slides.get();
|
79 |
+
|
80 |
+
if (els.length < 2) {
|
81 |
+
log('terminating; too few slides: ' + els.length);
|
82 |
+
return;
|
83 |
+
}
|
84 |
+
|
85 |
+
var opts2 = buildOptions($cont, $slides, els, opts, o);
|
86 |
+
if (opts2 === false)
|
87 |
+
return;
|
88 |
+
|
89 |
+
var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
|
90 |
+
|
91 |
+
// if it's an auto slideshow, kick it off
|
92 |
+
if (startTime) {
|
93 |
+
startTime += (opts2.delay || 0);
|
94 |
+
if (startTime < 10)
|
95 |
+
startTime = 10;
|
96 |
+
debug('first timeout: ' + startTime);
|
97 |
+
this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
|
98 |
+
}
|
99 |
+
});
|
100 |
+
};
|
101 |
+
|
102 |
+
function triggerPause(cont, byHover, onPager) {
|
103 |
+
var opts = $(cont).data('cycle.opts');
|
104 |
+
var paused = !!cont.cyclePause;
|
105 |
+
if (paused && opts.paused)
|
106 |
+
opts.paused(cont, opts, byHover, onPager);
|
107 |
+
else if (!paused && opts.resumed)
|
108 |
+
opts.resumed(cont, opts, byHover, onPager);
|
109 |
+
}
|
110 |
+
|
111 |
+
// process the args that were passed to the plugin fn
|
112 |
+
function handleArguments(cont, options, arg2) {
|
113 |
+
if (cont.cycleStop === undefined)
|
114 |
+
cont.cycleStop = 0;
|
115 |
+
if (options === undefined || options === null)
|
116 |
+
options = {};
|
117 |
+
if (options.constructor == String) {
|
118 |
+
switch(options) {
|
119 |
+
case 'destroy':
|
120 |
+
case 'stop':
|
121 |
+
var opts = $(cont).data('cycle.opts');
|
122 |
+
if (!opts)
|
123 |
+
return false;
|
124 |
+
cont.cycleStop++; // callbacks look for change
|
125 |
+
if (cont.cycleTimeout)
|
126 |
+
clearTimeout(cont.cycleTimeout);
|
127 |
+
cont.cycleTimeout = 0;
|
128 |
+
if (opts.elements)
|
129 |
+
$(opts.elements).stop();
|
130 |
+
$(cont).removeData('cycle.opts');
|
131 |
+
if (options == 'destroy')
|
132 |
+
destroy(cont, opts);
|
133 |
+
return false;
|
134 |
+
case 'toggle':
|
135 |
+
cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
|
136 |
+
checkInstantResume(cont.cyclePause, arg2, cont);
|
137 |
+
triggerPause(cont);
|
138 |
+
return false;
|
139 |
+
case 'pause':
|
140 |
+
cont.cyclePause = 1;
|
141 |
+
triggerPause(cont);
|
142 |
+
return false;
|
143 |
+
case 'resume':
|
144 |
+
cont.cyclePause = 0;
|
145 |
+
checkInstantResume(false, arg2, cont);
|
146 |
+
triggerPause(cont);
|
147 |
+
return false;
|
148 |
+
case 'prev':
|
149 |
+
case 'next':
|
150 |
+
opts = $(cont).data('cycle.opts');
|
151 |
+
if (!opts) {
|
152 |
+
log('options not found, "prev/next" ignored');
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
$.fn.cycle[options](opts);
|
156 |
+
return false;
|
157 |
+
default:
|
158 |
+
options = { fx: options };
|
159 |
+
}
|
160 |
+
return options;
|
161 |
+
}
|
162 |
+
else if (options.constructor == Number) {
|
163 |
+
// go to the requested slide
|
164 |
+
var num = options;
|
165 |
+
options = $(cont).data('cycle.opts');
|
166 |
+
if (!options) {
|
167 |
+
log('options not found, can not advance slide');
|
168 |
+
return false;
|
169 |
+
}
|
170 |
+
if (num < 0 || num >= options.elements.length) {
|
171 |
+
log('invalid slide index: ' + num);
|
172 |
+
return false;
|
173 |
+
}
|
174 |
+
options.nextSlide = num;
|
175 |
+
if (cont.cycleTimeout) {
|
176 |
+
clearTimeout(cont.cycleTimeout);
|
177 |
+
cont.cycleTimeout = 0;
|
178 |
+
}
|
179 |
+
if (typeof arg2 == 'string')
|
180 |
+
options.oneTimeFx = arg2;
|
181 |
+
go(options.elements, options, 1, num >= options.currSlide);
|
182 |
+
return false;
|
183 |
+
}
|
184 |
+
return options;
|
185 |
+
|
186 |
+
function checkInstantResume(isPaused, arg2, cont) {
|
187 |
+
if (!isPaused && arg2 === true) { // resume now!
|
188 |
+
var options = $(cont).data('cycle.opts');
|
189 |
+
if (!options) {
|
190 |
+
log('options not found, can not resume');
|
191 |
+
return false;
|
192 |
+
}
|
193 |
+
if (cont.cycleTimeout) {
|
194 |
+
clearTimeout(cont.cycleTimeout);
|
195 |
+
cont.cycleTimeout = 0;
|
196 |
+
}
|
197 |
+
go(options.elements, options, 1, !options.backwards);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
function removeFilter(el, opts) {
|
203 |
+
if (!$.support.opacity && opts.cleartype && el.style.filter) {
|
204 |
+
try { el.style.removeAttribute('filter'); }
|
205 |
+
catch(smother) {} // handle old opera versions
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
// unbind event handlers
|
210 |
+
function destroy(cont, opts) {
|
211 |
+
if (opts.next)
|
212 |
+
$(opts.next).unbind(opts.prevNextEvent);
|
213 |
+
if (opts.prev)
|
214 |
+
$(opts.prev).unbind(opts.prevNextEvent);
|
215 |
+
|
216 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
217 |
+
$.each(opts.pagerAnchors || [], function() {
|
218 |
+
this.unbind().remove();
|
219 |
+
});
|
220 |
+
opts.pagerAnchors = null;
|
221 |
+
$(cont).unbind('mouseenter.cycle mouseleave.cycle');
|
222 |
+
if (opts.destroy) // callback
|
223 |
+
opts.destroy(opts);
|
224 |
+
}
|
225 |
+
|
226 |
+
// one-time initialization
|
227 |
+
function buildOptions($cont, $slides, els, options, o) {
|
228 |
+
var startingSlideSpecified;
|
229 |
+
// support metadata plugin (v1.0 and v2.0)
|
230 |
+
var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
|
231 |
+
var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
|
232 |
+
if (meta)
|
233 |
+
opts = $.extend(opts, meta);
|
234 |
+
if (opts.autostop)
|
235 |
+
opts.countdown = opts.autostopCount || els.length;
|
236 |
+
|
237 |
+
var cont = $cont[0];
|
238 |
+
$cont.data('cycle.opts', opts);
|
239 |
+
opts.$cont = $cont;
|
240 |
+
opts.stopCount = cont.cycleStop;
|
241 |
+
opts.elements = els;
|
242 |
+
opts.before = opts.before ? [opts.before] : [];
|
243 |
+
opts.after = opts.after ? [opts.after] : [];
|
244 |
+
|
245 |
+
// push some after callbacks
|
246 |
+
if (!$.support.opacity && opts.cleartype)
|
247 |
+
opts.after.push(function() { removeFilter(this, opts); });
|
248 |
+
if (opts.continuous)
|
249 |
+
opts.after.push(function() { go(els,opts,0,!opts.backwards); });
|
250 |
+
|
251 |
+
saveOriginalOpts(opts);
|
252 |
+
|
253 |
+
// clearType corrections
|
254 |
+
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
255 |
+
clearTypeFix($slides);
|
256 |
+
|
257 |
+
// container requires non-static position so that slides can be position within
|
258 |
+
if ($cont.css('position') == 'static')
|
259 |
+
$cont.css('position', 'relative');
|
260 |
+
if (opts.width)
|
261 |
+
$cont.width(opts.width);
|
262 |
+
if (opts.height && opts.height != 'auto')
|
263 |
+
$cont.height(opts.height);
|
264 |
+
|
265 |
+
if (opts.startingSlide !== undefined) {
|
266 |
+
opts.startingSlide = parseInt(opts.startingSlide,10);
|
267 |
+
if (opts.startingSlide >= els.length || opts.startSlide < 0)
|
268 |
+
opts.startingSlide = 0; // catch bogus input
|
269 |
+
else
|
270 |
+
startingSlideSpecified = true;
|
271 |
+
}
|
272 |
+
else if (opts.backwards)
|
273 |
+
opts.startingSlide = els.length - 1;
|
274 |
+
else
|
275 |
+
opts.startingSlide = 0;
|
276 |
+
|
277 |
+
// if random, mix up the slide array
|
278 |
+
if (opts.random) {
|
279 |
+
opts.randomMap = [];
|
280 |
+
for (var i = 0; i < els.length; i++)
|
281 |
+
opts.randomMap.push(i);
|
282 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
283 |
+
if (startingSlideSpecified) {
|
284 |
+
// try to find the specified starting slide and if found set start slide index in the map accordingly
|
285 |
+
for ( var cnt = 0; cnt < els.length; cnt++ ) {
|
286 |
+
if ( opts.startingSlide == opts.randomMap[cnt] ) {
|
287 |
+
opts.randomIndex = cnt;
|
288 |
+
}
|
289 |
+
}
|
290 |
+
}
|
291 |
+
else {
|
292 |
+
opts.randomIndex = 1;
|
293 |
+
opts.startingSlide = opts.randomMap[1];
|
294 |
+
}
|
295 |
+
}
|
296 |
+
else if (opts.startingSlide >= els.length)
|
297 |
+
opts.startingSlide = 0; // catch bogus input
|
298 |
+
opts.currSlide = opts.startingSlide || 0;
|
299 |
+
var first = opts.startingSlide;
|
300 |
+
|
301 |
+
// set position and zIndex on all the slides
|
302 |
+
$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
|
303 |
+
var z;
|
304 |
+
if (opts.backwards)
|
305 |
+
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
|
306 |
+
else
|
307 |
+
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
|
308 |
+
$(this).css('z-index', z);
|
309 |
+
});
|
310 |
+
|
311 |
+
// make sure first slide is visible
|
312 |
+
$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
|
313 |
+
removeFilter(els[first], opts);
|
314 |
+
|
315 |
+
// stretch slides
|
316 |
+
if (opts.fit) {
|
317 |
+
if (!opts.aspect) {
|
318 |
+
if (opts.width)
|
319 |
+
$slides.width(opts.width);
|
320 |
+
if (opts.height && opts.height != 'auto')
|
321 |
+
$slides.height(opts.height);
|
322 |
+
} else {
|
323 |
+
$slides.each(function(){
|
324 |
+
var $slide = $(this);
|
325 |
+
var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
|
326 |
+
if( opts.width && $slide.width() != opts.width ) {
|
327 |
+
$slide.width( opts.width );
|
328 |
+
$slide.height( opts.width / ratio );
|
329 |
+
}
|
330 |
+
|
331 |
+
if( opts.height && $slide.height() < opts.height ) {
|
332 |
+
$slide.height( opts.height );
|
333 |
+
$slide.width( opts.height * ratio );
|
334 |
+
}
|
335 |
+
});
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
if (opts.center && ((!opts.fit) || opts.aspect)) {
|
340 |
+
$slides.each(function(){
|
341 |
+
var $slide = $(this);
|
342 |
+
$slide.css({
|
343 |
+
"margin-left": opts.width ?
|
344 |
+
((opts.width - $slide.width()) / 2) + "px" :
|
345 |
+
0,
|
346 |
+
"margin-top": opts.height ?
|
347 |
+
((opts.height - $slide.height()) / 2) + "px" :
|
348 |
+
0
|
349 |
+
});
|
350 |
+
});
|
351 |
+
}
|
352 |
+
|
353 |
+
if (opts.center && !opts.fit && !opts.slideResize) {
|
354 |
+
$slides.each(function(){
|
355 |
+
var $slide = $(this);
|
356 |
+
$slide.css({
|
357 |
+
"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
|
358 |
+
"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
|
359 |
+
});
|
360 |
+
});
|
361 |
+
}
|
362 |
+
|
363 |
+
// stretch container
|
364 |
+
var reshape = opts.containerResize && !$cont.innerHeight();
|
365 |
+
if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
|
366 |
+
var maxw = 0, maxh = 0;
|
367 |
+
for(var j=0; j < els.length; j++) {
|
368 |
+
var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
|
369 |
+
if (!w) w = e.offsetWidth || e.width || $e.attr('width');
|
370 |
+
if (!h) h = e.offsetHeight || e.height || $e.attr('height');
|
371 |
+
maxw = w > maxw ? w : maxw;
|
372 |
+
maxh = h > maxh ? h : maxh;
|
373 |
+
}
|
374 |
+
if (maxw > 0 && maxh > 0)
|
375 |
+
$cont.css({width:maxw+'px',height:maxh+'px'});
|
376 |
+
}
|
377 |
+
|
378 |
+
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
379 |
+
if (opts.pause)
|
380 |
+
$cont.bind('mouseenter.cycle', function(){
|
381 |
+
pauseFlag = true;
|
382 |
+
this.cyclePause++;
|
383 |
+
triggerPause(cont, true);
|
384 |
+
}).bind('mouseleave.cycle', function(){
|
385 |
+
if (pauseFlag)
|
386 |
+
this.cyclePause--;
|
387 |
+
triggerPause(cont, true);
|
388 |
+
});
|
389 |
+
|
390 |
+
if (supportMultiTransitions(opts) === false)
|
391 |
+
return false;
|
392 |
+
|
393 |
+
// apparently a lot of people use image slideshows without height/width attributes on the images.
|
394 |
+
// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
|
395 |
+
var requeue = false;
|
396 |
+
options.requeueAttempts = options.requeueAttempts || 0;
|
397 |
+
$slides.each(function() {
|
398 |
+
// try to get height/width of each slide
|
399 |
+
var $el = $(this);
|
400 |
+
this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
|
401 |
+
this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
|
402 |
+
|
403 |
+
if ( $el.is('img') ) {
|
404 |
+
// sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
|
405 |
+
// an image is being downloaded and the markup did not include sizing info (height/width attributes);
|
406 |
+
// there seems to be some "default" sizes used in this situation
|
407 |
+
var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
|
408 |
+
var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
|
409 |
+
var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
|
410 |
+
var loadingOther = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
|
411 |
+
// don't requeue for images that are still loading but have a valid size
|
412 |
+
if (loadingIE || loadingFF || loadingOp || loadingOther) {
|
413 |
+
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
|
414 |
+
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
|
415 |
+
setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
|
416 |
+
requeue = true;
|
417 |
+
return false; // break each loop
|
418 |
+
}
|
419 |
+
else {
|
420 |
+
log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
|
421 |
+
}
|
422 |
+
}
|
423 |
+
}
|
424 |
+
return true;
|
425 |
+
});
|
426 |
+
|
427 |
+
if (requeue)
|
428 |
+
return false;
|
429 |
+
|
430 |
+
opts.cssBefore = opts.cssBefore || {};
|
431 |
+
opts.cssAfter = opts.cssAfter || {};
|
432 |
+
opts.cssFirst = opts.cssFirst || {};
|
433 |
+
opts.animIn = opts.animIn || {};
|
434 |
+
opts.animOut = opts.animOut || {};
|
435 |
+
|
436 |
+
$slides.not(':eq('+first+')').css(opts.cssBefore);
|
437 |
+
$($slides[first]).css(opts.cssFirst);
|
438 |
+
|
439 |
+
if (opts.timeout) {
|
440 |
+
opts.timeout = parseInt(opts.timeout,10);
|
441 |
+
// ensure that timeout and speed settings are sane
|
442 |
+
if (opts.speed.constructor == String)
|
443 |
+
opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
|
444 |
+
if (!opts.sync)
|
445 |
+
opts.speed = opts.speed / 2;
|
446 |
+
|
447 |
+
var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
|
448 |
+
while((opts.timeout - opts.speed) < buffer) // sanitize timeout
|
449 |
+
opts.timeout += opts.speed;
|
450 |
+
}
|
451 |
+
if (opts.easing)
|
452 |
+
opts.easeIn = opts.easeOut = opts.easing;
|
453 |
+
if (!opts.speedIn)
|
454 |
+
opts.speedIn = opts.speed;
|
455 |
+
if (!opts.speedOut)
|
456 |
+
opts.speedOut = opts.speed;
|
457 |
+
|
458 |
+
opts.slideCount = els.length;
|
459 |
+
opts.currSlide = opts.lastSlide = first;
|
460 |
+
if (opts.random) {
|
461 |
+
if (++opts.randomIndex == els.length)
|
462 |
+
opts.randomIndex = 0;
|
463 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
464 |
+
}
|
465 |
+
else if (opts.backwards)
|
466 |
+
opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
|
467 |
+
else
|
468 |
+
opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
|
469 |
+
|
470 |
+
// run transition init fn
|
471 |
+
if (!opts.multiFx) {
|
472 |
+
var init = $.fn.cycle.transitions[opts.fx];
|
473 |
+
if ($.isFunction(init))
|
474 |
+
init($cont, $slides, opts);
|
475 |
+
else if (opts.fx != 'custom' && !opts.multiFx) {
|
476 |
+
log('unknown transition: ' + opts.fx,'; slideshow terminating');
|
477 |
+
return false;
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
// fire artificial events
|
482 |
+
var e0 = $slides[first];
|
483 |
+
if (!opts.skipInitializationCallbacks) {
|
484 |
+
if (opts.before.length)
|
485 |
+
opts.before[0].apply(e0, [e0, e0, opts, true]);
|
486 |
+
if (opts.after.length)
|
487 |
+
opts.after[0].apply(e0, [e0, e0, opts, true]);
|
488 |
+
}
|
489 |
+
if (opts.next)
|
490 |
+
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
|
491 |
+
if (opts.prev)
|
492 |
+
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
|
493 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
494 |
+
buildPager(els,opts);
|
495 |
+
|
496 |
+
exposeAddSlide(opts, els);
|
497 |
+
|
498 |
+
return opts;
|
499 |
+
}
|
500 |
+
|
501 |
+
// save off original opts so we can restore after clearing state
|
502 |
+
function saveOriginalOpts(opts) {
|
503 |
+
opts.original = { before: [], after: [] };
|
504 |
+
opts.original.cssBefore = $.extend({}, opts.cssBefore);
|
505 |
+
opts.original.cssAfter = $.extend({}, opts.cssAfter);
|
506 |
+
opts.original.animIn = $.extend({}, opts.animIn);
|
507 |
+
opts.original.animOut = $.extend({}, opts.animOut);
|
508 |
+
$.each(opts.before, function() { opts.original.before.push(this); });
|
509 |
+
$.each(opts.after, function() { opts.original.after.push(this); });
|
510 |
+
}
|
511 |
+
|
512 |
+
function supportMultiTransitions(opts) {
|
513 |
+
var i, tx, txs = $.fn.cycle.transitions;
|
514 |
+
// look for multiple effects
|
515 |
+
if (opts.fx.indexOf(',') > 0) {
|
516 |
+
opts.multiFx = true;
|
517 |
+
opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
|
518 |
+
// discard any bogus effect names
|
519 |
+
for (i=0; i < opts.fxs.length; i++) {
|
520 |
+
var fx = opts.fxs[i];
|
521 |
+
tx = txs[fx];
|
522 |
+
if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
|
523 |
+
log('discarding unknown transition: ',fx);
|
524 |
+
opts.fxs.splice(i,1);
|
525 |
+
i--;
|
526 |
+
}
|
527 |
+
}
|
528 |
+
// if we have an empty list then we threw everything away!
|
529 |
+
if (!opts.fxs.length) {
|
530 |
+
log('No valid transitions named; slideshow terminating.');
|
531 |
+
return false;
|
532 |
+
}
|
533 |
+
}
|
534 |
+
else if (opts.fx == 'all') { // auto-gen the list of transitions
|
535 |
+
opts.multiFx = true;
|
536 |
+
opts.fxs = [];
|
537 |
+
for (var p in txs) {
|
538 |
+
if (txs.hasOwnProperty(p)) {
|
539 |
+
tx = txs[p];
|
540 |
+
if (txs.hasOwnProperty(p) && $.isFunction(tx))
|
541 |
+
opts.fxs.push(p);
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
if (opts.multiFx && opts.randomizeEffects) {
|
546 |
+
// munge the fxs array to make effect selection random
|
547 |
+
var r1 = Math.floor(Math.random() * 20) + 30;
|
548 |
+
for (i = 0; i < r1; i++) {
|
549 |
+
var r2 = Math.floor(Math.random() * opts.fxs.length);
|
550 |
+
opts.fxs.push(opts.fxs.splice(r2,1)[0]);
|
551 |
+
}
|
552 |
+
debug('randomized fx sequence: ',opts.fxs);
|
553 |
+
}
|
554 |
+
return true;
|
555 |
+
}
|
556 |
+
|
557 |
+
// provide a mechanism for adding slides after the slideshow has started
|
558 |
+
function exposeAddSlide(opts, els) {
|
559 |
+
opts.addSlide = function(newSlide, prepend) {
|
560 |
+
var $s = $(newSlide), s = $s[0];
|
561 |
+
if (!opts.autostopCount)
|
562 |
+
opts.countdown++;
|
563 |
+
els[prepend?'unshift':'push'](s);
|
564 |
+
if (opts.els)
|
565 |
+
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
|
566 |
+
opts.slideCount = els.length;
|
567 |
+
|
568 |
+
// add the slide to the random map and resort
|
569 |
+
if (opts.random) {
|
570 |
+
opts.randomMap.push(opts.slideCount-1);
|
571 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
572 |
+
}
|
573 |
+
|
574 |
+
$s.css('position','absolute');
|
575 |
+
$s[prepend?'prependTo':'appendTo'](opts.$cont);
|
576 |
+
|
577 |
+
if (prepend) {
|
578 |
+
opts.currSlide++;
|
579 |
+
opts.nextSlide++;
|
580 |
+
}
|
581 |
+
|
582 |
+
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
583 |
+
clearTypeFix($s);
|
584 |
+
|
585 |
+
if (opts.fit && opts.width)
|
586 |
+
$s.width(opts.width);
|
587 |
+
if (opts.fit && opts.height && opts.height != 'auto')
|
588 |
+
$s.height(opts.height);
|
589 |
+
s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
|
590 |
+
s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
|
591 |
+
|
592 |
+
$s.css(opts.cssBefore);
|
593 |
+
|
594 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
595 |
+
$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
|
596 |
+
|
597 |
+
if ($.isFunction(opts.onAddSlide))
|
598 |
+
opts.onAddSlide($s);
|
599 |
+
else
|
600 |
+
$s.hide(); // default behavior
|
601 |
+
};
|
602 |
+
}
|
603 |
+
|
604 |
+
// reset internal state; we do this on every pass in order to support multiple effects
|
605 |
+
$.fn.cycle.resetState = function(opts, fx) {
|
606 |
+
fx = fx || opts.fx;
|
607 |
+
opts.before = []; opts.after = [];
|
608 |
+
opts.cssBefore = $.extend({}, opts.original.cssBefore);
|
609 |
+
opts.cssAfter = $.extend({}, opts.original.cssAfter);
|
610 |
+
opts.animIn = $.extend({}, opts.original.animIn);
|
611 |
+
opts.animOut = $.extend({}, opts.original.animOut);
|
612 |
+
opts.fxFn = null;
|
613 |
+
$.each(opts.original.before, function() { opts.before.push(this); });
|
614 |
+
$.each(opts.original.after, function() { opts.after.push(this); });
|
615 |
+
|
616 |
+
// re-init
|
617 |
+
var init = $.fn.cycle.transitions[fx];
|
618 |
+
if ($.isFunction(init))
|
619 |
+
init(opts.$cont, $(opts.elements), opts);
|
620 |
+
};
|
621 |
+
|
622 |
+
// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
|
623 |
+
function go(els, opts, manual, fwd) {
|
624 |
+
var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
|
625 |
+
|
626 |
+
// opts.busy is true if we're in the middle of an animation
|
627 |
+
if (manual && opts.busy && opts.manualTrump) {
|
628 |
+
// let manual transitions requests trump active ones
|
629 |
+
debug('manualTrump in go(), stopping active transition');
|
630 |
+
$(els).stop(true,true);
|
631 |
+
opts.busy = 0;
|
632 |
+
clearTimeout(p.cycleTimeout);
|
633 |
+
}
|
634 |
+
|
635 |
+
// don't begin another timeout-based transition if there is one active
|
636 |
+
if (opts.busy) {
|
637 |
+
debug('transition active, ignoring new tx request');
|
638 |
+
return;
|
639 |
+
}
|
640 |
+
|
641 |
+
|
642 |
+
// stop cycling if we have an outstanding stop request
|
643 |
+
if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
|
644 |
+
return;
|
645 |
+
|
646 |
+
// check to see if we should stop cycling based on autostop options
|
647 |
+
if (!manual && !p.cyclePause && !opts.bounce &&
|
648 |
+
((opts.autostop && (--opts.countdown <= 0)) ||
|
649 |
+
(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
|
650 |
+
if (opts.end)
|
651 |
+
opts.end(opts);
|
652 |
+
return;
|
653 |
+
}
|
654 |
+
|
655 |
+
// if slideshow is paused, only transition on a manual trigger
|
656 |
+
var changed = false;
|
657 |
+
if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
|
658 |
+
changed = true;
|
659 |
+
var fx = opts.fx;
|
660 |
+
// keep trying to get the slide size if we don't have it yet
|
661 |
+
curr.cycleH = curr.cycleH || $(curr).height();
|
662 |
+
curr.cycleW = curr.cycleW || $(curr).width();
|
663 |
+
next.cycleH = next.cycleH || $(next).height();
|
664 |
+
next.cycleW = next.cycleW || $(next).width();
|
665 |
+
|
666 |
+
// support multiple transition types
|
667 |
+
if (opts.multiFx) {
|
668 |
+
if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
|
669 |
+
opts.lastFx = 0;
|
670 |
+
else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
|
671 |
+
opts.lastFx = opts.fxs.length - 1;
|
672 |
+
fx = opts.fxs[opts.lastFx];
|
673 |
+
}
|
674 |
+
|
675 |
+
// one-time fx overrides apply to: $('div').cycle(3,'zoom');
|
676 |
+
if (opts.oneTimeFx) {
|
677 |
+
fx = opts.oneTimeFx;
|
678 |
+
opts.oneTimeFx = null;
|
679 |
+
}
|
680 |
+
|
681 |
+
$.fn.cycle.resetState(opts, fx);
|
682 |
+
|
683 |
+
// run the before callbacks
|
684 |
+
if (opts.before.length)
|
685 |
+
$.each(opts.before, function(i,o) {
|
686 |
+
if (p.cycleStop != opts.stopCount) return;
|
687 |
+
o.apply(next, [curr, next, opts, fwd]);
|
688 |
+
});
|
689 |
+
|
690 |
+
// stage the after callacks
|
691 |
+
var after = function() {
|
692 |
+
opts.busy = 0;
|
693 |
+
$.each(opts.after, function(i,o) {
|
694 |
+
if (p.cycleStop != opts.stopCount) return;
|
695 |
+
o.apply(next, [curr, next, opts, fwd]);
|
696 |
+
});
|
697 |
+
if (!p.cycleStop) {
|
698 |
+
// queue next transition
|
699 |
+
queueNext();
|
700 |
+
}
|
701 |
+
};
|
702 |
+
|
703 |
+
debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
|
704 |
+
|
705 |
+
// get ready to perform the transition
|
706 |
+
opts.busy = 1;
|
707 |
+
if (opts.fxFn) // fx function provided?
|
708 |
+
opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
709 |
+
else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
|
710 |
+
$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
711 |
+
else
|
712 |
+
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
713 |
+
}
|
714 |
+
else {
|
715 |
+
queueNext();
|
716 |
+
}
|
717 |
+
|
718 |
+
if (changed || opts.nextSlide == opts.currSlide) {
|
719 |
+
// calculate the next slide
|
720 |
+
var roll;
|
721 |
+
opts.lastSlide = opts.currSlide;
|
722 |
+
if (opts.random) {
|
723 |
+
opts.currSlide = opts.nextSlide;
|
724 |
+
if (++opts.randomIndex == els.length) {
|
725 |
+
opts.randomIndex = 0;
|
726 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
727 |
+
}
|
728 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
729 |
+
if (opts.nextSlide == opts.currSlide)
|
730 |
+
opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
|
731 |
+
}
|
732 |
+
else if (opts.backwards) {
|
733 |
+
roll = (opts.nextSlide - 1) < 0;
|
734 |
+
if (roll && opts.bounce) {
|
735 |
+
opts.backwards = !opts.backwards;
|
736 |
+
opts.nextSlide = 1;
|
737 |
+
opts.currSlide = 0;
|
738 |
+
}
|
739 |
+
else {
|
740 |
+
opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
|
741 |
+
opts.currSlide = roll ? 0 : opts.nextSlide+1;
|
742 |
+
}
|
743 |
+
}
|
744 |
+
else { // sequence
|
745 |
+
roll = (opts.nextSlide + 1) == els.length;
|
746 |
+
if (roll && opts.bounce) {
|
747 |
+
opts.backwards = !opts.backwards;
|
748 |
+
opts.nextSlide = els.length-2;
|
749 |
+
opts.currSlide = els.length-1;
|
750 |
+
}
|
751 |
+
else {
|
752 |
+
opts.nextSlide = roll ? 0 : opts.nextSlide+1;
|
753 |
+
opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
|
754 |
+
}
|
755 |
+
}
|
756 |
+
}
|
757 |
+
if (changed && opts.pager)
|
758 |
+
opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
|
759 |
+
|
760 |
+
function queueNext() {
|
761 |
+
// stage the next transition
|
762 |
+
var ms = 0, timeout = opts.timeout;
|
763 |
+
if (opts.timeout && !opts.continuous) {
|
764 |
+
ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
|
765 |
+
if (opts.fx == 'shuffle')
|
766 |
+
ms -= opts.speedOut;
|
767 |
+
}
|
768 |
+
else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
|
769 |
+
ms = 10;
|
770 |
+
if (ms > 0)
|
771 |
+
p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
|
772 |
+
}
|
773 |
+
}
|
774 |
+
|
775 |
+
// invoked after transition
|
776 |
+
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
|
777 |
+
$(pager).each(function() {
|
778 |
+
$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
|
779 |
+
});
|
780 |
+
};
|
781 |
+
|
782 |
+
// calculate timeout value for current transition
|
783 |
+
function getTimeout(curr, next, opts, fwd) {
|
784 |
+
if (opts.timeoutFn) {
|
785 |
+
// call user provided calc fn
|
786 |
+
var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
|
787 |
+
while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
|
788 |
+
t += opts.speed;
|
789 |
+
debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
|
790 |
+
if (t !== false)
|
791 |
+
return t;
|
792 |
+
}
|
793 |
+
return opts.timeout;
|
794 |
+
}
|
795 |
+
|
796 |
+
// expose next/prev function, caller must pass in state
|
797 |
+
$.fn.cycle.next = function(opts) { advance(opts,1); };
|
798 |
+
$.fn.cycle.prev = function(opts) { advance(opts,0);};
|
799 |
+
|
800 |
+
// advance slide forward or back
|
801 |
+
function advance(opts, moveForward) {
|
802 |
+
var val = moveForward ? 1 : -1;
|
803 |
+
var els = opts.elements;
|
804 |
+
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
805 |
+
if (timeout) {
|
806 |
+
clearTimeout(timeout);
|
807 |
+
p.cycleTimeout = 0;
|
808 |
+
}
|
809 |
+
if (opts.random && val < 0) {
|
810 |
+
// move back to the previously display slide
|
811 |
+
opts.randomIndex--;
|
812 |
+
if (--opts.randomIndex == -2)
|
813 |
+
opts.randomIndex = els.length-2;
|
814 |
+
else if (opts.randomIndex == -1)
|
815 |
+
opts.randomIndex = els.length-1;
|
816 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
817 |
+
}
|
818 |
+
else if (opts.random) {
|
819 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
820 |
+
}
|
821 |
+
else {
|
822 |
+
opts.nextSlide = opts.currSlide + val;
|
823 |
+
if (opts.nextSlide < 0) {
|
824 |
+
if (opts.nowrap) return false;
|
825 |
+
opts.nextSlide = els.length - 1;
|
826 |
+
}
|
827 |
+
else if (opts.nextSlide >= els.length) {
|
828 |
+
if (opts.nowrap) return false;
|
829 |
+
opts.nextSlide = 0;
|
830 |
+
}
|
831 |
+
}
|
832 |
+
|
833 |
+
var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
|
834 |
+
if ($.isFunction(cb))
|
835 |
+
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
|
836 |
+
go(els, opts, 1, moveForward);
|
837 |
+
return false;
|
838 |
+
}
|
839 |
+
|
840 |
+
function buildPager(els, opts) {
|
841 |
+
var $p = $(opts.pager);
|
842 |
+
$.each(els, function(i,o) {
|
843 |
+
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
|
844 |
+
});
|
845 |
+
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
|
846 |
+
}
|
847 |
+
|
848 |
+
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
849 |
+
var a;
|
850 |
+
if ($.isFunction(opts.pagerAnchorBuilder)) {
|
851 |
+
a = opts.pagerAnchorBuilder(i,el);
|
852 |
+
debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
|
853 |
+
}
|
854 |
+
else
|
855 |
+
a = '<a href="#">'+(i+1)+'</a>';
|
856 |
+
|
857 |
+
if (!a)
|
858 |
+
return;
|
859 |
+
var $a = $(a);
|
860 |
+
// don't reparent if anchor is in the dom
|
861 |
+
if ($a.parents('body').length === 0) {
|
862 |
+
var arr = [];
|
863 |
+
if ($p.length > 1) {
|
864 |
+
$p.each(function() {
|
865 |
+
var $clone = $a.clone(true);
|
866 |
+
$(this).append($clone);
|
867 |
+
arr.push($clone[0]);
|
868 |
+
});
|
869 |
+
$a = $(arr);
|
870 |
+
}
|
871 |
+
else {
|
872 |
+
$a.appendTo($p);
|
873 |
+
}
|
874 |
+
}
|
875 |
+
|
876 |
+
opts.pagerAnchors = opts.pagerAnchors || [];
|
877 |
+
opts.pagerAnchors.push($a);
|
878 |
+
|
879 |
+
var pagerFn = function(e) {
|
880 |
+
e.preventDefault();
|
881 |
+
opts.nextSlide = i;
|
882 |
+
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
883 |
+
if (timeout) {
|
884 |
+
clearTimeout(timeout);
|
885 |
+
p.cycleTimeout = 0;
|
886 |
+
}
|
887 |
+
var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
|
888 |
+
if ($.isFunction(cb))
|
889 |
+
cb(opts.nextSlide, els[opts.nextSlide]);
|
890 |
+
go(els,opts,1,opts.currSlide < i); // trigger the trans
|
891 |
+
// return false; // <== allow bubble
|
892 |
+
};
|
893 |
+
|
894 |
+
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
|
895 |
+
$a.hover(pagerFn, function(){/* no-op */} );
|
896 |
+
}
|
897 |
+
else {
|
898 |
+
$a.bind(opts.pagerEvent, pagerFn);
|
899 |
+
}
|
900 |
+
|
901 |
+
if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
|
902 |
+
$a.bind('click.cycle', function(){return false;}); // suppress click
|
903 |
+
|
904 |
+
var cont = opts.$cont[0];
|
905 |
+
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
906 |
+
if (opts.pauseOnPagerHover) {
|
907 |
+
$a.hover(
|
908 |
+
function() {
|
909 |
+
pauseFlag = true;
|
910 |
+
cont.cyclePause++;
|
911 |
+
triggerPause(cont,true,true);
|
912 |
+
}, function() {
|
913 |
+
if (pauseFlag)
|
914 |
+
cont.cyclePause--;
|
915 |
+
triggerPause(cont,true,true);
|
916 |
+
}
|
917 |
+
);
|
918 |
+
}
|
919 |
+
};
|
920 |
+
|
921 |
+
// helper fn to calculate the number of slides between the current and the next
|
922 |
+
$.fn.cycle.hopsFromLast = function(opts, fwd) {
|
923 |
+
var hops, l = opts.lastSlide, c = opts.currSlide;
|
924 |
+
if (fwd)
|
925 |
+
hops = c > l ? c - l : opts.slideCount - l;
|
926 |
+
else
|
927 |
+
hops = c < l ? l - c : l + opts.slideCount - c;
|
928 |
+
return hops;
|
929 |
+
};
|
930 |
+
|
931 |
+
// fix clearType problems in ie6 by setting an explicit bg color
|
932 |
+
// (otherwise text slides look horrible during a fade transition)
|
933 |
+
function clearTypeFix($slides) {
|
934 |
+
debug('applying clearType background-color hack');
|
935 |
+
function hex(s) {
|
936 |
+
s = parseInt(s,10).toString(16);
|
937 |
+
return s.length < 2 ? '0'+s : s;
|
938 |
+
}
|
939 |
+
function getBg(e) {
|
940 |
+
for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
|
941 |
+
var v = $.css(e,'background-color');
|
942 |
+
if (v && v.indexOf('rgb') >= 0 ) {
|
943 |
+
var rgb = v.match(/\d+/g);
|
944 |
+
return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
|
945 |
+
}
|
946 |
+
if (v && v != 'transparent')
|
947 |
+
return v;
|
948 |
+
}
|
949 |
+
return '#ffffff';
|
950 |
+
}
|
951 |
+
$slides.each(function() { $(this).css('background-color', getBg(this)); });
|
952 |
+
}
|
953 |
+
|
954 |
+
// reset common props before the next transition
|
955 |
+
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
956 |
+
$(opts.elements).not(curr).hide();
|
957 |
+
if (typeof opts.cssBefore.opacity == 'undefined')
|
958 |
+
opts.cssBefore.opacity = 1;
|
959 |
+
opts.cssBefore.display = 'block';
|
960 |
+
if (opts.slideResize && w !== false && next.cycleW > 0)
|
961 |
+
opts.cssBefore.width = next.cycleW;
|
962 |
+
if (opts.slideResize && h !== false && next.cycleH > 0)
|
963 |
+
opts.cssBefore.height = next.cycleH;
|
964 |
+
opts.cssAfter = opts.cssAfter || {};
|
965 |
+
opts.cssAfter.display = 'none';
|
966 |
+
$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
|
967 |
+
$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
|
968 |
+
};
|
969 |
+
|
970 |
+
// the actual fn for effecting a transition
|
971 |
+
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
972 |
+
var $l = $(curr), $n = $(next);
|
973 |
+
var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
|
974 |
+
$n.css(opts.cssBefore);
|
975 |
+
if (speedOverride) {
|
976 |
+
if (typeof speedOverride == 'number')
|
977 |
+
speedIn = speedOut = speedOverride;
|
978 |
+
else
|
979 |
+
speedIn = speedOut = 1;
|
980 |
+
easeIn = easeOut = null;
|
981 |
+
}
|
982 |
+
var fn = function() {
|
983 |
+
$n.animate(opts.animIn, speedIn, easeIn, function() {
|
984 |
+
cb();
|
985 |
+
});
|
986 |
+
};
|
987 |
+
$l.animate(opts.animOut, speedOut, easeOut, function() {
|
988 |
+
$l.css(opts.cssAfter);
|
989 |
+
if (!opts.sync)
|
990 |
+
fn();
|
991 |
+
});
|
992 |
+
if (opts.sync) fn();
|
993 |
+
};
|
994 |
+
|
995 |
+
// transition definitions - only fade is defined here, transition pack defines the rest
|
996 |
+
$.fn.cycle.transitions = {
|
997 |
+
fade: function($cont, $slides, opts) {
|
998 |
+
$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
|
999 |
+
opts.before.push(function(curr,next,opts) {
|
1000 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1001 |
+
opts.cssBefore.opacity = 0;
|
1002 |
+
});
|
1003 |
+
opts.animIn = { opacity: 1 };
|
1004 |
+
opts.animOut = { opacity: 0 };
|
1005 |
+
opts.cssBefore = { top: 0, left: 0 };
|
1006 |
+
}
|
1007 |
+
};
|
1008 |
+
|
1009 |
+
$.fn.cycle.ver = function() { return ver; };
|
1010 |
+
|
1011 |
+
// override these globally if you like (they are all optional)
|
1012 |
+
$.fn.cycle.defaults = {
|
1013 |
+
activePagerClass: 'activeSlide', // class name used for the active pager link
|
1014 |
+
after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1015 |
+
allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
|
1016 |
+
animIn: null, // properties that define how the slide animates in
|
1017 |
+
animOut: null, // properties that define how the slide animates out
|
1018 |
+
aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
|
1019 |
+
autostop: 0, // true to end slideshow after X transitions (where X == slide count)
|
1020 |
+
autostopCount: 0, // number of transitions (optionally used with autostop to define X)
|
1021 |
+
backwards: false, // true to start slideshow at last slide and move backwards through the stack
|
1022 |
+
before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1023 |
+
center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
|
1024 |
+
cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
|
1025 |
+
cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
|
1026 |
+
containerResize: 1, // resize container to fit largest slide
|
1027 |
+
continuous: 0, // true to start next transition immediately after current one completes
|
1028 |
+
cssAfter: null, // properties that defined the state of the slide after transitioning out
|
1029 |
+
cssBefore: null, // properties that define the initial state of the slide before transitioning in
|
1030 |
+
delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
|
1031 |
+
easeIn: null, // easing for "in" transition
|
1032 |
+
easeOut: null, // easing for "out" transition
|
1033 |
+
easing: null, // easing method for both in and out transitions
|
1034 |
+
end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
|
1035 |
+
fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
|
1036 |
+
fit: 0, // force slides to fit container
|
1037 |
+
fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
|
1038 |
+
fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
|
1039 |
+
height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
|
1040 |
+
manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
|
1041 |
+
metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
|
1042 |
+
next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
|
1043 |
+
nowrap: 0, // true to prevent slideshow from wrapping
|
1044 |
+
onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
|
1045 |
+
onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
|
1046 |
+
pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
|
1047 |
+
pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
|
1048 |
+
pagerEvent: 'click.cycle', // name of event which drives the pager navigation
|
1049 |
+
pause: 0, // true to enable "pause on hover"
|
1050 |
+
pauseOnPagerHover: 0, // true to pause when hovering over pager link
|
1051 |
+
prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
|
1052 |
+
prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
|
1053 |
+
random: 0, // true for random, false for sequence (not applicable to shuffle fx)
|
1054 |
+
randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
|
1055 |
+
requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
|
1056 |
+
requeueTimeout: 250, // ms delay for requeue
|
1057 |
+
rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
|
1058 |
+
shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
|
1059 |
+
skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
|
1060 |
+
slideExpr: null, // expression for selecting slides (if something other than all children is required)
|
1061 |
+
slideResize: 1, // force slide width/height to fixed size before every transition
|
1062 |
+
speed: 1000, // speed of the transition (any valid fx speed value)
|
1063 |
+
speedIn: null, // speed of the 'in' transition
|
1064 |
+
speedOut: null, // speed of the 'out' transition
|
1065 |
+
startingSlide: undefined,// zero-based index of the first slide to be displayed
|
1066 |
+
sync: 1, // true if in/out transitions should occur simultaneously
|
1067 |
+
timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
|
1068 |
+
timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1069 |
+
updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
|
1070 |
+
width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
|
1071 |
+
};
|
1072 |
+
|
1073 |
+
})(jQuery);
|
1074 |
+
|
1075 |
+
|
1076 |
+
/*!
|
1077 |
+
* jQuery Cycle Plugin Transition Definitions
|
1078 |
+
* This script is a plugin for the jQuery Cycle Plugin
|
1079 |
+
* Examples and documentation at: http://malsup.com/jquery/cycle/
|
1080 |
+
* Copyright (c) 2007-2010 M. Alsup
|
1081 |
+
* Version: 2.73
|
1082 |
+
* Dual licensed under the MIT and GPL licenses:
|
1083 |
+
* http://www.opensource.org/licenses/mit-license.php
|
1084 |
+
* http://www.gnu.org/licenses/gpl.html
|
1085 |
+
*/
|
1086 |
+
(function($) {
|
1087 |
+
"use strict";
|
1088 |
+
|
1089 |
+
//
|
1090 |
+
// These functions define slide initialization and properties for the named
|
1091 |
+
// transitions. To save file size feel free to remove any of these that you
|
1092 |
+
// don't need.
|
1093 |
+
//
|
1094 |
+
$.fn.cycle.transitions.none = function($cont, $slides, opts) {
|
1095 |
+
opts.fxFn = function(curr,next,opts,after){
|
1096 |
+
$(next).show();
|
1097 |
+
$(curr).hide();
|
1098 |
+
after();
|
1099 |
+
};
|
1100 |
+
};
|
1101 |
+
|
1102 |
+
// not a cross-fade, fadeout only fades out the top slide
|
1103 |
+
$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
|
1104 |
+
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
|
1105 |
+
opts.before.push(function(curr,next,opts,w,h,rev) {
|
1106 |
+
$(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
|
1107 |
+
$(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
|
1108 |
+
});
|
1109 |
+
opts.animIn.opacity = 1;
|
1110 |
+
opts.animOut.opacity = 0;
|
1111 |
+
opts.cssBefore.opacity = 1;
|
1112 |
+
opts.cssBefore.display = 'block';
|
1113 |
+
opts.cssAfter.zIndex = 0;
|
1114 |
+
};
|
1115 |
+
|
1116 |
+
// scrollUp/Down/Left/Right
|
1117 |
+
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
|
1118 |
+
$cont.css('overflow','hidden');
|
1119 |
+
opts.before.push($.fn.cycle.commonReset);
|
1120 |
+
var h = $cont.height();
|
1121 |
+
opts.cssBefore.top = h;
|
1122 |
+
opts.cssBefore.left = 0;
|
1123 |
+
opts.cssFirst.top = 0;
|
1124 |
+
opts.animIn.top = 0;
|
1125 |
+
opts.animOut.top = -h;
|
1126 |
+
};
|
1127 |
+
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
|
1128 |
+
$cont.css('overflow','hidden');
|
1129 |
+
opts.before.push($.fn.cycle.commonReset);
|
1130 |
+
var h = $cont.height();
|
1131 |
+
opts.cssFirst.top = 0;
|
1132 |
+
opts.cssBefore.top = -h;
|
1133 |
+
opts.cssBefore.left = 0;
|
1134 |
+
opts.animIn.top = 0;
|
1135 |
+
opts.animOut.top = h;
|
1136 |
+
};
|
1137 |
+
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
|
1138 |
+
$cont.css('overflow','hidden');
|
1139 |
+
opts.before.push($.fn.cycle.commonReset);
|
1140 |
+
var w = $cont.width();
|
1141 |
+
opts.cssFirst.left = 0;
|
1142 |
+
opts.cssBefore.left = w;
|
1143 |
+
opts.cssBefore.top = 0;
|
1144 |
+
opts.animIn.left = 0;
|
1145 |
+
opts.animOut.left = 0-w;
|
1146 |
+
};
|
1147 |
+
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
|
1148 |
+
$cont.css('overflow','hidden');
|
1149 |
+
opts.before.push($.fn.cycle.commonReset);
|
1150 |
+
var w = $cont.width();
|
1151 |
+
opts.cssFirst.left = 0;
|
1152 |
+
opts.cssBefore.left = -w;
|
1153 |
+
opts.cssBefore.top = 0;
|
1154 |
+
opts.animIn.left = 0;
|
1155 |
+
opts.animOut.left = w;
|
1156 |
+
};
|
1157 |
+
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
|
1158 |
+
$cont.css('overflow','hidden').width();
|
1159 |
+
opts.before.push(function(curr, next, opts, fwd) {
|
1160 |
+
if (opts.rev)
|
1161 |
+
fwd = !fwd;
|
1162 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1163 |
+
opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
|
1164 |
+
opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
|
1165 |
+
});
|
1166 |
+
opts.cssFirst.left = 0;
|
1167 |
+
opts.cssBefore.top = 0;
|
1168 |
+
opts.animIn.left = 0;
|
1169 |
+
opts.animOut.top = 0;
|
1170 |
+
};
|
1171 |
+
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
|
1172 |
+
$cont.css('overflow','hidden');
|
1173 |
+
opts.before.push(function(curr, next, opts, fwd) {
|
1174 |
+
if (opts.rev)
|
1175 |
+
fwd = !fwd;
|
1176 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1177 |
+
opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
|
1178 |
+
opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
|
1179 |
+
});
|
1180 |
+
opts.cssFirst.top = 0;
|
1181 |
+
opts.cssBefore.left = 0;
|
1182 |
+
opts.animIn.top = 0;
|
1183 |
+
opts.animOut.left = 0;
|
1184 |
+
};
|
1185 |
+
|
1186 |
+
// slideX/slideY
|
1187 |
+
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
|
1188 |
+
opts.before.push(function(curr, next, opts) {
|
1189 |
+
$(opts.elements).not(curr).hide();
|
1190 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1191 |
+
opts.animIn.width = next.cycleW;
|
1192 |
+
});
|
1193 |
+
opts.cssBefore.left = 0;
|
1194 |
+
opts.cssBefore.top = 0;
|
1195 |
+
opts.cssBefore.width = 0;
|
1196 |
+
opts.animIn.width = 'show';
|
1197 |
+
opts.animOut.width = 0;
|
1198 |
+
};
|
1199 |
+
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
|
1200 |
+
opts.before.push(function(curr, next, opts) {
|
1201 |
+
$(opts.elements).not(curr).hide();
|
1202 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1203 |
+
opts.animIn.height = next.cycleH;
|
1204 |
+
});
|
1205 |
+
opts.cssBefore.left = 0;
|
1206 |
+
opts.cssBefore.top = 0;
|
1207 |
+
opts.cssBefore.height = 0;
|
1208 |
+
opts.animIn.height = 'show';
|
1209 |
+
opts.animOut.height = 0;
|
1210 |
+
};
|
1211 |
+
|
1212 |
+
// shuffle
|
1213 |
+
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
|
1214 |
+
var i, w = $cont.css('overflow', 'visible').width();
|
1215 |
+
$slides.css({left: 0, top: 0});
|
1216 |
+
opts.before.push(function(curr,next,opts) {
|
1217 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1218 |
+
});
|
1219 |
+
// only adjust speed once!
|
1220 |
+
if (!opts.speedAdjusted) {
|
1221 |
+
opts.speed = opts.speed / 2; // shuffle has 2 transitions
|
1222 |
+
opts.speedAdjusted = true;
|
1223 |
+
}
|
1224 |
+
opts.random = 0;
|
1225 |
+
opts.shuffle = opts.shuffle || {left:-w, top:15};
|
1226 |
+
opts.els = [];
|
1227 |
+
for (i=0; i < $slides.length; i++)
|
1228 |
+
opts.els.push($slides[i]);
|
1229 |
+
|
1230 |
+
for (i=0; i < opts.currSlide; i++)
|
1231 |
+
opts.els.push(opts.els.shift());
|
1232 |
+
|
1233 |
+
// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
|
1234 |
+
opts.fxFn = function(curr, next, opts, cb, fwd) {
|
1235 |
+
if (opts.rev)
|
1236 |
+
fwd = !fwd;
|
1237 |
+
var $el = fwd ? $(curr) : $(next);
|
1238 |
+
$(next).css(opts.cssBefore);
|
1239 |
+
var count = opts.slideCount;
|
1240 |
+
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
|
1241 |
+
var hops = $.fn.cycle.hopsFromLast(opts, fwd);
|
1242 |
+
for (var k=0; k < hops; k++) {
|
1243 |
+
if (fwd)
|
1244 |
+
opts.els.push(opts.els.shift());
|
1245 |
+
else
|
1246 |
+
opts.els.unshift(opts.els.pop());
|
1247 |
+
}
|
1248 |
+
if (fwd) {
|
1249 |
+
for (var i=0, len=opts.els.length; i < len; i++)
|
1250 |
+
$(opts.els[i]).css('z-index', len-i+count);
|
1251 |
+
}
|
1252 |
+
else {
|
1253 |
+
var z = $(curr).css('z-index');
|
1254 |
+
$el.css('z-index', parseInt(z,10)+1+count);
|
1255 |
+
}
|
1256 |
+
$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
|
1257 |
+
$(fwd ? this : curr).hide();
|
1258 |
+
if (cb) cb();
|
1259 |
+
});
|
1260 |
+
});
|
1261 |
+
};
|
1262 |
+
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1263 |
+
};
|
1264 |
+
|
1265 |
+
// turnUp/Down/Left/Right
|
1266 |
+
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
|
1267 |
+
opts.before.push(function(curr, next, opts) {
|
1268 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1269 |
+
opts.cssBefore.top = next.cycleH;
|
1270 |
+
opts.animIn.height = next.cycleH;
|
1271 |
+
opts.animOut.width = next.cycleW;
|
1272 |
+
});
|
1273 |
+
opts.cssFirst.top = 0;
|
1274 |
+
opts.cssBefore.left = 0;
|
1275 |
+
opts.cssBefore.height = 0;
|
1276 |
+
opts.animIn.top = 0;
|
1277 |
+
opts.animOut.height = 0;
|
1278 |
+
};
|
1279 |
+
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
|
1280 |
+
opts.before.push(function(curr, next, opts) {
|
1281 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1282 |
+
opts.animIn.height = next.cycleH;
|
1283 |
+
opts.animOut.top = curr.cycleH;
|
1284 |
+
});
|
1285 |
+
opts.cssFirst.top = 0;
|
1286 |
+
opts.cssBefore.left = 0;
|
1287 |
+
opts.cssBefore.top = 0;
|
1288 |
+
opts.cssBefore.height = 0;
|
1289 |
+
opts.animOut.height = 0;
|
1290 |
+
};
|
1291 |
+
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
|
1292 |
+
opts.before.push(function(curr, next, opts) {
|
1293 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1294 |
+
opts.cssBefore.left = next.cycleW;
|
1295 |
+
opts.animIn.width = next.cycleW;
|
1296 |
+
});
|
1297 |
+
opts.cssBefore.top = 0;
|
1298 |
+
opts.cssBefore.width = 0;
|
1299 |
+
opts.animIn.left = 0;
|
1300 |
+
opts.animOut.width = 0;
|
1301 |
+
};
|
1302 |
+
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
|
1303 |
+
opts.before.push(function(curr, next, opts) {
|
1304 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1305 |
+
opts.animIn.width = next.cycleW;
|
1306 |
+
opts.animOut.left = curr.cycleW;
|
1307 |
+
});
|
1308 |
+
$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
|
1309 |
+
opts.animIn.left = 0;
|
1310 |
+
opts.animOut.width = 0;
|
1311 |
+
};
|
1312 |
+
|
1313 |
+
// zoom
|
1314 |
+
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
|
1315 |
+
opts.before.push(function(curr, next, opts) {
|
1316 |
+
$.fn.cycle.commonReset(curr,next,opts,false,false,true);
|
1317 |
+
opts.cssBefore.top = next.cycleH/2;
|
1318 |
+
opts.cssBefore.left = next.cycleW/2;
|
1319 |
+
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
|
1320 |
+
$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
|
1321 |
+
});
|
1322 |
+
opts.cssFirst.top = 0;
|
1323 |
+
opts.cssFirst.left = 0;
|
1324 |
+
opts.cssBefore.width = 0;
|
1325 |
+
opts.cssBefore.height = 0;
|
1326 |
+
};
|
1327 |
+
|
1328 |
+
// fadeZoom
|
1329 |
+
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
|
1330 |
+
opts.before.push(function(curr, next, opts) {
|
1331 |
+
$.fn.cycle.commonReset(curr,next,opts,false,false);
|
1332 |
+
opts.cssBefore.left = next.cycleW/2;
|
1333 |
+
opts.cssBefore.top = next.cycleH/2;
|
1334 |
+
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
|
1335 |
+
});
|
1336 |
+
opts.cssBefore.width = 0;
|
1337 |
+
opts.cssBefore.height = 0;
|
1338 |
+
opts.animOut.opacity = 0;
|
1339 |
+
};
|
1340 |
+
|
1341 |
+
// blindX
|
1342 |
+
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
|
1343 |
+
var w = $cont.css('overflow','hidden').width();
|
1344 |
+
opts.before.push(function(curr, next, opts) {
|
1345 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1346 |
+
opts.animIn.width = next.cycleW;
|
1347 |
+
opts.animOut.left = curr.cycleW;
|
1348 |
+
});
|
1349 |
+
opts.cssBefore.left = w;
|
1350 |
+
opts.cssBefore.top = 0;
|
1351 |
+
opts.animIn.left = 0;
|
1352 |
+
opts.animOut.left = w;
|
1353 |
+
};
|
1354 |
+
// blindY
|
1355 |
+
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
|
1356 |
+
var h = $cont.css('overflow','hidden').height();
|
1357 |
+
opts.before.push(function(curr, next, opts) {
|
1358 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1359 |
+
opts.animIn.height = next.cycleH;
|
1360 |
+
opts.animOut.top = curr.cycleH;
|
1361 |
+
});
|
1362 |
+
opts.cssBefore.top = h;
|
1363 |
+
opts.cssBefore.left = 0;
|
1364 |
+
opts.animIn.top = 0;
|
1365 |
+
opts.animOut.top = h;
|
1366 |
+
};
|
1367 |
+
// blindZ
|
1368 |
+
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
|
1369 |
+
var h = $cont.css('overflow','hidden').height();
|
1370 |
+
var w = $cont.width();
|
1371 |
+
opts.before.push(function(curr, next, opts) {
|
1372 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1373 |
+
opts.animIn.height = next.cycleH;
|
1374 |
+
opts.animOut.top = curr.cycleH;
|
1375 |
+
});
|
1376 |
+
opts.cssBefore.top = h;
|
1377 |
+
opts.cssBefore.left = w;
|
1378 |
+
opts.animIn.top = 0;
|
1379 |
+
opts.animIn.left = 0;
|
1380 |
+
opts.animOut.top = h;
|
1381 |
+
opts.animOut.left = w;
|
1382 |
+
};
|
1383 |
+
|
1384 |
+
// growX - grow horizontally from centered 0 width
|
1385 |
+
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
|
1386 |
+
opts.before.push(function(curr, next, opts) {
|
1387 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1388 |
+
opts.cssBefore.left = this.cycleW/2;
|
1389 |
+
opts.animIn.left = 0;
|
1390 |
+
opts.animIn.width = this.cycleW;
|
1391 |
+
opts.animOut.left = 0;
|
1392 |
+
});
|
1393 |
+
opts.cssBefore.top = 0;
|
1394 |
+
opts.cssBefore.width = 0;
|
1395 |
+
};
|
1396 |
+
// growY - grow vertically from centered 0 height
|
1397 |
+
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
|
1398 |
+
opts.before.push(function(curr, next, opts) {
|
1399 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1400 |
+
opts.cssBefore.top = this.cycleH/2;
|
1401 |
+
opts.animIn.top = 0;
|
1402 |
+
opts.animIn.height = this.cycleH;
|
1403 |
+
opts.animOut.top = 0;
|
1404 |
+
});
|
1405 |
+
opts.cssBefore.height = 0;
|
1406 |
+
opts.cssBefore.left = 0;
|
1407 |
+
};
|
1408 |
+
|
1409 |
+
// curtainX - squeeze in both edges horizontally
|
1410 |
+
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
|
1411 |
+
opts.before.push(function(curr, next, opts) {
|
1412 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true,true);
|
1413 |
+
opts.cssBefore.left = next.cycleW/2;
|
1414 |
+
opts.animIn.left = 0;
|
1415 |
+
opts.animIn.width = this.cycleW;
|
1416 |
+
opts.animOut.left = curr.cycleW/2;
|
1417 |
+
opts.animOut.width = 0;
|
1418 |
+
});
|
1419 |
+
opts.cssBefore.top = 0;
|
1420 |
+
opts.cssBefore.width = 0;
|
1421 |
+
};
|
1422 |
+
// curtainY - squeeze in both edges vertically
|
1423 |
+
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
|
1424 |
+
opts.before.push(function(curr, next, opts) {
|
1425 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false,true);
|
1426 |
+
opts.cssBefore.top = next.cycleH/2;
|
1427 |
+
opts.animIn.top = 0;
|
1428 |
+
opts.animIn.height = next.cycleH;
|
1429 |
+
opts.animOut.top = curr.cycleH/2;
|
1430 |
+
opts.animOut.height = 0;
|
1431 |
+
});
|
1432 |
+
opts.cssBefore.height = 0;
|
1433 |
+
opts.cssBefore.left = 0;
|
1434 |
+
};
|
1435 |
+
|
1436 |
+
// cover - curr slide covered by next slide
|
1437 |
+
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
|
1438 |
+
var d = opts.direction || 'left';
|
1439 |
+
var w = $cont.css('overflow','hidden').width();
|
1440 |
+
var h = $cont.height();
|
1441 |
+
opts.before.push(function(curr, next, opts) {
|
1442 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1443 |
+
if (d == 'right')
|
1444 |
+
opts.cssBefore.left = -w;
|
1445 |
+
else if (d == 'up')
|
1446 |
+
opts.cssBefore.top = h;
|
1447 |
+
else if (d == 'down')
|
1448 |
+
opts.cssBefore.top = -h;
|
1449 |
+
else
|
1450 |
+
opts.cssBefore.left = w;
|
1451 |
+
});
|
1452 |
+
opts.animIn.left = 0;
|
1453 |
+
opts.animIn.top = 0;
|
1454 |
+
opts.cssBefore.top = 0;
|
1455 |
+
opts.cssBefore.left = 0;
|
1456 |
+
};
|
1457 |
+
|
1458 |
+
// uncover - curr slide moves off next slide
|
1459 |
+
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
|
1460 |
+
var d = opts.direction || 'left';
|
1461 |
+
var w = $cont.css('overflow','hidden').width();
|
1462 |
+
var h = $cont.height();
|
1463 |
+
opts.before.push(function(curr, next, opts) {
|
1464 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1465 |
+
if (d == 'right')
|
1466 |
+
opts.animOut.left = w;
|
1467 |
+
else if (d == 'up')
|
1468 |
+
opts.animOut.top = -h;
|
1469 |
+
else if (d == 'down')
|
1470 |
+
opts.animOut.top = h;
|
1471 |
+
else
|
1472 |
+
opts.animOut.left = -w;
|
1473 |
+
});
|
1474 |
+
opts.animIn.left = 0;
|
1475 |
+
opts.animIn.top = 0;
|
1476 |
+
opts.cssBefore.top = 0;
|
1477 |
+
opts.cssBefore.left = 0;
|
1478 |
+
};
|
1479 |
+
|
1480 |
+
// toss - move top slide and fade away
|
1481 |
+
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
|
1482 |
+
var w = $cont.css('overflow','visible').width();
|
1483 |
+
var h = $cont.height();
|
1484 |
+
opts.before.push(function(curr, next, opts) {
|
1485 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1486 |
+
// provide default toss settings if animOut not provided
|
1487 |
+
if (!opts.animOut.left && !opts.animOut.top)
|
1488 |
+
$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
|
1489 |
+
else
|
1490 |
+
opts.animOut.opacity = 0;
|
1491 |
+
});
|
1492 |
+
opts.cssBefore.left = 0;
|
1493 |
+
opts.cssBefore.top = 0;
|
1494 |
+
opts.animIn.left = 0;
|
1495 |
+
};
|
1496 |
+
|
1497 |
+
// wipe - clip animation
|
1498 |
+
$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
|
1499 |
+
var w = $cont.css('overflow','hidden').width();
|
1500 |
+
var h = $cont.height();
|
1501 |
+
opts.cssBefore = opts.cssBefore || {};
|
1502 |
+
var clip;
|
1503 |
+
if (opts.clip) {
|
1504 |
+
if (/l2r/.test(opts.clip))
|
1505 |
+
clip = 'rect(0px 0px '+h+'px 0px)';
|
1506 |
+
else if (/r2l/.test(opts.clip))
|
1507 |
+
clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
|
1508 |
+
else if (/t2b/.test(opts.clip))
|
1509 |
+
clip = 'rect(0px '+w+'px 0px 0px)';
|
1510 |
+
else if (/b2t/.test(opts.clip))
|
1511 |
+
clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
|
1512 |
+
else if (/zoom/.test(opts.clip)) {
|
1513 |
+
var top = parseInt(h/2,10);
|
1514 |
+
var left = parseInt(w/2,10);
|
1515 |
+
clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
|
1516 |
+
}
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
|
1520 |
+
|
1521 |
+
var d = opts.cssBefore.clip.match(/(\d+)/g);
|
1522 |
+
var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
|
1523 |
+
|
1524 |
+
opts.before.push(function(curr, next, opts) {
|
1525 |
+
if (curr == next) return;
|
1526 |
+
var $curr = $(curr), $next = $(next);
|
1527 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,false);
|
1528 |
+
opts.cssAfter.display = 'block';
|
1529 |
+
|
1530 |
+
var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
|
1531 |
+
(function f() {
|
1532 |
+
var tt = t ? t - parseInt(step * (t/count),10) : 0;
|
1533 |
+
var ll = l ? l - parseInt(step * (l/count),10) : 0;
|
1534 |
+
var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
|
1535 |
+
var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
|
1536 |
+
$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
|
1537 |
+
(step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
|
1538 |
+
})();
|
1539 |
+
});
|
1540 |
+
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1541 |
+
opts.animIn = { left: 0 };
|
1542 |
+
opts.animOut = { left: 0 };
|
1543 |
+
};
|
1544 |
+
|
1545 |
+
})(jQuery);
|
js/jquery.easing.1.3.js
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* $ Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
3 |
+
*
|
4 |
+
* Uses the built in easing capabilities added In $ 1.1
|
5 |
+
* to offer multiple easing options
|
6 |
+
*
|
7 |
+
* TERMS OF USE - $ Easing
|
8 |
+
*
|
9 |
+
* Open source under the BSD License.
|
10 |
+
*
|
11 |
+
* Copyright © 2008 George McGinley Smith
|
12 |
+
* All rights reserved.
|
13 |
+
*
|
14 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
15 |
+
* are permitted provided that the following conditions are met:
|
16 |
+
*
|
17 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
18 |
+
* conditions and the following disclaimer.
|
19 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
20 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
21 |
+
* provided with the distribution.
|
22 |
+
*
|
23 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
24 |
+
* or promote products derived from this software without specific prior written permission.
|
25 |
+
*
|
26 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
27 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
28 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
29 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
30 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
31 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
32 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
33 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
34 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
|
38 |
+
// t: current time, b: begInnIng value, c: change In value, d: duration
|
39 |
+
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
40 |
+
|
41 |
+
jQuery.extend( jQuery.easing,
|
42 |
+
{
|
43 |
+
def: 'easeOutQuad',
|
44 |
+
swing: function (x, t, b, c, d) {
|
45 |
+
//alert(jQuery.easing.default);
|
46 |
+
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
47 |
+
},
|
48 |
+
easeInQuad: function (x, t, b, c, d) {
|
49 |
+
return c*(t/=d)*t + b;
|
50 |
+
},
|
51 |
+
easeOutQuad: function (x, t, b, c, d) {
|
52 |
+
return -c *(t/=d)*(t-2) + b;
|
53 |
+
},
|
54 |
+
easeInOutQuad: function (x, t, b, c, d) {
|
55 |
+
if ((t/=d/2) < 1) return c/2*t*t + b;
|
56 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
57 |
+
},
|
58 |
+
easeInCubic: function (x, t, b, c, d) {
|
59 |
+
return c*(t/=d)*t*t + b;
|
60 |
+
},
|
61 |
+
easeOutCubic: function (x, t, b, c, d) {
|
62 |
+
return c*((t=t/d-1)*t*t + 1) + b;
|
63 |
+
},
|
64 |
+
easeInOutCubic: function (x, t, b, c, d) {
|
65 |
+
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
66 |
+
return c/2*((t-=2)*t*t + 2) + b;
|
67 |
+
},
|
68 |
+
easeInQuart: function (x, t, b, c, d) {
|
69 |
+
return c*(t/=d)*t*t*t + b;
|
70 |
+
},
|
71 |
+
easeOutQuart: function (x, t, b, c, d) {
|
72 |
+
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
73 |
+
},
|
74 |
+
easeInOutQuart: function (x, t, b, c, d) {
|
75 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
76 |
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
77 |
+
},
|
78 |
+
easeInQuint: function (x, t, b, c, d) {
|
79 |
+
return c*(t/=d)*t*t*t*t + b;
|
80 |
+
},
|
81 |
+
easeOutQuint: function (x, t, b, c, d) {
|
82 |
+
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
83 |
+
},
|
84 |
+
easeInOutQuint: function (x, t, b, c, d) {
|
85 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
86 |
+
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
87 |
+
},
|
88 |
+
easeInSine: function (x, t, b, c, d) {
|
89 |
+
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
90 |
+
},
|
91 |
+
easeOutSine: function (x, t, b, c, d) {
|
92 |
+
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
93 |
+
},
|
94 |
+
easeInOutSine: function (x, t, b, c, d) {
|
95 |
+
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
96 |
+
},
|
97 |
+
easeInExpo: function (x, t, b, c, d) {
|
98 |
+
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
99 |
+
},
|
100 |
+
easeOutExpo: function (x, t, b, c, d) {
|
101 |
+
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
102 |
+
},
|
103 |
+
easeInOutExpo: function (x, t, b, c, d) {
|
104 |
+
if (t==0) return b;
|
105 |
+
if (t==d) return b+c;
|
106 |
+
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
107 |
+
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
108 |
+
},
|
109 |
+
easeInCirc: function (x, t, b, c, d) {
|
110 |
+
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
111 |
+
},
|
112 |
+
easeOutCirc: function (x, t, b, c, d) {
|
113 |
+
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
114 |
+
},
|
115 |
+
easeInOutCirc: function (x, t, b, c, d) {
|
116 |
+
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
117 |
+
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
118 |
+
},
|
119 |
+
easeInElastic: function (x, t, b, c, d) {
|
120 |
+
var s=1.70158;var p=0;var a=c;
|
121 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
122 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
123 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
124 |
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
125 |
+
},
|
126 |
+
easeOutElastic: function (x, t, b, c, d) {
|
127 |
+
var s=1.70158;var p=0;var a=c;
|
128 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
129 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
130 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
131 |
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
132 |
+
},
|
133 |
+
easeInOutElastic: function (x, t, b, c, d) {
|
134 |
+
var s=1.70158;var p=0;var a=c;
|
135 |
+
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
136 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
137 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
138 |
+
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
139 |
+
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
140 |
+
},
|
141 |
+
easeInBack: function (x, t, b, c, d, s) {
|
142 |
+
if (s == undefined) s = 1.70158;
|
143 |
+
return c*(t/=d)*t*((s+1)*t - s) + b;
|
144 |
+
},
|
145 |
+
easeOutBack: function (x, t, b, c, d, s) {
|
146 |
+
if (s == undefined) s = 1.70158;
|
147 |
+
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
148 |
+
},
|
149 |
+
easeInOutBack: function (x, t, b, c, d, s) {
|
150 |
+
if (s == undefined) s = 1.70158;
|
151 |
+
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
152 |
+
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
153 |
+
},
|
154 |
+
easeInBounce: function (x, t, b, c, d) {
|
155 |
+
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
156 |
+
},
|
157 |
+
easeOutBounce: function (x, t, b, c, d) {
|
158 |
+
if ((t/=d) < (1/2.75)) {
|
159 |
+
return c*(7.5625*t*t) + b;
|
160 |
+
} else if (t < (2/2.75)) {
|
161 |
+
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
162 |
+
} else if (t < (2.5/2.75)) {
|
163 |
+
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
164 |
+
} else {
|
165 |
+
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
166 |
+
}
|
167 |
+
},
|
168 |
+
easeInOutBounce: function (x, t, b, c, d) {
|
169 |
+
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
170 |
+
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
171 |
+
}
|
172 |
+
});
|
173 |
+
|
174 |
+
/*
|
175 |
+
*
|
176 |
+
* TERMS OF USE - EASING EQUATIONS
|
177 |
+
*
|
178 |
+
* Open source under the BSD License.
|
179 |
+
*
|
180 |
+
* Copyright © 2001 Robert Penner
|
181 |
+
* All rights reserved.
|
182 |
+
*
|
183 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
184 |
+
* are permitted provided that the following conditions are met:
|
185 |
+
*
|
186 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
187 |
+
* conditions and the following disclaimer.
|
188 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
189 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
190 |
+
* provided with the distribution.
|
191 |
+
*
|
192 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
193 |
+
* or promote products derived from this software without specific prior written permission.
|
194 |
+
*
|
195 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
196 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
197 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
198 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
199 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
200 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
201 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
202 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
203 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
204 |
+
*
|
205 |
+
*/
|
readme.txt
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Advanced post slider ===
|
2 |
+
Contributors: digontoahsan
|
3 |
+
Donate link:
|
4 |
+
Tags: post slider, slider, slideshow, logo scroller, testimonial scroller, banner rotator, recent post slider, sidebar slideshow, posts, post, image slideshow
|
5 |
+
Requires at least: 3.0.1
|
6 |
+
Tested up to: 3.7
|
7 |
+
Stable tag: 1.0
|
8 |
+
License: GPLv2
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Advanced post slider is a slideshow plugin powered with three built-in templates, lots of effect, easy customizable options and many more to explore.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
Unlimited number of slideshow in a single page or post with different sets of options like post type, category, effect, navigation type.
|
16 |
+
Create slideshow with single or multiple images per slide, rotate your banner or client logo at sidebar; scroll your testimonial with custom link.
|
17 |
+
|
18 |
+
<strong>Click here for <a target="_blank" href="http://wpcue.com/plugins/advanced-post-slider/template-one-demo/">demo</a></strong>
|
19 |
+
|
20 |
+
= Key Feature =
|
21 |
+
|
22 |
+
* You can create multiple slideshow with different options at single page or post.
|
23 |
+
* Three built-in design format and each have a predefined optionset.
|
24 |
+
* You can customize this in many ways withour changing code.
|
25 |
+
* Supports post,custom post type and even page content
|
26 |
+
* Easy option for adjusting slide container width, height, background color, border and box-shadow. You can easily turn on/off border and box-shadow
|
27 |
+
* Ability to control excerpt length for each slideshow
|
28 |
+
* Cross browser compatibility
|
29 |
+
|
30 |
+
Visit <a target="_blank" href="http://www.wpcue.com/plugins/advanced-post-slider/">www.wpcue.com/</a> for more
|
31 |
+
|
32 |
+
== Installation ==
|
33 |
+
|
34 |
+
Using the WordPress dashboard
|
35 |
+
|
36 |
+
1. Login to admin panel
|
37 |
+
2. Go to Plugins
|
38 |
+
3. Select Add New
|
39 |
+
4. Search Advanced post slider
|
40 |
+
5. Select Install Now
|
41 |
+
6. Select Activate Plugin
|
42 |
+
|
43 |
+
Manual
|
44 |
+
|
45 |
+
1. Download the plugin and extract the files
|
46 |
+
2. Upload the directory "advanced-post-slider" to your wp-content/plugins/ directory
|
47 |
+
3. Activate the plugin through the 'Plugins' menu in WordPress
|
48 |
+
4. Check the "Adv. Slider" Tab created by this plugins for manage options
|
49 |
+
|
50 |
+
Use shortcode [advps-slideshow optset="optset ID"] at admin panel post/page edit screen where optset ID is the id of the option set. You will get the id of optoin set at the top right corner of each option set from admin panel.
|
51 |
+
|
52 |
+
Use WordPress function "do_shortcode" for use in template or theme PHP file.
|
53 |
+
`<?php echo do_shortcode( '[advps-slideshow optset="1"]' ); ?>`
|
54 |
+
|
55 |
+
Watch this <a href="https://www.youtube.com/watch?v=5OcqO8Wmrhs" target="_blank">video</a> for installation and quick overview.
|
56 |
+
|
57 |
+
== Frequently Asked Questions ==
|
58 |
+
|
59 |
+
= Where do I submit a question? =
|
60 |
+
|
61 |
+
Dont have any FAQ for now.
|
62 |
+
|
63 |
+
== Screenshots ==
|
64 |
+
|
65 |
+
1. Template one optionset
|
66 |
+
2. Template two optionset
|
67 |
+
3. Template three optionset
|
68 |
+
4. Thumbnail options
|
69 |
+
5. Template one sample
|
70 |
+
6. Template two sample
|
71 |
+
7. Template three sample
|
72 |
+
|
73 |
+
== Changelog ==
|
74 |
+
|
75 |
+
= 1.0 =
|
76 |
+
* First version.
|
77 |
+
|
78 |
+
== Upgrade Notice ==
|
79 |
+
* Current version
|
80 |
+
|
81 |
+
== Thank You ==
|
82 |
+
|
83 |
+
Thank you for trying this plugin!
|