Version Description
= Before Upgrading =
- Note the Title and Content fonts on your old Smooth Slider.
- Go to 'Settings' panel and 'Save Changes'.
- Recheck the Slider Title, Post Title and the Slider Content fonts on the Settings Panel.
Get older versions
!!IMP!! If you have highly customized Smooth Slider, Before upgrading to 2.4, save your CSS and Settings. You may lose some CSS formatting as in the new versions the slider javascript is changed and is different from previous versions.
Download this release
Release Info
Developer | internet techies |
Plugin | Smooth Slider |
Version | 2.5 |
Comparing to | |
See all releases |
Code changes from version 2.4 to 2.5
- css/admin.css +87 -57
- css/skins/default/style.css +17 -6
- css/skins/sample/style.css +36 -16
- images/Thumbs.db +0 -0
- images/banner-premium.png +0 -0
- images/elegantthemes.gif +0 -0
- images/slidervilla-728.jpg +0 -0
- images/slidervilla-ad1.jpg +0 -0
- includes/smooth-slider-functions.php +5 -3
- includes/sslider-get-the-image-functions.php +20 -12
- js/jcycle.js +195 -152
- js/jquery.bpopup.min.js +7 -0
- js/smooth.js +21 -0
- readme.txt +32 -8
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
- screenshot-8.png +0 -0
- settings/settings.php +415 -93
- settings/sliders.php +41 -62
- slider_versions/smooth_1.php +118 -52
- smooth-slider.php +219 -169
css/admin.css
CHANGED
@@ -1,84 +1,114 @@
|
|
1 |
/* CSS used for styling the Settings form */
|
|
|
|
|
|
|
|
|
2 |
form#smooth_slider_form fieldset{margin:0px 0 10px 0px;background:#eee;border:0px;padding:10px 20px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;}
|
3 |
form#smooth_slider_form legend{padding:12px 9px 19px;margin:-10px 0 0 30px;background:#efefef;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;background: #fafafa;}
|
4 |
form#smooth_slider_form legend span{font-size:100%;font-weight:bold;color:#fff;background:#444;-moz-border-radius-topleft:10px;-webkit-border-top-left-radius:10px;-moz-border-radius-topright:10px;-webkit-border-top-right-radius:10px;border-top-right-radius:10px;padding:5px 11px 0;}
|
5 |
form#smooth_slider_form{font-family:arial;font-size:100%;color:#666;}
|
6 |
form#smooth_slider_form label {}
|
7 |
-
form#smooth_slider_form input[type="text"] {
|
8 |
-
|
9 |
-
form#smooth_slider_form select
|
|
|
10 |
form#smooth_slider_form option{display:block;color:#666;}
|
11 |
-
|
12 |
-
form#smooth_slider_form input[type="checkbox"] {
|
13 |
-
form#smooth_slider_form input[type="radio"] {
|
14 |
|
15 |
input[type="text"]:disabled {opacity: .5;border:1px solid #eee !important;filter: alpha(opacity=50);}
|
16 |
|
17 |
-
form#smooth_slider_form textarea {
|
18 |
form#smooth_slider_form .faulty_field {background:#fff4f4 !important;color:#ff0000;border:1px solid #ff0000 !important;}
|
19 |
form#smooth_slider_form label span {color:#ff0000;font-size:85%;}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/*For Tooltip*/
|
22 |
-
.moreInfo {
|
23 |
-
|
24 |
-
font-
|
25 |
-
vertical-align:top;
|
26 |
-
}
|
27 |
-
.trigger{
|
28 |
-
padding:0px 3px;
|
29 |
-
border:1px solid #ccc;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;
|
30 |
-
cursor:help;
|
31 |
-
border-color: #298CBA;
|
32 |
-
font-weight: bold;
|
33 |
-
color: white;
|
34 |
-
background: #21759B;
|
35 |
-
text-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0;
|
36 |
-
vertical-align:top;
|
37 |
-
}
|
38 |
-
.tooltip {
|
39 |
-
position: absolute;
|
40 |
-
top:-12px;
|
41 |
-
left:25px;
|
42 |
-
z-index:999;
|
43 |
-
width:25em;
|
44 |
-
background:#EFEBCE;
|
45 |
-
font-size:12px;
|
46 |
-
color:#333;
|
47 |
-
border:0px;padding:15px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;
|
48 |
-
display: none; /* keeps the tooltip hidden if no JS available */
|
49 |
-
}
|
50 |
/************************************************
|
51 |
* ui-tabs *
|
52 |
************************************************/
|
53 |
.ui-tabs { padding: .2em; zoom: 1; }
|
54 |
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
55 |
-
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border
|
56 |
-
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#
|
57 |
-
|
58 |
-
|
59 |
-
.ui-tabs .ui-tabs-nav li
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
61 |
.ui-tabs .ui-tabs-hide { display: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
/*tabs complete*/
|
63 |
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
64 |
#sldr_close {float:right;}
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
border: 3px solid #ccc;
|
71 |
-
padding: 3px;
|
72 |
-
z-index: 1000;
|
73 |
-
}
|
74 |
|
|
|
|
|
75 |
|
76 |
-
|
77 |
-
color
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
text-
|
82 |
-
}
|
83 |
-
|
84 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* CSS used for styling the Settings form */
|
2 |
+
#smooth_settings{padding-top:10px;}
|
3 |
+
h2.top_heading{font-family:'Century Gothic','Avant Garde',sans-serif;font-weight:bold;color:#00b7f3;font-size:20px;}
|
4 |
+
h2.top_heading span{color:#f07057;}
|
5 |
+
#settings_preview h2.heading{background:#f5f5f5;text-align:center;font-family:Arial,Helvetica,sans-serif;font-size:16px;font-weight:bold;letter-spacing:1px;vertical-align:middle;margin-bottom: 10px;}
|
6 |
form#smooth_slider_form fieldset{margin:0px 0 10px 0px;background:#eee;border:0px;padding:10px 20px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;}
|
7 |
form#smooth_slider_form legend{padding:12px 9px 19px;margin:-10px 0 0 30px;background:#efefef;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;background: #fafafa;}
|
8 |
form#smooth_slider_form legend span{font-size:100%;font-weight:bold;color:#fff;background:#444;-moz-border-radius-topleft:10px;-webkit-border-top-left-radius:10px;-moz-border-radius-topright:10px;-webkit-border-top-right-radius:10px;border-top-right-radius:10px;padding:5px 11px 0;}
|
9 |
form#smooth_slider_form{font-family:arial;font-size:100%;color:#666;}
|
10 |
form#smooth_slider_form label {}
|
11 |
+
form#smooth_slider_form input[type="text"] {}
|
12 |
+
form#smooth_slider_form input.regular-text{width:60%;}
|
13 |
+
form#smooth_slider_form select{width:60%;}
|
14 |
+
form#smooth_slider_form select {}
|
15 |
form#smooth_slider_form option{display:block;color:#666;}
|
16 |
+
code {word-break:break-all;}
|
17 |
+
form#smooth_slider_form input[type="checkbox"] {}
|
18 |
+
form#smooth_slider_form input[type="radio"] {}
|
19 |
|
20 |
input[type="text"]:disabled {opacity: .5;border:1px solid #eee !important;filter: alpha(opacity=50);}
|
21 |
|
22 |
+
form#smooth_slider_form textarea {padding:2px 10px;margin-bottom:10px;}
|
23 |
form#smooth_slider_form .faulty_field {background:#fff4f4 !important;color:#ff0000;border:1px solid #ff0000 !important;}
|
24 |
form#smooth_slider_form label span {color:#ff0000;font-size:85%;}
|
25 |
|
26 |
+
form#smooth_slider_form th{letter-spacing:1px;}
|
27 |
+
form#smooth_slider_form th, form#smooth_slider_form td,form#smooth_slider_form select,form#smooth_slider_form input,form#smooth_slider_form textarea{font-weight:normal;font-size:13px;}
|
28 |
+
h2.sub-heading,h3.sub-heading{font-family:Georgia,serif;font-size:16px;font-weight:normal;background: #00c0e4;
|
29 |
+
color: #fff;letter-spacing:1px;padding: 10px;margin-left:-10px;}
|
30 |
+
div.sub_settings{padding:0 0px 10px 10px;background:#fff;margin:0;}
|
31 |
+
div.sub_settings_m{padding:0 0px 10px 10px;background:#fff;margin:5px 0;}
|
32 |
+
|
33 |
+
/*Sliders Page*/
|
34 |
+
#smooth_sliders_create thead.blue,#smooth_sliders_create tfoot.blue{font-family: Georgia,serif;font-size: 16px;font-weight: normal;background: #00c0e4;color: #fff;letter-spacing: 1px;}
|
35 |
+
#smooth_sliders_create thead.blue th,#smooth_sliders_create tfoot.blue th{color:#fff;}
|
36 |
+
#smooth_sliders_create li.reorder{background: #ffffff;padding: 10px;border: 1px solid #ccc;cursor:move;}
|
37 |
+
|
38 |
/*For Tooltip*/
|
39 |
+
.moreInfo {position: relative;font-weight:bold;vertical-align:top;}
|
40 |
+
.trigger{padding:0px 3px;border:1px solid #ccc;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;cursor:help;border-color: #eac14d;font-weight: bold;color: white;background: #eac14d;vertical-align:top;display: inline-block;}
|
41 |
+
.tooltip {position: absolute;top:-12px; left:25px;z-index:999;width:25em;background:#EFEBCE;font-size:12px;color:#333;border:0px;padding:15px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;display: none; /* keeps the tooltip hidden if no JS available */ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/************************************************
|
43 |
* ui-tabs *
|
44 |
************************************************/
|
45 |
.ui-tabs { padding: .2em; zoom: 1; }
|
46 |
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
47 |
+
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border: 0 !important; margin: 0 .2em -1px 0; padding: 0; background:#585858;font-weight:normal;font-size:13px;letter-spacing:1px;}
|
48 |
+
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#ffffff;}
|
49 |
+
|
50 |
+
/*Colored Tabs*/
|
51 |
+
.ui-tabs .ui-tabs-nav li.blue{background:#00c0e4;}
|
52 |
+
.ui-tabs .ui-tabs-nav li.green{background:#25b695;}
|
53 |
+
.ui-tabs .ui-tabs-nav li.yellow{background:#eac14d;}
|
54 |
+
.ui-tabs .ui-tabs-nav li.pink{background:#e6567a;}
|
55 |
+
.ui-tabs .ui-tabs-nav li.purple{background:#cb70d7;}
|
56 |
+
.ui-tabs .ui-tabs-nav li.gray{background:#585858;}
|
57 |
+
.ui-tabs .ui-tabs-nav li.orange{background:#f07057;}
|
58 |
+
.ui-tabs .ui-tabs-nav li.black{background:#323a45;}
|
59 |
+
.ui-tabs .ui-tabs-nav li.asbestos{background:#7f8c8d;}
|
60 |
+
|
61 |
+
.ui-tabs .ui-tabs-nav li.ui-state-active { border-bottom-width: 0; background-color:#323a45;font-size:15px;font-weight:bold;font-style:italic;}
|
62 |
+
.ui-tabs .ui-tabs-nav li.ui-state-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#ffffff;}
|
63 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-state-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
64 |
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
65 |
.ui-tabs .ui-tabs-hide { display: none !important; }
|
66 |
+
|
67 |
+
/*Left Sided Tabs*/
|
68 |
+
.ui-tabs-vertical-left{padding:0;background:#f5f5f5;margin:10px 0 0 0;}
|
69 |
+
.ui-tabs-vertical-left .ui-tabs-nav { float: left; padding: 0 2px 0 0;border-right:0px;max-width:24%;margin:0;background:none;border:none;}
|
70 |
+
.ui-tabs-vertical-left .ui-tabs-nav li { float: left; clear: left; width: 100%; border-bottom-width: 1px !important; margin: 0 0 0.2em 0; white-space:normal;border-radius:none;word-break:break-all;}
|
71 |
+
.ui-tabs-vertical-left .ui-tabs-nav li a { display:block; padding:1em 10%;width:80%;}
|
72 |
+
.ui-tabs-vertical-left .ui-tabs-nav li.ui-state-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
|
73 |
+
.ui-tabs-vertical-left .ui-tabs-panel { padding: 0; float: left; width: 75%;}
|
74 |
+
.smooth_sliders_create .ui-tabs-vertical-left .ui-tabs-panel{margin-left:10px;margin-right: 15px;}
|
75 |
+
.ui-tabs-vertical-left .ui-tabs-nav li.ui-state-active { margin-right: -1px; padding-right: 1px; border-right:0px;}
|
76 |
+
.svilla_cl{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
77 |
+
.svilla_cr{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
78 |
+
|
79 |
+
/*Active tabs*/
|
80 |
+
.ui-tabs .ui-tabs-nav li.ui-state-active a:after{right: 0;border: solid transparent;content: " ";height: 0;width: 0;position: absolute; pointer-events: none;border-width: 8px;top: 50%;margin-top: -8px;border-right-color: #f1f1f1;}
|
81 |
+
|
82 |
/*tabs complete*/
|
83 |
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
84 |
#sldr_close {float:right;}
|
85 |
|
86 |
+
/*Buttons*/
|
87 |
+
.svilla_button{background:#333 !important;color:#fff !important;font-size:13px;width:100%;text-align:left;border:0 !important;padding:10px 5%;font-weight:bold;cursor:pointer;}a.svilla_button{text-decoration:none;display:block;margin-right:10px;width:100%;font-weight:bold;-webkit-box-sizing: border-box; -moz-box-sizing: border-box;box-sizing: border-box;}
|
88 |
+
.svilla_gray_button{background:#00c0e4 !important;padding:5px 5%;}a.svilla_gray_button{color:#ffffff !important; }
|
89 |
+
a.svorangebutton{background:#f07057;color:#fff !important;margin-right:10px;font-size:13px;width:100%;text-align:left;border:0 !important;font-weight:bold;cursor:pointer;text-decoration:none;display:block;font-weight:bold;-webkit-box-sizing: border-box; -moz-box-sizing: border-box;box-sizing: border-box;float:right;max-width:25%;padding:10px 0px;text-align:center;max-width:25%;}
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
/*Color Picker*/
|
92 |
+
.color-picker-wrap {position: absolute;display: none;background: #fff;border: 3px solid #ccc;padding: 3px;z-index: 1000;}
|
93 |
|
94 |
+
/*Shortcode Popup*/
|
95 |
+
#popup,#popup2,.bMulti {background-color: transparent;border-radius: 10px 10px 10px 10px;color: #111;display: none;min-width: 350px;min-height: 18%;}
|
96 |
+
.button.b-close,.button.bClose {border-radius: 7px 7px 7px 7px;box-shadow: none;font: bold 131% sans-serif;padding: 3px 6px 2px 6px;position: absolute;right: -7px;top: -7px;}
|
97 |
+
.modal_shortcode{min-height: 50px;text-align: center;background: #222222;color: #ffffff;font-size: 18px;font-weight: bold;line-height: 3em;
|
98 |
+
font-family: "Century Gothic", "Avant Garde", "Trebuchet MS", sans-serif;}
|
99 |
+
.modal_preview{text-align: center;background: #efeeee;min-height: 80px;font-size: 14px;line-height: 4em;font-weight: bold;font-family:"Century Gothic", "Avant Garde", "Trebuchet MS", sans-serif;border-bottom: 4px solid #ed4938;}
|
100 |
+
.admin_shortcode{background:#fff;}
|
101 |
+
/* Validation Error */
|
102 |
+
#smooth_slider_form input.error{border: 1px solid #D8000C; padding: 5px 0}
|
103 |
+
|
104 |
+
#poststuff .inner-sidebar {width:100%;}
|
105 |
+
#poststuff .postbox{min-width:100%;}
|
106 |
+
|
107 |
+
.frmdiv{float:left;width:70%;}
|
108 |
+
/*responsive*/
|
109 |
+
@media only screen and (min-width: 1280px) { .ui-tabs-vertical-left .ui-tabs-nav li {width:175px !important;}}
|
110 |
+
@media only screen and (min-width: 768px) and (max-width: 1279px) {.ui-tabs-vertical-left .ui-tabs-panel {width: 75%;}}
|
111 |
+
@media only screen and (max-width: 767px) { #smooth_settings,#smooth_sliders_create{width:100% !important;float:none !important;}
|
112 |
+
#poststuff{width: 100% !important;}
|
113 |
+
.frmdiv{width:100%;}
|
114 |
+
.ui-tabs-vertical-left .ui-tabs-nav {width:100%;max-width:100%;text-align:center;}.ui-tabs-vertical-left .ui-tabs-panel {width:100%;}}
|
css/skins/default/style.css
CHANGED
@@ -5,16 +5,17 @@ Website:http://www.clickonf5.org
|
|
5 |
*/
|
6 |
/*Smooth Slider specific styles*/
|
7 |
.smooth_slider_fouc .smooth_slider {display: none;}
|
8 |
-
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;
|
9 |
-
.smooth_slider{padding:0 5px;}
|
10 |
.smooth_slider .sldr_title{margin:5px 0 10px 0;}
|
11 |
.smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
|
12 |
.smooth_slider .smooth_sliderb{position:relative;}
|
13 |
-
.smooth_slider .smooth_slideri{position:absolute;}
|
|
|
14 |
.smooth_slider a{text-decoration:none !important;}
|
15 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
16 |
-
.smooth_slider p.smooth_more{margin:0;}
|
17 |
-
.smooth_slider p.smooth_more a{text-decoration:underline !important;
|
18 |
.smooth_slider p.smooth_more a:hover{text-decoration:none;}
|
19 |
|
20 |
.sldrbr{line-height:1px;}
|
@@ -34,4 +35,14 @@ Website:http://www.clickonf5.org
|
|
34 |
.smooth_slider .smooth_nav a.smooth_slider_nnav.activeSlide { font-weight:bold;background-color: #efefef ; }
|
35 |
.smooth_slider .smooth_nav a.smooth_slider_nnav:focus { outline: none; }
|
36 |
.smooth_slider .smooth_nav a.smooth_slider_inav{display:block;float:left;}
|
37 |
-
.smooth_slider .smooth_nav a.smooth_slider_bnav{background: transparent url(buttons/default/nav.png) no-repeat 0 0;margin:0 3px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
*/
|
6 |
/*Smooth Slider specific styles*/
|
7 |
.smooth_slider_fouc .smooth_slider {display: none;}
|
8 |
+
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;vertical-align:baseline;}
|
9 |
+
.smooth_slider{padding:0 5px;width:100%;}
|
10 |
.smooth_slider .sldr_title{margin:5px 0 10px 0;}
|
11 |
.smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
|
12 |
.smooth_slider .smooth_sliderb{position:relative;}
|
13 |
+
.smooth_slider .smooth_slideri{position:absolute;width:100% !important;height:auto !important;}
|
14 |
+
.smooth_slider .smooth_slider_thumbnail{position:relative;max-width:100%;}
|
15 |
.smooth_slider a{text-decoration:none !important;}
|
16 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
17 |
+
.smooth_slider p.smooth_more{margin:0;display:inline-block;}
|
18 |
+
.smooth_slider p.smooth_more a{text-decoration:underline !important;}
|
19 |
.smooth_slider p.smooth_more a:hover{text-decoration:none;}
|
20 |
|
21 |
.sldrbr{line-height:1px;}
|
35 |
.smooth_slider .smooth_nav a.smooth_slider_nnav.activeSlide { font-weight:bold;background-color: #efefef ; }
|
36 |
.smooth_slider .smooth_nav a.smooth_slider_nnav:focus { outline: none; }
|
37 |
.smooth_slider .smooth_nav a.smooth_slider_inav{display:block;float:left;}
|
38 |
+
.smooth_slider .smooth_nav a.smooth_slider_bnav{background: transparent url(buttons/default/nav.png) no-repeat 0 0;margin:0 3px;}
|
39 |
+
/* smooth Video */
|
40 |
+
.smooth_slider_eshortcode{position:relative;}
|
41 |
+
.smooth_slider video{
|
42 |
+
display: inline-block;
|
43 |
+
width: 100% !important;
|
44 |
+
}
|
45 |
+
.mejs-overlay-button{margin-top:-50px !important;}
|
46 |
+
.smooth_slider_eshortcode div.mejs-mediaelement{height:auto !important;max-width:100% !important;}
|
47 |
+
.smooth_slider_eshortcode div.mejs-inner,div.wp-video-shortcode,div.wp-video,.mejs-layers,.mejs-overlay-play{height:100% !important;max-width:100% !important;}
|
48 |
+
.wp-core-ui .button-primary{float:left;}
|
css/skins/sample/style.css
CHANGED
@@ -3,17 +3,24 @@
|
|
3 |
Author:Tejaswini
|
4 |
Website:http://www.keencodes.com/
|
5 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
.smooth_slider_fouc .smooth_slider {display: none;}
|
7 |
-
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;
|
8 |
-
.smooth_slider{padding:0 5px;}
|
9 |
.smooth_slider .sldr_title{margin:5px 0 10px 0;}
|
10 |
.smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
|
11 |
.smooth_slider .smooth_sliderb{position:relative;}
|
12 |
-
.smooth_slider .smooth_slideri{position:absolute;}
|
|
|
13 |
.smooth_slider a{text-decoration:none !important;}
|
14 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
15 |
-
.smooth_slider p.smooth_more{margin:0;}
|
16 |
-
.smooth_slider p.smooth_more a{text-decoration:underline !important;
|
17 |
.smooth_slider p.smooth_more a:hover{text-decoration:none;}
|
18 |
|
19 |
.sldrbr{line-height:1px;}
|
@@ -22,14 +29,27 @@ Website:http://www.keencodes.com/
|
|
22 |
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
23 |
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
24 |
|
25 |
-
/*
|
26 |
-
|
27 |
-
.smooth_slider .
|
28 |
-
.smooth_slider .
|
29 |
-
|
30 |
-
|
31 |
-
.smooth_slider .
|
32 |
-
.smooth_slider .
|
33 |
-
.smooth_slider .
|
34 |
-
.smooth_slider .
|
35 |
-
.smooth_slider .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Author:Tejaswini
|
4 |
Website:http://www.keencodes.com/
|
5 |
*/
|
6 |
+
@charset "utf-8";
|
7 |
+
/* CSS Document
|
8 |
+
Author:Tejaswini
|
9 |
+
Website:http://www.clickonf5.org
|
10 |
+
*/
|
11 |
+
/*Smooth Slider specific styles*/
|
12 |
.smooth_slider_fouc .smooth_slider {display: none;}
|
13 |
+
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;vertical-align:baseline;}
|
14 |
+
.smooth_slider{padding:0 5px;width:100%;}
|
15 |
.smooth_slider .sldr_title{margin:5px 0 10px 0;}
|
16 |
.smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
|
17 |
.smooth_slider .smooth_sliderb{position:relative;}
|
18 |
+
.smooth_slider .smooth_slideri{position:absolute;width:100% !important;height:auto !important;}
|
19 |
+
.smooth_slider .smooth_slider_thumbnail{position:relative;max-width:100%;}
|
20 |
.smooth_slider a{text-decoration:none !important;}
|
21 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
22 |
+
.smooth_slider p.smooth_more{margin:0;display:inline-block;}
|
23 |
+
.smooth_slider p.smooth_more a{text-decoration:underline !important;}
|
24 |
.smooth_slider p.smooth_more a:hover{text-decoration:none;}
|
25 |
|
26 |
.sldrbr{line-height:1px;}
|
29 |
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
30 |
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
31 |
|
32 |
+
/*Navigation */
|
33 |
+
/* Next and Previous navigational arrows */
|
34 |
+
.smooth_slider .smooth_next {position: absolute;right: 0px;top:45%; width: 24px; height: 24px; cursor: pointer; background: transparent url(buttons/default/next.png) no-repeat 0 0;}
|
35 |
+
.smooth_slider .smooth_prev { position: absolute;left: 0px;top:45%; width: 24px; height: 24px; cursor: pointer; background: transparent url(buttons/default/prev.png) no-repeat 0 0;}
|
36 |
+
|
37 |
+
/*Navigation numbers*/
|
38 |
+
.smooth_slider .smooth_nav { position:absolute;bottom:0px;text-align:center;margin: 10px auto;}
|
39 |
+
.smooth_slider .smooth_nav a.smooth_slider_nnav { padding: 2px 6px; margin: 3px; border: 1px solid #ccc; text-align: center; text-decoration: none; font-weight:normal;}
|
40 |
+
.smooth_slider .smooth_nav a.smooth_slider_nnav.activeSlide { font-weight:bold;background-color: #efefef ; }
|
41 |
+
.smooth_slider .smooth_nav a.smooth_slider_nnav:focus { outline: none; }
|
42 |
+
.smooth_slider .smooth_nav a.smooth_slider_inav{display:block;float:left;}
|
43 |
+
.smooth_slider .smooth_nav a.smooth_slider_bnav{background: transparent url(buttons/default/nav.png) no-repeat 0 0;margin:0 3px;}
|
44 |
+
/* smooth Video */
|
45 |
+
.smooth_slider_eshortcode{position:relative;}
|
46 |
+
.smooth_slider video{
|
47 |
+
display: inline-block;
|
48 |
+
width: 100% !important;
|
49 |
+
}
|
50 |
+
.mejs-overlay-button{margin-top:-50px !important;}
|
51 |
+
.smooth_slider_eshortcode div.mejs-mediaelement{height:auto !important;max-width:100% !important;}
|
52 |
+
.smooth_slider_eshortcode div.mejs-inner,div.wp-video-shortcode,div.wp-video,.mejs-layers,.mejs-overlay-play{height:100% !important;max-width:100% !important;}
|
53 |
+
|
54 |
+
/* Add generated css here */
|
55 |
+
/**/
|
images/Thumbs.db
CHANGED
Binary file
|
images/banner-premium.png
ADDED
Binary file
|
images/elegantthemes.gif
DELETED
Binary file
|
images/slidervilla-728.jpg
DELETED
Binary file
|
images/slidervilla-ad1.jpg
DELETED
Binary file
|
includes/smooth-slider-functions.php
CHANGED
@@ -16,7 +16,7 @@ function get_smooth_slider_name($slider_id) {
|
|
16 |
global $wpdb, $table_prefix;
|
17 |
$table_name = $table_prefix.SLIDER_META;
|
18 |
$slider_obj = $wpdb->get_results("SELECT * FROM $table_name WHERE slider_id = '$slider_id'", OBJECT);
|
19 |
-
$slider_name = $slider_obj->slider_name;
|
20 |
return $slider_name;
|
21 |
}
|
22 |
function ss_get_post_sliders($post_id){
|
@@ -115,7 +115,8 @@ function smooth_slider_word_limiter( $text, $limit = 50 ) {
|
|
115 |
$dots = '';
|
116 |
}
|
117 |
for($i=0;$i<$limit;$i++){
|
118 |
-
|
|
|
119 |
}
|
120 |
if ($dots) {
|
121 |
$string = substr($string, 0, strlen($string));
|
@@ -164,4 +165,5 @@ function add_cf5_column_if_not_exist($table_name, $column_name, $create_ddl) {
|
|
164 |
}
|
165 |
return false;
|
166 |
}
|
167 |
-
|
|
16 |
global $wpdb, $table_prefix;
|
17 |
$table_name = $table_prefix.SLIDER_META;
|
18 |
$slider_obj = $wpdb->get_results("SELECT * FROM $table_name WHERE slider_id = '$slider_id'", OBJECT);
|
19 |
+
if (isset ($slider_obj[0]))$slider_name = $slider_obj[0]->slider_name;
|
20 |
return $slider_name;
|
21 |
}
|
22 |
function ss_get_post_sliders($post_id){
|
115 |
$dots = '';
|
116 |
}
|
117 |
for($i=0;$i<$limit;$i++){
|
118 |
+
if (isset ($explode[$i]))
|
119 |
+
$string .= $explode[$i]." ";
|
120 |
}
|
121 |
if ($dots) {
|
122 |
$string = substr($string, 0, strlen($string));
|
165 |
}
|
166 |
return false;
|
167 |
}
|
168 |
+
|
169 |
+
?>
|
includes/sslider-get-the-image-functions.php
CHANGED
@@ -40,13 +40,14 @@ add_theme_support( 'post-thumbnails' );
|
|
40 |
*/
|
41 |
function smooth_sslider_get_the_image( $args = array() ) {
|
42 |
global $post;
|
43 |
-
$post_id = $post->ID;
|
|
|
44 |
$permalink = get_permalink( $post_id );
|
45 |
|
46 |
/* Set the default arguments. */
|
47 |
$defaults = array(
|
48 |
'custom_key' => array( 'Thumbnail', 'thumbnail' ),
|
49 |
-
'post_id' => $
|
50 |
'attachment' => true,
|
51 |
'the_post_thumbnail' => true, // WP 2.9+ image function
|
52 |
'default_size' => false, // Deprecated 0.5 in favor of $size
|
@@ -205,7 +206,7 @@ function smooth_sslider_image_by_attachment( $args = array() ) {
|
|
205 |
|
206 |
/* Get attachments for the inputted $post_id. */
|
207 |
$attachments = get_children( array( 'post_parent' => $args['post_id'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) );
|
208 |
-
|
209 |
/* If no attachments are found, check if the post itself is an attachment and grab its image. */
|
210 |
if ( empty( $attachments ) && $args['size'] ) {
|
211 |
if ( 'attachment' == get_post_type( $args['post_id'] ) ) {
|
@@ -246,8 +247,9 @@ function smooth_sslider_image_by_scan( $args = array() ) {
|
|
246 |
preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $args['post_id'] ), $matches );
|
247 |
|
248 |
/* If there is a match for the image, return its URL. */
|
249 |
-
if ( isset( $matches )
|
250 |
-
|
|
|
251 |
|
252 |
return false;
|
253 |
}
|
@@ -305,8 +307,10 @@ function smooth_sslider_display_the_image( $args = array(), $image = false ) {
|
|
305 |
$class = join( ' ', array_unique( $classes ) );
|
306 |
|
307 |
/* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */
|
308 |
-
if ( $image['post_thumbnail_id']
|
309 |
-
|
|
|
|
|
310 |
|
311 |
/* Add the image attributes to the <img /> element. */
|
312 |
$html = '<img src="' . $image['url'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '"' . $width . $height . $style .' />';
|
@@ -321,12 +325,16 @@ function smooth_sslider_display_the_image( $args = array(), $image = false ) {
|
|
321 |
}
|
322 |
|
323 |
/* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */
|
324 |
-
if ( $image['post_thumbnail_id']
|
325 |
-
|
|
|
|
|
326 |
|
327 |
/* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */
|
328 |
-
if ( $image['post_thumbnail_id']
|
329 |
-
|
|
|
|
|
330 |
|
331 |
return $html;
|
332 |
}
|
@@ -341,4 +349,4 @@ function smooth_sslider_get_the_image_link( $deprecated = '', $deprecated_2 = ''
|
|
341 |
smooth_sslider_get_the_image();
|
342 |
}
|
343 |
|
344 |
-
?>
|
40 |
*/
|
41 |
function smooth_sslider_get_the_image( $args = array() ) {
|
42 |
global $post;
|
43 |
+
if(isset($post->ID))$post_id = $post->ID;
|
44 |
+
else $post_id = 0;
|
45 |
$permalink = get_permalink( $post_id );
|
46 |
|
47 |
/* Set the default arguments. */
|
48 |
$defaults = array(
|
49 |
'custom_key' => array( 'Thumbnail', 'thumbnail' ),
|
50 |
+
'post_id' => $post_id,
|
51 |
'attachment' => true,
|
52 |
'the_post_thumbnail' => true, // WP 2.9+ image function
|
53 |
'default_size' => false, // Deprecated 0.5 in favor of $size
|
206 |
|
207 |
/* Get attachments for the inputted $post_id. */
|
208 |
$attachments = get_children( array( 'post_parent' => $args['post_id'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) );
|
209 |
+
$i = 0;
|
210 |
/* If no attachments are found, check if the post itself is an attachment and grab its image. */
|
211 |
if ( empty( $attachments ) && $args['size'] ) {
|
212 |
if ( 'attachment' == get_post_type( $args['post_id'] ) ) {
|
247 |
preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $args['post_id'] ), $matches );
|
248 |
|
249 |
/* If there is a match for the image, return its URL. */
|
250 |
+
if ( isset( $matches ) )
|
251 |
+
if( isset($matches[1][0]) )
|
252 |
+
return array( 'url' => $matches[1][0] );
|
253 |
|
254 |
return false;
|
255 |
}
|
307 |
$class = join( ' ', array_unique( $classes ) );
|
308 |
|
309 |
/* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */
|
310 |
+
if (isset ($image['post_thumbnail_id'])) {
|
311 |
+
if ( $image['post_thumbnail_id'] )
|
312 |
+
do_action( 'begin_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size );
|
313 |
+
}
|
314 |
|
315 |
/* Add the image attributes to the <img /> element. */
|
316 |
$html = '<img src="' . $image['url'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '"' . $width . $height . $style .' />';
|
325 |
}
|
326 |
|
327 |
/* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */
|
328 |
+
if (isset ($image['post_thumbnail_id'])) {
|
329 |
+
if ( $image['post_thumbnail_id'] )
|
330 |
+
do_action( 'end_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size );
|
331 |
+
}
|
332 |
|
333 |
/* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */
|
334 |
+
if (isset ($image['post_thumbnail_id'])) {
|
335 |
+
if ( $image['post_thumbnail_id'] )
|
336 |
+
$html = apply_filters( 'post_thumbnail_html', $html, $post_id, $image['post_thumbnail_id'], $size, '' );
|
337 |
+
}
|
338 |
|
339 |
return $html;
|
340 |
}
|
349 |
smooth_sslider_get_the_image();
|
350 |
}
|
351 |
|
352 |
+
?>
|
js/jcycle.js
CHANGED
@@ -1,32 +1,29 @@
|
|
1 |
/*!
|
2 |
* jQuery Cycle Plugin (with Transition Definitions)
|
3 |
* Examples and documentation at: http://jquery.malsup.com/cycle/
|
4 |
-
* Copyright (c) 2007-
|
5 |
-
* Version:
|
6 |
* Dual licensed under the MIT and GPL licenses.
|
7 |
* http://jquery.malsup.com/license.html
|
8 |
-
* Requires: jQuery v1.
|
9 |
*/
|
10 |
-
;(function(
|
|
|
11 |
|
12 |
-
var ver = '
|
13 |
-
|
14 |
-
// if $.support is not defined (pre jQuery 1.3) add what I need
|
15 |
-
if ($.support == undefined) {
|
16 |
-
$.support = {
|
17 |
-
opacity: !($.browser.msie)
|
18 |
-
};
|
19 |
-
}
|
20 |
|
21 |
function debug(s) {
|
22 |
-
$.fn.cycle.debug
|
|
|
23 |
}
|
24 |
function log() {
|
25 |
-
|
|
|
|
|
26 |
}
|
27 |
$.expr[':'].paused = function(el) {
|
28 |
return el.cyclePause;
|
29 |
-
}
|
30 |
|
31 |
|
32 |
// the options arg can be...
|
@@ -68,20 +65,21 @@ $.fn.cycle = function(options, arg2) {
|
|
68 |
if (this.cycleTimeout)
|
69 |
clearTimeout(this.cycleTimeout);
|
70 |
this.cycleTimeout = this.cyclePause = 0;
|
|
|
71 |
|
72 |
var $cont = $(this);
|
73 |
var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
|
74 |
var els = $slides.get();
|
75 |
|
76 |
-
var opts2 = buildOptions($cont, $slides, els, opts, o);
|
77 |
-
if (opts2 === false)
|
78 |
-
return;
|
79 |
-
|
80 |
if (els.length < 2) {
|
81 |
log('terminating; too few slides: ' + els.length);
|
82 |
return;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
85 |
var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
|
86 |
|
87 |
// if it's an auto slideshow, kick it off
|
@@ -90,13 +88,15 @@ $.fn.cycle = function(options, arg2) {
|
|
90 |
if (startTime < 10)
|
91 |
startTime = 10;
|
92 |
debug('first timeout: ' + startTime);
|
93 |
-
this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime);
|
94 |
}
|
95 |
});
|
96 |
};
|
97 |
|
98 |
function triggerPause(cont, byHover, onPager) {
|
99 |
var opts = $(cont).data('cycle.opts');
|
|
|
|
|
100 |
var paused = !!cont.cyclePause;
|
101 |
if (paused && opts.paused)
|
102 |
opts.paused(cont, opts, byHover, onPager);
|
@@ -106,7 +106,7 @@ function triggerPause(cont, byHover, onPager) {
|
|
106 |
|
107 |
// process the args that were passed to the plugin fn
|
108 |
function handleArguments(cont, options, arg2) {
|
109 |
-
if (cont.cycleStop
|
110 |
cont.cycleStop = 0;
|
111 |
if (options === undefined || options === null)
|
112 |
options = {};
|
@@ -121,10 +121,11 @@ function handleArguments(cont, options, arg2) {
|
|
121 |
if (cont.cycleTimeout)
|
122 |
clearTimeout(cont.cycleTimeout);
|
123 |
cont.cycleTimeout = 0;
|
124 |
-
|
|
|
125 |
$(cont).removeData('cycle.opts');
|
126 |
if (options == 'destroy')
|
127 |
-
destroy(opts);
|
128 |
return false;
|
129 |
case 'toggle':
|
130 |
cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
|
@@ -142,16 +143,18 @@ function handleArguments(cont, options, arg2) {
|
|
142 |
return false;
|
143 |
case 'prev':
|
144 |
case 'next':
|
145 |
-
|
146 |
if (!opts) {
|
147 |
log('options not found, "prev/next" ignored');
|
148 |
return false;
|
149 |
}
|
|
|
|
|
150 |
$.fn.cycle[options](opts);
|
151 |
return false;
|
152 |
default:
|
153 |
options = { fx: options };
|
154 |
-
}
|
155 |
return options;
|
156 |
}
|
157 |
else if (options.constructor == Number) {
|
@@ -192,17 +195,17 @@ function handleArguments(cont, options, arg2) {
|
|
192 |
go(options.elements, options, 1, !options.backwards);
|
193 |
}
|
194 |
}
|
195 |
-
}
|
196 |
|
197 |
function removeFilter(el, opts) {
|
198 |
if (!$.support.opacity && opts.cleartype && el.style.filter) {
|
199 |
try { el.style.removeAttribute('filter'); }
|
200 |
catch(smother) {} // handle old opera versions
|
201 |
}
|
202 |
-
}
|
203 |
|
204 |
// unbind event handlers
|
205 |
-
function destroy(opts) {
|
206 |
if (opts.next)
|
207 |
$(opts.next).unbind(opts.prevNextEvent);
|
208 |
if (opts.prev)
|
@@ -213,12 +216,14 @@ function destroy(opts) {
|
|
213 |
this.unbind().remove();
|
214 |
});
|
215 |
opts.pagerAnchors = null;
|
|
|
216 |
if (opts.destroy) // callback
|
217 |
opts.destroy(opts);
|
218 |
-
}
|
219 |
|
220 |
// one-time initialization
|
221 |
function buildOptions($cont, $slides, els, options, o) {
|
|
|
222 |
// support metadata plugin (v1.0 and v2.0)
|
223 |
var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
|
224 |
var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
|
@@ -255,10 +260,17 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
255 |
if (opts.height && opts.height != 'auto')
|
256 |
$cont.height(opts.height);
|
257 |
|
258 |
-
if (opts.startingSlide)
|
259 |
opts.startingSlide = parseInt(opts.startingSlide,10);
|
|
|
|
|
|
|
|
|
|
|
260 |
else if (opts.backwards)
|
261 |
opts.startingSlide = els.length - 1;
|
|
|
|
|
262 |
|
263 |
// if random, mix up the slide array
|
264 |
if (opts.random) {
|
@@ -266,8 +278,18 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
266 |
for (var i = 0; i < els.length; i++)
|
267 |
opts.randomMap.push(i);
|
268 |
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
else if (opts.startingSlide >= els.length)
|
273 |
opts.startingSlide = 0; // catch bogus input
|
@@ -281,7 +303,7 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
281 |
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
|
282 |
else
|
283 |
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
|
284 |
-
$(this).css('z-index', z)
|
285 |
});
|
286 |
|
287 |
// make sure first slide is visible
|
@@ -327,17 +349,17 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
327 |
}
|
328 |
|
329 |
if (opts.center && !opts.fit && !opts.slideResize) {
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
}
|
338 |
|
339 |
// stretch container
|
340 |
-
var reshape = opts.containerResize &&
|
341 |
if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
|
342 |
var maxw = 0, maxh = 0;
|
343 |
for(var j=0; j < els.length; j++) {
|
@@ -347,23 +369,23 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
347 |
maxw = w > maxw ? w : maxw;
|
348 |
maxh = h > maxh ? h : maxh;
|
349 |
}
|
350 |
-
if (maxw > 0 && maxh > 0)
|
351 |
$cont.css({width:maxw+'px',height:maxh+'px'});
|
|
|
|
|
352 |
}
|
353 |
|
354 |
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
355 |
if (opts.pause)
|
356 |
-
$cont.
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
pauseFlag && this.cyclePause--;
|
364 |
triggerPause(cont, true);
|
365 |
-
|
366 |
-
);
|
367 |
|
368 |
if (supportMultiTransitions(opts) === false)
|
369 |
return false;
|
@@ -379,18 +401,12 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
379 |
this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
|
380 |
|
381 |
if ( $el.is('img') ) {
|
382 |
-
|
383 |
-
// an image is being downloaded and the markup did not include sizing info (height/width attributes);
|
384 |
-
// there seems to be some "default" sizes used in this situation
|
385 |
-
var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
|
386 |
-
var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
|
387 |
-
var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
|
388 |
-
var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
|
389 |
// don't requeue for images that are still loading but have a valid size
|
390 |
-
if (
|
391 |
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
|
392 |
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
|
393 |
-
setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
|
394 |
requeue = true;
|
395 |
return false; // break each loop
|
396 |
}
|
@@ -441,7 +457,7 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
441 |
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
442 |
}
|
443 |
else if (opts.backwards)
|
444 |
-
opts.nextSlide = opts.startingSlide
|
445 |
else
|
446 |
opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
|
447 |
|
@@ -465,16 +481,16 @@ function buildOptions($cont, $slides, els, options, o) {
|
|
465 |
opts.after[0].apply(e0, [e0, e0, opts, true]);
|
466 |
}
|
467 |
if (opts.next)
|
468 |
-
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});
|
469 |
if (opts.prev)
|
470 |
-
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});
|
471 |
if (opts.pager || opts.pagerAnchorBuilder)
|
472 |
buildPager(els,opts);
|
473 |
|
474 |
exposeAddSlide(opts, els);
|
475 |
|
476 |
return opts;
|
477 |
-
}
|
478 |
|
479 |
// save off original opts so we can restore after clearing state
|
480 |
function saveOriginalOpts(opts) {
|
@@ -485,7 +501,7 @@ function saveOriginalOpts(opts) {
|
|
485 |
opts.original.animOut = $.extend({}, opts.animOut);
|
486 |
$.each(opts.before, function() { opts.original.before.push(this); });
|
487 |
$.each(opts.after, function() { opts.original.after.push(this); });
|
488 |
-
}
|
489 |
|
490 |
function supportMultiTransitions(opts) {
|
491 |
var i, tx, txs = $.fn.cycle.transitions;
|
@@ -512,10 +528,12 @@ function supportMultiTransitions(opts) {
|
|
512 |
else if (opts.fx == 'all') { // auto-gen the list of transitions
|
513 |
opts.multiFx = true;
|
514 |
opts.fxs = [];
|
515 |
-
for (p in txs) {
|
516 |
-
|
517 |
-
|
518 |
-
|
|
|
|
|
519 |
}
|
520 |
}
|
521 |
if (opts.multiFx && opts.randomizeEffects) {
|
@@ -528,7 +546,7 @@ function supportMultiTransitions(opts) {
|
|
528 |
debug('randomized fx sequence: ',opts.fxs);
|
529 |
}
|
530 |
return true;
|
531 |
-
}
|
532 |
|
533 |
// provide a mechanism for adding slides after the slideshow has started
|
534 |
function exposeAddSlide(opts, els) {
|
@@ -541,6 +559,12 @@ function exposeAddSlide(opts, els) {
|
|
541 |
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
|
542 |
opts.slideCount = els.length;
|
543 |
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
$s.css('position','absolute');
|
545 |
$s[prepend?'prependTo':'appendTo'](opts.$cont);
|
546 |
|
@@ -591,20 +615,23 @@ $.fn.cycle.resetState = function(opts, fx) {
|
|
591 |
|
592 |
// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
|
593 |
function go(els, opts, manual, fwd) {
|
|
|
|
|
594 |
// opts.busy is true if we're in the middle of an animation
|
595 |
if (manual && opts.busy && opts.manualTrump) {
|
596 |
// let manual transitions requests trump active ones
|
597 |
debug('manualTrump in go(), stopping active transition');
|
598 |
$(els).stop(true,true);
|
599 |
opts.busy = 0;
|
|
|
600 |
}
|
|
|
601 |
// don't begin another timeout-based transition if there is one active
|
602 |
if (opts.busy) {
|
603 |
debug('transition active, ignoring new tx request');
|
604 |
return;
|
605 |
}
|
606 |
|
607 |
-
var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
|
608 |
|
609 |
// stop cycling if we have an outstanding stop request
|
610 |
if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
|
@@ -632,9 +659,9 @@ function go(els, opts, manual, fwd) {
|
|
632 |
|
633 |
// support multiple transition types
|
634 |
if (opts.multiFx) {
|
635 |
-
if (fwd && (opts.lastFx
|
636 |
opts.lastFx = 0;
|
637 |
-
else if (!fwd && (opts.lastFx
|
638 |
opts.lastFx = opts.fxs.length - 1;
|
639 |
fx = opts.fxs[opts.lastFx];
|
640 |
}
|
@@ -678,20 +705,26 @@ function go(els, opts, manual, fwd) {
|
|
678 |
else
|
679 |
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
680 |
}
|
|
|
|
|
|
|
681 |
|
682 |
if (changed || opts.nextSlide == opts.currSlide) {
|
683 |
// calculate the next slide
|
|
|
684 |
opts.lastSlide = opts.currSlide;
|
685 |
if (opts.random) {
|
686 |
opts.currSlide = opts.nextSlide;
|
687 |
-
if (++opts.randomIndex == els.length)
|
688 |
opts.randomIndex = 0;
|
|
|
|
|
689 |
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
690 |
if (opts.nextSlide == opts.currSlide)
|
691 |
opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
|
692 |
}
|
693 |
else if (opts.backwards) {
|
694 |
-
|
695 |
if (roll && opts.bounce) {
|
696 |
opts.backwards = !opts.backwards;
|
697 |
opts.nextSlide = 1;
|
@@ -703,7 +736,7 @@ function go(els, opts, manual, fwd) {
|
|
703 |
}
|
704 |
}
|
705 |
else { // sequence
|
706 |
-
|
707 |
if (roll && opts.bounce) {
|
708 |
opts.backwards = !opts.backwards;
|
709 |
opts.nextSlide = els.length-2;
|
@@ -729,9 +762,9 @@ function go(els, opts, manual, fwd) {
|
|
729 |
else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
|
730 |
ms = 10;
|
731 |
if (ms > 0)
|
732 |
-
p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms);
|
733 |
}
|
734 |
-
}
|
735 |
|
736 |
// invoked after transition
|
737 |
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
|
@@ -752,7 +785,7 @@ function getTimeout(curr, next, opts, fwd) {
|
|
752 |
return t;
|
753 |
}
|
754 |
return opts.timeout;
|
755 |
-
}
|
756 |
|
757 |
// expose next/prev function, caller must pass in state
|
758 |
$.fn.cycle.next = function(opts) { advance(opts,1); };
|
@@ -796,7 +829,7 @@ function advance(opts, moveForward) {
|
|
796 |
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
|
797 |
go(els, opts, 1, moveForward);
|
798 |
return false;
|
799 |
-
}
|
800 |
|
801 |
function buildPager(els, opts) {
|
802 |
var $p = $(opts.pager);
|
@@ -804,7 +837,7 @@ function buildPager(els, opts) {
|
|
804 |
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
|
805 |
});
|
806 |
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
|
807 |
-
}
|
808 |
|
809 |
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
810 |
var a;
|
@@ -850,7 +883,7 @@ $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
|
850 |
cb(opts.nextSlide, els[opts.nextSlide]);
|
851 |
go(els,opts,1,opts.currSlide < i); // trigger the trans
|
852 |
// return false; // <== allow bubble
|
853 |
-
}
|
854 |
|
855 |
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
|
856 |
$a.hover(pagerFn, function(){/* no-op */} );
|
@@ -871,7 +904,8 @@ $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
|
871 |
cont.cyclePause++;
|
872 |
triggerPause(cont,true,true);
|
873 |
}, function() {
|
874 |
-
pauseFlag
|
|
|
875 |
triggerPause(cont,true,true);
|
876 |
}
|
877 |
);
|
@@ -895,7 +929,7 @@ function clearTypeFix($slides) {
|
|
895 |
function hex(s) {
|
896 |
s = parseInt(s,10).toString(16);
|
897 |
return s.length < 2 ? '0'+s : s;
|
898 |
-
}
|
899 |
function getBg(e) {
|
900 |
for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
|
901 |
var v = $.css(e,'background-color');
|
@@ -907,9 +941,9 @@ function clearTypeFix($slides) {
|
|
907 |
return v;
|
908 |
}
|
909 |
return '#ffffff';
|
910 |
-
}
|
911 |
$slides.each(function() { $(this).css('background-color', getBg(this)); });
|
912 |
-
}
|
913 |
|
914 |
// reset common props before the next transition
|
915 |
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
@@ -930,7 +964,7 @@ $.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
|
930 |
// the actual fn for effecting a transition
|
931 |
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
932 |
var $l = $(curr), $n = $(next);
|
933 |
-
var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
|
934 |
$n.css(opts.cssBefore);
|
935 |
if (speedOverride) {
|
936 |
if (typeof speedOverride == 'number')
|
@@ -940,11 +974,11 @@ $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
|
940 |
easeIn = easeOut = null;
|
941 |
}
|
942 |
var fn = function() {
|
943 |
-
$n.animate(opts.animIn, speedIn, easeIn, function() {
|
944 |
cb();
|
945 |
});
|
946 |
};
|
947 |
-
$l.animate(opts.animOut, speedOut, easeOut, function() {
|
948 |
$l.css(opts.cssAfter);
|
949 |
if (!opts.sync)
|
950 |
fn();
|
@@ -970,64 +1004,67 @@ $.fn.cycle.ver = function() { return ver; };
|
|
970 |
|
971 |
// override these globally if you like (they are all optional)
|
972 |
$.fn.cycle.defaults = {
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
|
|
|
|
|
|
1031 |
};
|
1032 |
|
1033 |
})(jQuery);
|
@@ -1044,6 +1081,7 @@ $.fn.cycle.defaults = {
|
|
1044 |
* http://www.gnu.org/licenses/gpl.html
|
1045 |
*/
|
1046 |
(function($) {
|
|
|
1047 |
|
1048 |
//
|
1049 |
// These functions define slide initialization and properties for the named
|
@@ -1062,8 +1100,8 @@ $.fn.cycle.transitions.none = function($cont, $slides, opts) {
|
|
1062 |
$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
|
1063 |
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
|
1064 |
opts.before.push(function(curr,next,opts,w,h,rev) {
|
1065 |
-
$(curr).css('zIndex',opts.slideCount + (
|
1066 |
-
$(next).css('zIndex',opts.slideCount + (
|
1067 |
});
|
1068 |
opts.animIn.opacity = 1;
|
1069 |
opts.animOut.opacity = 0;
|
@@ -1198,8 +1236,12 @@ $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
|
|
1198 |
var count = opts.slideCount;
|
1199 |
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
|
1200 |
var hops = $.fn.cycle.hopsFromLast(opts, fwd);
|
1201 |
-
for (var k=0; k < hops; k++)
|
1202 |
-
|
|
|
|
|
|
|
|
|
1203 |
if (fwd) {
|
1204 |
for (var i=0, len=opts.els.length; i < len; i++)
|
1205 |
$(opts.els[i]).css('z-index', len-i+count);
|
@@ -1395,6 +1437,7 @@ $.fn.cycle.transitions.cover = function($cont, $slides, opts) {
|
|
1395 |
var h = $cont.height();
|
1396 |
opts.before.push(function(curr, next, opts) {
|
1397 |
$.fn.cycle.commonReset(curr,next,opts);
|
|
|
1398 |
if (d == 'right')
|
1399 |
opts.cssBefore.left = -w;
|
1400 |
else if (d == 'up')
|
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.3 (11-JUL-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.3';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
function debug(s) {
|
16 |
+
if ($.fn.cycle.debug)
|
17 |
+
log(s);
|
18 |
}
|
19 |
function log() {
|
20 |
+
/*global console */
|
21 |
+
if (window.console && console.log)
|
22 |
+
console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
|
23 |
}
|
24 |
$.expr[':'].paused = function(el) {
|
25 |
return el.cyclePause;
|
26 |
+
};
|
27 |
|
28 |
|
29 |
// the options arg can be...
|
65 |
if (this.cycleTimeout)
|
66 |
clearTimeout(this.cycleTimeout);
|
67 |
this.cycleTimeout = this.cyclePause = 0;
|
68 |
+
this.cycleStop = 0; // issue #108
|
69 |
|
70 |
var $cont = $(this);
|
71 |
var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
|
72 |
var els = $slides.get();
|
73 |
|
|
|
|
|
|
|
|
|
74 |
if (els.length < 2) {
|
75 |
log('terminating; too few slides: ' + els.length);
|
76 |
return;
|
77 |
}
|
78 |
|
79 |
+
var opts2 = buildOptions($cont, $slides, els, opts, o);
|
80 |
+
if (opts2 === false)
|
81 |
+
return;
|
82 |
+
|
83 |
var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
|
84 |
|
85 |
// if it's an auto slideshow, kick it off
|
88 |
if (startTime < 10)
|
89 |
startTime = 10;
|
90 |
debug('first timeout: ' + startTime);
|
91 |
+
this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
|
92 |
}
|
93 |
});
|
94 |
};
|
95 |
|
96 |
function triggerPause(cont, byHover, onPager) {
|
97 |
var opts = $(cont).data('cycle.opts');
|
98 |
+
if (!opts)
|
99 |
+
return;
|
100 |
var paused = !!cont.cyclePause;
|
101 |
if (paused && opts.paused)
|
102 |
opts.paused(cont, opts, byHover, onPager);
|
106 |
|
107 |
// process the args that were passed to the plugin fn
|
108 |
function handleArguments(cont, options, arg2) {
|
109 |
+
if (cont.cycleStop === undefined)
|
110 |
cont.cycleStop = 0;
|
111 |
if (options === undefined || options === null)
|
112 |
options = {};
|
121 |
if (cont.cycleTimeout)
|
122 |
clearTimeout(cont.cycleTimeout);
|
123 |
cont.cycleTimeout = 0;
|
124 |
+
if (opts.elements)
|
125 |
+
$(opts.elements).stop();
|
126 |
$(cont).removeData('cycle.opts');
|
127 |
if (options == 'destroy')
|
128 |
+
destroy(cont, opts);
|
129 |
return false;
|
130 |
case 'toggle':
|
131 |
cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
|
143 |
return false;
|
144 |
case 'prev':
|
145 |
case 'next':
|
146 |
+
opts = $(cont).data('cycle.opts');
|
147 |
if (!opts) {
|
148 |
log('options not found, "prev/next" ignored');
|
149 |
return false;
|
150 |
}
|
151 |
+
if (typeof arg2 == 'string')
|
152 |
+
opts.oneTimeFx = arg2;
|
153 |
$.fn.cycle[options](opts);
|
154 |
return false;
|
155 |
default:
|
156 |
options = { fx: options };
|
157 |
+
}
|
158 |
return options;
|
159 |
}
|
160 |
else if (options.constructor == Number) {
|
195 |
go(options.elements, options, 1, !options.backwards);
|
196 |
}
|
197 |
}
|
198 |
+
}
|
199 |
|
200 |
function removeFilter(el, opts) {
|
201 |
if (!$.support.opacity && opts.cleartype && el.style.filter) {
|
202 |
try { el.style.removeAttribute('filter'); }
|
203 |
catch(smother) {} // handle old opera versions
|
204 |
}
|
205 |
+
}
|
206 |
|
207 |
// unbind event handlers
|
208 |
+
function destroy(cont, opts) {
|
209 |
if (opts.next)
|
210 |
$(opts.next).unbind(opts.prevNextEvent);
|
211 |
if (opts.prev)
|
216 |
this.unbind().remove();
|
217 |
});
|
218 |
opts.pagerAnchors = null;
|
219 |
+
$(cont).unbind('mouseenter.cycle mouseleave.cycle');
|
220 |
if (opts.destroy) // callback
|
221 |
opts.destroy(opts);
|
222 |
+
}
|
223 |
|
224 |
// one-time initialization
|
225 |
function buildOptions($cont, $slides, els, options, o) {
|
226 |
+
var startingSlideSpecified;
|
227 |
// support metadata plugin (v1.0 and v2.0)
|
228 |
var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
|
229 |
var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
|
260 |
if (opts.height && opts.height != 'auto')
|
261 |
$cont.height(opts.height);
|
262 |
|
263 |
+
if (opts.startingSlide !== undefined) {
|
264 |
opts.startingSlide = parseInt(opts.startingSlide,10);
|
265 |
+
if (opts.startingSlide >= els.length || opts.startSlide < 0)
|
266 |
+
opts.startingSlide = 0; // catch bogus input
|
267 |
+
else
|
268 |
+
startingSlideSpecified = true;
|
269 |
+
}
|
270 |
else if (opts.backwards)
|
271 |
opts.startingSlide = els.length - 1;
|
272 |
+
else
|
273 |
+
opts.startingSlide = 0;
|
274 |
|
275 |
// if random, mix up the slide array
|
276 |
if (opts.random) {
|
278 |
for (var i = 0; i < els.length; i++)
|
279 |
opts.randomMap.push(i);
|
280 |
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
281 |
+
if (startingSlideSpecified) {
|
282 |
+
// try to find the specified starting slide and if found set start slide index in the map accordingly
|
283 |
+
for ( var cnt = 0; cnt < els.length; cnt++ ) {
|
284 |
+
if ( opts.startingSlide == opts.randomMap[cnt] ) {
|
285 |
+
opts.randomIndex = cnt;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
}
|
289 |
+
else {
|
290 |
+
opts.randomIndex = 1;
|
291 |
+
opts.startingSlide = opts.randomMap[1];
|
292 |
+
}
|
293 |
}
|
294 |
else if (opts.startingSlide >= els.length)
|
295 |
opts.startingSlide = 0; // catch bogus input
|
303 |
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
|
304 |
else
|
305 |
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
|
306 |
+
$(this).css('z-index', z);
|
307 |
});
|
308 |
|
309 |
// make sure first slide is visible
|
349 |
}
|
350 |
|
351 |
if (opts.center && !opts.fit && !opts.slideResize) {
|
352 |
+
$slides.each(function(){
|
353 |
+
var $slide = $(this);
|
354 |
+
$slide.css({
|
355 |
+
"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
|
356 |
+
"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
|
357 |
+
});
|
358 |
+
});
|
359 |
}
|
360 |
|
361 |
// stretch container
|
362 |
+
var reshape = (opts.containerResize || opts.containerResizeHeight) && $cont.innerHeight() < 1;
|
363 |
if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
|
364 |
var maxw = 0, maxh = 0;
|
365 |
for(var j=0; j < els.length; j++) {
|
369 |
maxw = w > maxw ? w : maxw;
|
370 |
maxh = h > maxh ? h : maxh;
|
371 |
}
|
372 |
+
if (opts.containerResize && maxw > 0 && maxh > 0)
|
373 |
$cont.css({width:maxw+'px',height:maxh+'px'});
|
374 |
+
if (opts.containerResizeHeight && maxh > 0)
|
375 |
+
$cont.css({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;
|
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 |
+
var loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
// don't requeue for images that are still loading but have a valid size
|
406 |
+
if (loading) {
|
407 |
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
|
408 |
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
|
409 |
+
setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
|
410 |
requeue = true;
|
411 |
return false; // break each loop
|
412 |
}
|
457 |
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
458 |
}
|
459 |
else if (opts.backwards)
|
460 |
+
opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
|
461 |
else
|
462 |
opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
|
463 |
|
481 |
opts.after[0].apply(e0, [e0, e0, opts, true]);
|
482 |
}
|
483 |
if (opts.next)
|
484 |
+
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
|
485 |
if (opts.prev)
|
486 |
+
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
|
487 |
if (opts.pager || opts.pagerAnchorBuilder)
|
488 |
buildPager(els,opts);
|
489 |
|
490 |
exposeAddSlide(opts, els);
|
491 |
|
492 |
return opts;
|
493 |
+
}
|
494 |
|
495 |
// save off original opts so we can restore after clearing state
|
496 |
function saveOriginalOpts(opts) {
|
501 |
opts.original.animOut = $.extend({}, opts.animOut);
|
502 |
$.each(opts.before, function() { opts.original.before.push(this); });
|
503 |
$.each(opts.after, function() { opts.original.after.push(this); });
|
504 |
+
}
|
505 |
|
506 |
function supportMultiTransitions(opts) {
|
507 |
var i, tx, txs = $.fn.cycle.transitions;
|
528 |
else if (opts.fx == 'all') { // auto-gen the list of transitions
|
529 |
opts.multiFx = true;
|
530 |
opts.fxs = [];
|
531 |
+
for (var p in txs) {
|
532 |
+
if (txs.hasOwnProperty(p)) {
|
533 |
+
tx = txs[p];
|
534 |
+
if (txs.hasOwnProperty(p) && $.isFunction(tx))
|
535 |
+
opts.fxs.push(p);
|
536 |
+
}
|
537 |
}
|
538 |
}
|
539 |
if (opts.multiFx && opts.randomizeEffects) {
|
546 |
debug('randomized fx sequence: ',opts.fxs);
|
547 |
}
|
548 |
return true;
|
549 |
+
}
|
550 |
|
551 |
// provide a mechanism for adding slides after the slideshow has started
|
552 |
function exposeAddSlide(opts, els) {
|
559 |
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
|
560 |
opts.slideCount = els.length;
|
561 |
|
562 |
+
// add the slide to the random map and resort
|
563 |
+
if (opts.random) {
|
564 |
+
opts.randomMap.push(opts.slideCount-1);
|
565 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
566 |
+
}
|
567 |
+
|
568 |
$s.css('position','absolute');
|
569 |
$s[prepend?'prependTo':'appendTo'](opts.$cont);
|
570 |
|
615 |
|
616 |
// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
|
617 |
function go(els, opts, manual, fwd) {
|
618 |
+
var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
|
619 |
+
|
620 |
// opts.busy is true if we're in the middle of an animation
|
621 |
if (manual && opts.busy && opts.manualTrump) {
|
622 |
// let manual transitions requests trump active ones
|
623 |
debug('manualTrump in go(), stopping active transition');
|
624 |
$(els).stop(true,true);
|
625 |
opts.busy = 0;
|
626 |
+
clearTimeout(p.cycleTimeout);
|
627 |
}
|
628 |
+
|
629 |
// don't begin another timeout-based transition if there is one active
|
630 |
if (opts.busy) {
|
631 |
debug('transition active, ignoring new tx request');
|
632 |
return;
|
633 |
}
|
634 |
|
|
|
635 |
|
636 |
// stop cycling if we have an outstanding stop request
|
637 |
if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
|
659 |
|
660 |
// support multiple transition types
|
661 |
if (opts.multiFx) {
|
662 |
+
if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
|
663 |
opts.lastFx = 0;
|
664 |
+
else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
|
665 |
opts.lastFx = opts.fxs.length - 1;
|
666 |
fx = opts.fxs[opts.lastFx];
|
667 |
}
|
705 |
else
|
706 |
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
707 |
}
|
708 |
+
else {
|
709 |
+
queueNext();
|
710 |
+
}
|
711 |
|
712 |
if (changed || opts.nextSlide == opts.currSlide) {
|
713 |
// calculate the next slide
|
714 |
+
var roll;
|
715 |
opts.lastSlide = opts.currSlide;
|
716 |
if (opts.random) {
|
717 |
opts.currSlide = opts.nextSlide;
|
718 |
+
if (++opts.randomIndex == els.length) {
|
719 |
opts.randomIndex = 0;
|
720 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
721 |
+
}
|
722 |
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
723 |
if (opts.nextSlide == opts.currSlide)
|
724 |
opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
|
725 |
}
|
726 |
else if (opts.backwards) {
|
727 |
+
roll = (opts.nextSlide - 1) < 0;
|
728 |
if (roll && opts.bounce) {
|
729 |
opts.backwards = !opts.backwards;
|
730 |
opts.nextSlide = 1;
|
736 |
}
|
737 |
}
|
738 |
else { // sequence
|
739 |
+
roll = (opts.nextSlide + 1) == els.length;
|
740 |
if (roll && opts.bounce) {
|
741 |
opts.backwards = !opts.backwards;
|
742 |
opts.nextSlide = els.length-2;
|
762 |
else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
|
763 |
ms = 10;
|
764 |
if (ms > 0)
|
765 |
+
p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
|
766 |
}
|
767 |
+
}
|
768 |
|
769 |
// invoked after transition
|
770 |
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
|
785 |
return t;
|
786 |
}
|
787 |
return opts.timeout;
|
788 |
+
}
|
789 |
|
790 |
// expose next/prev function, caller must pass in state
|
791 |
$.fn.cycle.next = function(opts) { advance(opts,1); };
|
829 |
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
|
830 |
go(els, opts, 1, moveForward);
|
831 |
return false;
|
832 |
+
}
|
833 |
|
834 |
function buildPager(els, opts) {
|
835 |
var $p = $(opts.pager);
|
837 |
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
|
838 |
});
|
839 |
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
|
840 |
+
}
|
841 |
|
842 |
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
843 |
var a;
|
883 |
cb(opts.nextSlide, els[opts.nextSlide]);
|
884 |
go(els,opts,1,opts.currSlide < i); // trigger the trans
|
885 |
// return false; // <== allow bubble
|
886 |
+
};
|
887 |
|
888 |
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
|
889 |
$a.hover(pagerFn, function(){/* no-op */} );
|
904 |
cont.cyclePause++;
|
905 |
triggerPause(cont,true,true);
|
906 |
}, function() {
|
907 |
+
if (pauseFlag)
|
908 |
+
cont.cyclePause--;
|
909 |
triggerPause(cont,true,true);
|
910 |
}
|
911 |
);
|
929 |
function hex(s) {
|
930 |
s = parseInt(s,10).toString(16);
|
931 |
return s.length < 2 ? '0'+s : s;
|
932 |
+
}
|
933 |
function getBg(e) {
|
934 |
for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
|
935 |
var v = $.css(e,'background-color');
|
941 |
return v;
|
942 |
}
|
943 |
return '#ffffff';
|
944 |
+
}
|
945 |
$slides.each(function() { $(this).css('background-color', getBg(this)); });
|
946 |
+
}
|
947 |
|
948 |
// reset common props before the next transition
|
949 |
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
964 |
// the actual fn for effecting a transition
|
965 |
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
966 |
var $l = $(curr), $n = $(next);
|
967 |
+
var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut, animInDelay = opts.animInDelay, animOutDelay = opts.animOutDelay;
|
968 |
$n.css(opts.cssBefore);
|
969 |
if (speedOverride) {
|
970 |
if (typeof speedOverride == 'number')
|
974 |
easeIn = easeOut = null;
|
975 |
}
|
976 |
var fn = function() {
|
977 |
+
$n.delay(animInDelay).animate(opts.animIn, speedIn, easeIn, function() {
|
978 |
cb();
|
979 |
});
|
980 |
};
|
981 |
+
$l.delay(animOutDelay).animate(opts.animOut, speedOut, easeOut, function() {
|
982 |
$l.css(opts.cssAfter);
|
983 |
if (!opts.sync)
|
984 |
fn();
|
1004 |
|
1005 |
// override these globally if you like (they are all optional)
|
1006 |
$.fn.cycle.defaults = {
|
1007 |
+
activePagerClass: 'activeSlide', // class name used for the active pager link
|
1008 |
+
after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1009 |
+
allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
|
1010 |
+
animIn: null, // properties that define how the slide animates in
|
1011 |
+
animInDelay: 0, // allows delay before next slide transitions in
|
1012 |
+
animOut: null, // properties that define how the slide animates out
|
1013 |
+
animOutDelay: 0, // allows delay before current slide transitions out
|
1014 |
+
aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
|
1015 |
+
autostop: 0, // true to end slideshow after X transitions (where X == slide count)
|
1016 |
+
autostopCount: 0, // number of transitions (optionally used with autostop to define X)
|
1017 |
+
backwards: false, // true to start slideshow at last slide and move backwards through the stack
|
1018 |
+
before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1019 |
+
center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
|
1020 |
+
cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
|
1021 |
+
cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
|
1022 |
+
containerResize: 1, // resize container to fit largest slide
|
1023 |
+
containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic
|
1024 |
+
continuous: 0, // true to start next transition immediately after current one completes
|
1025 |
+
cssAfter: null, // properties that defined the state of the slide after transitioning out
|
1026 |
+
cssBefore: null, // properties that define the initial state of the slide before transitioning in
|
1027 |
+
delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
|
1028 |
+
easeIn: null, // easing for "in" transition
|
1029 |
+
easeOut: null, // easing for "out" transition
|
1030 |
+
easing: null, // easing method for both in and out transitions
|
1031 |
+
end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
|
1032 |
+
fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
|
1033 |
+
fit: 0, // force slides to fit container
|
1034 |
+
fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
|
1035 |
+
fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
|
1036 |
+
height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
|
1037 |
+
manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
|
1038 |
+
metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
|
1039 |
+
next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
|
1040 |
+
nowrap: 0, // true to prevent slideshow from wrapping
|
1041 |
+
onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
|
1042 |
+
onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
|
1043 |
+
pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
|
1044 |
+
pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
|
1045 |
+
pagerEvent: 'click.cycle', // name of event which drives the pager navigation
|
1046 |
+
pause: 0, // true to enable "pause on hover"
|
1047 |
+
pauseOnPagerHover: 0, // true to pause when hovering over pager link
|
1048 |
+
prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
|
1049 |
+
prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
|
1050 |
+
random: 0, // true for random, false for sequence (not applicable to shuffle fx)
|
1051 |
+
randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
|
1052 |
+
requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
|
1053 |
+
requeueTimeout: 250, // ms delay for requeue
|
1054 |
+
rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
|
1055 |
+
shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
|
1056 |
+
skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
|
1057 |
+
slideExpr: null, // expression for selecting slides (if something other than all children is required)
|
1058 |
+
slideResize: 1, // force slide width/height to fixed size before every transition
|
1059 |
+
speed: 1000, // speed of the transition (any valid fx speed value)
|
1060 |
+
speedIn: null, // speed of the 'in' transition
|
1061 |
+
speedOut: null, // speed of the 'out' transition
|
1062 |
+
startingSlide: undefined,// zero-based index of the first slide to be displayed
|
1063 |
+
sync: 1, // true if in/out transitions should occur simultaneously
|
1064 |
+
timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
|
1065 |
+
timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1066 |
+
updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
|
1067 |
+
width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
|
1068 |
};
|
1069 |
|
1070 |
})(jQuery);
|
1081 |
* http://www.gnu.org/licenses/gpl.html
|
1082 |
*/
|
1083 |
(function($) {
|
1084 |
+
"use strict";
|
1085 |
|
1086 |
//
|
1087 |
// These functions define slide initialization and properties for the named
|
1100 |
$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
|
1101 |
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
|
1102 |
opts.before.push(function(curr,next,opts,w,h,rev) {
|
1103 |
+
$(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
|
1104 |
+
$(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
|
1105 |
});
|
1106 |
opts.animIn.opacity = 1;
|
1107 |
opts.animOut.opacity = 0;
|
1236 |
var count = opts.slideCount;
|
1237 |
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
|
1238 |
var hops = $.fn.cycle.hopsFromLast(opts, fwd);
|
1239 |
+
for (var k=0; k < hops; k++) {
|
1240 |
+
if (fwd)
|
1241 |
+
opts.els.push(opts.els.shift());
|
1242 |
+
else
|
1243 |
+
opts.els.unshift(opts.els.pop());
|
1244 |
+
}
|
1245 |
if (fwd) {
|
1246 |
for (var i=0, len=opts.els.length; i < len; i++)
|
1247 |
$(opts.els[i]).css('z-index', len-i+count);
|
1437 |
var h = $cont.height();
|
1438 |
opts.before.push(function(curr, next, opts) {
|
1439 |
$.fn.cycle.commonReset(curr,next,opts);
|
1440 |
+
opts.cssAfter.display = '';
|
1441 |
if (d == 'right')
|
1442 |
opts.cssBefore.left = -w;
|
1443 |
else if (d == 'up')
|
js/jquery.bpopup.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*================================================================================
|
2 |
+
* @name: bPopup - if you can't get it up, use bPopup
|
3 |
+
* @author: (c)Bjoern Klinggaard (twitter@bklinggaard)
|
4 |
+
* @demo: http://dinbror.dk/bpopup
|
5 |
+
* @version: 0.9.4.min
|
6 |
+
================================================================================*/
|
7 |
+
(function(b){b.fn.bPopup=function(z,F){function K(){a.contentContainer=b(a.contentContainer||c);switch(a.content){case "iframe":var h=b('<iframe class="b-iframe" '+a.iframeAttr+"></iframe>");h.appendTo(a.contentContainer);r=c.outerHeight(!0);s=c.outerWidth(!0);A();h.attr("src",a.loadUrl);k(a.loadCallback);break;case "image":A();b("<img />").load(function(){k(a.loadCallback);G(b(this))}).attr("src",a.loadUrl).hide().appendTo(a.contentContainer);break;default:A(),b('<div class="b-ajax-wrapper"></div>').load(a.loadUrl,a.loadData,function(){k(a.loadCallback);G(b(this))}).hide().appendTo(a.contentContainer)}}function A(){a.modal&&b('<div class="b-modal '+e+'"></div>').css({backgroundColor:a.modalColor,position:"fixed",top:0,right:0,bottom:0,left:0,opacity:0,zIndex:a.zIndex+t}).appendTo(a.appendTo).fadeTo(a.speed,a.opacity);D();c.data("bPopup",a).data("id",e).css({left:"slideIn"==a.transition||"slideBack"==a.transition?"slideBack"==a.transition?g.scrollLeft()+u:-1*(v+s):l(!(!a.follow[0]&&m||f)),position:a.positionStyle||"absolute",top:"slideDown"==a.transition||"slideUp"==a.transition?"slideUp"==a.transition?g.scrollTop()+w:x+-1*r:n(!(!a.follow[1]&&p||f)),"z-index":a.zIndex+t+1}).each(function(){a.appending&&b(this).appendTo(a.appendTo)});H(!0)}function q(){a.modal&&b(".b-modal."+c.data("id")).fadeTo(a.speed,0,function(){b(this).remove()});a.scrollBar||b("html").css("overflow","auto");b(".b-modal."+e).unbind("click");g.unbind("keydown."+e);d.unbind("."+e).data("bPopup",0<d.data("bPopup")-1?d.data("bPopup")-1:null);c.undelegate(".bClose, ."+a.closeClass,"click."+e,q).data("bPopup",null);H();return!1}function G(h){var b=h.width(),e=h.height(),d={};a.contentContainer.css({height:e,width:b});e>=c.height()&&(d.height=c.height());b>=c.width()&&(d.width=c.width());r=c.outerHeight(!0);s=c.outerWidth(!0);D();a.contentContainer.css({height:"auto",width:"auto"});d.left=l(!(!a.follow[0]&&m||f));d.top=n(!(!a.follow[1]&&p||f));c.animate(d,250,function(){h.show();B=E()})}function L(){d.data("bPopup",t);c.delegate(".bClose, ."+a.closeClass,"click."+e,q);a.modalClose&&b(".b-modal."+e).css("cursor","pointer").bind("click",q);M||!a.follow[0]&&!a.follow[1]||d.bind("scroll."+e,function(){B&&c.dequeue().animate({left:a.follow[0]?l(!f):"auto",top:a.follow[1]?n(!f):"auto"},a.followSpeed,a.followEasing)}).bind("resize."+e,function(){w=y.innerHeight||d.height();u=y.innerWidth||d.width();if(B=E())clearTimeout(I),I=setTimeout(function(){D();c.dequeue().each(function(){f?b(this).css({left:v,top:x}):b(this).animate({left:a.follow[0]?l(!0):"auto",top:a.follow[1]?n(!0):"auto"},a.followSpeed,a.followEasing)})},50)});a.escClose&&g.bind("keydown."+e,function(a){27==a.which&&q()})}function H(b){function d(e){c.css({display:"block",opacity:1}).animate(e,a.speed,a.easing,function(){J(b)})}switch(b?a.transition:a.transitionClose||a.transition){case "slideIn":d({left:b?l(!(!a.follow[0]&&m||f)):g.scrollLeft()-(s||c.outerWidth(!0))-C});break;case "slideBack":d({left:b?l(!(!a.follow[0]&&m||f)):g.scrollLeft()+u+C});break;case "slideDown":d({top:b?n(!(!a.follow[1]&&p||f)):g.scrollTop()-(r||c.outerHeight(!0))-C});break;case "slideUp":d({top:b?n(!(!a.follow[1]&&p||f)):g.scrollTop()+w+C});break;default:c.stop().fadeTo(a.speed,b?1:0,function(){J(b)})}}function J(b){b?(L(),k(F),a.autoClose&&setTimeout(q,a.autoClose)):(c.hide(),k(a.onClose),a.loadUrl&&(a.contentContainer.empty(),c.css({height:"auto",width:"auto"})))}function l(a){return a?v+g.scrollLeft():v}function n(a){return a?x+g.scrollTop():x}function k(a){b.isFunction(a)&&a.call(c)}function D(){x=p?a.position[1]:Math.max(0,(w-c.outerHeight(!0))/2-a.amsl);v=m?a.position[0]:(u-c.outerWidth(!0))/2;B=E()}function E(){return w>c.outerHeight(!0)&&u>c.outerWidth(!0)}b.isFunction(z)&&(F=z,z=null);var a=b.extend({},b.fn.bPopup.defaults,z);a.scrollBar||b("html").css("overflow","hidden");var c=this,g=b(document),y=window,d=b(y),w=y.innerHeight||d.height(),u=y.innerWidth||d.width(),M=/OS 6(_\d)+/i.test(navigator.userAgent),C=200,t=0,e,B,p,m,f,x,v,r,s,I;c.close=function(){a=this.data("bPopup");e="__b-popup"+d.data("bPopup")+"__";q()};return c.each(function(){b(this).data("bPopup")||(k(a.onOpen),t=(d.data("bPopup")||0)+1,e="__b-popup"+t+"__",p="auto"!==a.position[1],m="auto"!==a.position[0],f="fixed"===a.positionStyle,r=c.outerHeight(!0),s=c.outerWidth(!0),a.loadUrl?K():A())})};b.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",autoClose:!1,closeClass:"b-close",content:"ajax",contentContainer:!1,easing:"swing",escClose:!0,follow:[!0,!0],followEasing:"swing",followSpeed:500,iframeAttr:'scrolling="no" frameborder="0"',loadCallback:!1,loadData:!1,loadUrl:!1,modal:!0,modalClose:!0,modalColor:"#000",onClose:!1,onOpen:!1,opacity:0.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,speed:250,transition:"fadeIn",transitionClose:!1,zIndex:9997}})(jQuery);
|
js/smooth.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var smooth_waitForFinalEvent = (function () {
|
2 |
+
var smooth_timers = {};
|
3 |
+
return function (callback, ms, uniqueId) {
|
4 |
+
if (!uniqueId) {
|
5 |
+
uniqueId = "Don't call this twice without a uniqueId";
|
6 |
+
}
|
7 |
+
if (smooth_timers[uniqueId]) {
|
8 |
+
clearTimeout (smooth_timers[uniqueId]);
|
9 |
+
}
|
10 |
+
smooth_timers[uniqueId] = setTimeout(callback, ms);
|
11 |
+
};
|
12 |
+
})();
|
13 |
+
jQuery.fn.smoothSliderHeight=function(){
|
14 |
+
var iht=0;
|
15 |
+
jQuery(this).find(".smooth_slideri").each(function(idx,el){
|
16 |
+
if(jQuery(el).outerHeight(true)>iht)iht=jQuery(el).outerHeight(true);
|
17 |
+
});
|
18 |
+
var ht=iht + jQuery(this).find(".sldr_title").outerHeight(true) + jQuery(this).find(".smooth_nav").outerHeight(true);
|
19 |
+
jQuery(this).height(ht);
|
20 |
+
return jQuery(this);
|
21 |
+
};
|
readme.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
=== Smooth Slider ===
|
2 |
Contributors: internet techies, slidervilla
|
3 |
-
Tags:
|
4 |
Donate link: http://www.clickonf5.org/go/smooth-slider/
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
In less than 50 seconds, embed a recent posts slider using Smooth Slider. It creates a dynamic slideshow/s for featured Posts, Pages, Media Images and Custom Post Types on a WordPress site. With live preview on admin panel, one can customize the slider before implementation. At <a href="http://slidervilla.com/" rel="friend" title="SliderVilla Premium WordPress Sliders">SliderVilla</a
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
-
*
|
19 |
* Six transition effects ( Fade transition supported )
|
20 |
* Custom Slider, Category Slider and Recent Posts Slider supported ( Template tags, Shortcode and Widget available )
|
21 |
* Slider Preview in admin panel
|
@@ -125,13 +125,37 @@ Check the other FAQs on Smooth [Slider Documetation on SliderVilla](http://guide
|
|
125 |
|
126 |
== Screenshots ==
|
127 |
|
128 |
-
1. Demo of Smooth Slider
|
129 |
-
2.
|
130 |
-
3.
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
Version 2.4 (09/10/2012)
|
136 |
|
137 |
1. New: Smooth Slider now Supports Responsive Design Layout
|
1 |
=== Smooth Slider ===
|
2 |
Contributors: internet techies, slidervilla
|
3 |
+
Tags: slider, slideshow, wordpress slider, content slider, posts slider,image slider, responsive slideshow, image Rotator, jquery slider, Photo Slider, nivo slider, slider plugin, javascript slider, coin slider, responsive slider, featured-content-slider, Horizontal slider, carousel slider, wp slider, vertical slider, best slider plugin, content slideshow, javascript slideshow, slideshow manager, slideshow plugin, image slideshow, jquery slideshow, wordpress slideshow, vertical slides, responsive, nivoslider, flex slider, coinslider, carousel, post, posts, plugin, slider widget, widget slider, widget slideshow, widget, widgets, seo, wordpress seo, media, page, slide, slides
|
4 |
Donate link: http://www.clickonf5.org/go/smooth-slider/
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 2.5
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
+
Most Popular Responsive WordPress Slider for Featured Content, Videos and Media Images
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
In less than 50 seconds, embed a recent posts slider using Smooth Slider. It creates a dynamic slideshow/s for featured Posts, Pages, Media Images and Custom Post Types on a WordPress site. With live preview on admin panel, one can customize the slider before implementation. At <a href="http://slidervilla.com/" rel="friend" title="SliderVilla Premium WordPress Sliders">SliderVilla</a> , we develop only sliders and we know the requirements very well. Smooth Slider is a basic slider WordPress plugin but is capable of adding a nice carousel in no time. With shortcode, widgets and template tag, one can embed Smooth SLider anywhere in the site.
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
+
* Responsive Design
|
19 |
* Six transition effects ( Fade transition supported )
|
20 |
* Custom Slider, Category Slider and Recent Posts Slider supported ( Template tags, Shortcode and Widget available )
|
21 |
* Slider Preview in admin panel
|
125 |
|
126 |
== Screenshots ==
|
127 |
|
128 |
+
1. One Demo of Smooth Slider
|
129 |
+
2. Another demo with image in centre
|
130 |
+
3. Basic Settings Panel
|
131 |
+
4. Advance Setting options under Miscellaneous section
|
132 |
+
5. Control Live Preview Panel, Get Shortcode and Template Tag
|
133 |
+
6. Export/Import Setting Values, Get Quick Shortcode and Template Tag
|
134 |
+
7. Image auto fetch preferences, customize image width/height and other parameters
|
135 |
+
8. Drag and Drop reorder or added slides
|
136 |
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
Version 2.5 (05/30/2014)
|
141 |
+
|
142 |
+
1. New: Create Multiple Sliders from Sliders Panel
|
143 |
+
2. New: Embed videos or other items using "Embed Shortcode" new field
|
144 |
+
3. New: Show/Hide Image Thumbnail if video inserted in slide
|
145 |
+
4. New: Made 100% Responsive Slider with Fluid Design
|
146 |
+
5. New: Export/Import Settings Set (useful when implementing customized Smooth SLider from dev to live site)
|
147 |
+
6. New: Reset Setting values to Global Derfault
|
148 |
+
7. New: Preview tab to select 'Recent Post Slider', Category Slider, Custom Slider to live preview on admin panel
|
149 |
+
8. New: Shortcode and Template Tags to embed the preview slider are shown on settings panel sidebar
|
150 |
+
9. New: Clean and minimal admin panel with almost no advertisement
|
151 |
+
10. New: Easy embed shortcode pop-up on setting changes
|
152 |
+
11. New: Change the color of "Continue Reading" text
|
153 |
+
12. New: Added validations on setting fields
|
154 |
+
13. Fix: Post Meta Box fields not updating
|
155 |
+
14. Fix: Disable Suto Play was not working properly
|
156 |
+
15. Fix: Admin Panel CSS issue
|
157 |
+
16. Fix: Debug notifications
|
158 |
+
|
159 |
Version 2.4 (09/10/2012)
|
160 |
|
161 |
1. New: Smooth Slider now Supports Responsive Design Layout
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
ADDED
Binary file
|
screenshot-5.png
ADDED
Binary file
|
screenshot-6.png
ADDED
Binary file
|
screenshot-7.png
ADDED
Binary file
|
screenshot-8.png
ADDED
Binary file
|
settings/settings.php
CHANGED
@@ -6,89 +6,157 @@ if ( is_admin() ){ // admin actions
|
|
6 |
|
7 |
// function for adding settings page to wp-admin
|
8 |
function smooth_slider_settings() {
|
9 |
-
add_menu_page( 'Smooth Slider', 'Smooth Slider', 'manage_options','smooth-slider-admin', 'smooth_slider_create_multiple_sliders'
|
10 |
add_submenu_page('smooth-slider-admin', 'Smooth Sliders', 'Sliders', 'manage_options', 'smooth-slider-admin', 'smooth_slider_create_multiple_sliders');
|
11 |
add_submenu_page('smooth-slider-admin', 'Smooth Slider Settings', 'Settings', 'manage_options', 'smooth-slider-settings', 'smooth_slider_settings_page');
|
12 |
}
|
13 |
include('sliders.php');
|
14 |
// This function displays the page content for the Smooth Slider Options submenu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
function smooth_slider_settings_page() {
|
16 |
-
global $smooth_slider;
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<div class="wrap" style="clear:both;">
|
19 |
-
<h2
|
20 |
-
<
|
21 |
-
|
22 |
-
<input type="hidden" name="cmd" value="_s-xclick">
|
23 |
-
<input type="hidden" name="hosted_button_id" value="8046056">
|
24 |
-
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
25 |
-
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
26 |
-
</form>
|
27 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-admin' ) );?>
|
28 |
-
<button class="button-primary"><a style="color:#fff;text-decoration:none;" href="<?php echo $url; ?>" title="<?php _e('Go to Sliders page where you can re-order the slide posts, delete the slides from the slider etc.','smooth-slider'); ?>"><?php _e('Go to Sliders Admin','smooth-slider'); ?></a></button>
|
29 |
|
30 |
-
|
31 |
-
<div>
|
32 |
<?php
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
</div></div>
|
44 |
-
|
45 |
-
<div class="postbox">
|
46 |
-
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
47 |
-
<div class="inside">
|
48 |
-
<ul>
|
49 |
-
<li><a href="http://slidervilla.com/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
50 |
-
<li><a href="http://keencodes.com/" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
51 |
-
<li><a href="http://www.clickonf5.org" title="<?php _e('Visit Internet Techies','smooth-slider'); ?>
|
52 |
-
" ><?php _e('Plugin Parent Site','smooth-slider'); ?></a></li>
|
53 |
-
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
54 |
-
</ul>
|
55 |
-
</div>
|
56 |
-
</div>
|
57 |
-
|
58 |
-
<div class="postbox">
|
59 |
-
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
60 |
-
<div class="inside">
|
61 |
-
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fslidervilla&width=270&height=170&colorscheme=light&show_faces=true&border_color&stream=false&header=false&appId=140253496056337" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:270px; height:170px;" allowTransparency="true"></iframe>
|
62 |
-
</div>
|
63 |
-
</div>
|
64 |
-
|
65 |
-
<div class="postbox">
|
66 |
-
<h3 class="hndle"><span></span><?php _e('Recommended Themes','smooth-slider'); ?></h3>
|
67 |
-
<div class="inside">
|
68 |
-
<div style="margin:10px 5px">
|
69 |
-
<a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/elegantthemes.gif');?>" alt="Recommended WordPress Themes" /></a>
|
70 |
-
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">Elegant Themes</a> are attractive, compatible, affordable, SEO optimized WordPress Themes and have best support in community.</p>
|
71 |
-
<p><strong>Beautiful themes, Great support!</strong></p>
|
72 |
-
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">For more info visit ElegantThemes</a></p>
|
73 |
-
</div>
|
74 |
-
</div></div>
|
75 |
-
|
76 |
-
</div> <!--end of poststuff -->
|
77 |
|
|
|
78 |
<form method="post" action="options.php" id="smooth_slider_form">
|
79 |
<?php settings_fields('smooth-slider-group'); ?>
|
80 |
-
|
81 |
<div id="slider_tabs">
|
82 |
<ul class="ui-tabs">
|
83 |
-
<li style="font-weight:bold;font-size:12px;"><a href="#basic">Basic Settings</a></li>
|
84 |
-
<li style="font-weight:bold;font-size:12px;"><a href="#slides">Slides Panel</a></li>
|
85 |
-
|
86 |
-
|
87 |
</ul>
|
88 |
|
89 |
<div id="basic">
|
90 |
-
<div
|
91 |
-
<h2><?php _e('Basic Controls','smooth-slider'); ?></h2>
|
92 |
<table class="form-table">
|
93 |
|
94 |
<tr valign="top">
|
@@ -131,7 +199,7 @@ get_smooth_slider();
|
|
131 |
|
132 |
<tr valign="top">
|
133 |
<th scope="row"><?php _e('Slide Animation Length','smooth-slider'); ?></th>
|
134 |
-
<td><input type="text" name="smooth_slider_options[transition]" id="smooth_slider_transition" class="small-text" value="<?php echo $smooth_slider['transition']; ?>"
|
135 |
<span class="moreInfo">
|
136 |
<span class="trigger"> ? </span>
|
137 |
<div class="tooltip">
|
@@ -154,7 +222,7 @@ get_smooth_slider();
|
|
154 |
</tr>
|
155 |
|
156 |
<tr valign="top">
|
157 |
-
<th scope="row"><?php _e('Slider Height','smooth-slider'); ?></th>
|
158 |
<td><input type="text" name="smooth_slider_options[height]" id="smooth_slider_height" class="small-text" value="<?php echo $smooth_slider['height']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
159 |
</tr>
|
160 |
|
@@ -190,7 +258,7 @@ get_smooth_slider();
|
|
190 |
<label for="smooth_slider_goto_slide"><?php _e('Show go to slide number links or images','smooth-slider'); ?></label><br />
|
191 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', $smooth_slider['goto_slide']); ?> /> <?php _e('None ','smooth-slider'); ?><br />
|
192 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="1" <?php checked('1', $smooth_slider['goto_slide']); ?> /> <?php _e('Numbers','smooth-slider'); ?> <br />
|
193 |
-
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="2" <?php checked('2', $smooth_slider['goto_slide']); ?> /> <?php _e('Custom Images for Navigation','smooth-slider'); ?>
|
194 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="3" <?php checked('3', $smooth_slider['goto_slide']); ?> /> <?php _e('Enter Custom Text or HTML','smooth-slider'); ?>
|
195 |
<input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
|
196 |
</fieldset></td>
|
@@ -202,8 +270,8 @@ get_smooth_slider();
|
|
202 |
</p>
|
203 |
</div>
|
204 |
|
205 |
-
<div
|
206 |
-
<h2><?php _e('Miscellaneous','smooth-slider'); ?></h2>
|
207 |
|
208 |
<table class="form-table">
|
209 |
|
@@ -233,9 +301,14 @@ get_smooth_slider();
|
|
233 |
<td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
|
234 |
</tr>
|
235 |
|
|
|
|
|
|
|
|
|
|
|
236 |
<tr valign="top">
|
237 |
<th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
|
238 |
-
<td><select name="smooth_slider_options[user_level]" >
|
239 |
<option value="manage_options" <?php if ($smooth_slider['user_level'] == "manage_options"){ echo "selected";}?> ><?php _e('Administrator','smooth-slider'); ?></option>
|
240 |
<option value="edit_others_posts" <?php if ($smooth_slider['user_level'] == "edit_others_posts"){ echo "selected";}?> ><?php _e('Editor and Admininstrator','smooth-slider'); ?></option>
|
241 |
<option value="publish_posts" <?php if ($smooth_slider['user_level'] == "publish_posts"){ echo "selected";}?> ><?php _e('Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
@@ -304,7 +377,7 @@ if ($handle = opendir($directory)) {
|
|
304 |
|
305 |
<tr valign="top">
|
306 |
<th scope="row"><?php _e('Custom Styles','smooth-slider'); ?></th>
|
307 |
-
<td><textarea name="smooth_slider_options[css]" rows="5"
|
308 |
<span class="moreInfo">
|
309 |
<span class="trigger"> ? </span>
|
310 |
<div class="tooltip">
|
@@ -320,8 +393,8 @@ if ($handle = opendir($directory)) {
|
|
320 |
</div><!--#basics-->
|
321 |
|
322 |
<div id="slides">
|
323 |
-
<div
|
324 |
-
<h2><?php _e('Slider Title','smooth-slider'); ?></h2>
|
325 |
<p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
|
326 |
<table class="form-table">
|
327 |
|
@@ -389,8 +462,8 @@ if ($handle = opendir($directory)) {
|
|
389 |
</p>
|
390 |
</div>
|
391 |
|
392 |
-
<div
|
393 |
-
<h2><?php _e('Post Title','smooth-slider'); ?></h2>
|
394 |
<p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
|
395 |
<table class="form-table">
|
396 |
|
@@ -444,8 +517,8 @@ if ($handle = opendir($directory)) {
|
|
444 |
</p>
|
445 |
</div>
|
446 |
|
447 |
-
<div
|
448 |
-
<h2><?php _e('Thumbnail Image','smooth-slider'); ?></h2>
|
449 |
<p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
|
450 |
<table class="form-table">
|
451 |
|
@@ -557,8 +630,8 @@ if ($handle = opendir($directory)) {
|
|
557 |
|
558 |
</div>
|
559 |
|
560 |
-
<div
|
561 |
-
<h2><?php _e('Slider Content','smooth-slider'); ?></h2>
|
562 |
<p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
|
563 |
<table class="form-table">
|
564 |
<tr valign="top">
|
@@ -638,23 +711,84 @@ if ($handle = opendir($directory)) {
|
|
638 |
|
639 |
</div><!--#slides-->
|
640 |
|
641 |
-
<div id="
|
642 |
-
<div
|
643 |
-
<h2><?php _e('
|
644 |
|
645 |
<table class="form-table">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
646 |
<tr valign="top">
|
647 |
-
<th scope="row"><?php _e('
|
648 |
-
<td><
|
|
|
|
|
|
|
|
|
|
|
649 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
</table>
|
|
|
|
|
|
|
651 |
</div>
|
652 |
|
653 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
654 |
|
655 |
<div id="cssvalues">
|
656 |
-
<div
|
657 |
-
<h2><?php _e('CSS Generated thru these settings','thumbel-slider'); ?></h2>
|
658 |
<p><?php _e('Save Changes for the settings first and then view this data. You can use this CSS in your \'custom\' stylesheets if you use other than \'default\' value for the Stylesheet folder.','thumbel-slider'); ?></p>
|
659 |
<?php $smooth_slider_css = smooth_get_inline_css($echo='1'); ?>
|
660 |
<div style="font-family:monospace;font-size:13px;background:#ddd;">
|
@@ -668,29 +802,217 @@ if ($handle = opendir($directory)) {
|
|
668 |
.smooth_slider .smooth_slideri p.more{<?php echo $smooth_slider_css['smooth_slider_p_more'];?>} <br />
|
669 |
.smooth_slider .smooth_next{<?php echo $smooth_slider_css['smooth_next'];?>} <br />
|
670 |
.smooth_slider .smooth_prev{<?php echo $smooth_slider_css['smooth_prev'];?>}
|
|
|
|
|
671 |
</div>
|
672 |
</div>
|
673 |
</div> <!--#cssvalues-->
|
|
|
674 |
|
675 |
</div> <!--end of #slider_tabs-->
|
676 |
|
677 |
<p class="submit">
|
678 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
679 |
</p>
|
680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
</form>
|
682 |
|
683 |
-
|
684 |
-
|
685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
|
688 |
</div> <!--end of float wrap -->
|
689 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
|
691 |
<?php
|
692 |
}
|
693 |
function register_mysettings() { // whitelist options
|
694 |
register_setting( 'smooth-slider-group', 'smooth_slider_options' );
|
695 |
}
|
696 |
-
?>
|
6 |
|
7 |
// function for adding settings page to wp-admin
|
8 |
function smooth_slider_settings() {
|
9 |
+
add_menu_page( 'Smooth Slider', 'Smooth Slider', 'manage_options','smooth-slider-admin', 'smooth_slider_create_multiple_sliders');
|
10 |
add_submenu_page('smooth-slider-admin', 'Smooth Sliders', 'Sliders', 'manage_options', 'smooth-slider-admin', 'smooth_slider_create_multiple_sliders');
|
11 |
add_submenu_page('smooth-slider-admin', 'Smooth Slider Settings', 'Settings', 'manage_options', 'smooth-slider-settings', 'smooth_slider_settings_page');
|
12 |
}
|
13 |
include('sliders.php');
|
14 |
// This function displays the page content for the Smooth Slider Options submenu
|
15 |
+
function smooth_process_set_requests(){
|
16 |
+
global $smooth_slider;
|
17 |
+
//Export Settings
|
18 |
+
if(isset($_POST['export'])){
|
19 |
+
if ($_POST['export']=='Export') {
|
20 |
+
@ob_end_clean();
|
21 |
+
|
22 |
+
// required for IE, otherwise Content-Disposition may be ignored
|
23 |
+
if(ini_get('zlib.output_compression'))
|
24 |
+
ini_set('zlib.output_compression', 'Off');
|
25 |
+
|
26 |
+
header('Content-Type: ' . "text/x-csv");
|
27 |
+
header('Content-Disposition: attachment; filename="smooth-settings.csv"');
|
28 |
+
header("Content-Transfer-Encoding: binary");
|
29 |
+
header('Accept-Ranges: bytes');
|
30 |
+
|
31 |
+
/* The three lines below basically make the
|
32 |
+
download non-cacheable */
|
33 |
+
header("Cache-control: private");
|
34 |
+
header('Pragma: private');
|
35 |
+
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
36 |
+
|
37 |
+
$exportTXT='';$i=0;
|
38 |
+
$slider_options='smooth_slider_options';
|
39 |
+
$slider_curr=get_option($slider_options);
|
40 |
+
foreach($slider_curr as $key=>$value){
|
41 |
+
if($i>0) $exportTXT.="\n";
|
42 |
+
if(!is_array($value)){
|
43 |
+
$exportTXT.=$key.",".$value;
|
44 |
+
}
|
45 |
+
else {
|
46 |
+
$exportTXT.=$key.',';
|
47 |
+
$j=0;
|
48 |
+
if($value) {
|
49 |
+
foreach($value as $v){
|
50 |
+
if($j>0) $exportTXT.="|";
|
51 |
+
$exportTXT.=$v;
|
52 |
+
$j++;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
$i++;
|
57 |
+
}
|
58 |
+
$exportTXT.="\n";
|
59 |
+
$exportTXT.="slider_name,smooth";
|
60 |
+
print($exportTXT);
|
61 |
+
exit();
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
66 |
+
add_action('load-smooth-slider_page_smooth-slider-settings','smooth_process_set_requests');
|
67 |
function smooth_slider_settings_page() {
|
68 |
+
global $smooth_slider,$default_slider;
|
69 |
+
//print_r($default_slider);
|
70 |
+
//die("test");
|
71 |
+
|
72 |
+
//Reset Settings
|
73 |
+
if (isset ($_POST['smooth_reset_settings_submit'])) {
|
74 |
+
if ( $_POST['smooth_reset_settings']!='n' ) {
|
75 |
+
$smooth_reset_settings=$_POST['smooth_reset_settings'];
|
76 |
+
$options='smooth_slider_options';
|
77 |
+
$optionsvalue=get_option($options);
|
78 |
+
if( $smooth_reset_settings == 'g' ){
|
79 |
+
$new_settings_value=$default_slider;
|
80 |
+
update_option($options,$new_settings_value);
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
}
|
85 |
+
$new_settings_msg='';
|
86 |
+
//Import Settings
|
87 |
+
if (isset ($_POST['import'])) {
|
88 |
+
if ($_POST['import']=='Import') {
|
89 |
+
global $wpdb;
|
90 |
+
$imported_settings_message='';
|
91 |
+
$csv_mimetypes = array('text/csv','text/x-csv','text/plain','application/csv','text/comma-separated-values','application/excel','application/vnd.ms-excel','application/vnd.msexcel','text/anytext','application/octet-stream','application/txt');
|
92 |
+
if ($_FILES['settings_file']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['settings_file']['tmp_name']) && in_array($_FILES['settings_file']['type'], $csv_mimetypes) ) {
|
93 |
+
$imported_settings=file_get_contents($_FILES['settings_file']['tmp_name']);
|
94 |
+
$settings_arr=explode("\n",$imported_settings);
|
95 |
+
$slider_settings=array();
|
96 |
+
foreach($settings_arr as $settings_field){
|
97 |
+
$s=explode(',',$settings_field);
|
98 |
+
$inner=explode('|',$s[1]);
|
99 |
+
if(count($inner)>1) $slider_settings[$s[0]]=$inner;
|
100 |
+
else $slider_settings[$s[0]]=$s[1];
|
101 |
+
}
|
102 |
+
$options='smooth_slider_options';
|
103 |
+
|
104 |
+
if( $slider_settings['slider_name'] == 'smooth' ) {
|
105 |
+
update_option($options,$slider_settings);
|
106 |
+
$new_settings_msg='<div id="message" class="updated fade" style="clear:left;"><h3>'.__('Settings imported successfully ','smooth-slider').'</h3></div>';
|
107 |
+
$imported_settings_message='<div style="clear:left;color:#006E2E;"><h3>'.__('Settings imported successfully ','smooth-slider').'</h3></div>';
|
108 |
+
}
|
109 |
+
else {
|
110 |
+
$new_settings_msg=$imported_settings_message='<div id="message" class="error fade" style="clear:left;"><h3>'.__('Settings imported do not match to Smooth Slider Settings. Please check the file.','smooth-slider').'</h3></div>';
|
111 |
+
$imported_settings_message='<div style="clear:left;color:#ff0000;"><h3>'.__('Settings imported do not match to Smooth Slider Settings. Please check the file.','smooth-slider').'</h3></div>';
|
112 |
+
}
|
113 |
+
}
|
114 |
+
else{
|
115 |
+
$new_settings_msg=$imported_settings_message='<div id="message" class="error fade" style="clear:left;"><h3>'.__('Error in File, Settings not imported. Please check the file being imported. ','smooth-slider').'</h3></div>';
|
116 |
+
$imported_settings_message='<div style="clear:left;color:#ff0000;"><h3>'.__('Error in File, Settings not imported. Please check the file being imported. ','smooth-slider').'</h3></div>';
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
$smooth_slider=get_option('smooth_slider_options');
|
121 |
+
foreach($default_slider as $key=>$value){
|
122 |
+
if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
|
123 |
+
}
|
124 |
+
?>
|
125 |
<div class="wrap" style="clear:both;">
|
126 |
+
<h2 class="top_heading"><?php _e('Smooth Slider Settings ','smooth-slider');?> </h2>
|
127 |
+
<div class="svilla_cl"></div>
|
128 |
+
|
|
|
|
|
|
|
|
|
|
|
129 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-admin' ) );?>
|
|
|
130 |
|
131 |
+
<?php if ($smooth_slider['disable_preview'] != '1'){ ?>
|
132 |
+
<div id="settings_preview"><h2 class="heading"><?php _e('Preview','smooth-slider'); ?></h2>
|
133 |
<?php
|
134 |
+
if ($smooth_slider['preview'] == "0")
|
135 |
+
get_smooth_slider($smooth_slider['slider_id']);
|
136 |
+
elseif($smooth_slider['preview'] == "1")
|
137 |
+
get_smooth_slider_category($smooth_slider['catg_slug']);
|
138 |
+
else
|
139 |
+
get_smooth_slider_recent();
|
140 |
+
?>
|
141 |
+
</div>
|
142 |
+
<?php }?>
|
143 |
+
<?php echo $new_settings_msg;?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
<div class="frmdiv">
|
146 |
<form method="post" action="options.php" id="smooth_slider_form">
|
147 |
<?php settings_fields('smooth-slider-group'); ?>
|
148 |
+
|
149 |
<div id="slider_tabs">
|
150 |
<ul class="ui-tabs">
|
151 |
+
<li class="green" style="font-weight:bold;font-size:12px;"><a href="#basic">Basic Settings</a></li>
|
152 |
+
<li class="pink" style="font-weight:bold;font-size:12px;"><a href="#slides">Slides Panel</a></li>
|
153 |
+
<li class="yellow" style="font-weight:bold;font-size:12px;"><a href="#preview">Preview</a></li>
|
154 |
+
<li class="asbestos" style="font-weight:bold;font-size:12px;"><a href="#cssvalues">Generated CSS</a></li>
|
155 |
</ul>
|
156 |
|
157 |
<div id="basic">
|
158 |
+
<div class="sub_settings">
|
159 |
+
<h2 class="sub-heading"><?php _e('Basic Controls','smooth-slider'); ?></h2>
|
160 |
<table class="form-table">
|
161 |
|
162 |
<tr valign="top">
|
199 |
|
200 |
<tr valign="top">
|
201 |
<th scope="row"><?php _e('Slide Animation Length','smooth-slider'); ?></th>
|
202 |
+
<td><input type="text" name="smooth_slider_options[transition]" id="smooth_slider_transition" class="small-text" value="<?php echo $smooth_slider['transition']; ?>" />
|
203 |
<span class="moreInfo">
|
204 |
<span class="trigger"> ? </span>
|
205 |
<div class="tooltip">
|
222 |
</tr>
|
223 |
|
224 |
<tr valign="top">
|
225 |
+
<th scope="row"><?php _e('Min. Slider Height','smooth-slider'); ?></th>
|
226 |
<td><input type="text" name="smooth_slider_options[height]" id="smooth_slider_height" class="small-text" value="<?php echo $smooth_slider['height']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
227 |
</tr>
|
228 |
|
258 |
<label for="smooth_slider_goto_slide"><?php _e('Show go to slide number links or images','smooth-slider'); ?></label><br />
|
259 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', $smooth_slider['goto_slide']); ?> /> <?php _e('None ','smooth-slider'); ?><br />
|
260 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="1" <?php checked('1', $smooth_slider['goto_slide']); ?> /> <?php _e('Numbers','smooth-slider'); ?> <br />
|
261 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="2" <?php checked('2', $smooth_slider['goto_slide']); ?> /> <?php _e('Custom Images for Navigation','smooth-slider'); ?> <br /> <input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="4" <?php checked('4', $smooth_slider['goto_slide']); ?> /> <?php _e('Fixed Images for Navigation','smooth-slider'); ?> <br /> <?php _e('Image Width: ','smooth-slider'); ?><input type="text" name="smooth_slider_options[navimg_w]" id="smooth_slider_navimg_w" class="small-text" value="<?php echo $smooth_slider['navimg_w']; ?>" /> <?php _e('px','smooth-slider'); ?> <br /> <?php _e('Height: ','smooth-slider'); ?><input type="text" name="smooth_slider_options[navimg_ht]" id="smooth_slider_navimg_ht" class="small-text" value="<?php echo $smooth_slider['navimg_ht']; ?>" /> <?php _e('px','smooth-slider'); ?><br />
|
262 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="3" <?php checked('3', $smooth_slider['goto_slide']); ?> /> <?php _e('Enter Custom Text or HTML','smooth-slider'); ?>
|
263 |
<input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
|
264 |
</fieldset></td>
|
270 |
</p>
|
271 |
</div>
|
272 |
|
273 |
+
<div class="sub_settings_m">
|
274 |
+
<h2 class="sub-heading"><?php _e('Miscellaneous','smooth-slider'); ?></h2>
|
275 |
|
276 |
<table class="form-table">
|
277 |
|
301 |
<td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
|
302 |
</tr>
|
303 |
|
304 |
+
<tr valign="top">
|
305 |
+
<th scope="row"><?php _e('Color of "Continue Reading Text"','smooth-slider'); ?></th>
|
306 |
+
<td><input type="text" name="smooth_slider_options[readmorecolor]" id="color_value_7" value="<?php echo $smooth_slider['readmorecolor']; ?>" /> <img id="color_picker_7" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="<?php _e('Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_7"></div></td>
|
307 |
+
</tr>
|
308 |
+
|
309 |
<tr valign="top">
|
310 |
<th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
|
311 |
+
<td><select name="smooth_slider_options[user_level]" style="width:100%;">
|
312 |
<option value="manage_options" <?php if ($smooth_slider['user_level'] == "manage_options"){ echo "selected";}?> ><?php _e('Administrator','smooth-slider'); ?></option>
|
313 |
<option value="edit_others_posts" <?php if ($smooth_slider['user_level'] == "edit_others_posts"){ echo "selected";}?> ><?php _e('Editor and Admininstrator','smooth-slider'); ?></option>
|
314 |
<option value="publish_posts" <?php if ($smooth_slider['user_level'] == "publish_posts"){ echo "selected";}?> ><?php _e('Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
377 |
|
378 |
<tr valign="top">
|
379 |
<th scope="row"><?php _e('Custom Styles','smooth-slider'); ?></th>
|
380 |
+
<td><textarea name="smooth_slider_options[css]" rows="5" class="regular-text code"><?php echo $smooth_slider['css']; ?></textarea>
|
381 |
<span class="moreInfo">
|
382 |
<span class="trigger"> ? </span>
|
383 |
<div class="tooltip">
|
393 |
</div><!--#basics-->
|
394 |
|
395 |
<div id="slides">
|
396 |
+
<div class="sub_settings">
|
397 |
+
<h2 class="sub-heading"><?php _e('Slider Title','smooth-slider'); ?></h2>
|
398 |
<p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
|
399 |
<table class="form-table">
|
400 |
|
462 |
</p>
|
463 |
</div>
|
464 |
|
465 |
+
<div class="sub_settings_m">
|
466 |
+
<h2 class="sub-heading"><?php _e('Post Title','smooth-slider'); ?></h2>
|
467 |
<p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
|
468 |
<table class="form-table">
|
469 |
|
517 |
</p>
|
518 |
</div>
|
519 |
|
520 |
+
<div class="sub_settings_m">
|
521 |
+
<h2 class="sub-heading"><?php _e('Thumbnail Image','smooth-slider'); ?></h2>
|
522 |
<p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
|
523 |
<table class="form-table">
|
524 |
|
630 |
|
631 |
</div>
|
632 |
|
633 |
+
<div class="sub_settings_m">
|
634 |
+
<h2 class="sub-heading"><?php _e('Slider Content','smooth-slider'); ?></h2>
|
635 |
<p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
|
636 |
<table class="form-table">
|
637 |
<tr valign="top">
|
711 |
|
712 |
</div><!--#slides-->
|
713 |
|
714 |
+
<div id="preview">
|
715 |
+
<div class="sub_settings">
|
716 |
+
<h2 class="sub-heading"><?php _e('Preview on Settings Panel','smooth-slider'); ?></h2>
|
717 |
|
718 |
<table class="form-table">
|
719 |
+
|
720 |
+
<tr valign="top">
|
721 |
+
<th scope="row"><label for="smooth_slider_disable_preview"><?php _e('Disable Preview Section','smooth-slider'); ?></label></th>
|
722 |
+
<td>
|
723 |
+
<input name="smooth_slider_options[disable_preview]" type="checkbox" id="smooth_slider_disable_preview" value="1" <?php checked("1", $smooth_slider['disable_preview']); ?> />
|
724 |
+
<span class="moreInfo">
|
725 |
+
<span class="trigger"> ? </span>
|
726 |
+
<div class="tooltip">
|
727 |
+
<?php _e('If disabled, the \'Preview\' of Slider on this Settings page will be removed.','smooth-slider'); ?>
|
728 |
+
</div>
|
729 |
+
</span>
|
730 |
+
</td>
|
731 |
+
</tr>
|
732 |
+
|
733 |
<tr valign="top">
|
734 |
+
<th scope="row"><?php _e('Smooth Template Tag for Preview','smooth-slider'); ?></th>
|
735 |
+
<td><select name="smooth_slider_options[preview]" id="smooth_slider_preview">
|
736 |
+
<option value="2" <?php if ($smooth_slider['preview'] == "2"){ echo "selected";}?> ><?php _e('Recent Posts Slider','smooth-slider'); ?></option>
|
737 |
+
<option value="1" <?php if ($smooth_slider['preview'] == "1"){ echo "selected";}?> ><?php _e('Category Slider','smooth-slider'); ?></option>
|
738 |
+
<option value="0" <?php if ($smooth_slider['preview'] == "0"){ echo "selected";}?> ><?php _e('Custom Slider with Slider ID','smooth-slider'); ?></option>
|
739 |
+
</select>
|
740 |
+
</td>
|
741 |
</tr>
|
742 |
+
|
743 |
+
<tr valign="top">
|
744 |
+
<th scope="row"><?php _e('Preview Slider Params','smooth-slider'); ?></th>
|
745 |
+
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Preview Slider Params','smooth-slider'); ?></span></legend>
|
746 |
+
<label for="smooth_slider_options[slider_id]" style="width:45%;"><?php _e('Slider ID in case of Custom Slider','smooth-slider'); ?></label>
|
747 |
+
<input type="text" name="smooth_slider_options[slider_id]" id="smooth_slider_id" class="regular-text code" value="<?php echo $smooth_slider['slider_id']; ?>" style="width:45%;" />
|
748 |
+
<br /> <br />
|
749 |
+
<label for="smooth_slider_options[catg_slug]" style="width:45%;"><?php _e('Category Slug in case of Category Slider','smooth-slider'); ?></label>
|
750 |
+
<input type="text" name="smooth_slider_options[catg_slug]" id="smooth_slider_catslug" class="regular-text code" style="width:100px;" value="<?php echo $smooth_slider['catg_slug']; ?>" style="width:45%;" />
|
751 |
+
</fieldset></td>
|
752 |
+
</tr>
|
753 |
+
|
754 |
</table>
|
755 |
+
<p class="submit">
|
756 |
+
<input type="submit" class="button-primary" id="preview_save" value="<?php _e('Save Changes') ?>" />
|
757 |
+
</p>
|
758 |
</div>
|
759 |
|
760 |
+
<div class="sub_settings_m">
|
761 |
+
<h2 class="sub-heading"><?php _e('Shortcode','smooth-slider'); ?></h2>
|
762 |
+
<p><?php _e('Paste the below shortcode on Page/Post Edit Panel to get the slider as shown in the above Preview','smooth-slider'); ?></p><br />
|
763 |
+
<?php
|
764 |
+
if ($smooth_slider['preview'] == "0")
|
765 |
+
$preview='[smoothslider id="'.$smooth_slider['slider_id'].'"]';
|
766 |
+
elseif($smooth_slider['preview'] == "1")
|
767 |
+
$preview='[smoothcategory catg_slug="'.$smooth_slider['catg_slug'].'"]';
|
768 |
+
else
|
769 |
+
$preview='[smoothrecent]';
|
770 |
+
echo $preview;
|
771 |
+
?>
|
772 |
+
</div>
|
773 |
+
|
774 |
+
<div class="sub_settings_m">
|
775 |
+
<h2 class="sub-heading"><?php _e('Template Tag','smooth-slider'); ?></h2>
|
776 |
+
<p><?php _e('Paste the below template tag in your theme template file like index.php or page.php at required location to get the slider as shown in the above Preview','smooth-slider'); ?></p><br />
|
777 |
+
<?php
|
778 |
+
if ($smooth_slider['preview'] == "0")
|
779 |
+
echo '<code><?php if(function_exists("get_smooth_slider")){get_smooth_slider($slider_id="'.$smooth_slider['slider_id'].'");}?></code>';
|
780 |
+
elseif($smooth_slider['preview'] == "1")
|
781 |
+
echo '<code><?php if(function_exists("get_smooth_slider_category")){get_smooth_slider_category($catg_slug="'.$smooth_slider['catg_slug'].'");}?></code>';
|
782 |
+
else
|
783 |
+
echo '<code><?php if(function_exists("get_smooth_slider_recent")){get_smooth_slider_recent();}?></code>';
|
784 |
+
?>
|
785 |
+
</div>
|
786 |
+
|
787 |
+
</div><!-- preview tab ends-->
|
788 |
|
789 |
<div id="cssvalues">
|
790 |
+
<div class="sub_settings">
|
791 |
+
<h2 class="sub-heading"><?php _e('CSS Generated thru these settings','thumbel-slider'); ?></h2>
|
792 |
<p><?php _e('Save Changes for the settings first and then view this data. You can use this CSS in your \'custom\' stylesheets if you use other than \'default\' value for the Stylesheet folder.','thumbel-slider'); ?></p>
|
793 |
<?php $smooth_slider_css = smooth_get_inline_css($echo='1'); ?>
|
794 |
<div style="font-family:monospace;font-size:13px;background:#ddd;">
|
802 |
.smooth_slider .smooth_slideri p.more{<?php echo $smooth_slider_css['smooth_slider_p_more'];?>} <br />
|
803 |
.smooth_slider .smooth_next{<?php echo $smooth_slider_css['smooth_next'];?>} <br />
|
804 |
.smooth_slider .smooth_prev{<?php echo $smooth_slider_css['smooth_prev'];?>}
|
805 |
+
.smooth_slider .smooth_slider_eshortcode{<?php echo $smooth_slider_css['smooth_slider_eshortcode'];?>}
|
806 |
+
.smooth_slider .smooth_more a{<?php echo $smooth_slider_css['smooth_slider_p_more'];?>}
|
807 |
</div>
|
808 |
</div>
|
809 |
</div> <!--#cssvalues-->
|
810 |
+
<div class="svilla_cl"></div><div class="svilla_cr"></div>
|
811 |
|
812 |
</div> <!--end of #slider_tabs-->
|
813 |
|
814 |
<p class="submit">
|
815 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
816 |
</p>
|
817 |
+
<input type="hidden" name="smooth_slider_options[active_tab]" id="smooth_activetab" value="<?php echo $smooth_slider['active_tab']; ?>" />
|
818 |
+
<input type="hidden" name="smooth_slider_options[popup]" id="smoothpopup" value="<?php echo $smooth_slider['popup']; ?>" />
|
819 |
+
<input type="hidden" name="hidden_preview" id="hidden_preview" value="<?php echo $smooth_slider['preview']; ?>" />
|
820 |
+
<input type="hidden" name="hidden_category" id="hidden_category" value="<?php echo $smooth_slider['catg_slug']; ?>" />
|
821 |
+
<input type="hidden" name="hidden_sliderid" id="hidden_sliderid" value="<?php echo $smooth_slider['slider_id']; ?>" />
|
822 |
+
|
823 |
+
</form>
|
824 |
+
<!-- Added for shortcode to show on save of settings-->
|
825 |
+
<div id="saveResult"></div>
|
826 |
+
|
827 |
+
<!--Form to reset Settings set-->
|
828 |
+
<form style="float:left;width:100%;" action="" method="post">
|
829 |
+
<table class="form-table">
|
830 |
+
<tr valign="top">
|
831 |
+
<th scope="row"><?php _e('Reset Settings to','smooth-slider'); ?></th>
|
832 |
+
<td><select name="smooth_reset_settings" id="smooth_slider_reset_settings" >
|
833 |
+
<option value="n" selected ><?php _e('None','smooth-slider'); ?></option>
|
834 |
+
<option value="g" ><?php _e('Global Default','smooth-slider'); ?></option>
|
835 |
+
</select>
|
836 |
+
</td>
|
837 |
+
</tr>
|
838 |
+
</table>
|
839 |
+
|
840 |
+
<p class="submit">
|
841 |
+
<input name="smooth_reset_settings_submit" type="submit" class="button-primary" value="<?php _e('Reset Settings') ?>" />
|
842 |
+
</p>
|
843 |
</form>
|
844 |
|
845 |
+
<div class="svilla_cl"></div>
|
846 |
+
|
847 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin-top:2%;float: left;width: 95%;" id="import">
|
848 |
+
<?php if (isset ($imported_settings_message))echo $imported_settings_message;?>
|
849 |
+
<h3><?php _e('Import Settings Set by uploading a Settings File','smooth-slider'); ?></h3>
|
850 |
+
<form style="margin-right:10px;font-size:14px;" action="" method="post" enctype="multipart/form-data">
|
851 |
+
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
|
852 |
+
<input type="file" name="settings_file" id="settings_file" style="font-size:13px;width:50%;padding:0 5px;" />
|
853 |
+
<input type="submit" value="Import" name="import" onclick="return confirmSettingsImport()" title="<?php _e('Import Settings from a file','smooth-slider'); ?>" class="button-primary" />
|
854 |
+
</form>
|
855 |
+
</div>
|
856 |
+
</div> <!--end of float left -->
|
857 |
+
<!-- Added for validations - start -->
|
858 |
+
<script type="text/javascript">
|
859 |
|
860 |
+
jQuery(document).ready(function($) {
|
861 |
+
<?php if(isset($_GET['settings-updated'])) { if($_GET['settings-updated'] == 'true' and $smooth_slider['popup'] == '1' ) {
|
862 |
+
?>
|
863 |
+
jQuery('#saveResult').html("<div id='popup'><div class='modal_shortcode'>Quick Embed Shortcode</div><span class='button b-close'><span>X</span></span></div>");
|
864 |
+
jQuery('#popup').append('<div class="modal_preview"><?php echo $preview;?></div>');
|
865 |
+
jQuery('#popup').bPopup({
|
866 |
+
opacity: 0.6,
|
867 |
+
position: ['35%', '35%'],
|
868 |
+
positionStyle: 'fixed', //'fixed' or 'absolute'
|
869 |
+
onClose: function() { return true; }
|
870 |
+
});
|
871 |
+
|
872 |
+
<?php }} ?>
|
873 |
+
|
874 |
+
jQuery('#smooth_slider_form').submit(function(event) {
|
875 |
+
|
876 |
+
var slide_animationlen=jQuery("#smooth_slider_transition").val();
|
877 |
+
if(slide_animationlen=='' || slide_animationlen <= 0 || isNaN(slide_animationlen)) {
|
878 |
+
alert("Slide Animation Length should be a number greater than 0!");
|
879 |
+
jQuery("#smooth_slider_transition").addClass('error');
|
880 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_transition').offset().top-50}, 600);
|
881 |
+
return false;
|
882 |
+
}
|
883 |
+
var slider_speed=jQuery("#smooth_slider_speed").val();
|
884 |
+
if(slider_speed=='' || slider_speed <= 0 || isNaN(slider_speed)) {
|
885 |
+
alert("Slide Pause Interval should be a number greater than 0!");
|
886 |
+
jQuery("#smooth_slider_speed").addClass('error');
|
887 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_speed').offset().top-50}, 600);
|
888 |
+
return false;
|
889 |
+
}
|
890 |
+
var slider_posts=jQuery("#smooth_slider_no_posts").val();
|
891 |
+
if(slider_posts=='' || slider_posts <= 0 || isNaN(slider_posts)) {
|
892 |
+
alert("Number of Posts in the Slideshow should be a number greater than 0!");
|
893 |
+
jQuery("#smooth_slider_no_posts").addClass('error');
|
894 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_no_posts').offset().top-50}, 600);
|
895 |
+
return false;
|
896 |
+
}
|
897 |
+
var slider_width=jQuery("#smooth_slider_width").val();
|
898 |
+
if(slider_width=='' || slider_width <= 0 || isNaN(slider_width)) {
|
899 |
+
alert("Slider Width should be a number greater than 0!");
|
900 |
+
jQuery("#smooth_slider_width").addClass('error');
|
901 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_width').offset().top-50}, 600);
|
902 |
+
return false;
|
903 |
+
}
|
904 |
+
var slider_height=jQuery("#smooth_slider_height").val();
|
905 |
+
if(slider_height=='' || slider_height <= 0 || isNaN(slider_height)) {
|
906 |
+
alert("Slider Height should be a number greater than 0!");
|
907 |
+
jQuery("#smooth_slider_height").addClass('error');
|
908 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_height').offset().top-50}, 600);
|
909 |
+
return false;
|
910 |
+
}
|
911 |
+
|
912 |
+
|
913 |
+
var prev=jQuery("#smooth_slider_preview").val(),
|
914 |
+
hiddenpreview=jQuery("#hidden_preview").val(),
|
915 |
+
hiddencatslug=jQuery("#hidden_category").val(),
|
916 |
+
hiddensliderid=jQuery("#hidden_sliderid").val(),
|
917 |
+
slider_id = jQuery("#smooth_slider_id").val(),
|
918 |
+
slider_catslug=jQuery("#smooth_slider_catslug").val();
|
919 |
+
if(prev == "0" && slider_id == ''){
|
920 |
+
alert("Slider id should be mentioned");
|
921 |
+
jQuery("#smooth_slider_id").addClass('error');
|
922 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_id').offset().top-50}, 600);
|
923 |
+
return false;
|
924 |
+
}
|
925 |
+
if(prev == "1" && slider_catslug == ''){
|
926 |
+
alert("Category slug should be mentioned whose posts you want to display in slider");
|
927 |
+
jQuery("#smooth_slider_catslug").addClass('error');
|
928 |
+
jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_catslug').offset().top-50}, 600);
|
929 |
+
return false;
|
930 |
+
}
|
931 |
+
if(hiddenpreview != prev || slider_id != hiddensliderid || slider_catslug != hiddencatslug ) jQuery('#smoothpopup').val("1");
|
932 |
+
else jQuery('#smoothpopup').val("0");
|
933 |
+
});
|
934 |
+
});
|
935 |
+
|
936 |
+
</script>
|
937 |
+
<!-- Added for validation - end -->
|
938 |
+
|
939 |
+
|
940 |
|
941 |
</div> <!--end of float wrap -->
|
942 |
|
943 |
+
<div id="poststuff" class="metabox-holder has-right-sidebar" style="float:left;width:28%;max-width:300px;min-width:inherit;">
|
944 |
+
<div class="postbox" style="margin:0 0 10px 0;">
|
945 |
+
<h3 class="hndle"><span></span><?php _e('Quick Embed Shortcode','smooth-slider'); ?></h3>
|
946 |
+
<div class="inside" id="shortcodeview">
|
947 |
+
<?php
|
948 |
+
if ($smooth_slider['preview'] == "0")
|
949 |
+
echo '[smoothslider id="'.$smooth_slider['slider_id'].'"]';
|
950 |
+
elseif($smooth_slider['preview'] == "1")
|
951 |
+
echo '[smoothcategory catg_slug="'.$smooth_slider['catg_slug'].'"]';
|
952 |
+
else
|
953 |
+
echo '[smoothrecent]';
|
954 |
+
?>
|
955 |
+
</div></div>
|
956 |
+
|
957 |
+
<div class="postbox" style="margin:10px 0;">
|
958 |
+
<h3 class="hndle"><span></span><?php _e('Quick Embed Template Tag','smooth-slider'); ?></h3>
|
959 |
+
<div class="inside">
|
960 |
+
<?php
|
961 |
+
if ($smooth_slider['preview'] == "0")
|
962 |
+
echo '<code><?php if( function_exists("get_smooth_slider") ){ get_smooth_slider( $slider_id="'.$smooth_slider['slider_id'].'"); } ?></code>';
|
963 |
+
elseif($smooth_slider['preview'] == "1")
|
964 |
+
echo '<code><?php if( function_exists( "get_smooth_slider_category" ) ){ get_smooth_slider_category( $catg_slug="'.$smooth_slider['catg_slug'].'"); } ?></code>';
|
965 |
+
else
|
966 |
+
echo '<code><?php if( function_exists( "get_smooth_slider_recent" ) ){ get_smooth_slider_recent(); } ?></code>';
|
967 |
+
?>
|
968 |
+
</div></div>
|
969 |
+
|
970 |
+
<form style="margin-right:10px;font-size:14px;width:100%;" action="" method="post">
|
971 |
+
<a class="svilla_button svilla_gray_button" href="<?php echo $url; ?>" title="<?php _e('Go to Sliders page where you can re-order the slide posts, delete the slides from the slider etc.','smooth-slider'); ?>"><?php _e('Go to Sliders Admin','smooth-slider'); ?></a>
|
972 |
+
<input type="submit" value="Export" name="export" title="<?php _e('Export this Settings Set to a file','smooth-slider'); ?>" class="svilla_button" />
|
973 |
+
<a href="#import" title="<?php _e('Go to Import Settings Form','smooth-slider'); ?>" class="svilla_button">Import</a>
|
974 |
+
<div class="svilla_cl"></div>
|
975 |
+
</form>
|
976 |
+
<div class="postbox" style="margin:10px 0;">
|
977 |
+
<div class="inside">
|
978 |
+
<div style="margin:10px auto;">
|
979 |
+
<a href="http://slidervilla.com" title="Premium WordPress Slider Plugins" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/banner-premium.png');?>" alt="Premium WordPress Slider Plugins" width="100%" /></a>
|
980 |
+
</div>
|
981 |
+
<p><a href="http://slidervilla.com/" title="Recommended WordPress Sliders" target="_blank">SliderVilla slider plugins</a> are feature rich and stylish plugins to embed a nice looking featured content slider in your existing or new theme template. 100% customization options available on WordPress Settings page of the plugin.</p>
|
982 |
+
<p><strong>Stylish Sliders, <a href="http://slidervilla.com/blog/testimonials/" target="_blank">Happy Customers</a>!</strong></p>
|
983 |
+
<p><a href="http://slidervilla.com/" title="Recommended WordPress Sliders" target="_blank">For more info visit SliderVilla</a></p>
|
984 |
+
</div></div>
|
985 |
+
|
986 |
+
<div class="postbox">
|
987 |
+
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
988 |
+
<div class="inside">
|
989 |
+
<ul>
|
990 |
+
<li><a href="http://slidervilla.com/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
991 |
+
<li><a href="http://wordpress.org/support/plugin/smooth-slider" title="<?php _e('Support Forum for Smooth Slider','smooth-slider'); ?>
|
992 |
+
" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
993 |
+
<li><a href="http://slidervilla.com/about-us/" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
994 |
+
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
995 |
+
<li><strong>Current Version: <?php echo SMOOTH_SLIDER_VER;?></strong></li>
|
996 |
+
</ul>
|
997 |
+
</div>
|
998 |
+
</div>
|
999 |
+
|
1000 |
+
<div class="postbox">
|
1001 |
+
<div class="inside">
|
1002 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
1003 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
1004 |
+
<input type="hidden" name="hosted_button_id" value="8046056">
|
1005 |
+
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
1006 |
+
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
1007 |
+
</form>
|
1008 |
+
</div>
|
1009 |
+
</div>
|
1010 |
+
|
1011 |
+
</div> <!--end of poststuff -->
|
1012 |
|
1013 |
<?php
|
1014 |
}
|
1015 |
function register_mysettings() { // whitelist options
|
1016 |
register_setting( 'smooth-slider-group', 'smooth_slider_options' );
|
1017 |
}
|
1018 |
+
?>
|
settings/sliders.php
CHANGED
@@ -3,21 +3,11 @@ function smooth_slider_create_multiple_sliders() {
|
|
3 |
global $smooth_slider;
|
4 |
?>
|
5 |
|
6 |
-
<div class="wrap" style="clear:both;">
|
7 |
-
<div style="margin:10px auto;clear:left;">
|
8 |
-
<a href="http://slidervilla.com/" title="Premium WordPress Slider Plugins" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/slidervilla-728.jpg');?>" alt="Premium WordPress Slider Plugins" /></a>
|
9 |
-
</div>
|
10 |
<h2 style="float:left;"><?php _e('Sliders Created','smooth-slider'); ?></h2>
|
11 |
-
<form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
12 |
-
<input type="hidden" name="cmd" value="_s-xclick">
|
13 |
-
<input type="hidden" name="hosted_button_id" value="8046056">
|
14 |
-
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
15 |
-
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
16 |
-
</form>
|
17 |
-
|
18 |
<?php
|
19 |
-
if ($_POST['remove_posts_slider']) {
|
20 |
-
if (
|
21 |
global $wpdb, $table_prefix;
|
22 |
$table_name = $table_prefix.SLIDER_TABLE;
|
23 |
$current_slider = $_POST['current_slider_id'];
|
@@ -55,14 +45,14 @@ if ($_POST['remove_posts_slider']) {
|
|
55 |
}
|
56 |
}
|
57 |
}
|
58 |
-
if ($_POST['create_new_slider']) {
|
59 |
$slider_name = $_POST['new_slider_name'];
|
60 |
global $wpdb,$table_prefix;
|
61 |
$slider_meta = $table_prefix.SLIDER_META;
|
62 |
$sql = "INSERT INTO $slider_meta (slider_name) VALUES('$slider_name');";
|
63 |
$result = $wpdb->query($sql);
|
64 |
}
|
65 |
-
if ($_POST['reorder_posts_slider']) {
|
66 |
$i=1;
|
67 |
global $wpdb, $table_prefix;
|
68 |
$table_name = $table_prefix.SLIDER_TABLE;
|
@@ -74,23 +64,27 @@ if ($_POST['reorder_posts_slider']) {
|
|
74 |
}
|
75 |
}
|
76 |
?>
|
77 |
-
<div style="clear:
|
78 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-settings' ) );?>
|
79 |
-
<a href="<?php echo $url; ?>" title="<?php _e('Settings Page for Smooth Slider where you can change the color, font etc. for the sliders','smooth-slider'); ?>"><?php _e('Go to Smooth Slider Settings page','smooth-slider'); ?></a>
|
80 |
<?php $sliders = ss_get_sliders(); ?>
|
81 |
-
|
82 |
<div id="slider_tabs">
|
83 |
<ul class="ui-tabs">
|
84 |
<?php foreach($sliders as $slider){?>
|
85 |
-
<li><a href="#tabs-<?php echo $slider['slider_id'];?>"><?php echo $slider['slider_name'];?></a></li>
|
86 |
<?php } ?>
|
87 |
-
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
88 |
-
<li><a href="#new_slider"><?php _e('Create New Slider','smooth-slider'); ?></a></li>
|
89 |
<?php } ?>
|
90 |
</ul>
|
91 |
|
92 |
<?php foreach($sliders as $slider){?>
|
93 |
-
<div id="tabs-<?php echo $slider['slider_id'];?>">
|
|
|
|
|
|
|
|
|
94 |
<form action="" method="post">
|
95 |
<?php settings_fields('smooth-slider-group'); ?>
|
96 |
|
@@ -139,6 +133,7 @@ if ($_POST['reorder_posts_slider']) {
|
|
139 |
echo '</div>';
|
140 |
?>
|
141 |
</tbody></table>
|
|
|
142 |
</form>
|
143 |
|
144 |
|
@@ -178,14 +173,15 @@ if ($_POST['reorder_posts_slider']) {
|
|
178 |
|
179 |
echo '</div>';
|
180 |
?>
|
181 |
-
</div>
|
|
|
182 |
</form>
|
183 |
</div>
|
184 |
|
185 |
<?php } ?>
|
186 |
|
187 |
-
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
188 |
-
<div id="new_slider">
|
189 |
<form action="" method="post" onsubmit="return slider_checkform(this);" >
|
190 |
<h3><?php _e('Enter New Slider Name','smooth-slider'); ?></h3>
|
191 |
<input type="hidden" name="create_new_slider" value="1" />
|
@@ -197,50 +193,33 @@ if ($_POST['reorder_posts_slider']) {
|
|
197 |
</form>
|
198 |
</div>
|
199 |
<?php }?>
|
200 |
-
</div>
|
201 |
|
202 |
-
<div style="margin:10px auto;clear:left;">
|
203 |
-
<a href="http://slidervilla.com/" title="Premium WordPress Slider Plugins" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/slidervilla-728.jpg');?>" alt="Premium WordPress Slider Plugins" /></a>
|
204 |
</div>
|
205 |
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
|
|
211 |
<ul>
|
212 |
<li><a href="http://slidervilla.com/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
213 |
-
<li><a href="http://
|
214 |
" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
215 |
-
<li><a href="http://
|
216 |
-
|
217 |
-
|
218 |
-
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
219 |
</ul>
|
220 |
-
|
221 |
-
</div>
|
222 |
-
</div>
|
223 |
-
|
224 |
-
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
225 |
-
<div class="postbox">
|
226 |
-
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
227 |
-
<div class="inside">
|
228 |
-
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fslidervilla&width=270&height=170&colorscheme=light&show_faces=true&border_color&stream=false&header=false&appId=140253496056337" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:270px; height:170px;" allowTransparency="true"></iframe>
|
229 |
-
</div>
|
230 |
-
</div>
|
231 |
</div>
|
232 |
-
|
233 |
-
<div
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
<p><strong>Beautiful themes, Great support!</strong></p>
|
241 |
-
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">For more info visit ElegantThemes</a></p>
|
242 |
-
</div>
|
243 |
-
</div></div></div>
|
244 |
|
245 |
<div style="clear:left;"></div>
|
246 |
</div> <!--end of poststuff -->
|
@@ -249,4 +228,4 @@ if ($_POST['reorder_posts_slider']) {
|
|
249 |
</div> <!--end of float wrap -->
|
250 |
<?php
|
251 |
}
|
252 |
-
?>
|
3 |
global $smooth_slider;
|
4 |
?>
|
5 |
|
6 |
+
<div class="wrap smooth_sliders_create" id="smooth_sliders_create" style="clear:both;">
|
|
|
|
|
|
|
7 |
<h2 style="float:left;"><?php _e('Sliders Created','smooth-slider'); ?></h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<?php
|
9 |
+
if (isset($_POST['remove_posts_slider'])) {
|
10 |
+
if (isset($_POST['slider_posts']) ) {
|
11 |
global $wpdb, $table_prefix;
|
12 |
$table_name = $table_prefix.SLIDER_TABLE;
|
13 |
$current_slider = $_POST['current_slider_id'];
|
45 |
}
|
46 |
}
|
47 |
}
|
48 |
+
if (isset($_POST['create_new_slider'])) {
|
49 |
$slider_name = $_POST['new_slider_name'];
|
50 |
global $wpdb,$table_prefix;
|
51 |
$slider_meta = $table_prefix.SLIDER_META;
|
52 |
$sql = "INSERT INTO $slider_meta (slider_name) VALUES('$slider_name');";
|
53 |
$result = $wpdb->query($sql);
|
54 |
}
|
55 |
+
if (isset($_POST['reorder_posts_slider'])) {
|
56 |
$i=1;
|
57 |
global $wpdb, $table_prefix;
|
58 |
$table_name = $table_prefix.SLIDER_TABLE;
|
64 |
}
|
65 |
}
|
66 |
?>
|
67 |
+
<div style="clear:left"></div>
|
68 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-settings' ) );?>
|
69 |
+
<a class="svorangebutton" href="<?php echo $url; ?>" title="<?php _e('Settings Page for Smooth Slider where you can change the color, font etc. for the sliders','smooth-slider'); ?>"><?php _e('Go to Smooth Slider Settings page','smooth-slider'); ?></a>
|
70 |
<?php $sliders = ss_get_sliders(); ?>
|
71 |
+
<div style="clear:right"></div>
|
72 |
<div id="slider_tabs">
|
73 |
<ul class="ui-tabs">
|
74 |
<?php foreach($sliders as $slider){?>
|
75 |
+
<li class="yellow"><a href="#tabs-<?php echo $slider['slider_id'];?>"><?php echo $slider['slider_name'];?></a></li>
|
76 |
<?php } ?>
|
77 |
+
<?php if(isset($smooth_slider['multiple_sliders']) && $smooth_slider['multiple_sliders'] == '1') {?>
|
78 |
+
<li class="green"><a href="#new_slider"><?php _e('Create New Slider','smooth-slider'); ?></a></li>
|
79 |
<?php } ?>
|
80 |
</ul>
|
81 |
|
82 |
<?php foreach($sliders as $slider){?>
|
83 |
+
<div id="tabs-<?php echo $slider['slider_id'];?>" style="width:56% !important;">
|
84 |
+
<strong>Quick Embed Shortcode:</strong>
|
85 |
+
<div class="admin_shortcode">
|
86 |
+
<pre style="padding: 10px 0;">[smoothslider id='<?php echo $slider['slider_id'];?>']</pre>
|
87 |
+
</div>
|
88 |
<form action="" method="post">
|
89 |
<?php settings_fields('smooth-slider-group'); ?>
|
90 |
|
133 |
echo '</div>';
|
134 |
?>
|
135 |
</tbody></table>
|
136 |
+
<input type="hidden" name="active_tab" class="smooth_activetab" value="0" />
|
137 |
</form>
|
138 |
|
139 |
|
173 |
|
174 |
echo '</div>';
|
175 |
?>
|
176 |
+
</div>
|
177 |
+
<input type="hidden" name="active_tab" class="smooth_activetab" value="0" />
|
178 |
</form>
|
179 |
</div>
|
180 |
|
181 |
<?php } ?>
|
182 |
|
183 |
+
<?php if(isset($smooth_slider['multiple_sliders']) && $smooth_slider['multiple_sliders'] == '1') {?>
|
184 |
+
<div id="new_slider" style="width:60%;">
|
185 |
<form action="" method="post" onsubmit="return slider_checkform(this);" >
|
186 |
<h3><?php _e('Enter New Slider Name','smooth-slider'); ?></h3>
|
187 |
<input type="hidden" name="create_new_slider" value="1" />
|
193 |
</form>
|
194 |
</div>
|
195 |
<?php }?>
|
|
|
196 |
|
|
|
|
|
197 |
</div>
|
198 |
|
199 |
+
|
200 |
+
<div id="poststuff" class="metabox-holder has-right-sidebar" style="float:left;width:25%;max-width:300px;min-width:inherit;">
|
201 |
+
|
202 |
+
<div class="postbox">
|
203 |
+
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
204 |
+
<div class="inside">
|
205 |
<ul>
|
206 |
<li><a href="http://slidervilla.com/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
207 |
+
<li><a href="http://wordpress.org/support/plugin/smooth-slider" title="<?php _e('Support Forum for Smooth Slider','smooth-slider'); ?>
|
208 |
" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
209 |
+
<li><a href="http://slidervilla.com/about-us/" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
210 |
+
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
211 |
+
<li><strong>Current Version: <?php echo SMOOTH_SLIDER_VER;?></strong></li>
|
|
|
212 |
</ul>
|
213 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
</div>
|
215 |
+
|
216 |
+
<div class="postbox" style="margin:10px 0;">
|
217 |
+
|
218 |
+
<div class="inside">
|
219 |
+
<div style="margin:10px auto;">
|
220 |
+
<a href="http://slidervilla.com" title="Premium WordPress Slider Plugins" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/banner-premium.png');?>" alt="Premium WordPress Slider Plugins" width="100%" /></a>
|
221 |
+
</div>
|
222 |
+
</div></div>
|
|
|
|
|
|
|
|
|
223 |
|
224 |
<div style="clear:left;"></div>
|
225 |
</div> <!--end of poststuff -->
|
228 |
</div> <!--end of float wrap -->
|
229 |
<?php
|
230 |
}
|
231 |
+
?>
|
slider_versions/smooth_1.php
CHANGED
@@ -125,8 +125,18 @@ function smooth_global_posts_processor( $posts, $smooth_slider,$out_echo ){
|
|
125 |
//filter hook
|
126 |
$smooth_slide_image=apply_filters('smooth_slide_image',$smooth_slide_image,$post_id,$smooth_slider,$smooth_slider_css);
|
127 |
|
128 |
-
$
|
|
|
|
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
131 |
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
132 |
else
|
@@ -158,20 +168,16 @@ function smooth_global_posts_processor( $posts, $smooth_slider,$out_echo ){
|
|
158 |
}
|
159 |
|
160 |
function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1'){
|
161 |
-
global $smooth_slider;
|
|
|
|
|
|
|
162 |
$smooth_sldr_j = $r_array[0];
|
163 |
$smooth_slider_css = smooth_get_inline_css();
|
164 |
$html='';
|
165 |
|
166 |
-
|
167 |
-
|
168 |
-
$slideri_css='margin:0px '. ( ($smooth_slider['prev_next'] == 1) ? "10": "0" ) .'% 0px '. ( ($smooth_slider['prev_next'] == 1) ? "10": "0" ) .'% !important;width:'. ( ($smooth_slider['prev_next'] == 1) ? "80": "100" ) .'% !important;';
|
169 |
-
$smooth_media_queries='';
|
170 |
-
if( $smooth_slider['responsive'] == '1' ) {
|
171 |
-
$smooth_media_queries='@media only screen and (max-width: 479px) {.smooth_slider{width:100% !important;height:'. ( $slider_height + ($slider_height*0.51) ).'px !important;}.smooth_slider .smooth_slideri{'.$slideri_css.'}.smooth_slider .smooth_slider_thumbnail{max-width:100% !important;}}@media only screen and (min-width: 480px) and (max-width: 767px) {.smooth_slider{width:100% !important;height:'. ( $slider_height + ($slider_height*0.36) ).'px !important;}.smooth_slider .smooth_slideri{'.$slideri_css.'}.smooth_slider .smooth_slider_thumbnail{max-width:100% !important;}}@media only screen and (min-width: 768px) and (max-width: 959px) {.smooth_slider{width:100% !important;height:'. ( $slider_height + ($slider_height*0.12) ).'px !important;}.smooth_slider .smooth_slideri{'.$slideri_css.'}.smooth_slider .smooth_slider_thumbnail{max-width:100% !important;} }';
|
172 |
-
//filter hook
|
173 |
-
$smooth_media_queries=apply_filters('smooth_media_queries',$smooth_media_queries,$smooth_slider);
|
174 |
-
}
|
175 |
|
176 |
if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){
|
177 |
$fouc='jQuery("html").addClass("smooth_slider_fouc");jQuery(document).ready(function() { jQuery(".smooth_slider_fouc #'.$slider_handle.'").css({"display" : "block"}); });';
|
@@ -185,7 +191,7 @@ function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1
|
|
185 |
jQuery("#'.$slider_handle.'").cycle({
|
186 |
fx: "'.$smooth_slider['fx'].'",
|
187 |
speed:"'.$smooth_slider['transition'] * 100 .'",
|
188 |
-
timeout:
|
189 |
if ($smooth_slider['prev_next'] == 1){
|
190 |
$html.='next: "#'.$slider_handle.'_next",
|
191 |
prev:"#'.$slider_handle.'_prev",';
|
@@ -220,8 +226,15 @@ function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1
|
|
220 |
}
|
221 |
|
222 |
if(!empty($smooth_media_queries)){
|
223 |
-
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
$html.='});';
|
227 |
//Action hook
|
@@ -244,11 +257,11 @@ function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1
|
|
244 |
$html.='<div id="'.$slider_handle.'_nav" class="smooth_nav">'.$smooth_slider['custom_nav'].'</div>';
|
245 |
}
|
246 |
if ($smooth_slider['prev_next'] == 1){
|
247 |
-
$html.='<div id="'.$slider_handle.'_next" class="smooth_next"
|
248 |
-
<div id="'.$slider_handle.'_prev" class="smooth_prev"
|
249 |
}
|
250 |
if($smooth_slider['support'] == '1'){
|
251 |
-
$html.='<div class="sldrlink" '.$smooth_slider_css['sldrlink'].'><a href="http://
|
252 |
}
|
253 |
$html.='<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
254 |
</div>';
|
@@ -258,7 +271,10 @@ function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1
|
|
258 |
|
259 |
//Basic Smooth Slider
|
260 |
function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
|
261 |
-
global $smooth_slider;
|
|
|
|
|
|
|
262 |
global $wpdb, $table_prefix;
|
263 |
$table_name = $table_prefix.SLIDER_TABLE;
|
264 |
$post_table = $table_prefix."posts";
|
@@ -300,7 +316,10 @@ function get_smooth_slider($slider_id='',$offset=0) {
|
|
300 |
|
301 |
//For displaying category specific posts in chronologically reverse order, from Smooth Slider 2.3.3
|
302 |
function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offset=0, $out_echo = '1') {
|
303 |
-
global $smooth_slider;
|
|
|
|
|
|
|
304 |
global $wpdb, $table_prefix;
|
305 |
|
306 |
if (!empty($catg_slug)) {
|
@@ -362,11 +381,10 @@ require_once (dirname (__FILE__) . '/shortcodes_1.php');
|
|
362 |
require_once (dirname (__FILE__) . '/widgets_1.php');
|
363 |
|
364 |
function smooth_slider_enqueue_scripts() {
|
365 |
-
wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),
|
366 |
-
array('jquery'), SMOOTH_SLIDER_VER, false);
|
367 |
}
|
368 |
|
369 |
-
add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
370 |
|
371 |
function smooth_slider_enqueue_styles() {
|
372 |
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
@@ -404,12 +422,12 @@ global $smooth_slider;
|
|
404 |
wp_enqueue_script( 'jquery-ui-tabs' );
|
405 |
wp_enqueue_script( 'jquery-ui-core' );
|
406 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
407 |
-
wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),
|
408 |
-
array('jquery'), SMOOTH_SLIDER_VER, false);
|
409 |
wp_enqueue_script( 'smooth_slider_admin_js', smooth_slider_plugin_url( 'js/admin.js' ),
|
410 |
array('jquery'), SMOOTH_SLIDER_VER, false);
|
411 |
wp_enqueue_style( 'smooth_slider_admin_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
412 |
false, SMOOTH_SLIDER_VER, 'all');
|
|
|
413 |
wp_enqueue_style( 'smooth_slider_admin_css', smooth_slider_plugin_url( 'css/admin.css' ),
|
414 |
false, SMOOTH_SLIDER_VER, 'all');
|
415 |
}
|
@@ -421,21 +439,37 @@ add_action( 'admin_init', 'smooth_slider_admin_scripts' );
|
|
421 |
function smooth_slider_admin_head() {
|
422 |
global $smooth_slider;
|
423 |
if ( is_admin() ){ // admin actions
|
424 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
// Sliders page only
|
426 |
-
if ( isset($_GET['page']) && 'smooth-slider-admin' == $_GET['page'] ) {
|
427 |
-
|
428 |
-
|
429 |
-
<script type="text/javascript">
|
430 |
-
// <![CDATA[
|
431 |
-
jQuery(document).ready(function() {
|
432 |
-
jQuery("#slider_tabs").tabs();
|
433 |
-
<?php foreach($sliders as $slider){?>
|
434 |
-
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
435 |
-
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
436 |
-
<?php } ?>
|
437 |
-
});
|
438 |
-
function confirmRemove()
|
439 |
{
|
440 |
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
441 |
if (agree)
|
@@ -473,14 +507,9 @@ if ( is_admin() ){ // admin actions
|
|
473 |
} //Sliders page only
|
474 |
|
475 |
// Settings page only
|
476 |
-
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
|
477 |
-
|
478 |
-
|
479 |
-
jQuery(document).ready(function() {
|
480 |
-
jQuery("#slider_tabs").tabs();
|
481 |
-
});
|
482 |
-
</script>
|
483 |
-
<?php wp_print_scripts( 'farbtastic' );
|
484 |
wp_print_styles( 'farbtastic' );
|
485 |
?>
|
486 |
<script type="text/javascript">
|
@@ -590,7 +619,35 @@ jQuery(document).ready(function() {
|
|
590 |
jQuery('#sldr_close').click(function () {
|
591 |
jQuery('#sldr_message').fadeOut("slow");
|
592 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
</script>
|
595 |
<style type="text/css">
|
596 |
.color-picker-wrap {
|
@@ -607,13 +664,18 @@ jQuery(document).ready(function() {
|
|
607 |
<?php
|
608 |
} //for smooth slider option page
|
609 |
}//only for admin
|
|
|
|
|
|
|
610 |
}
|
611 |
add_action('admin_head', 'smooth_slider_admin_head');
|
612 |
|
613 |
//get inline css with style attribute attached
|
614 |
function smooth_get_inline_css($echo='0'){
|
615 |
-
global $smooth_slider;
|
616 |
-
|
|
|
|
|
617 |
global $post;
|
618 |
if(is_singular()) {
|
619 |
$smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
@@ -628,7 +690,7 @@ function smooth_get_inline_css($echo='0'){
|
|
628 |
$style_start= ($echo=='0') ? 'style="':'';
|
629 |
$style_end= ($echo=='0') ? '"':'';
|
630 |
//smooth_slider
|
631 |
-
$smooth_slider_css['smooth_slider']=$style_start.'width:'.$smooth_slider['width'].'px;height:'.$smooth_slider['height'].'px;background-color:'. ( ($smooth_slider['bg'] == '1') ? "transparent" : $smooth_slider['bg_color'] ) .';border:'. $smooth_slider['border'].'px solid '.$smooth_slider['brcolor'].';'.$style_end;
|
632 |
|
633 |
if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){$slider_title_font = "bold";} else { $slider_title_font = "normal"; }
|
634 |
if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){$slider_title_style = "italic";} else {$slider_title_style = "normal";}
|
@@ -637,12 +699,13 @@ function smooth_get_inline_css($echo='0'){
|
|
637 |
|
638 |
if ($smooth_slider['bg'] == '1') { $smooth_slideri_bg = "transparent";} else { $smooth_slideri_bg = $smooth_slider['bg_color']; }
|
639 |
//smooth_slideri
|
640 |
-
$smooth_slider_css['smooth_slideri']=$style_start.'width:'. ( ($smooth_slider['prev_next'] == 1) ? ( $smooth_slider['width'] - 48 ): $smooth_slider['width'] ) .'px;margin:0px '. ( ($smooth_slider['prev_next'] == 1) ? "24": "0" ) .'px 0px '. ( ($smooth_slider['prev_next'] == 1) ? "24": "0" ) .'px;'.$style_end;
|
641 |
|
642 |
if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){$ptitle_fweight = "bold";} else {$ptitle_fweight = "normal";}
|
643 |
if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){$ptitle_fstyle = "italic";} else {$ptitle_fstyle = "normal";}
|
|
|
644 |
//smooth_slider_h2
|
645 |
-
$smooth_slider_css['smooth_slider_h2']=$style_start.'clear:none;line-height:'. ($smooth_slider['ptitle_fsize'] + 3) .'px;font-family:'. $smooth_slider['ptitle_font'].';font-size:'.$smooth_slider['ptitle_fsize'].'px;font-weight:'.$ptitle_fweight.';font-style:'.$ptitle_fstyle.';color:'.$smooth_slider['ptitle_fcolor'].';margin:
|
646 |
|
647 |
//smooth_slider_h2 a
|
648 |
$smooth_slider_css['smooth_slider_h2_a']=$style_start.'color:'.$smooth_slider['ptitle_fcolor'].';font-size:'.$smooth_slider['ptitle_fsize'].'px;font-weight:'.$ptitle_fweight.';font-style:'.$ptitle_fstyle.';'.$style_end;
|
@@ -658,9 +721,12 @@ function smooth_get_inline_css($echo='0'){
|
|
658 |
if($smooth_slider['img_size'] == '1'){ $thumb_width= 'width:'. $smooth_slider['img_width'].'px;';} else{$thumb_width='';}
|
659 |
//smooth_slider_thumbnail
|
660 |
$smooth_slider_css['smooth_slider_thumbnail']=$style_start.'float:'.$smooth_slider['img_align'].';margin:0 '.$thumb_margin_right.'px 0 '.$thumb_margin_left.'px;max-height:'.$smooth_slider['img_height'].'px;border:'.$smooth_slider['img_border'].'px solid '.$smooth_slider['img_brcolor'].';'.$thumb_width.$style_end;
|
|
|
|
|
|
|
661 |
|
662 |
//smooth_slider_p_more
|
663 |
-
$smooth_slider_css['smooth_slider_p_more']=$style_start.'color:'.$smooth_slider['
|
664 |
|
665 |
$smooth_slider_css['sldrlink']=$style_start.'padding-right:'. ( ($smooth_slider['prev_next'] == 1) ? "10" : "0" ) .'px;"';
|
666 |
$smooth_slider_css['sldrlink_a']='style="color:'.$smooth_slider['content_fcolor'].' !important;'.$style_end;
|
@@ -677,4 +743,4 @@ if($css and !empty($css)){?>
|
|
677 |
}
|
678 |
add_action('wp_head', 'smooth_slider_css');
|
679 |
add_action('admin_head', 'smooth_slider_css');
|
680 |
-
?>
|
125 |
//filter hook
|
126 |
$smooth_slide_image=apply_filters('smooth_slide_image',$smooth_slide_image,$post_id,$smooth_slider,$smooth_slider_css);
|
127 |
|
128 |
+
$thumbnail_image=get_post_meta($post_id, '_disable_image', true);
|
129 |
+
if($thumbnail_image!='1')
|
130 |
+
$html .= $smooth_slide_image;
|
131 |
|
132 |
+
/* Added for embeding any shortcode on slide - start */
|
133 |
+
$smooth_eshortcode=get_post_meta($post_id, '_smooth_embed_shortcode', true);
|
134 |
+
if(!empty($smooth_eshortcode)){
|
135 |
+
$shortcode_html=do_shortcode($smooth_eshortcode);
|
136 |
+
$html.='<div class="smooth_slider_thumbnail"><div class="smooth_slider_eshortcode" '.$smooth_slider_css['smooth_slider_eshortcode'].'>'.$shortcode_html.'</div></div>';
|
137 |
+
}
|
138 |
+
/* Added for embeding any shortcode on slide - end */
|
139 |
+
|
140 |
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
141 |
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
142 |
else
|
168 |
}
|
169 |
|
170 |
function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1'){
|
171 |
+
global $smooth_slider,$default_slider;
|
172 |
+
foreach($default_slider as $key=>$value){
|
173 |
+
if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
|
174 |
+
}
|
175 |
$smooth_sldr_j = $r_array[0];
|
176 |
$smooth_slider_css = smooth_get_inline_css();
|
177 |
$html='';
|
178 |
|
179 |
+
wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
|
180 |
+
wp_enqueue_script( 'smooth-slider', smooth_slider_plugin_url( 'js/smooth.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){
|
183 |
$fouc='jQuery("html").addClass("smooth_slider_fouc");jQuery(document).ready(function() { jQuery(".smooth_slider_fouc #'.$slider_handle.'").css({"display" : "block"}); });';
|
191 |
jQuery("#'.$slider_handle.'").cycle({
|
192 |
fx: "'.$smooth_slider['fx'].'",
|
193 |
speed:"'.$smooth_slider['transition'] * 100 .'",
|
194 |
+
timeout: '. ( ($smooth_slider['autostep'] == '1') ? ( $smooth_slider['speed'] * 1000 ) : 0 ) .',';
|
195 |
if ($smooth_slider['prev_next'] == 1){
|
196 |
$html.='next: "#'.$slider_handle.'_next",
|
197 |
prev:"#'.$slider_handle.'_prev",';
|
226 |
}
|
227 |
|
228 |
if(!empty($smooth_media_queries)){
|
229 |
+
// $html.='jQuery("head").append("<style type=\"text/css\">'. $smooth_media_queries .'</style>");';
|
230 |
}
|
231 |
+
$html.='jQuery("#'.$slider_handle.'").smoothSliderHeight();';
|
232 |
+
|
233 |
+
$html.='jQuery(window).resize(function() {
|
234 |
+
smooth_waitForFinalEvent(function(){
|
235 |
+
jQuery("#'.$slider_handle.'").smoothSliderHeight();
|
236 |
+
}, 1000, "'.$slider_handle.'");
|
237 |
+
});';
|
238 |
|
239 |
$html.='});';
|
240 |
//Action hook
|
257 |
$html.='<div id="'.$slider_handle.'_nav" class="smooth_nav">'.$smooth_slider['custom_nav'].'</div>';
|
258 |
}
|
259 |
if ($smooth_slider['prev_next'] == 1){
|
260 |
+
$html.='<div id="'.$slider_handle.'_next" class="smooth_next"></div>
|
261 |
+
<div id="'.$slider_handle.'_prev" class="smooth_prev"></div>';
|
262 |
}
|
263 |
if($smooth_slider['support'] == '1'){
|
264 |
+
$html.='<div class="sldrlink" '.$smooth_slider_css['sldrlink'].'><a href="http://slidervilla.com/smooth-slider/" target="_blank" '.$smooth_slider_css['sldrlink_a'].'>Smooth Slider</a></div>';
|
265 |
}
|
266 |
$html.='<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
267 |
</div>';
|
271 |
|
272 |
//Basic Smooth Slider
|
273 |
function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
|
274 |
+
global $smooth_slider,$default_slider;
|
275 |
+
foreach($default_slider as $key=>$value){
|
276 |
+
if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
|
277 |
+
}
|
278 |
global $wpdb, $table_prefix;
|
279 |
$table_name = $table_prefix.SLIDER_TABLE;
|
280 |
$post_table = $table_prefix."posts";
|
316 |
|
317 |
//For displaying category specific posts in chronologically reverse order, from Smooth Slider 2.3.3
|
318 |
function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offset=0, $out_echo = '1') {
|
319 |
+
global $smooth_slider,$default_slider;
|
320 |
+
foreach($default_slider as $key=>$value){
|
321 |
+
if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
|
322 |
+
}
|
323 |
global $wpdb, $table_prefix;
|
324 |
|
325 |
if (!empty($catg_slug)) {
|
381 |
require_once (dirname (__FILE__) . '/widgets_1.php');
|
382 |
|
383 |
function smooth_slider_enqueue_scripts() {
|
384 |
+
//wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
|
|
|
385 |
}
|
386 |
|
387 |
+
//add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
388 |
|
389 |
function smooth_slider_enqueue_styles() {
|
390 |
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
422 |
wp_enqueue_script( 'jquery-ui-tabs' );
|
423 |
wp_enqueue_script( 'jquery-ui-core' );
|
424 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
425 |
+
//wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
|
|
|
426 |
wp_enqueue_script( 'smooth_slider_admin_js', smooth_slider_plugin_url( 'js/admin.js' ),
|
427 |
array('jquery'), SMOOTH_SLIDER_VER, false);
|
428 |
wp_enqueue_style( 'smooth_slider_admin_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
429 |
false, SMOOTH_SLIDER_VER, 'all');
|
430 |
+
wp_enqueue_script( 'jquery.bpopup.min', smooth_slider_plugin_url( 'js/jquery.bpopup.min.js' ),'', PINWHEEL_SLIDER_VER, false);
|
431 |
wp_enqueue_style( 'smooth_slider_admin_css', smooth_slider_plugin_url( 'css/admin.css' ),
|
432 |
false, SMOOTH_SLIDER_VER, 'all');
|
433 |
}
|
439 |
function smooth_slider_admin_head() {
|
440 |
global $smooth_slider;
|
441 |
if ( is_admin() ){ // admin actions
|
442 |
+
if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page'] or 'smooth-slider-settings' == $_GET['page'])) {
|
443 |
+
$smooth_slider_curr=get_option('smooth_slider_options');
|
444 |
+
$active_tab=(isset($smooth_slider_curr['active_tab']))?$smooth_slider_curr['active_tab']:0;
|
445 |
+
if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page']) ){ if(isset($_POST['active_tab']) ) $active_tab=$_POST['active_tab'];else $active_tab = 0;}
|
446 |
+
if(empty($active_tab)){$active_tab=0;}
|
447 |
+
|
448 |
+
|
449 |
+
?>
|
450 |
+
<script type="text/javascript">
|
451 |
+
// <![CDATA[
|
452 |
+
jQuery(document).ready(function() {
|
453 |
+
jQuery("#slider_tabs").tabs({fx: { opacity: "toggle", duration: 300}, active: <?php echo $active_tab;?> }).addClass( "ui-tabs-vertical-left ui-helper-clearfix" );
|
454 |
+
jQuery( "#slider_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
|
455 |
+
<?php if ( isset($_GET['page']) && (( 'smooth-slider-settings' == $_GET['page']) or ('smooth-slider-admin' == $_GET['page']) ) ) { ?>
|
456 |
+
jQuery( "#slider_tabs" ).on( "tabsactivate", function( event, ui ) {
|
457 |
+
jQuery( "#smooth_activetab, .smooth_activetab" ).val( jQuery( "#slider_tabs" ).tabs( "option", "active" ) );
|
458 |
+
});
|
459 |
+
<?php }
|
460 |
+
$sliders = ss_get_sliders();
|
461 |
+
foreach($sliders as $slider){ ?>
|
462 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
463 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
464 |
+
<?php } ?>
|
465 |
+
|
466 |
+
});
|
467 |
+
</script> <?php
|
468 |
+
}
|
469 |
// Sliders page only
|
470 |
+
if ( isset($_GET['page']) && 'smooth-slider-admin' == $_GET['page'] ) {?>
|
471 |
+
<script type="text/javascript">
|
472 |
+
function confirmRemove()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
{
|
474 |
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
475 |
if (agree)
|
507 |
} //Sliders page only
|
508 |
|
509 |
// Settings page only
|
510 |
+
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
|
511 |
+
$smooth_slider_curr=get_option('smooth_slider_options');
|
512 |
+
wp_print_scripts( 'farbtastic' );
|
|
|
|
|
|
|
|
|
|
|
513 |
wp_print_styles( 'farbtastic' );
|
514 |
?>
|
515 |
<script type="text/javascript">
|
619 |
jQuery('#sldr_close').click(function () {
|
620 |
jQuery('#sldr_message').fadeOut("slow");
|
621 |
});
|
622 |
+
//for seventh color box
|
623 |
+
jQuery('#colorbox_7').farbtastic('#color_value_7');
|
624 |
+
jQuery('#color_picker_7').click(function () {
|
625 |
+
if (jQuery('#colorbox_7').css('display') == "block") {
|
626 |
+
jQuery('#colorbox_7').fadeOut("slow"); }
|
627 |
+
else {
|
628 |
+
jQuery('#colorbox_7').fadeIn("slow"); }
|
629 |
+
});
|
630 |
+
var colorpick_7 = false;
|
631 |
+
jQuery(document).mousedown(function(){
|
632 |
+
if (colorpick_7 == true) {
|
633 |
+
return; }
|
634 |
+
jQuery('#colorbox_7').fadeOut("slow");
|
635 |
+
});
|
636 |
+
jQuery(document).mouseup(function(){
|
637 |
+
colorpick_7 = false;
|
638 |
+
});
|
639 |
+
jQuery('#sldr_close').click(function () {
|
640 |
+
jQuery('#sldr_message').fadeOut("slow");
|
641 |
+
});
|
642 |
});
|
643 |
+
function confirmSettingsImport()
|
644 |
+
{
|
645 |
+
var agree=confirm("Reset these Settings to Imported Settings Set??");
|
646 |
+
if (agree)
|
647 |
+
return true ;
|
648 |
+
else
|
649 |
+
return false ;
|
650 |
+
}
|
651 |
</script>
|
652 |
<style type="text/css">
|
653 |
.color-picker-wrap {
|
664 |
<?php
|
665 |
} //for smooth slider option page
|
666 |
}//only for admin
|
667 |
+
?>
|
668 |
+
<style type="text/css">#adminmenu #toplevel_page_smooth-slider-admin div.wp-menu-image:before { content: "\f233"; }</style>
|
669 |
+
<?php
|
670 |
}
|
671 |
add_action('admin_head', 'smooth_slider_admin_head');
|
672 |
|
673 |
//get inline css with style attribute attached
|
674 |
function smooth_get_inline_css($echo='0'){
|
675 |
+
global $smooth_slider,$default_slider;
|
676 |
+
foreach($default_slider as $key=>$value){
|
677 |
+
if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
|
678 |
+
}
|
679 |
global $post;
|
680 |
if(is_singular()) {
|
681 |
$smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
690 |
$style_start= ($echo=='0') ? 'style="':'';
|
691 |
$style_end= ($echo=='0') ? '"':'';
|
692 |
//smooth_slider
|
693 |
+
$smooth_slider_css['smooth_slider']=$style_start.'max-width:'.$smooth_slider['width'].'px;min-height:'.$smooth_slider['height'].'px;background-color:'. ( ($smooth_slider['bg'] == '1') ? "transparent" : $smooth_slider['bg_color'] ) .';border:'. $smooth_slider['border'].'px solid '.$smooth_slider['brcolor'].';'.$style_end;
|
694 |
|
695 |
if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){$slider_title_font = "bold";} else { $slider_title_font = "normal"; }
|
696 |
if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){$slider_title_style = "italic";} else {$slider_title_style = "normal";}
|
699 |
|
700 |
if ($smooth_slider['bg'] == '1') { $smooth_slideri_bg = "transparent";} else { $smooth_slideri_bg = $smooth_slider['bg_color']; }
|
701 |
//smooth_slideri
|
702 |
+
$smooth_slider_css['smooth_slideri']=$style_start.'max-width:'. ( ($smooth_slider['prev_next'] == 1) ? ( $smooth_slider['width'] - 48 ): $smooth_slider['width'] ) .'px;margin:0px '. ( ($smooth_slider['prev_next'] == 1) ? "24": "0" ) .'px 0px '. ( ($smooth_slider['prev_next'] == 1) ? "24": "0" ) .'px;'.$style_end;
|
703 |
|
704 |
if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){$ptitle_fweight = "bold";} else {$ptitle_fweight = "normal";}
|
705 |
if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){$ptitle_fstyle = "italic";} else {$ptitle_fstyle = "normal";}
|
706 |
+
if ($smooth_slider['img_align'] == "none"){$margin="1em 0 5px 0;";}else{$margin="0 0 5px 0;";}
|
707 |
//smooth_slider_h2
|
708 |
+
$smooth_slider_css['smooth_slider_h2']=$style_start.'clear:none;line-height:'. ($smooth_slider['ptitle_fsize'] + 3) .'px;font-family:'. $smooth_slider['ptitle_font'].';font-size:'.$smooth_slider['ptitle_fsize'].'px;font-weight:'.$ptitle_fweight.';font-style:'.$ptitle_fstyle.';color:'.$smooth_slider['ptitle_fcolor'].';margin:'.$margin.$style_end;
|
709 |
|
710 |
//smooth_slider_h2 a
|
711 |
$smooth_slider_css['smooth_slider_h2_a']=$style_start.'color:'.$smooth_slider['ptitle_fcolor'].';font-size:'.$smooth_slider['ptitle_fsize'].'px;font-weight:'.$ptitle_fweight.';font-style:'.$ptitle_fstyle.';'.$style_end;
|
721 |
if($smooth_slider['img_size'] == '1'){ $thumb_width= 'width:'. $smooth_slider['img_width'].'px;';} else{$thumb_width='';}
|
722 |
//smooth_slider_thumbnail
|
723 |
$smooth_slider_css['smooth_slider_thumbnail']=$style_start.'float:'.$smooth_slider['img_align'].';margin:0 '.$thumb_margin_right.'px 0 '.$thumb_margin_left.'px;max-height:'.$smooth_slider['img_height'].'px;border:'.$smooth_slider['img_border'].'px solid '.$smooth_slider['img_brcolor'].';'.$thumb_width.$style_end;
|
724 |
+
|
725 |
+
//smooth_slider_eshortcode
|
726 |
+
$smooth_slider_css['smooth_slider_eshortcode']=$style_start.'float:'.$smooth_slider['img_align'].';margin:0 '.$thumb_margin_right.'px 0 '.$thumb_margin_left.'px;height:'.$smooth_slider['img_height'].'px;border:'.$smooth_slider['img_border'].'px solid '.$smooth_slider['img_brcolor'].';'.$thumb_width.$style_end;
|
727 |
|
728 |
//smooth_slider_p_more
|
729 |
+
$smooth_slider_css['smooth_slider_p_more']=$style_start.'color:'.$smooth_slider['readmorecolor'].';font-family:'.$smooth_slider['content_font'].';font-size:'.$smooth_slider['content_fsize'].'px;margin-left: 10px;'.$style_end;
|
730 |
|
731 |
$smooth_slider_css['sldrlink']=$style_start.'padding-right:'. ( ($smooth_slider['prev_next'] == 1) ? "10" : "0" ) .'px;"';
|
732 |
$smooth_slider_css['sldrlink_a']='style="color:'.$smooth_slider['content_fcolor'].' !important;'.$style_end;
|
743 |
}
|
744 |
add_action('wp_head', 'smooth_slider_css');
|
745 |
add_action('admin_head', 'smooth_slider_css');
|
746 |
+
?>
|
smooth-slider.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Smooth Slider
|
4 |
-
Plugin URI: http://
|
5 |
-
Description: Smooth
|
6 |
-
Version: 2.
|
7 |
-
Author:
|
8 |
-
Author URI: http://
|
9 |
Wordpress version supported: 2.9 and above
|
10 |
*/
|
11 |
|
12 |
-
/* Copyright 2009-
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
@@ -25,85 +25,33 @@ Wordpress version supported: 2.9 and above
|
|
25 |
along with this program; if not, write to the Free Software
|
26 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
-
//Please visit Plugin page http://
|
29 |
//on activation
|
30 |
//defined global variables and constants here
|
31 |
-
global $smooth_slider;
|
32 |
$smooth_slider = get_option('smooth_slider_options');
|
|
|
33 |
define('SLIDER_TABLE','smooth_slider'); //Slider TABLE NAME
|
34 |
define('PREV_SLIDER_TABLE','slider'); //Slider TABLE NAME
|
35 |
define('SLIDER_META','smooth_slider_meta'); //Meta TABLE NAME
|
36 |
define('SLIDER_POST_META','smooth_slider_postmeta'); //Meta TABLE NAME
|
37 |
-
define("SMOOTH_SLIDER_VER","2.
|
38 |
if ( ! defined( 'SMOOTH_SLIDER_PLUGIN_BASENAME' ) )
|
39 |
define( 'SMOOTH_SLIDER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
40 |
if ( ! defined( 'SMOOTH_SLIDER_CSS_DIR' ) ){
|
41 |
-
if($smooth_slider['ver']=='step') define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/styles/' );
|
42 |
else define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/skins/' );
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
global $wpdb, $table_prefix;
|
49 |
-
$table_name = $table_prefix.SLIDER_TABLE;
|
50 |
-
if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
|
51 |
-
$sql = "CREATE TABLE $table_name (
|
52 |
-
id int(5) NOT NULL AUTO_INCREMENT,
|
53 |
-
post_id int(11) NOT NULL,
|
54 |
-
date datetime NOT NULL,
|
55 |
-
slider_id int(5) NOT NULL DEFAULT '1',
|
56 |
-
UNIQUE KEY id(id)
|
57 |
-
);";
|
58 |
-
$rs = $wpdb->query($sql);
|
59 |
-
|
60 |
-
$prev_table_name = $table_prefix.PREV_SLIDER_TABLE;
|
61 |
-
|
62 |
-
if($wpdb->get_var("show tables like '$prev_table_name'") == $prev_table_name) {
|
63 |
-
$prev_slider_data = ss_get_prev_slider();
|
64 |
-
foreach ($prev_slider_data as $prev_slider_row){
|
65 |
-
$prev_post_id = $prev_slider_row['id'];
|
66 |
-
$prev_date_time = $prev_slider_row['date'];
|
67 |
-
if ($prev_post_id) {
|
68 |
-
$sql = "INSERT INTO $table_name (post_id,date) VALUES('$prev_post_id','$prev_date_time');";
|
69 |
-
$result = $wpdb->query($sql);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
add_cf5_column_if_not_exist($table_name, 'slide_order', "ALTER TABLE ".$table_name." ADD slide_order int(5) NOT NULL DEFAULT '0';");
|
75 |
-
|
76 |
-
$meta_table_name = $table_prefix.SLIDER_META;
|
77 |
-
if($wpdb->get_var("show tables like '$meta_table_name'") != $meta_table_name) {
|
78 |
-
$sql = "CREATE TABLE $meta_table_name (
|
79 |
-
slider_id int(5) NOT NULL AUTO_INCREMENT,
|
80 |
-
slider_name varchar(100) NOT NULL default '',
|
81 |
-
UNIQUE KEY slider_id(slider_id)
|
82 |
-
);";
|
83 |
-
$rs2 = $wpdb->query($sql);
|
84 |
-
|
85 |
-
$sql = "INSERT INTO $meta_table_name (slider_id,slider_name) VALUES('1','Smooth Slider');";
|
86 |
-
$rs3 = $wpdb->query($sql);
|
87 |
-
}
|
88 |
-
|
89 |
-
$slider_postmeta = $table_prefix.SLIDER_POST_META;
|
90 |
-
if($wpdb->get_var("show tables like '$slider_postmeta'") != $slider_postmeta) {
|
91 |
-
$sql = "CREATE TABLE $slider_postmeta (
|
92 |
-
post_id int(11) NOT NULL,
|
93 |
-
slider_id int(5) NOT NULL default '1',
|
94 |
-
UNIQUE KEY post_id(post_id)
|
95 |
-
);";
|
96 |
-
$rs4 = $wpdb->query($sql);
|
97 |
-
}
|
98 |
-
// Need to delete the previously created options in old versions and create only one option field for Smooth Slider
|
99 |
-
$default_slider = array();
|
100 |
-
$default_slider = array('speed'=>'7',
|
101 |
'no_posts'=>'5',
|
102 |
'bg_color'=>'#ffffff',
|
103 |
'height'=>'250',
|
104 |
'width'=>'450',
|
105 |
-
'border'=>'
|
106 |
-
'brcolor'=>'#
|
107 |
'prev_next'=>'0',
|
108 |
'goto_slide'=>'1',
|
109 |
'title_text'=>'Featured Posts',
|
@@ -138,88 +86,160 @@ function install_smooth_slider() {
|
|
138 |
'crop'=>'0',
|
139 |
'transition'=>'5',
|
140 |
'autostep'=>'1',
|
141 |
-
'multiple_sliders'=>'
|
142 |
-
'navimg_w'=>'
|
143 |
-
'navimg_ht'=>'
|
144 |
'content_limit'=>'20',
|
145 |
'stylesheet'=>'default',
|
146 |
'shortcode'=>'1',
|
147 |
'rand'=>'0',
|
148 |
'ver'=>'j',
|
149 |
-
'support'=>'
|
150 |
'fouc'=>'0',
|
151 |
'fx'=>'scrollHorz',
|
152 |
-
'responsive'=>'0',
|
153 |
'css'=>'',
|
154 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
);
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
-
|
|
|
180 |
$smooth_slider['img_pick'] = array('1',$cskey,'1','1','1','1');
|
|
|
|
|
|
|
|
|
181 |
}
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
elseif($smooth_slider['user_level']<=7 and $smooth_slider['user_level'] >2){
|
209 |
-
$smooth_slider['user_level']='edit_others_posts';
|
210 |
-
}
|
211 |
-
elseif($smooth_slider['user_level']==2){
|
212 |
-
$smooth_slider['user_level']='publish_posts';
|
213 |
-
}
|
214 |
-
else {
|
215 |
-
$smooth_slider['user_level']='edit_posts';
|
216 |
}
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
221 |
}
|
222 |
register_activation_hook( __FILE__, 'install_smooth_slider' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
require_once (dirname (__FILE__) . '/includes/smooth-slider-functions.php');
|
224 |
require_once (dirname (__FILE__) . '/includes/sslider-get-the-image-functions.php');
|
225 |
|
@@ -283,14 +303,14 @@ global $smooth_slider;
|
|
283 |
}
|
284 |
$slider_style = get_post_meta($post_id,'_smooth_slider_style',true);
|
285 |
$post_slider_style=$_POST['_smooth_slider_style'];
|
286 |
-
if($slider_style != $post_slider_style
|
287 |
update_post_meta($post_id, '_smooth_slider_style', $_POST['_smooth_slider_style']);
|
288 |
}
|
289 |
|
290 |
$thumbnail_key = $smooth_slider['img_pick'][1];
|
291 |
$sslider_thumbnail = get_post_meta($post_id,$thumbnail_key,true);
|
292 |
$post_slider_thumbnail=$_POST['sslider_thumbnail'];
|
293 |
-
if($sslider_thumbnail != $post_slider_thumbnail
|
294 |
update_post_meta($post_id, $thumbnail_key, $_POST['sslider_thumbnail']);
|
295 |
}
|
296 |
|
@@ -298,15 +318,28 @@ global $smooth_slider;
|
|
298 |
$link=$_POST['sslider_link'];
|
299 |
//$sldr_post=get_post($post_id);
|
300 |
//if((!isset($link) or empty($link)) and $sldr_post->post_status == 'publish' ){$link=get_permalink($post_id);}//from 2.3.3
|
301 |
-
if($sslider_link != $link
|
302 |
update_post_meta($post_id, 'slide_redirect_url', $link);
|
303 |
}
|
304 |
|
305 |
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
306 |
$post_sslider_nolink = $_POST['sslider_nolink'];
|
307 |
-
if($sslider_nolink != $
|
308 |
update_post_meta($post_id, 'sslider_nolink', $_POST['sslider_nolink']);
|
309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
} //sldr_verify
|
312 |
}
|
@@ -416,36 +449,36 @@ function add_to_slider_checkbox() {
|
|
416 |
$sliders = ss_get_sliders();
|
417 |
?>
|
418 |
<div id="slider_checkbox">
|
419 |
-
|
420 |
-
|
421 |
-
|
|
|
|
|
422 |
<?php foreach ($sliders as $slider) { ?>
|
423 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(in_array($slider['slider_id'],$post_slider_arr)){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
424 |
<?php } ?>
|
425 |
-
</select>
|
426 |
|
427 |
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
428 |
-
<
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
<input type="checkbox" class="sldr_post" name="display_slider" value="1" <?php if(ss_slider_on_this_post($post_id)){echo "checked";}?> />
|
433 |
-
<label for="display_slider"><?php _e('Display ','smooth-slider'); ?>
|
434 |
-
<select name="display_slider_name">
|
435 |
<?php foreach ($sliders as $slider) { ?>
|
436 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(ss_post_on_slider($post_id,$slider['slider_id'])){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
437 |
<?php } ?>
|
438 |
-
</select> <?php _e('on this Post/Page (you need to add the Smooth Slider template tag manually on your page.php/single.php or whatever page template file)','smooth-slider'); ?></label>
|
439 |
<?php } ?>
|
440 |
|
441 |
<input type="hidden" name="sldr-verify" id="sldr-verify" value="<?php echo wp_create_nonce('SmoothSlider');?>" />
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
|
|
|
|
446 |
$slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
447 |
?>
|
448 |
-
|
449 |
<?php
|
450 |
$directory = SMOOTH_SLIDER_CSS_DIR;
|
451 |
if ($handle = opendir($directory)) {
|
@@ -456,22 +489,39 @@ function add_to_slider_checkbox() {
|
|
456 |
closedir($handle);
|
457 |
}
|
458 |
?>
|
459 |
-
</select>
|
460 |
|
461 |
<?php $thumbnail_key = $smooth_slider['img_pick'][1];
|
462 |
$sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
|
463 |
-
|
464 |
-
|
|
|
|
|
465 |
?>
|
466 |
-
<
|
467 |
-
|
468 |
-
<
|
469 |
-
|
470 |
-
|
471 |
-
<
|
472 |
-
|
473 |
-
<input type="
|
474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
</div>
|
476 |
|
477 |
<?php }
|
@@ -545,4 +595,4 @@ function sslider_plugin_action_links( $links, $file ) {
|
|
545 |
require_once (dirname (__FILE__) . '/slider_versions/smooth_1.php');
|
546 |
require_once (dirname (__FILE__) . '/settings/settings.php');
|
547 |
require_once (dirname (__FILE__) . '/includes/media-images.php');
|
548 |
-
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Smooth Slider
|
4 |
+
Plugin URI: http://slidervilla.com/smooth-slider/
|
5 |
+
Description: Smooth slider adds a responsive featured content on image slider using shortcode, widget and template tags. Create and embed featured content slider, recent post slider, category slider in less than 60 seconds.
|
6 |
+
Version: 2.5
|
7 |
+
Author: SliderVilla
|
8 |
+
Author URI: http://slidervilla.com/
|
9 |
Wordpress version supported: 2.9 and above
|
10 |
*/
|
11 |
|
12 |
+
/* Copyright 2009-2014 SliderVilla (email : support@slidervilla.com)
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
25 |
along with this program; if not, write to the Free Software
|
26 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
+
//Please visit Plugin page http://slidervilla.com/smooth-slider/ for Changelog
|
29 |
//on activation
|
30 |
//defined global variables and constants here
|
31 |
+
global $smooth_slider,$default_slider,$smooth_db_version;
|
32 |
$smooth_slider = get_option('smooth_slider_options');
|
33 |
+
$smooth_db_version='2.5'; //current version of smooth slider database
|
34 |
define('SLIDER_TABLE','smooth_slider'); //Slider TABLE NAME
|
35 |
define('PREV_SLIDER_TABLE','slider'); //Slider TABLE NAME
|
36 |
define('SLIDER_META','smooth_slider_meta'); //Meta TABLE NAME
|
37 |
define('SLIDER_POST_META','smooth_slider_postmeta'); //Meta TABLE NAME
|
38 |
+
define("SMOOTH_SLIDER_VER","2.5",false);//Current Version of Smooth Slider
|
39 |
if ( ! defined( 'SMOOTH_SLIDER_PLUGIN_BASENAME' ) )
|
40 |
define( 'SMOOTH_SLIDER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
41 |
if ( ! defined( 'SMOOTH_SLIDER_CSS_DIR' ) ){
|
42 |
+
if(isset($smooth_slider['ver']) && $smooth_slider['ver']=='step') define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/styles/' );
|
43 |
else define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/skins/' );
|
44 |
}
|
45 |
+
|
46 |
+
// Need to delete the previously created options in old versions and create only one option field for Smooth Slider
|
47 |
+
$default_slider = array();
|
48 |
+
$default_slider = array('speed'=>'7',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
'no_posts'=>'5',
|
50 |
'bg_color'=>'#ffffff',
|
51 |
'height'=>'250',
|
52 |
'width'=>'450',
|
53 |
+
'border'=>'0',
|
54 |
+
'brcolor'=>'#dddddd',
|
55 |
'prev_next'=>'0',
|
56 |
'goto_slide'=>'1',
|
57 |
'title_text'=>'Featured Posts',
|
86 |
'crop'=>'0',
|
87 |
'transition'=>'5',
|
88 |
'autostep'=>'1',
|
89 |
+
'multiple_sliders'=>'1',
|
90 |
+
'navimg_w'=>'8',
|
91 |
+
'navimg_ht'=>'8',
|
92 |
'content_limit'=>'20',
|
93 |
'stylesheet'=>'default',
|
94 |
'shortcode'=>'1',
|
95 |
'rand'=>'0',
|
96 |
'ver'=>'j',
|
97 |
+
'support'=>'0',
|
98 |
'fouc'=>'0',
|
99 |
'fx'=>'scrollHorz',
|
|
|
100 |
'css'=>'',
|
101 |
+
'active_tab'=>'0',
|
102 |
+
'disable_preview'=>'0',
|
103 |
+
'preview'=>'2',
|
104 |
+
'slider_id'=>'1',
|
105 |
+
'catg_slug'=>'',
|
106 |
+
'popup'=>'1',
|
107 |
+
'readmorecolor'=>'#0092E4',
|
108 |
+
'noscript'=>''
|
109 |
);
|
110 |
+
// Create Text Domain For Translations
|
111 |
+
load_plugin_textdomain('smooth-slider', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
|
112 |
+
|
113 |
+
function install_smooth_slider() {
|
114 |
+
global $wpdb, $table_prefix,$smooth_db_version;
|
115 |
+
$installed_ver = get_site_option( "smooth_db_version" );
|
116 |
+
if( $installed_ver != $smooth_db_version ) {
|
117 |
+
$table_name = $table_prefix.SLIDER_TABLE;
|
118 |
+
if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
|
119 |
+
$sql = "CREATE TABLE $table_name (
|
120 |
+
id int(5) NOT NULL AUTO_INCREMENT,
|
121 |
+
post_id int(11) NOT NULL,
|
122 |
+
date datetime NOT NULL,
|
123 |
+
slider_id int(5) NOT NULL DEFAULT '1',
|
124 |
+
UNIQUE KEY id(id)
|
125 |
+
);";
|
126 |
+
$rs = $wpdb->query($sql);
|
127 |
+
|
128 |
+
$prev_table_name = $table_prefix.PREV_SLIDER_TABLE;
|
129 |
+
|
130 |
+
if($wpdb->get_var("show tables like '$prev_table_name'") == $prev_table_name) {
|
131 |
+
$prev_slider_data = ss_get_prev_slider();
|
132 |
+
foreach ($prev_slider_data as $prev_slider_row){
|
133 |
+
$prev_post_id = $prev_slider_row['id'];
|
134 |
+
$prev_date_time = $prev_slider_row['date'];
|
135 |
+
if ($prev_post_id) {
|
136 |
+
$sql = "INSERT INTO $table_name (post_id,date) VALUES('$prev_post_id','$prev_date_time');";
|
137 |
+
$result = $wpdb->query($sql);
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
add_cf5_column_if_not_exist($table_name, 'slide_order', "ALTER TABLE ".$table_name." ADD slide_order int(5) NOT NULL DEFAULT '0';");
|
143 |
+
|
144 |
+
$meta_table_name = $table_prefix.SLIDER_META;
|
145 |
+
if($wpdb->get_var("show tables like '$meta_table_name'") != $meta_table_name) {
|
146 |
+
$sql = "CREATE TABLE $meta_table_name (
|
147 |
+
slider_id int(5) NOT NULL AUTO_INCREMENT,
|
148 |
+
slider_name varchar(100) NOT NULL default '',
|
149 |
+
UNIQUE KEY slider_id(slider_id)
|
150 |
+
);";
|
151 |
+
$rs2 = $wpdb->query($sql);
|
152 |
+
|
153 |
+
$sql = "INSERT INTO $meta_table_name (slider_id,slider_name) VALUES('1','Smooth Slider');";
|
154 |
+
$rs3 = $wpdb->query($sql);
|
155 |
+
}
|
156 |
+
|
157 |
+
$slider_postmeta = $table_prefix.SLIDER_POST_META;
|
158 |
+
if($wpdb->get_var("show tables like '$slider_postmeta'") != $slider_postmeta) {
|
159 |
+
$sql = "CREATE TABLE $slider_postmeta (
|
160 |
+
post_id int(11) NOT NULL,
|
161 |
+
slider_id int(5) NOT NULL default '1',
|
162 |
+
UNIQUE KEY post_id(post_id)
|
163 |
+
);";
|
164 |
+
$rs4 = $wpdb->query($sql);
|
165 |
+
}
|
166 |
+
|
167 |
+
global $default_slider;
|
168 |
+
|
169 |
+
$smooth_slider = get_option('smooth_slider_options');
|
170 |
+
|
171 |
+
$img_pick = $smooth_slider['img_pick'];
|
172 |
+
|
173 |
+
if(is_array($img_pick)) {
|
174 |
+
$cskey = $smooth_slider['img_pick'][1];
|
175 |
+
}
|
176 |
+
else{
|
177 |
+
$cskey = 'slider_thumbnail';
|
178 |
}
|
179 |
+
|
180 |
+
if(!is_array($img_pick)) {
|
181 |
+
//if(!isset($smooth_slider['img_pick'][0])) {
|
182 |
+
if($smooth_slider['img_pick'] == '1') {
|
183 |
+
$smooth_slider['img_pick'] = array('0',$cskey,'0','0','1','1');
|
184 |
+
}
|
185 |
+
elseif($smooth_slider['img_pick'] == '0'){
|
186 |
+
$smooth_slider['img_pick'] = array('1',$cskey,'0','0','1','0');
|
187 |
+
}
|
188 |
+
else {
|
189 |
+
$smooth_slider['img_pick'] = array('1',$cskey,'1','1','1','1');
|
190 |
+
}
|
191 |
}
|
192 |
+
|
193 |
+
/* if(is_array($img_pick) and (count($img_pick)<6 or count($img_pick)>6)) {
|
194 |
$smooth_slider['img_pick'] = array('1',$cskey,'1','1','1','1');
|
195 |
+
}
|
196 |
+
*/
|
197 |
+
if(!$smooth_slider) {
|
198 |
+
$smooth_slider = array();
|
199 |
}
|
200 |
+
|
201 |
+
//if($smooth_slider and !isset($smooth_slider['ver'])){
|
202 |
+
$smooth_slider['stylesheet']='default';
|
203 |
+
//}
|
204 |
+
|
205 |
+
foreach($default_slider as $key=>$value) {
|
206 |
+
if(!isset($smooth_slider[$key])) {
|
207 |
+
$smooth_slider[$key] = $value;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
$smooth_slider['ver']='j';
|
212 |
+
|
213 |
+
if($smooth_slider['user_level']<=10 and $smooth_slider['user_level'] >=1) {
|
214 |
+
if($smooth_slider['user_level']<=10 and $smooth_slider['user_level'] >7) {
|
215 |
+
$smooth_slider['user_level']='manage_options';
|
216 |
+
}
|
217 |
+
elseif($smooth_slider['user_level']<=7 and $smooth_slider['user_level'] >2){
|
218 |
+
$smooth_slider['user_level']='edit_others_posts';
|
219 |
+
}
|
220 |
+
elseif($smooth_slider['user_level']==2){
|
221 |
+
$smooth_slider['user_level']='publish_posts';
|
222 |
+
}
|
223 |
+
else {
|
224 |
+
$smooth_slider['user_level']='edit_posts';
|
225 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
}
|
227 |
+
|
228 |
+
delete_option('smooth_slider_options');
|
229 |
+
update_option('smooth_slider_options',$smooth_slider);
|
230 |
+
update_site_option( "smooth_db_version", $smooth_db_version );
|
231 |
+
}
|
232 |
}
|
233 |
register_activation_hook( __FILE__, 'install_smooth_slider' );
|
234 |
+
/* Added for auto update - start */
|
235 |
+
function smooth_update_db_check() {
|
236 |
+
global $smooth_db_version;
|
237 |
+
if (get_site_option('smooth_db_version') != $smooth_db_version) {
|
238 |
+
install_smooth_slider();
|
239 |
+
}
|
240 |
+
}
|
241 |
+
add_action('plugins_loaded', 'smooth_update_db_check');
|
242 |
+
/* Added for auto update - end */
|
243 |
require_once (dirname (__FILE__) . '/includes/smooth-slider-functions.php');
|
244 |
require_once (dirname (__FILE__) . '/includes/sslider-get-the-image-functions.php');
|
245 |
|
303 |
}
|
304 |
$slider_style = get_post_meta($post_id,'_smooth_slider_style',true);
|
305 |
$post_slider_style=$_POST['_smooth_slider_style'];
|
306 |
+
if($slider_style != $post_slider_style) {
|
307 |
update_post_meta($post_id, '_smooth_slider_style', $_POST['_smooth_slider_style']);
|
308 |
}
|
309 |
|
310 |
$thumbnail_key = $smooth_slider['img_pick'][1];
|
311 |
$sslider_thumbnail = get_post_meta($post_id,$thumbnail_key,true);
|
312 |
$post_slider_thumbnail=$_POST['sslider_thumbnail'];
|
313 |
+
if($sslider_thumbnail != $post_slider_thumbnail) {
|
314 |
update_post_meta($post_id, $thumbnail_key, $_POST['sslider_thumbnail']);
|
315 |
}
|
316 |
|
318 |
$link=$_POST['sslider_link'];
|
319 |
//$sldr_post=get_post($post_id);
|
320 |
//if((!isset($link) or empty($link)) and $sldr_post->post_status == 'publish' ){$link=get_permalink($post_id);}//from 2.3.3
|
321 |
+
if($sslider_link != $link) {
|
322 |
update_post_meta($post_id, 'slide_redirect_url', $link);
|
323 |
}
|
324 |
|
325 |
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
326 |
$post_sslider_nolink = $_POST['sslider_nolink'];
|
327 |
+
if($sslider_nolink != $post_sslider_nolink) {
|
328 |
update_post_meta($post_id, 'sslider_nolink', $_POST['sslider_nolink']);
|
329 |
}
|
330 |
+
/* Added for embed shortcode - start */
|
331 |
+
$disable_image = get_post_meta($post_id,'_disable_image',true);
|
332 |
+
$post_disable_image = $_POST['disable_image'];
|
333 |
+
if($disable_image != $post_disable_image ) {
|
334 |
+
update_post_meta($post_id, '_disable_image', $post_disable_image );
|
335 |
+
}
|
336 |
+
$smooth_sslider_eshortcode = get_post_meta($post_id,'_smooth_embed_shortcode',true);
|
337 |
+
$post_smooth_sslider_eshortcode = $_POST['smooth_sslider_eshortcode'];
|
338 |
+
if($smooth_sslider_eshortcode != $post_smooth_sslider_eshortcode) {
|
339 |
+
update_post_meta($post_id, '_smooth_embed_shortcode', $post_smooth_sslider_eshortcode);
|
340 |
+
}
|
341 |
+
|
342 |
+
/* Added for embed shortcode -end */
|
343 |
|
344 |
} //sldr_verify
|
345 |
}
|
449 |
$sliders = ss_get_sliders();
|
450 |
?>
|
451 |
<div id="slider_checkbox">
|
452 |
+
<table class="form-table">
|
453 |
+
<tr valign="top">
|
454 |
+
<th scope="row"><input type="checkbox" class="sldr_post" name="slider" value="slider" <?php echo $extra;?> />
|
455 |
+
<label for="slider"><?php _e('Add this post/page to','smooth-slider'); ?> </label></th>
|
456 |
+
<td><select name="slider_name[]" multiple="multiple" size="2" style="height:4em;">
|
457 |
<?php foreach ($sliders as $slider) { ?>
|
458 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(in_array($slider['slider_id'],$post_slider_arr)){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
459 |
<?php } ?>
|
460 |
+
</select></td></tr>
|
461 |
|
462 |
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
463 |
+
<tr valign="top">
|
464 |
+
<th scope="row"><input type="checkbox" class="sldr_post" name="display_slider" value="1" <?php if(ss_slider_on_this_post($post_id)){echo "checked";}?> /><label for="display_slider"><?php _e('Display ','smooth-slider'); ?></th>
|
465 |
+
<td><select name="display_slider_name">
|
|
|
|
|
|
|
|
|
466 |
<?php foreach ($sliders as $slider) { ?>
|
467 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(ss_post_on_slider($post_id,$slider['slider_id'])){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
468 |
<?php } ?>
|
469 |
+
</select> <?php _e('on this Post/Page (you need to add the Smooth Slider template tag manually on your page.php/single.php or whatever page template file)','smooth-slider'); ?></label></td></tr>
|
470 |
<?php } ?>
|
471 |
|
472 |
<input type="hidden" name="sldr-verify" id="sldr-verify" value="<?php echo wp_create_nonce('SmoothSlider');?>" />
|
473 |
+
|
474 |
+
|
475 |
+
|
476 |
+
<tr valign="top">
|
477 |
+
<th scope="row"><label for="_smooth_slider_style"><?php _e('Stylesheet to use if slider is displayed on this Post/Page','smooth-slider'); ?> </label></th>
|
478 |
+
<?php
|
479 |
$slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
480 |
?>
|
481 |
+
<td> <select name="_smooth_slider_style" >
|
482 |
<?php
|
483 |
$directory = SMOOTH_SLIDER_CSS_DIR;
|
484 |
if ($handle = opendir($directory)) {
|
489 |
closedir($handle);
|
490 |
}
|
491 |
?>
|
492 |
+
</select> </td></tr>
|
493 |
|
494 |
<?php $thumbnail_key = $smooth_slider['img_pick'][1];
|
495 |
$sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
|
496 |
+
$sslider_link= get_post_meta($post_id, 'slide_redirect_url', true);
|
497 |
+
$sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
|
498 |
+
$sslider_disable_image=get_post_meta($post_id, '_disable_image', true);
|
499 |
+
$smooth_embed_shortcode=get_post_meta($post_id, '_smooth_embed_shortcode', true);
|
500 |
?>
|
501 |
+
<tr valign="top">
|
502 |
+
<th scope="row"><label for="sslider_thumbnail"><?php _e('Custom Thumbnail Image(url)','smooth-slider'); ?></label></th>
|
503 |
+
<td><input type="text" name="sslider_thumbnail" class="sslider_thumbnail" value="<?php echo $sslider_thumbnail;?>" size="50" />
|
504 |
+
</td></tr>
|
505 |
+
|
506 |
+
<tr valign="top">
|
507 |
+
<th scope="row"><label for="sslider_link"><?php _e('Slide Link URL ','smooth-slider'); ?></label></th>
|
508 |
+
<td><input type="text" name="sslider_link" class="sslider_link" value="<?php echo $sslider_link;?>" size="50" /><small><?php _e('If left empty, it will be by default linked to the permalink.','smooth-slider'); ?></small> </td></tr>
|
509 |
+
<tr valign="top">
|
510 |
+
<th scope="row"><label for="sslider_nolink"> <?php _e('Do not link this slide to any page(url)','smooth-slider'); ?></label></th>
|
511 |
+
<td><input type="checkbox" name="sslider_nolink" class="sslider_nolink" value="1" <?php if($sslider_nolink=='1'){echo "checked";}?> /> </td></tr>
|
512 |
+
|
513 |
+
<tr valign="top">
|
514 |
+
<th scope="row"><label for="disable_image"><?php _e('Disable Thumbnail Image','smooth-slider'); ?> </label></th>
|
515 |
+
<td><input type="checkbox" name="disable_image" value="1" <?php if($sslider_disable_image=='1'){echo "checked";}?> /> </td>
|
516 |
+
</tr>
|
517 |
+
<!-- Added for video - Start -->
|
518 |
+
<tr valign="top">
|
519 |
+
<th scope="row"><label for="embed_shortcode"><?php _e('Embed Shortcode','smooth-slider'); ?> </label><br><br><div style="font-weight:normal;border:1px dashed #ccc;padding:5px;color:#666;line-height:20px;font-size:13px;">You can embed any type of shortcode e.g video shortcode or button shortcode which you want to be overlaid on the slide.</div></th>
|
520 |
+
<td><textarea rows="4" cols="50" name="smooth_sslider_eshortcode"><?php echo htmlentities( $smooth_embed_shortcode, ENT_QUOTES);?></textarea></td>
|
521 |
+
</tr>
|
522 |
+
</table>
|
523 |
+
<!-- Added for video - End -->
|
524 |
+
|
525 |
</div>
|
526 |
|
527 |
<?php }
|
595 |
require_once (dirname (__FILE__) . '/slider_versions/smooth_1.php');
|
596 |
require_once (dirname (__FILE__) . '/settings/settings.php');
|
597 |
require_once (dirname (__FILE__) . '/includes/media-images.php');
|
598 |
+
?>
|