Smooth Slider - Version 2.6

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 Icon 128x128 Smooth Slider
Version 2.6
Comparing to
See all releases

Code changes from version 2.5.1 to 2.6

css/admin.css CHANGED
@@ -1,21 +1,23 @@
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;line-height:22px;background:#f3f3f3;}
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
 
@@ -29,7 +31,7 @@ h2.sub-heading,h3.sub-heading{font-family:Georgia,serif;font-size:16px;font-weig
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;}
@@ -37,8 +39,8 @@ div.sub_settings_m{padding:0 0px 10px 10px;background:#fff;margin:5px 0;}
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
  ************************************************/
@@ -65,17 +67,17 @@ div.sub_settings_m{padding:0 0px 10px 10px;background:#fff;margin:5px 0;}
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
 
@@ -96,20 +98,101 @@ a.svorangebutton{background:#f07057;color:#fff !important;margin-right:10px;font
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
 
109
- /*responsive*/
110
- @media only screen and (min-width: 1280px) { .ui-tabs-vertical-left .ui-tabs-nav li {width:175px !important;}}
111
- @media only screen and (min-width: 768px) and (max-width: 1279px) {.ui-tabs-vertical-left .ui-tabs-panel {width: 75%;}}
112
- @media only screen and (max-width: 767px) { #smooth_settings,#smooth_sliders_create{width:100% !important;float:none !important;}
113
- #poststuff{width: 100% !important;}
114
- .frmdiv{width:100%;}
115
- .ui-tabs-vertical-left .ui-tabs-nav {width:100%;max-width:100%;text-align:center;}.ui-tabs-vertical-left .ui-tabs-panel {width:100%;}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* CSS used for styling the Settings form */
2
+ #smooth_settings{padding-top:10px;width:70%;float:left;}
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;}
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,form#smooth_slider_form select,form#smooth_slider_form textarea{width:20em;}
13
+
14
  form#smooth_slider_form select {}
15
  form#smooth_slider_form option{display:block;color:#666;}
16
+
17
+ form#smooth_slider_form input[type="checkbox"] {width:16px;height:16px;}
18
+ form#smooth_slider_form input[type="radio"] {width:16px;height:16px;}
19
+ form#smooth_slider_form input[type=checkbox]:checked:before, input[type=radio]:checked:before{font: 400 21px/1 dashicons;}
20
+ form#smooth_slider_form input[type=radio]:checked:before{width:6px;height:6px;margin:4px;}
21
 
22
  input[type="text"]:disabled {opacity: .5;border:1px solid #eee !important;filter: alpha(opacity=50);}
23
 
31
  color: #fff;letter-spacing:1px;padding: 10px;margin-left:-10px;}
32
  div.sub_settings{padding:0 0px 10px 10px;background:#fff;margin:0;}
33
  div.sub_settings_m{padding:0 0px 10px 10px;background:#fff;margin:5px 0;}
34
+ .smooth_generated_css{font-family:monospace;font-size:13px;background:#ddd;word-break:break-all;}
35
  /*Sliders Page*/
36
  #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;}
37
  #smooth_sliders_create thead.blue th,#smooth_sliders_create tfoot.blue th{color:#fff;}
39
 
40
  /*For Tooltip*/
41
  .moreInfo {position: relative;font-weight:bold;vertical-align:top;}
42
+ .trigger{padding:0px 3px;border:1px solid #ccc;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;cursor:help;border-color: #00c0e4;font-weight: bold;color: white;background: #00c0e4;vertical-align:top;display: inline-block;}
43
+ .tooltip {position: absolute;top:-12px; left:25px;z-index:999;width:25em;background:#00c0e4;font-size:12px;color:#fff;border:0px;padding:15px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;display: none; /* keeps the tooltip hidden if no JS availabel */ }
44
  /************************************************
45
  * ui-tabs *
46
  ************************************************/
67
  .ui-tabs .ui-tabs-hide { display: none !important; }
68
 
69
  /*Left Sided Tabs*/
70
+ .ui-tabs-vertical-left{padding:0;background:#f5f5f5;margin:0 10px 0 0;}
71
  .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;}
72
  .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;}
73
  .ui-tabs-vertical-left .ui-tabs-nav li a { display:block; padding:1em 10%;width:80%;}
74
  .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; }
75
  .ui-tabs-vertical-left .ui-tabs-panel { padding: 0; float: left; width: 75%;}
 
76
  .ui-tabs-vertical-left .ui-tabs-nav li.ui-state-active { margin-right: -1px; padding-right: 1px; border-right:0px;}
77
+ #smooth_sliders_create .ui-tabs-vertical-left .ui-tabs-panel {margin-left: 10px;margin-right:15px;}
78
  .svilla_cl{display:block;visibility:hidden;clear:left;height:0;content:".";}
79
  .svilla_cr{display:block;visibility:hidden;clear:right;height:0;content:".";}
80
+ .sub-heading{cursor:pointer;}
81
  /*Active tabs*/
82
  .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;}
83
 
98
  .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;}
99
  .modal_shortcode{min-height: 50px;text-align: center;background: #222222;color: #ffffff;font-size: 18px;font-weight: bold;line-height: 3em;
100
  font-family: "Century Gothic", "Avant Garde", "Trebuchet MS", sans-serif;}
101
+ .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;word-break:break-all;}
102
  .admin_shortcode{background:#fff;}
103
  /* Validation Error */
104
  #smooth_slider_form input.error{border: 1px solid #D8000C; padding: 5px 0}
105
+ #poststuff{min-width:255px;width:100%;}
106
+ /* code */
107
+ code {word-break:break-all;line-height:22px;background:#f3f3f3;}
108
+ /*responsive*/
109
+ @media only screen and (min-width: 1280px) { .ui-tabs-vertical-left .ui-tabs-nav li {width:175px !important;}}
110
 
111
+ @media only screen and (min-width: 768px) and (max-width: 1279px) {#smooth_settings {width: 100%;}form#smooth_slider_form select,.form-table td input[type=text]{width: 20em;padding:5px;}form#smooth_slider_form textarea{width:20em;}.form-table td, .form-table th{padding:10px 0 10px 0;}input.small-text{width:5em !important;}form#smooth_slider_form fieldset{width:80%;padding: 10px;}#smooth_tabs .ui-tabs-vertical-left .ui-tabs-panel{width:65% !important;}}
 
112
 
113
+ @media only screen and (max-width: 767px) { #smooth_settings,#smooth_sliders_create{width:100% !important;float:none !important;}#poststuff{!important;min-width:255px;width:100%} .ui-tabs-vertical-left .ui-tabs-nav {width:100%;max-width:100%;text-align:center;}.ui-tabs-vertical-left .ui-tabs-panel{width:100% !important;margin-left:0px !important;}.form-table td input[type=text]{display:initial;}.form-table td, .form-table th{display:table-cell;padding:10px 5px 10px 0;}.form#smooth_slider_form select,.form-table td input[type=text]{width: 20em;padding:5px;}.form#smooth_slider_form textarea{width:20em;}.form-table td select{display:table-cell;}form#smooth_slider_form fieldset{width:80%;padding: 10px;}}
114
 
115
+ @media only screen and (max-width: 420px){.form-table td, .form-table th{display:block;}.form-table td select{display:table-cell;}form#smooth_slider_form fieldset{width:75%;padding: 5px;}input[type=checkbox], input[type=radio]{width:16px;height:16px;}.form#smooth_slider_form textarea{width:0em;}#smooth_tabs table.widefat{word-wrap:break-word;}}
116
+
117
+ /*Minmax img*/
118
+ .toggle_img{width:20px;height:20px;float:right;cursor:pointer;}
119
+
120
+ /*Added Images Start*/
121
+ .addedImg{display:inline-block;margin:0 0 10px 0;padding:0;position:relative;line-height:0;cursor: move;}
122
+ .addedImg img{background:#000;max-height:100%}
123
+ .imgCont{position:relative;float:left;width:200px;height:133px;margin-right:10px;}
124
+ .addedImgEdit{display:none;width:24px;height:24px;position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-26px;background:url(../images/edit.png) no-repeat center center;cursor:pointer;}
125
+ .addedImgDel{display:none;width:24px;height:24px;position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:2px;;background:url(../images/delete.png) no-repeat center center;cursor:pointer;}
126
+ .ImgDetails{float:right;max-width:100%;padding:0;}
127
+ .ImgDetails div{margin-top:0;}
128
+ .ImgDetails .fL{float:left;width:50%;}
129
+ .ImgDetails .fR{float:right;width:50%;}
130
+ .ImgDetails span{width:100%%;display:inline-block;vertical-align:top;margin-bottom:10px;line-height:16px;}
131
+ .ImgDetails span textarea{width:95%;}
132
+ .ImgDetails span input,.ImgDetails span textarea{box-shadow:none;max-width:100%;}
133
+ .ImgDetails span.imgTitle input{width:25em;max-width:98%;}
134
+ .ImgDetails span.imgDesc textarea{width:25em;max-width:98%;}
135
+ #image-uploader input{margin:0 5px;cursor:pointer;}
136
+ /* Navigation Arrows on admin*/
137
+ .arrows {
138
+ float: left;
139
+ margin: 0 10px 20px 0;
140
+ width:auto;
141
+ height:auto;
142
+ }
143
+ .arrows img{
144
+ margin-left: 10px;
145
+ margin-bottom: 10px;
146
+ }
147
+ .arrows_input {
148
+ display: block !important;
149
+ margin-left: 50% !important;
150
+ }
151
+ /* on / off switch */
152
+ .label_show{
153
+ background: #fff;
154
+ padding: 7px 10px 6px 12px;
155
+ width: 10%;
156
+ color: #000;
157
+ font-weight: bold;
158
+ border-top: 1px solid #aaa;
159
+ border-bottom: 1px solid #aaa;
160
+ border-left: 1px solid #aaa;
161
+ border-top-left-radius: 6px;
162
+ border-bottom-left-radius: 6px;
163
+ cursor: pointer;
164
+ }
165
+ .label_hide {
166
+ padding: 7px 10px 6px 12px;
167
+ background: #fff;
168
+ color: #000;
169
+ font-weight: bold;
170
+ border-top: 1px solid #aaa;
171
+ border-right: 1px solid #aaa;
172
+ border-bottom: 1px solid #aaa;
173
+ border-top-right-radius: 6px;
174
+ border-bottom-right-radius: 6px;
175
+ cursor: pointer;
176
+ }
177
+ .showSelected {
178
+ background: #00c0e4;
179
+ color: #fff;
180
+ }
181
+ .hideSelected {
182
+ background: gray;
183
+ color: #fff;
184
+ }
185
+ .showHideSwitch {
186
+ position: relative; width: 90px;
187
+ -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
188
+ }
189
+ .showHideSwitch-checkbox {
190
+ display: none !important;
191
+ }
192
+ @media only screen and (max-width: 800px) {
193
+ .imgCont{float:none;}
194
+ .ImgDetails{float:none;width:100% !important;max-width:100%;padding:0;}
195
+ .ImgDetails div{float:none;width:100%;}
196
+ .ImgDetails span{display:block;}
197
+ }
198
+ /*Added Images End*/
css/skins/default/functions.php ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function smooth_post_processor_default( $posts, $smooth_slider,$out_echo){
3
+ $skin='default';
4
+ global $smooth_slider;
5
+ $smooth_slider_css = smooth_get_inline_css();
6
+ $html = '';
7
+ $smooth_sldr_j = 0;
8
+
9
+ foreach($posts as $post) {
10
+ $post_id = $post->ID;
11
+ $post_title = stripslashes($post->post_title);
12
+ $post_title = str_replace('"', '', $post_title);
13
+ //filter hook
14
+ $post_title=apply_filters('smooth_post_title',$post_title,$post_id,$smooth_slider,$smooth_slider_css);
15
+ $slider_content = $post->post_content;
16
+ //2.1 changes start
17
+ $slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
18
+ $sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
19
+ trim($slide_redirect_url);
20
+ if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
21
+ $permalink = $slide_redirect_url;
22
+ }
23
+ else{
24
+ $permalink = get_permalink($post_id);
25
+ }
26
+ if($sslider_nolink=='1'){
27
+ $permalink='';
28
+ }
29
+
30
+ //filter hook
31
+ $permalink=apply_filters('smooth_permalink',$permalink,$post_id,$smooth_slider,$smooth_slider_css);
32
+ //2.1 changes end
33
+ $smooth_sldr_j++;
34
+ $html .= '<div class="smooth_slideri" '.$smooth_slider_css['smooth_slideri'].'>
35
+ <!-- smooth_slideri -->';
36
+
37
+ $thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
38
+ //$image_control = get_post_meta($post_id, 'slider_image_control', true);
39
+
40
+ if ($smooth_slider['content_from'] == "slider_content") {
41
+ $slider_content = get_post_meta($post_id, 'slider_content', true);
42
+ }
43
+ if ($smooth_slider['content_from'] == "excerpt") {
44
+ $slider_content = $post->post_excerpt;
45
+ }
46
+
47
+ $slider_content = strip_shortcodes( $slider_content );
48
+
49
+ $slider_content = stripslashes($slider_content);
50
+ $slider_content = str_replace(']]>', ']]&gt;', $slider_content);
51
+
52
+ $slider_content = str_replace("\n","<br />",$slider_content);
53
+ $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
54
+
55
+ //filter hook
56
+ $slider_content=apply_filters('smooth_slide_excerpt',$slider_content,$post_id,$smooth_slider,$smooth_slider_css);
57
+ if(!isset($smooth_slider['img_pick'][0])) $smooth_slider['img_pick'][0]='';
58
+ if(!isset($smooth_slider['img_pick'][2])) $smooth_slider['img_pick'][2]='';
59
+ if(!isset($smooth_slider['img_pick'][3])) $smooth_slider['img_pick'][3]='';
60
+ if(!isset($smooth_slider['img_pick'][5])) $smooth_slider['img_pick'][5]='';
61
+
62
+ if($smooth_slider['img_pick'][0] == '1'){
63
+ $custom_key = array($smooth_slider['img_pick'][1]);
64
+ }
65
+ else {
66
+ $custom_key = '';
67
+ }
68
+
69
+ if($smooth_slider['img_pick'][2] == '1'){
70
+ $the_post_thumbnail = true;
71
+ }
72
+ else {
73
+ $the_post_thumbnail = false;
74
+ }
75
+
76
+ if($smooth_slider['img_pick'][3] == '1'){
77
+ $attachment = true;
78
+ $order_of_image = $smooth_slider['img_pick'][4];
79
+ }
80
+ else{
81
+ $attachment = false;
82
+ $order_of_image = '1';
83
+ }
84
+
85
+ if($smooth_slider['img_pick'][5] == '1'){
86
+ $image_scan = true;
87
+ }
88
+ else {
89
+ $image_scan = false;
90
+ }
91
+
92
+ if($smooth_slider['img_size'] == '1'){
93
+ $gti_width = $smooth_slider['img_width'];
94
+ }
95
+ else {
96
+ $gti_width = false;
97
+ }
98
+
99
+ if($smooth_slider['crop'] == '0'){
100
+ $extract_size = 'full';
101
+ }
102
+ elseif($smooth_slider['crop'] == '1'){
103
+ $extract_size = 'large';
104
+ }
105
+ elseif($smooth_slider['crop'] == '2'){
106
+ $extract_size = 'medium';
107
+ }
108
+ else{
109
+ $extract_size = 'thumbnail';
110
+ }
111
+
112
+ $img_args = array(
113
+ 'custom_key' => $custom_key,
114
+ 'post_id' => $post_id,
115
+ 'attachment' => $attachment,
116
+ 'size' => $extract_size,
117
+ 'the_post_thumbnail' => $the_post_thumbnail,
118
+ 'default_image' => false,
119
+ 'order_of_image' => $order_of_image,
120
+ 'link_to_post' => false,
121
+ 'image_class' => 'smooth_slider_thumbnail',
122
+ 'image_scan' => $image_scan,
123
+ 'width' => $gti_width,
124
+ 'height' => false,
125
+ 'echo' => false,
126
+ 'permalink' => $permalink,
127
+ 'style'=> $smooth_slider_css['smooth_slider_thumbnail']
128
+ );
129
+ $smooth_slide_image=smooth_sslider_get_the_image($img_args);
130
+ //filter hook
131
+ $smooth_slide_image=apply_filters('smooth_slide_image',$smooth_slide_image,$post_id,$smooth_slider,$smooth_slider_css);
132
+
133
+ $thumbnail_image=get_post_meta($post_id, '_disable_image', true);
134
+ if($thumbnail_image!='1')
135
+ $html .= $smooth_slide_image;
136
+
137
+ /* Added for embeding any shortcode on slide - start */
138
+ $smooth_eshortcode=get_post_meta($post_id, '_smooth_embed_shortcode', true);
139
+ if(!empty($smooth_eshortcode)){
140
+ $shortcode_html=do_shortcode($smooth_eshortcode);
141
+ $html.='<div class="smooth_slider_thumbnail"><div class="smooth_slider_eshortcode" '.$smooth_slider_css['smooth_slider_eshortcode'].'>'.$shortcode_html.'</div></div>';
142
+ }
143
+ /* Added for embeding any shortcode on slide - end */
144
+
145
+ if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
146
+ $slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
147
+ else
148
+ $slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
149
+
150
+ if ($smooth_slider['image_only'] == '1') {
151
+ $html .= '<!-- /smooth_slideri -->
152
+ </div>';
153
+ }
154
+ else {
155
+ if($permalink!='') {
156
+ $html .= '<h2 '.$smooth_slider_css['smooth_slider_h2'].'><a '.$smooth_slider_css['smooth_slider_h2_a'].' href="'.$permalink.'">'.$post_title.'</a></h2><span '.$smooth_slider_css['smooth_slider_span'].'> '.$slider_excerpt.'</span>
157
+ <p class="smooth_more"><a href="'.$permalink.'" '.$smooth_slider_css['smooth_slider_p_more'].'>'.$smooth_slider['more'].'</a></p>
158
+
159
+ <!-- /smooth_slideri -->
160
+ </div>'; }
161
+ else{
162
+ $html .= '<h2 '.$smooth_slider_css['smooth_slider_h2'].'>'.$post_title.'</h2><span '.$smooth_slider_css['smooth_slider_span'].'> '.$slider_excerpt.'</span>
163
+ <!-- /smooth_slideri -->
164
+ </div>'; }
165
+ }
166
+ }
167
+ if($out_echo == '1') {
168
+ echo $html;
169
+ }
170
+ $r_array = array( $smooth_sldr_j, $html);
171
+ $r_array=apply_filters('smooth_r_array',$r_array,$posts, $smooth_slider);
172
+ return $r_array;
173
+
174
+ }
175
+ function smooth_slider_get_default($slider_handle,$r_array,$slider_id='',$echo='1'){
176
+ $skin='default';
177
+ global $smooth_slider,$default_slider;
178
+ foreach($default_slider as $key=>$value){
179
+ if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
180
+ }
181
+ $smooth_sldr_j = $r_array[0];
182
+ $smooth_slider_css = smooth_get_inline_css();
183
+ $html='';
184
+
185
+ wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
186
+ wp_enqueue_script( 'smooth-slider', smooth_slider_plugin_url( 'js/smooth.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
187
+ /* Changed fouc code start 2.6 */
188
+ if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='' or $smooth_slider['fouc']=='0' ){
189
+ $fouc_dom='jQuery("html").addClass("smooth_slider_fouc");jQuery(".smooth_slider_fouc").hide();';
190
+ $fouc_ready='jQuery(document).ready(function() {
191
+ jQuery(".smooth_slider_fouc").show();
192
+ });';
193
+ }
194
+ else{
195
+ $fouc_dom=$fouc_ready='';
196
+ }
197
+ /* Changed fouc code end 2.6 */
198
+ $html.='<script type="text/javascript">';
199
+ $html.=$fouc_ready;
200
+ $html.='jQuery(document).ready(function() {
201
+ jQuery("#'.$slider_handle.'").cycle({
202
+ fx: "'.$smooth_slider['fx'].'",
203
+ speed:"'.$smooth_slider['transition'] * 100 .'",
204
+ timeout: '. ( ($smooth_slider['autostep'] == '1') ? ( $smooth_slider['speed'] * 1000 ) : 0 ) .',';
205
+ if ($smooth_slider['prev_next'] == 1){
206
+ $html.='next: "#'.$slider_handle.'_next",
207
+ prev:"#'.$slider_handle.'_prev",';
208
+ }
209
+
210
+ if ($smooth_slider['goto_slide'] == "1" or $smooth_slider['goto_slide'] == "2" or $smooth_slider['goto_slide'] == "4"){
211
+ $html.='pager: "#'.$slider_handle.'_nav",';
212
+ }
213
+
214
+ if ($smooth_slider['goto_slide'] == 1) {
215
+ $html.=' pagerAnchorBuilder: function(idx, slide) {
216
+ return \'<a class="sldr\'+(idx+1)+\' smooth_slider_nnav" href="#">\'+(idx+1)+\'</a>\';
217
+ },';
218
+ }
219
+ if ($smooth_slider['goto_slide'] == 2) {
220
+ $html.='pagerAnchorBuilder: function(idx, slide) {
221
+ return \'<a class="sldr\'+(idx+1)+\' smooth_slider_inav" style="background-image:url('. smooth_slider_plugin_url( 'images/' ).'slide\'+(idx+1)+\'.png);background-position:0 0;width:'. $smooth_slider['navimg_w'].'px;height:'.$smooth_slider['navimg_ht'].'px;" href="#"></a>\';
222
+ }, ';
223
+ }
224
+ if ($smooth_slider['goto_slide'] == 4) {
225
+ $html.='pagerAnchorBuilder: function(idx, slide) {
226
+ return \'<a class="sldr\'+(idx+1)+\' smooth_slider_inav smooth_slider_bnav" style="width:'. $smooth_slider['navimg_w'].'px;height:'.$smooth_slider['navimg_ht'].'px;" href="#"></a>\';
227
+ }, ';
228
+ }
229
+
230
+ $html.='pause: 1
231
+ ,slideExpr: "div.smooth_slideri"
232
+ });';
233
+
234
+ if ($smooth_slider['goto_slide'] == 2 or $smooth_slider['goto_slide'] == 4 ) {
235
+ $html.='jQuery("head").append("<style type=\"text/css\">#'.$slider_handle.' .smooth_nav a.smooth_slider_inav.activeSlide{background-position:-'.$smooth_slider['navimg_w'].'px 0 !important;}</style>");';
236
+ }
237
+
238
+ if(!empty($smooth_media_queries)){
239
+ // $html.='jQuery("head").append("<style type=\"text/css\">'. $smooth_media_queries .'</style>");';
240
+ }
241
+ if($smooth_slider['prev_next']==1) $navArr=1;
242
+ else $navArr=0;
243
+ $html.='jQuery("#'.$slider_handle.'").smoothSlider({
244
+ sliderWidth :'.$smooth_slider['width'].',
245
+ sliderHeight :'.$smooth_slider['height'].',
246
+ navArr :'.$navArr.'
247
+ });';
248
+
249
+
250
+ $html.='});';
251
+ //Action hook
252
+ do_action('smooth_global_script',$slider_handle,$smooth_slider);
253
+ $html.='</script><noscript><p><strong>'.$smooth_slider['noscript'].'</strong></p></noscript>';
254
+
255
+ $html.='<div id="'.$slider_handle.'" class="smooth_slider" '.$smooth_slider_css['smooth_slider'].'>';
256
+ //die('test '.$slider_id);
257
+ if( $smooth_slider['title_from']=='1' and !empty($slider_id) ){ $sldr_title = get_smooth_slider_name($slider_id);}
258
+ else {$sldr_title = $smooth_slider['title_text']; }
259
+ if(!empty($sldr_title)) {
260
+ $html.='<div class="sldr_title" '.$smooth_slider_css['sldr_title'].'>'.$sldr_title.'</div> ';
261
+ }
262
+
263
+ $html.='<div class="smooth_sliderb">'.$r_array[1].'</div>';
264
+
265
+ if ($smooth_slider['goto_slide'] == 1 or $smooth_slider['goto_slide'] == 2 or $smooth_slider['goto_slide'] == 4 ) {
266
+ $html.='<div id="'.$slider_handle.'_nav" class="smooth_nav"></div>';
267
+ }
268
+ if ($smooth_slider['goto_slide'] == 3) {
269
+ $html.='<div id="'.$slider_handle.'_nav" class="smooth_nav">'.$smooth_slider['custom_nav'].'</div>';
270
+ }
271
+ if ($smooth_slider['prev_next'] == 1){
272
+ $html.='<div id="'.$slider_handle.'_next" class="smooth_next"></div>
273
+ <div id="'.$slider_handle.'_prev" class="smooth_prev"></div>';
274
+ }
275
+
276
+ $html.='<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
277
+ </div>';
278
+ $html.='<script type="text/javascript">'.$fouc_dom.'</script>';
279
+ if($echo == '1') {echo $html; }
280
+ else { return $html; }
281
+ }
282
+ ?>
css/skins/default/settings.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $default_settings_default;
3
+ $default_settings_default = array(
4
+ 'bg_color'=>'#ffffff',
5
+ 'height'=>'250',
6
+ 'width'=>'450',
7
+ 'border'=>'0',
8
+ 'brcolor'=>'#dddddd',
9
+ 'prev_next'=>'0',
10
+ 'ptitle_font'=>'Trebuchet MS',
11
+ 'ptitle_fsize'=>'14',
12
+ 'ptitle_fstyle'=>'bold',
13
+ 'ptitle_fcolor'=>'#000000',
14
+ 'img_align'=>'left',
15
+ 'img_height'=>'120',
16
+ 'img_width'=>'165',
17
+ 'img_border'=>'1',
18
+ 'img_brcolor'=>'#000000',
19
+ 'content_font'=>'Verdana',
20
+ 'content_fsize'=>'12',
21
+ 'content_fstyle'=>'normal',
22
+ 'content_fcolor'=>'#333333',
23
+ 'content_from'=>'content',
24
+ 'content_chars'=>'300'
25
+ );
26
+ ?>
css/skins/default/style.css CHANGED
@@ -1,13 +1,12 @@
1
  @charset "utf-8";
2
  /*CSS Document
3
  Smooth Slider default styles*/
4
- .smooth_slider_fouc .smooth_slider {display: none;}
5
  .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;}
6
  .smooth_slider{padding:0 5px;width:100%;}
7
  .smooth_slider .sldr_title{margin:5px 0 10px 0;}
8
  .smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
9
  .smooth_slider .smooth_sliderb{position:relative;}
10
- .smooth_slider .smooth_slideri{position:absolute;width:100% !important;height:auto !important;}
11
  .smooth_slider .smooth_slider_thumbnail{position:relative;max-width:100%;}
12
  .smooth_slider a{text-decoration:none !important;}
13
  .smooth_slider h2{clear:none;display:block;padding:0px;}
@@ -40,4 +39,6 @@ Smooth Slider default styles*/
40
  .smooth_slider .mejs-overlay-button{margin-top:-50px !important;}
41
  .smooth_slider div.mejs-mediaelement{height:auto !important;max-width:100% !important;}
42
  .smooth_slider div.mejs-inner,.smooth_slider div.wp-video-shortcode,.smooth_slider div.wp-video,.smooth_slider .mejs-layers,.smooth_slider .mejs-overlay-play{height:100% !important;max-width:100% !important;}
43
-
 
 
1
  @charset "utf-8";
2
  /*CSS Document
3
  Smooth Slider default styles*/
 
4
  .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;}
5
  .smooth_slider{padding:0 5px;width:100%;}
6
  .smooth_slider .sldr_title{margin:5px 0 10px 0;}
7
  .smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
8
  .smooth_slider .smooth_sliderb{position:relative;}
9
+ .smooth_slider .smooth_slideri{position:absolute;width:100% !important;height:auto !important;word-break:break-all;}
10
  .smooth_slider .smooth_slider_thumbnail{position:relative;max-width:100%;}
11
  .smooth_slider a{text-decoration:none !important;}
12
  .smooth_slider h2{clear:none;display:block;padding:0px;}
39
  .smooth_slider .mejs-overlay-button{margin-top:-50px !important;}
40
  .smooth_slider div.mejs-mediaelement{height:auto !important;max-width:100% !important;}
41
  .smooth_slider div.mejs-inner,.smooth_slider div.wp-video-shortcode,.smooth_slider div.wp-video,.smooth_slider .mejs-layers,.smooth_slider .mejs-overlay-play{height:100% !important;max-width:100% !important;}
42
+ /*Added for responsiveness*/
43
+ .smooth_slider .smoothNone{float:none !important;}
44
+ .smooth_slider .smoothLeft{float:left !important;}
css/skins/sample/style.css CHANGED
@@ -1,8 +1,10 @@
 
 
 
1
  @charset "utf-8";
2
  /*CSS Document
3
  Smooth Slider
4
  sample stylesheet*/
5
- .smooth_slider_fouc .smooth_slider {display: none;}
6
  .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;}
7
  .smooth_slider{padding:0 5px;width:100%;}
8
  .smooth_slider .sldr_title{margin:5px 0 10px 0;}
@@ -41,6 +43,20 @@ sample stylesheet*/
41
  .smooth_slider .mejs-overlay-button{margin-top:-50px !important;}
42
  .smooth_slider div.mejs-mediaelement{height:auto !important;max-width:100% !important;}
43
  .smooth_slider div.mejs-inner,.smooth_slider div.wp-video-shortcode,.smooth_slider div.wp-video,.smooth_slider .mejs-layers,.smooth_slider .mejs-overlay-play{height:100% !important;max-width:100% !important;}
44
-
 
 
45
  /* Add Generated CSS (from Smooth Slider settings) below */
 
 
 
 
 
 
 
 
 
 
46
  /**/
 
 
1
+ /*
2
+ Caution: Do not edit this file. To create your own stylesheet, copy the CSS content of this file and paste in your own CSS file, name it style.css and place it in some custom name folder. You can upload that folder in the same location where sample folder is placed i.e. plugins => smooth-slider => css => skins => Upload your custom folder here
3
+ */
4
  @charset "utf-8";
5
  /*CSS Document
6
  Smooth Slider
7
  sample stylesheet*/
 
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;}
43
  .smooth_slider .mejs-overlay-button{margin-top:-50px !important;}
44
  .smooth_slider div.mejs-mediaelement{height:auto !important;max-width:100% !important;}
45
  .smooth_slider div.mejs-inner,.smooth_slider div.wp-video-shortcode,.smooth_slider div.wp-video,.smooth_slider .mejs-layers,.smooth_slider .mejs-overlay-play{height:100% !important;max-width:100% !important;}
46
+ /*Added for responsiveness*/
47
+ .smooth_slider .smoothNone{float:none !important;}
48
+ .smooth_slider .smoothLeft{float:left !important;}
49
  /* Add Generated CSS (from Smooth Slider settings) below */
50
+ .smooth_slider{max-width:450px;min-height:250px;background-color:#ffffff;border:0px solid #dddddd;}
51
+ .smooth_slider .sldr_title{font-family:Arial,Helvetica,sans-serif, Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold;font-style:normal;color:#000000;}
52
+ .smooth_slider .smooth_slideri{max-width:450px;margin:0px 0px 0px 0px;}
53
+ .smooth_slider .smooth_slider_thumbnail{float:left;margin:0 10px 0 0px;max-height:120px;border:1px solid #000000;width:165px;}
54
+ .smooth_slider .smooth_slideri h2{clear:none;line-height:17px;font-family:;font-size:14px;font-weight:bold;font-style:normal;color:#000000;margin:0 0 5px 0;}
55
+ .smooth_slider .smooth_slideri h2 a{color:#000000;font-size:14px;font-weight:bold;font-style:normal;}
56
+ .smooth_slider .smooth_slideri span{font-family:Arial,Helvetica,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#333333;}
57
+ .smooth_slider .smooth_slideri p.more{color:#0092E4;font-family:Arial,Helvetica,sans-serif;font-size:12px;margin-left: 10px;}
58
+ .smooth_slider .smooth_next{}
59
+ .smooth_slider .smooth_prev{} .smooth_slider .smooth_slider_eshortcode{float:left;margin:0 10px 0 0px;height:120px;border:1px solid #000000;width:165px;} .smooth_slider .smooth_more a{color:#0092E4;font-family:Arial,Helvetica,sans-serif;font-size:12px;margin-left: 10px;}
60
  /**/
61
+
62
+ /*Paste Generated CSS for other Settings Set below*/
images/close.png ADDED
Binary file
images/info.png ADDED
Binary file
includes/smooth-slider-functions.php CHANGED
@@ -14,6 +14,7 @@ function get_slider_posts_in_order($slider_id) {
14
  }
15
  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
  if (isset ($slider_obj[0]))$slider_name = $slider_obj[0]->slider_name;
14
  }
15
  function get_smooth_slider_name($slider_id) {
16
  global $wpdb, $table_prefix;
17
+
18
  $table_name = $table_prefix.SLIDER_META;
19
  $slider_obj = $wpdb->get_results("SELECT * FROM $table_name WHERE slider_id = '$slider_id'", OBJECT);
20
  if (isset ($slider_obj[0]))$slider_name = $slider_obj[0]->slider_name;
includes/sslider-get-the-image-functions.php CHANGED
@@ -180,7 +180,9 @@ function smooth_sslider_image_by_the_post_thumbnail( $args = array() ) {
180
  /* If no post image ID is found, return false. */
181
  if ( empty( $post_thumbnail_id ) )
182
  return false;
183
-
 
 
184
  /* Apply filters on post_thumbnail_size because this is a default WP filter used with its image feature. */
185
  $size = apply_filters( 'post_thumbnail_size', $args['size'] );
186
 
180
  /* If no post image ID is found, return false. */
181
  if ( empty( $post_thumbnail_id ) )
182
  return false;
183
+ /* Added for category Slider */
184
+ if( !wp_attachment_is_image($post_thumbnail_id) )
185
+ return false;
186
  /* Apply filters on post_thumbnail_size because this is a default WP filter used with its image feature. */
187
  $size = apply_filters( 'post_thumbnail_size', $args['size'] );
188
 
js/admin.js CHANGED
@@ -59,4 +59,126 @@ jQuery(function () {
59
  }, hideDelay);
60
  });
61
  });
62
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }, hideDelay);
60
  });
61
  });
62
+ /* Validation Shifted here from setting.php start 2.6 */
63
+ jQuery('#smooth_slider_form').submit(function(event) {
64
+
65
+ var slide_animationlen=jQuery("#smooth_slider_transition").val();
66
+ if(slide_animationlen=='' || slide_animationlen <= 0 || isNaN(slide_animationlen)) {
67
+ alert("Slide Animation Length should be a number greater than 0!");
68
+ jQuery("#smooth_slider_transition").addClass('error');
69
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_transition').offset().top-50}, 600);
70
+ return false;
71
+ }
72
+ var slider_speed=jQuery("#smooth_slider_speed").val();
73
+ if(slider_speed=='' || slider_speed <= 0 || isNaN(slider_speed)) {
74
+ alert("Slide Pause Interval should be a number greater than 0!");
75
+ jQuery("#smooth_slider_speed").addClass('error');
76
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_speed').offset().top-50}, 600);
77
+ return false;
78
+ }
79
+ var slider_posts=jQuery("#smooth_slider_no_posts").val();
80
+ if(slider_posts=='' || slider_posts <= 0 || isNaN(slider_posts)) {
81
+ alert("Number of Posts in the Slideshow should be a number greater than 0!");
82
+ jQuery("#smooth_slider_no_posts").addClass('error');
83
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_no_posts').offset().top-50}, 600);
84
+ return false;
85
+ }
86
+ var slider_width=jQuery("#smooth_slider_width").val();
87
+ if(slider_width=='' || slider_width <= 0 || isNaN(slider_width)) {
88
+ alert("Slider Width should be a number greater than 0!");
89
+ jQuery("#smooth_slider_width").addClass('error');
90
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_width').offset().top-50}, 600);
91
+ return false;
92
+ }
93
+ var slider_height=jQuery("#smooth_slider_height").val();
94
+ if(slider_height=='' || slider_height <= 0 || isNaN(slider_height)) {
95
+ alert("Slider Height should be a number greater than 0!");
96
+ jQuery("#smooth_slider_height").addClass('error');
97
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_height').offset().top-50}, 600);
98
+ return false;
99
+ }
100
+
101
+ /*Added for slider name selection Start*/
102
+
103
+ var slider_id = jQuery("#smooth_slider_id").val(),
104
+ hiddensliderid=jQuery("#hidden_sliderid").val(),
105
+ slider_catslug=jQuery("#smooth_slider_catslug").val(),
106
+ hiddencatslug=jQuery("#hidden_category").val(),
107
+ prev=jQuery("#smooth_slider_preview").val(),
108
+ hiddenpreview=jQuery("#hidden_preview").val(),
109
+ new_save=jQuery("#oldnew").val();
110
+ if(prev=='1' && slider_catslug=='') {
111
+ alert("Select the category whose posts you want to show!");
112
+ jQuery("#smooth_slider_catslug").addClass('error');
113
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_catslug').offset().top-50}, 600);
114
+ return false;
115
+ }
116
+ if(prev=='0') {
117
+ if(slider_id=='' || isNaN(slider_id) || slider_id<=0){
118
+ alert("Slider Name Should be selected!");
119
+ jQuery("#smooth_slider_id").addClass('error');
120
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_id').offset().top-50}, 600);
121
+ return false;
122
+ }
123
+ }
124
+
125
+ /* Added for slider name selection End*/
126
+ var prev=jQuery("#smooth_slider_preview").val(),
127
+ hiddenpreview=jQuery("#hidden_preview").val(),
128
+ hiddencatslug=jQuery("#hidden_category").val(),
129
+ hiddensliderid=jQuery("#hidden_sliderid").val(),
130
+ slider_id = jQuery("#smooth_slider_id").val(),
131
+ slider_catslug=jQuery("#smooth_slider_catslug").val();
132
+ if(prev == "0" && slider_id == ''){
133
+ alert("Slider id should be mentioned");
134
+ jQuery("#smooth_slider_id").addClass('error');
135
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_id').offset().top-50}, 600);
136
+ return false;
137
+ }
138
+ if(prev == "1" && slider_catslug == ''){
139
+ alert("Category slug should be mentioned whose posts you want to display in slider");
140
+ jQuery("#smooth_slider_catslug").addClass('error');
141
+ jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_catslug').offset().top-50}, 600);
142
+ return false;
143
+ }
144
+ if(hiddenpreview != prev || slider_id != hiddensliderid || slider_catslug != hiddencatslug ) jQuery('#smoothpopup').val("1");
145
+ else jQuery('#smoothpopup').val("0");
146
+ });
147
+
148
+ /* Validation Shifted here from setting.php end 2.6 */
149
+
150
+ /* Added for preview - start 2.6 */
151
+ var selpreview=jQuery("#smooth_slider_preview").val();
152
+ if(selpreview=='2')
153
+ jQuery("#smooth_slider_form .form-table tr.smooth_slider_params").css("display","none");
154
+ else if(selpreview=='1'){
155
+ jQuery("#smooth_slider_form .smooth_sid").css("display","none");
156
+ jQuery("#smooth_slider_form .form-table tr.smooth_slider_params").css("display","table-row");
157
+ jQuery("#smooth_slider_form .smooth_catslug").css("display","block");
158
+ }
159
+ else if(selpreview=='0'){
160
+ jQuery("#smooth_slider_form .smooth_catslug").css("display","none");
161
+ jQuery("#smooth_slider_form .form-table tr.smooth_slider_params").css("display","table-row");
162
+ jQuery("#smooth_slider_form .smooth_sid").css("display","block");
163
+ }
164
+ /* Added for preview - end 2.6*/
165
+
166
+ });
167
+
168
+ /* Added for preview start 2.6*/
169
+ function checkpreview(curr_preview){
170
+ if(curr_preview=='2')
171
+ jQuery("#smooth_slider_form .form-table tr.smooth_slider_params").css("display","none");
172
+ else if(curr_preview=='1'){
173
+ jQuery("#smooth_slider_form .smooth_sid").css("display","none");
174
+ jQuery("#smooth_slider_form .form-table tr.smooth_slider_params").css("display","table-row");
175
+ jQuery("#smooth_slider_form .smooth_catslug").css("display","block");
176
+ }
177
+ else if(curr_preview=='0'){
178
+ jQuery("#smooth_slider_form .smooth_catslug").css("display","none");
179
+ jQuery("#smooth_slider_form .form-table tr.smooth_slider_params").css("display","table-row");
180
+ jQuery("#smooth_slider_form .smooth_sid").css("display","block");
181
+ }
182
+ }
183
+ /* Added for preview start 2.6*/
184
+
js/media-uploader.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ $(document).ready(function() {
3
+ function slider_add_file(event,elm) {
4
+ var frame;
5
+ var $el = $(this);
6
+ var wrapper=jQuery(elm).parents('.uploaded-images');
7
+ event.preventDefault();
8
+
9
+ // If the media frame already exists, reopen it.
10
+ if ( frame ) {
11
+ frame.open();
12
+ return;
13
+ }
14
+
15
+ // Create the media frame.
16
+ frame = wp.media({
17
+ // Set the title of the modal.
18
+ title: 'Upload/Select Images',
19
+ multiple: true,
20
+ // Customize the submit button.
21
+ button: {
22
+ // Set the text of the button.
23
+ text: 'Add to Slider',
24
+ // Tell the button not to close the modal, since we're
25
+ // going to refresh the page when the image is selected.
26
+ close: false
27
+ }
28
+ });
29
+ frame.on( 'select', function() {
30
+ // Grab the selected attachment.
31
+ var attachments = frame.state().get('selection').toArray();
32
+ frame.close();
33
+ if(attachments.length>0){
34
+ var imgdiv='';
35
+ for(i=0;i<attachments.length;i++){
36
+ var imgId=parseInt(attachments[i].id);
37
+ imgdiv+='<div class="addedImg"><input type="hidden" name="imgID[]" value="'+imgId+'" /><div class="imgCont"><img title="'+attachments[i].attributes.title+'" src="'+attachments[i].attributes.url+'" width="200" /><span class="addedImgEdit"></span><span class="addedImgDel"></span></div><div class="ImgDetails"><div class="fL"><span class="imgTitle"><input placeholder="Title" title="Enter Image Title" type="text" name="title['+imgId+']" value="'+attachments[i].attributes.title+'" /></span><span class="imgDesc"><textarea placeholder="Description" title="Enter Image Description" rows=3 name="desc['+imgId+']">'+attachments[i].attributes.description+'</textarea></span></div><div class="fR"><span class="imgLink"><strong>Link to: </strong><input type="text" value="" name="link['+imgId+']" /></span><span class="imgNoLink"><strong>Do not link to any url: &nbsp; </strong><input type="checkbox" value="1" name="nolink['+imgId+']" /></span></div></div></div>';
38
+ };
39
+ wrapper.find('.addImgForm').prepend(imgdiv);
40
+ if(wrapper.find('.addSave').length<=0)wrapper.find('.image-uploader').prepend('<input type="submit" class="button-primary addSave" value="Save" name="addSave" />');
41
+ if(attachments.length>0){wrapper.find('.slider_images_upload').val('Add More Images');}
42
+ jQuery('.addedImg').hover(function(){ jQuery(this).find('img').css('opacity','0.6');jQuery(this).find('.addedImgEdit,.addedImgDel').fadeIn(500);},
43
+ function(){jQuery(this).find('img').css('opacity','1');jQuery(this).find('.addedImgEdit,.addedImgDel').fadeOut('fast');});
44
+ jQuery('.addedImgDel').click(function(){
45
+ jQuery(this).parent('.imgCont').parent('.addedImg').fadeOut(400,function(){jQuery(this).remove();});
46
+ });
47
+ jQuery( '.addedImgEdit').unbind( "click" );
48
+ jQuery('.ImgDetails').hide();
49
+ jQuery('.addedImgEdit').click(function(){
50
+ var imgDetails=jQuery(this).parent('.imgCont').parent('.addedImg').find('.ImgDetails');
51
+ var imgWrapper=jQuery(this).parents('.uploaded-images');
52
+ imgDetails.width((imgWrapper.width() - 220));
53
+ imgDetails.fadeToggle("slow");
54
+ });
55
+ }
56
+ });
57
+ // Finally, open the modal.
58
+ frame.open();
59
+ }
60
+
61
+ $('.upload-button').click( function( event ) {
62
+ slider_add_file(event,this);
63
+ });
64
+ });
65
+ })(jQuery);
js/smooth.js CHANGED
@@ -1,21 +1,46 @@
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
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ jQuery.fn.smoothSlider=function(args){
3
+ var defaults={
4
+ sliderWidth :900,
5
+ sliderHeight :320,
6
+ navArr :0
7
+
8
+ }
9
+ options=jQuery.extend({},defaults,args);
10
+ this.smoothSliderSize=function(){
11
+ var wrapWidth=jQuery(this).outerWidth(true);
12
+ var slideri=jQuery(this).find('.smooth_slideri');
13
+ var slideriW;
14
+ //calculate max-width of slideri
15
+ if(options.navArr==0) slideriW=wrapWidth;
16
+ else slideriW=wrapWidth-(48+10); //48px for arrows and 10 for additional margin for text
17
+ slideri.css('max-width',slideriW+'px');
18
+ //float excerpt bellow image
19
+ var sldrThumb=jQuery(this).find('.smooth_slider_thumbnail');
20
+ var sldrThumbW=sldrThumb.outerWidth(true);
21
+
22
+ if(slideriW-sldrThumbW < 70){
23
+ sldrThumb.removeClass('smoothLeft');
24
+ sldrThumb.addClass('smoothNone');
25
+ }
26
+ else{
27
+ sldrThumb.removeClass('smoothNone');
28
+ sldrThumb.addClass('smoothLeft');
29
+ }
30
+ //slider height
31
+ var iht=0;
32
+ jQuery(this).find(".smooth_slideri").each(function(idx,el){
33
+ if(jQuery(el).outerHeight(true)>iht)iht=jQuery(el).outerHeight(true);
34
+ });
35
+ var ht=iht + jQuery(this).find(".sldr_title").outerHeight(true) + jQuery(this).find(".smooth_nav").outerHeight(true);
36
+ jQuery(this).height(ht);
37
+ return jQuery(this);
38
+ };
39
+ this.smoothSliderSize();
40
+ self=this;
41
+ //On Window Resize
42
+ jQuery(window).resize(function() {
43
+ self.smoothSliderSize();
44
+ });
45
+ }
46
+ })(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: slider, slideshow, wordpress slider, content slider, posts slider,image sl
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.1
8
  License: GPLv2 or later
9
 
10
  Most Popular Responsive WordPress Slider for Featured Content, Videos and Media Images
@@ -137,6 +137,19 @@ Check the other FAQs on Smooth [Slider Documetation on SliderVilla](http://guide
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  Version 2.5.1 (06/04/2014)
141
 
142
  1. New: Removed promotional link text 'smooth slider' from the slider
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.6
8
  License: GPLv2 or later
9
 
10
  Most Popular Responsive WordPress Slider for Featured Content, Videos and Media Images
137
 
138
  == Changelog ==
139
 
140
+ Version 2.6 (07/29/2014)
141
+
142
+ 1. New: Image uploader for Sliders on 'Sliders' settings panel. No need to add individual media image to Smooth slider.
143
+ 2. New: Add any shortcode like video shortcode or button shortcode to slide which will be overlayed on it.
144
+ 3. New: Rename Slider field on Smooth Slider => Sliders panel
145
+ 4. New: Smooth Slider post meta box now has two tabs named basic and advanced with respective fields for the purpose of easy understanding and saving the space.
146
+ 5. New: On settings panel of Smooth slider now it is possible to expand and collapse tabs which greatly reduces scrolling efforts.
147
+ 6. New: Preview Slider params simplified on Settings panel.
148
+ 7. New: Color picker changed from Farbtastic to "wp-color-picker".
149
+ 8. Fix: Worked on responsiveness of slider.
150
+ 9. Fix: Settings panel cleanup and restructuring.
151
+ 10. Fix: Solved the debug errors on Sliders panel.
152
+
153
  Version 2.5.1 (06/04/2014)
154
 
155
  1. New: Removed promotional link text 'smooth slider' from the slider
settings/settings.php CHANGED
@@ -3,7 +3,6 @@ if ( is_admin() ){ // admin actions
3
  add_action('admin_menu', 'smooth_slider_settings');
4
  add_action( 'admin_init', 'register_mysettings' );
5
  }
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');
@@ -69,17 +68,40 @@ 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='';
@@ -142,7 +164,7 @@ else
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
 
@@ -155,10 +177,26 @@ else
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">
163
  <th scope="row"><label for="smooth_slider_autostep"><?php _e(' Enable autostepping of slides','smooth-slider'); ?></label></th>
164
  <td>
@@ -187,7 +225,7 @@ else
187
 
188
  <tr valign="top">
189
  <th scope="row"><?php _e('Slide Pause Interval','smooth-slider'); ?></th>
190
- <td><input type="text" name="smooth_slider_options[speed]" id="smooth_slider_speed" class="small-text" value="<?php echo $smooth_slider['speed']; ?>" /> &nbsp;<?php _e('(in secs)','smooth-slider'); ?>
191
  <span class="moreInfo">
192
  &nbsp; <span class="trigger"> ? </span>
193
  <div class="tooltip">
@@ -199,7 +237,7 @@ else
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
  &nbsp; <span class="trigger"> ? </span>
205
  <div class="tooltip">
@@ -211,30 +249,30 @@ else
211
 
212
  <tr valign="top">
213
  <th scope="row"><?php _e('Number of Posts in the Slideshow','smooth-slider'); ?></th>
214
- <td><input type="text" name="smooth_slider_options[no_posts]" id="smooth_slider_no_posts" class="small-text" value="<?php echo $smooth_slider['no_posts']; ?>" />
215
  </td>
216
  </tr>
217
 
218
  <tr valign="top">
219
- <th scope="row"><?php _e('Background Color','smooth-slider'); ?></th>
220
- <td><input type="text" name="smooth_slider_options[bg_color]" id="color_value_1" value="<?php echo $smooth_slider['bg_color']; ?>" />&nbsp; <img id="color_picker_1" 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_1"></div> &nbsp; &nbsp; &nbsp;
221
  <label for="smooth_slider_bg"><input name="smooth_slider_options[bg]" type="checkbox" id="smooth_slider_bg" value="1" <?php checked('1', $smooth_slider['bg']); ?> /><?php _e(' Use Transparent Background','smooth-slider'); ?></label> </td>
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']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
227
  </tr>
228
 
229
 
230
  <tr valign="top">
231
  <th scope="row"><?php _e('Slider Width','smooth-slider'); ?></th>
232
- <td><input type="text" name="smooth_slider_options[width]" id="smooth_slider_width" class="small-text" value="<?php echo $smooth_slider['width']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
233
  </tr>
234
 
235
  <tr valign="top">
236
  <th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
237
- <td><input type="text" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>" />
238
  <span class="moreInfo">
239
  &nbsp; <span class="trigger"> ? </span>
240
  <div class="tooltip">
@@ -246,7 +284,7 @@ else
246
 
247
  <tr valign="top">
248
  <th scope="row"><?php _e('Border Color','smooth-slider'); ?></th>
249
- <td><input type="text" name="smooth_slider_options[brcolor]" id="color_value_6" value="<?php echo $smooth_slider['brcolor']; ?>" />&nbsp; <img id="color_picker_6" 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_6"></div></td>
250
  </tr>
251
 
252
  <tr valign="top">
@@ -258,7 +296,7 @@ else
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 /> &nbsp; &nbsp; &nbsp; <?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 /> &nbsp; &nbsp; &nbsp; <?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,8 +308,8 @@ else
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
 
@@ -281,7 +319,7 @@ else
281
  <span class="moreInfo">
282
  &nbsp; <span class="trigger"> ? </span>
283
  <div class="tooltip">
284
- <?php _e('(read','smooth-slider'); ?> <a href="http://guides.slidervilla.com/smooth-slider/" title="<?php _e('how to retain html like line breaks and links in the Smooth Slider','smooth-slider'); ?>" target="_blank"><?php _e('Usage section of the plugin page','smooth-slider'); ?></a> <?php _e('to know more','smooth-slider'); ?>)
285
  </div>
286
  </span>
287
  </td>
@@ -293,8 +331,9 @@ else
293
 
294
  <tr valign="top">
295
  <th scope="row"><?php _e('Color of "Continue Reading Text"','smooth-slider'); ?></th>
296
- <td><input type="text" name="smooth_slider_options[readmorecolor]" id="color_value_7" value="<?php echo $smooth_slider['readmorecolor']; ?>" />&nbsp; <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>
297
  </tr>
 
298
 
299
  <tr valign="top">
300
  <th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
@@ -329,23 +368,6 @@ else
329
  <td><input name="smooth_slider_options[shortcode]" type="checkbox" value="1" <?php checked('1', $smooth_slider['shortcode']); ?> />&nbsp;<?php _e('check this if you want to use Smooth Slider Shortcode i.e [smoothslider]','smooth-slider'); ?></td>
330
  </tr>
331
 
332
- <tr valign="top">
333
- <th scope="row"><?php _e('Smooth Slider Styles to Use on Other than Post/Pages','smooth-slider'); ?> <small><?php _e('(i.e. for index.php,category.php,archive.php etc)','smooth-slider'); ?></small></th>
334
- <td><select name="smooth_slider_options[stylesheet]" >
335
- <?php
336
- $directory = SMOOTH_SLIDER_CSS_DIR;
337
- if ($handle = opendir($directory)) {
338
- while (false !== ($file = readdir($handle))) {
339
- if($file != '.' and $file != '..') { ?>
340
- <option value="<?php echo $file;?>" <?php if ($smooth_slider['stylesheet'] == $file){ echo "selected";}?> ><?php echo $file;?></option>
341
- <?php } }
342
- closedir($handle);
343
- }
344
- ?>
345
- </select>
346
- </td>
347
- </tr>
348
-
349
  <tr valign="top">
350
  <th scope="row"><?php _e('Multiple Slider Feature','smooth-slider'); ?></th>
351
  <td><label for="smooth_slider_multiple">
@@ -383,8 +405,8 @@ if ($handle = opendir($directory)) {
383
  </div><!--#basics-->
384
 
385
  <div id="slides">
386
- <div class="sub_settings">
387
- <h2 class="sub-heading"><?php _e('Slider Title','smooth-slider'); ?></h2>
388
  <p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
389
  <table class="form-table">
390
 
@@ -428,12 +450,11 @@ if ($handle = opendir($directory)) {
428
 
429
  <tr valign="top">
430
  <th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
431
- <td><input type="text" name="smooth_slider_options[title_fcolor]" id="color_value_2" value="<?php echo $smooth_slider['title_fcolor']; ?>" />&nbsp; <img id="color_picker_2" 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_2"></div></td>
432
  </tr>
433
-
434
  <tr valign="top">
435
  <th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
436
- <td><input type="text" name="smooth_slider_options[title_fsize]" id="smooth_slider_title_fsize" class="small-text" value="<?php echo $smooth_slider['title_fsize']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
437
  </tr>
438
 
439
  <tr valign="top">
@@ -452,8 +473,8 @@ if ($handle = opendir($directory)) {
452
  </p>
453
  </div>
454
 
455
- <div class="sub_settings_m">
456
- <h2 class="sub-heading"><?php _e('Post Title','smooth-slider'); ?></h2>
457
  <p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
458
  <table class="form-table">
459
 
@@ -483,12 +504,12 @@ if ($handle = opendir($directory)) {
483
 
484
  <tr valign="top">
485
  <th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
486
- <td><input type="text" name="smooth_slider_options[ptitle_fcolor]" id="color_value_3" value="<?php echo $smooth_slider['ptitle_fcolor']; ?>" />&nbsp; <img id="color_picker_3" 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_3"></div></td>
487
  </tr>
488
 
489
  <tr valign="top">
490
  <th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
491
- <td><input type="text" name="smooth_slider_options[ptitle_fsize]" id="smooth_slider_ptitle_fsize" class="small-text" value="<?php echo $smooth_slider['ptitle_fsize']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
492
  </tr>
493
 
494
  <tr valign="top">
@@ -507,20 +528,19 @@ if ($handle = opendir($directory)) {
507
  </p>
508
  </div>
509
 
510
- <div class="sub_settings_m">
511
- <h2 class="sub-heading"><?php _e('Thumbnail Image','smooth-slider'); ?></h2>
512
  <p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
513
  <table class="form-table">
514
 
515
  <tr valign="top">
516
  <th scope="row"><?php _e('Image Pick Preferences','smooth-slider'); ?> <small><?php _e('(The first one is having priority over second, the second having priority on third and so on)','smooth-slider'); ?></small></th>
517
  <td><fieldset><legend class="screen-reader-text"><span><?php _e('Image Pick Sequence','smooth-slider'); ?> <small><?php _e('(The first one is having priority over second, the second having priority on third and so on)','smooth-slider'); ?></small> </span></legend>
518
- <input name="smooth_slider_options[img_pick][0]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][0]); ?> /> <?php _e('Use Custom Field/Key','smooth-slider'); ?> &nbsp; &nbsp;
519
- <input type="text" name="smooth_slider_options[img_pick][1]" class="text" value="<?php echo $smooth_slider['img_pick'][1]; ?>" /> <?php _e('Name of the Custom Field/Key','smooth-slider'); ?>
520
- <br />
521
- <input name="smooth_slider_options[img_pick][2]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][2]); ?> /> <?php _e('Use Featured Post/Thumbnail (Wordpress 3.0 + feature)','smooth-slider'); ?>&nbsp; <br />
522
- <input name="smooth_slider_options[img_pick][3]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][3]); ?> /> <?php _e('Consider Images attached to the post','smooth-slider'); ?> &nbsp; &nbsp;
523
- <input type="text" name="smooth_slider_options[img_pick][4]" class="small-text" value="<?php echo $smooth_slider['img_pick'][4]; ?>" /> <?php _e('Order of the Image attachment to pick','smooth-slider'); ?> &nbsp; <br />
524
  <input name="smooth_slider_options[img_pick][5]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][5]); ?> /> <?php _e('Scan images from the post, in case there is no attached image to the post','smooth-slider'); ?>&nbsp;
525
  </fieldset></td>
526
  </tr>
@@ -568,13 +588,13 @@ if ($handle = opendir($directory)) {
568
  <br />
569
  <input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> <?php _e('Custom Size:','smooth-slider'); ?>&nbsp;
570
  <label for="smooth_slider_options[img_width]"><?php _e('Width','smooth-slider'); ?></label>
571
- <input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?> &nbsp;&nbsp;
572
  </fieldset></td>
573
  </tr>
574
 
575
  <tr valign="top">
576
  <th scope="row"><?php _e('Maximum Height of the Image','smooth-slider'); ?></th>
577
- <td><input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?>
578
  <span class="moreInfo">
579
  &nbsp; <span class="trigger"> ? </span>
580
  <div class="tooltip">
@@ -586,7 +606,7 @@ if ($handle = opendir($directory)) {
586
 
587
  <tr valign="top">
588
  <th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
589
- <td><input type="text" name="smooth_slider_options[img_border]" id="smooth_slider_img_border" class="small-text" value="<?php echo $smooth_slider['img_border']; ?>" />
590
  <span class="moreInfo">
591
  &nbsp; <span class="trigger"> ? </span>
592
  <div class="tooltip">
@@ -598,7 +618,7 @@ if ($handle = opendir($directory)) {
598
 
599
  <tr valign="top">
600
  <th scope="row"><?php _e('Border Color','smooth-slider'); ?></th>
601
- <td><input type="text" name="smooth_slider_options[img_brcolor]" id="color_value_4" value="<?php echo $smooth_slider['img_brcolor']; ?>" />&nbsp; <img id="color_picker_4" 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_4"></div></td>
602
  </tr>
603
 
604
  <tr valign="top">
@@ -620,8 +640,8 @@ if ($handle = opendir($directory)) {
620
 
621
  </div>
622
 
623
- <div class="sub_settings_m">
624
- <h2 class="sub-heading"><?php _e('Slider Content','smooth-slider'); ?></h2>
625
  <p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
626
  <table class="form-table">
627
  <tr valign="top">
@@ -650,12 +670,12 @@ if ($handle = opendir($directory)) {
650
 
651
  <tr valign="top">
652
  <th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
653
- <td><input type="text" name="smooth_slider_options[content_fcolor]" id="color_value_5" value="<?php echo $smooth_slider['content_fcolor']; ?>" />&nbsp; <img id="color_picker_5" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_5"></div></td>
654
  </tr>
655
 
656
  <tr valign="top">
657
  <th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
658
- <td><input type="text" name="smooth_slider_options[content_fsize]" id="smooth_slider_content_fsize" class="small-text" value="<?php echo $smooth_slider['content_fsize']; ?>" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
659
  </tr>
660
 
661
  <tr valign="top">
@@ -681,7 +701,7 @@ if ($handle = opendir($directory)) {
681
 
682
  <tr valign="top">
683
  <th scope="row"><?php _e('Maximum content size (in words)','smooth-slider'); ?></th>
684
- <td><input type="text" name="smooth_slider_options[content_limit]" id="smooth_slider_content_limit" class="small-text" value="<?php echo $smooth_slider['content_limit']; ?>" />
685
  <span class="moreInfo">
686
  &nbsp; <span class="trigger"> ? </span>
687
  <div class="tooltip">
@@ -693,7 +713,7 @@ if ($handle = opendir($directory)) {
693
 
694
  <tr valign="top">
695
  <th scope="row"><?php _e('Maximum content size (in characters)','smooth-slider'); ?></th>
696
- <td><input type="text" name="smooth_slider_options[content_chars]" id="smooth_slider_content_chars" class="small-text" value="<?php echo $smooth_slider['content_chars']; ?>" />&nbsp;<?php _e('characters','smooth-slider'); ?> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
697
  </tr>
698
 
699
  </table>
@@ -702,8 +722,8 @@ if ($handle = opendir($directory)) {
702
  </div><!--#slides-->
703
 
704
  <div id="preview">
705
- <div class="sub_settings">
706
- <h2 class="sub-heading"><?php _e('Preview on Settings Panel','smooth-slider'); ?></h2>
707
 
708
  <table class="form-table">
709
 
@@ -721,48 +741,73 @@ if ($handle = opendir($directory)) {
721
  </tr>
722
 
723
  <tr valign="top">
724
- <th scope="row"><?php _e('Smooth Template Tag for Preview','smooth-slider'); ?></th>
725
- <td><select name="smooth_slider_options[preview]" id="smooth_slider_preview">
726
  <option value="2" <?php if ($smooth_slider['preview'] == "2"){ echo "selected";}?> ><?php _e('Recent Posts Slider','smooth-slider'); ?></option>
727
  <option value="1" <?php if ($smooth_slider['preview'] == "1"){ echo "selected";}?> ><?php _e('Category Slider','smooth-slider'); ?></option>
728
- <option value="0" <?php if ($smooth_slider['preview'] == "0"){ echo "selected";}?> ><?php _e('Custom Slider with Slider ID','smooth-slider'); ?></option>
729
  </select>
730
  </td>
731
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
 
733
- <tr valign="top">
 
734
  <th scope="row"><?php _e('Preview Slider Params','smooth-slider'); ?></th>
735
  <td><fieldset><legend class="screen-reader-text"><span><?php _e('Preview Slider Params','smooth-slider'); ?></span></legend>
736
- <label for="smooth_slider_options[slider_id]" style="width:45%;"><?php _e('Slider ID in case of Custom Slider','smooth-slider'); ?></label>
737
- <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%;" />
738
- <br /> <br />
739
- <label for="smooth_slider_options[catg_slug]" style="width:45%;"><?php _e('Category Slug in case of Category Slider','smooth-slider'); ?></label>
740
- <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%;" />
 
741
  </fieldset></td>
742
  </tr>
743
 
 
744
  </table>
745
  <p class="submit">
746
  <input type="submit" class="button-primary" id="preview_save" value="<?php _e('Save Changes') ?>" />
747
  </p>
748
  </div>
749
 
750
- <div class="sub_settings_m">
751
- <h2 class="sub-heading"><?php _e('Shortcode','smooth-slider'); ?></h2>
752
- <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 />
753
- <?php
754
- if ($smooth_slider['preview'] == "0")
755
  $preview='[smoothslider id="'.$smooth_slider['slider_id'].'"]';
756
  elseif($smooth_slider['preview'] == "1")
757
  $preview='[smoothcategory catg_slug="'.$smooth_slider['catg_slug'].'"]';
758
  else
759
  $preview='[smoothrecent]';
760
- echo $preview;
761
  ?>
762
  </div>
763
 
764
- <div class="sub_settings_m">
765
- <h2 class="sub-heading"><?php _e('Template Tag','smooth-slider'); ?></h2>
766
  <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 />
767
  <?php
768
  if ($smooth_slider['preview'] == "0")
@@ -822,6 +867,18 @@ else
822
  <td><select name="smooth_reset_settings" id="smooth_slider_reset_settings" >
823
  <option value="n" selected ><?php _e('None','smooth-slider'); ?></option>
824
  <option value="g" ><?php _e('Global Default','smooth-slider'); ?></option>
 
 
 
 
 
 
 
 
 
 
 
 
825
  </select>
826
  </td>
827
  </tr>
@@ -846,7 +903,28 @@ else
846
  </div> <!--end of float left -->
847
  <!-- Added for validations - start -->
848
  <script type="text/javascript">
849
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
850
  jQuery(document).ready(function($) {
851
  <?php if(isset($_GET['settings-updated'])) { if($_GET['settings-updated'] == 'true' and $smooth_slider['popup'] == '1' ) {
852
  ?>
@@ -861,76 +939,29 @@ jQuery('#saveResult').html("<div id='popup'><div class='modal_shortcode'>Quick E
861
 
862
  <?php }} ?>
863
 
864
- jQuery('#smooth_slider_form').submit(function(event) {
865
-
866
- var slide_animationlen=jQuery("#smooth_slider_transition").val();
867
- if(slide_animationlen=='' || slide_animationlen <= 0 || isNaN(slide_animationlen)) {
868
- alert("Slide Animation Length should be a number greater than 0!");
869
- jQuery("#smooth_slider_transition").addClass('error');
870
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_transition').offset().top-50}, 600);
871
- return false;
872
- }
873
- var slider_speed=jQuery("#smooth_slider_speed").val();
874
- if(slider_speed=='' || slider_speed <= 0 || isNaN(slider_speed)) {
875
- alert("Slide Pause Interval should be a number greater than 0!");
876
- jQuery("#smooth_slider_speed").addClass('error');
877
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_speed').offset().top-50}, 600);
878
- return false;
879
- }
880
- var slider_posts=jQuery("#smooth_slider_no_posts").val();
881
- if(slider_posts=='' || slider_posts <= 0 || isNaN(slider_posts)) {
882
- alert("Number of Posts in the Slideshow should be a number greater than 0!");
883
- jQuery("#smooth_slider_no_posts").addClass('error');
884
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_no_posts').offset().top-50}, 600);
885
- return false;
886
- }
887
- var slider_width=jQuery("#smooth_slider_width").val();
888
- if(slider_width=='' || slider_width <= 0 || isNaN(slider_width)) {
889
- alert("Slider Width should be a number greater than 0!");
890
- jQuery("#smooth_slider_width").addClass('error');
891
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_width').offset().top-50}, 600);
892
- return false;
893
- }
894
- var slider_height=jQuery("#smooth_slider_height").val();
895
- if(slider_height=='' || slider_height <= 0 || isNaN(slider_height)) {
896
- alert("Slider Height should be a number greater than 0!");
897
- jQuery("#smooth_slider_height").addClass('error');
898
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_height').offset().top-50}, 600);
899
- return false;
900
- }
901
-
902
 
903
- var prev=jQuery("#smooth_slider_preview").val(),
904
- hiddenpreview=jQuery("#hidden_preview").val(),
905
- hiddencatslug=jQuery("#hidden_category").val(),
906
- hiddensliderid=jQuery("#hidden_sliderid").val(),
907
- slider_id = jQuery("#smooth_slider_id").val(),
908
- slider_catslug=jQuery("#smooth_slider_catslug").val();
909
- if(prev == "0" && slider_id == ''){
910
- alert("Slider id should be mentioned");
911
- jQuery("#smooth_slider_id").addClass('error');
912
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_id').offset().top-50}, 600);
913
- return false;
914
- }
915
- if(prev == "1" && slider_catslug == ''){
916
- alert("Category slug should be mentioned whose posts you want to display in slider");
917
- jQuery("#smooth_slider_catslug").addClass('error');
918
- jQuery("html,body").animate({scrollTop:jQuery('#smooth_slider_catslug').offset().top-50}, 600);
919
- return false;
920
- }
921
- if(hiddenpreview != prev || slider_id != hiddensliderid || slider_catslug != hiddencatslug ) jQuery('#smoothpopup').val("1");
922
- else jQuery('#smoothpopup').val("0");
923
- });
924
  });
 
925
 
 
 
926
  </script>
927
  <!-- Added for validation - end -->
928
-
929
-
930
-
931
  </div> <!--end of float wrap -->
932
 
933
- <div id="poststuff" class="metabox-holder has-right-sidebar" style="float:left;width:28%;max-width:300px;min-width:inherit;">
934
  <div class="postbox" style="margin:0 0 10px 0;">
935
  <h3 class="hndle"><span></span><?php _e('Quick Embed Shortcode','smooth-slider'); ?></h3>
936
  <div class="inside" id="shortcodeview">
@@ -1000,6 +1031,8 @@ jQuery('#saveResult').html("<div id='popup'><div class='modal_shortcode'>Quick E
1000
 
1001
  </div> <!--end of poststuff -->
1002
 
 
 
1003
  <?php
1004
  }
1005
  function register_mysettings() { // whitelist options
3
  add_action('admin_menu', 'smooth_slider_settings');
4
  add_action( 'admin_init', 'register_mysettings' );
5
  }
 
6
  // function for adding settings page to wp-admin
7
  function smooth_slider_settings() {
8
  add_menu_page( 'Smooth Slider', 'Smooth Slider', 'manage_options','smooth-slider-admin', 'smooth_slider_create_multiple_sliders');
68
  //print_r($default_slider);
69
  //die("test");
70
 
71
+ /* Skins settings File 2.6 */
72
+ $directory = SMOOTH_SLIDER_CSS_DIR;
73
+ if ($handle = opendir($directory)) {
74
+ while (false !== ($file = readdir($handle))) {
75
+ if($file != '.' and $file != '..') {
76
+ if($file != "sample")
77
+ require_once ( dirname( dirname(__FILE__) ) . '/css/skins/'.$file.'/settings.php');
78
+
79
+ } }
80
+ closedir($handle);
81
+ }
82
  //Reset Settings
83
  if (isset ($_POST['smooth_reset_settings_submit'])) {
84
  if ( $_POST['smooth_reset_settings']!='n' ) {
85
+ $smooth_reset_settings=$_POST['smooth_reset_settings'];
86
+ $options='smooth_slider_options';
87
+ $optionsvalue=get_option($options);
88
+ if( $smooth_reset_settings == 'g' ){
89
  $new_settings_value=$default_slider;
90
  update_option($options,$new_settings_value);
91
+ }
92
+ elseif(!is_numeric($smooth_reset_settings)) {
93
+ $skin=$smooth_reset_settings;
94
+ $new_settings_value=$default_slider;
95
+ $skin_defaults_str='default_settings_'.$skin;
96
+ global ${$skin_defaults_str};
97
+ if(count(${$skin_defaults_str})>0){
98
+ foreach(${$skin_defaults_str} as $key=>$value){
99
+ $new_settings_value[$key]=$value;
100
+ }
101
+ $new_settings_value['stylesheet']=$skin;
102
+ }
103
+ update_option($options,$new_settings_value);
104
+ }
105
  }
106
  }
107
  $new_settings_msg='';
164
  <?php }?>
165
  <?php echo $new_settings_msg;?>
166
 
167
+ <div id="smooth_settings">
168
  <form method="post" action="options.php" id="smooth_slider_form">
169
  <?php settings_fields('smooth-slider-group'); ?>
170
 
177
  </ul>
178
 
179
  <div id="basic">
180
+ <div class="sub_settings toggle_settings">
181
+ <h2 class="sub-heading"><?php _e('Basic Controls','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"> </h2>
182
  <table class="form-table">
183
 
184
+ <tr valign="top">
185
+ <th scope="row"><?php _e('Select Skin','smooth-slider'); ?> </th>
186
+ <td><select name="smooth_slider_options[stylesheet]" id="smooth_slider_stylesheet" onchange="return checkskin(this.value);">
187
+ <?php
188
+ $directory = SMOOTH_SLIDER_CSS_DIR;
189
+ if ($handle = opendir($directory)) {
190
+ while (false !== ($file = readdir($handle))) {
191
+ if($file != '.' and $file != '..') { ?>
192
+ <option value="<?php echo $file;?>" <?php if ($smooth_slider['stylesheet'] == $file){ echo "selected";}?> ><?php echo $file;?></option>
193
+ <?php } }
194
+ closedir($handle);
195
+ }
196
+ ?>
197
+ </select>
198
+ </td>
199
+ </tr>
200
  <tr valign="top">
201
  <th scope="row"><label for="smooth_slider_autostep"><?php _e(' Enable autostepping of slides','smooth-slider'); ?></label></th>
202
  <td>
225
 
226
  <tr valign="top">
227
  <th scope="row"><?php _e('Slide Pause Interval','smooth-slider'); ?></th>
228
+ <td><input type="number" name="smooth_slider_options[speed]" id="smooth_slider_speed" class="small-text" value="<?php echo $smooth_slider['speed']; ?>" min="1" /> &nbsp;<?php _e('(in secs)','smooth-slider'); ?>
229
  <span class="moreInfo">
230
  &nbsp; <span class="trigger"> ? </span>
231
  <div class="tooltip">
237
 
238
  <tr valign="top">
239
  <th scope="row"><?php _e('Slide Animation Length','smooth-slider'); ?></th>
240
+ <td><input type="number" name="smooth_slider_options[transition]" id="smooth_slider_transition" class="small-text" value="<?php echo $smooth_slider['transition']; ?>" min="1" />
241
  <span class="moreInfo">
242
  &nbsp; <span class="trigger"> ? </span>
243
  <div class="tooltip">
249
 
250
  <tr valign="top">
251
  <th scope="row"><?php _e('Number of Posts in the Slideshow','smooth-slider'); ?></th>
252
+ <td><input type="number" name="smooth_slider_options[no_posts]" id="smooth_slider_no_posts" class="small-text" value="<?php echo $smooth_slider['no_posts']; ?>" min="1" />
253
  </td>
254
  </tr>
255
 
256
  <tr valign="top">
257
+ <th scope="row"><?php _e('Slide Background Color','smooth-slider'); ?></th>
258
+ <td><input type="text" name="smooth_slider_options[bg_color]" id="smooth_slider_bg_color" value="<?php echo$smooth_slider['bg_color']; ?>" class="wp-color-picker-field" data-default-color="#ffffff" /></div></div></br></br>
259
  <label for="smooth_slider_bg"><input name="smooth_slider_options[bg]" type="checkbox" id="smooth_slider_bg" value="1" <?php checked('1', $smooth_slider['bg']); ?> /><?php _e(' Use Transparent Background','smooth-slider'); ?></label> </td>
260
  </tr>
261
 
262
  <tr valign="top">
263
  <th scope="row"><?php _e('Min. Slider Height','smooth-slider'); ?></th>
264
+ <td><input type="number" name="smooth_slider_options[height]" id="smooth_slider_height" class="small-text" value="<?php echo $smooth_slider['height']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
265
  </tr>
266
 
267
 
268
  <tr valign="top">
269
  <th scope="row"><?php _e('Slider Width','smooth-slider'); ?></th>
270
+ <td><input type="number" name="smooth_slider_options[width]" id="smooth_slider_width" class="small-text" value="<?php echo $smooth_slider['width']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
271
  </tr>
272
 
273
  <tr valign="top">
274
  <th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
275
+ <td><input type="number" min="0" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>" />
276
  <span class="moreInfo">
277
  &nbsp; <span class="trigger"> ? </span>
278
  <div class="tooltip">
284
 
285
  <tr valign="top">
286
  <th scope="row"><?php _e('Border Color','smooth-slider'); ?></th>
287
+ <td><input type="text" name="smooth_slider_options[brcolor]" id="smooth_slider_brcolor" value="<?php echo $smooth_slider['brcolor']; ?>" class="wp-color-picker-field" data-default-color="#dddddd" /></td>
288
  </tr>
289
 
290
  <tr valign="top">
296
  <label for="smooth_slider_goto_slide"><?php _e('Show go to slide number links or images','smooth-slider'); ?></label><br />
297
  <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 />
298
  <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 />
299
+ <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 /> &nbsp; &nbsp; &nbsp; <?php _e('Size: ','smooth-slider'); ?><input type="number" name="smooth_slider_options[navimg_w]" id="smooth_slider_navimg_w" class="small-text" value="<?php echo $smooth_slider['navimg_w']; ?>" min="1" />&nbsp;X&nbsp;<input type="number" name="smooth_slider_options[navimg_ht]" id="smooth_slider_navimg_ht" class="small-text" value="<?php echo $smooth_slider['navimg_ht']; ?>" min="1" /> <?php _e('px','smooth-slider'); ?><br />
300
  <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'); ?>
301
  <input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
302
  </fieldset></td>
308
  </p>
309
  </div>
310
 
311
+ <div class="sub_settings_m toggle_settings">
312
+ <h2 class="sub-heading"><?php _e('Miscellaneous','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
313
 
314
  <table class="form-table">
315
 
319
  <span class="moreInfo">
320
  &nbsp; <span class="trigger"> ? </span>
321
  <div class="tooltip">
322
+ <?php _e('Put the tags like &lt;br&gt;&lt;a&gt;&ltp&gt; to retain them.Do not separate them using commas, neither use anywhere.','smooth-slider'); ?>
323
  </div>
324
  </span>
325
  </td>
331
 
332
  <tr valign="top">
333
  <th scope="row"><?php _e('Color of "Continue Reading Text"','smooth-slider'); ?></th>
334
+ <td><input type="text" name="smooth_slider_options[readmorecolor]" id="smooth_slider_readmorecolor" value="<?php echo$smooth_slider['readmorecolor']; ?>" class="wp-color-picker-field" data-default-color="#3F4C6B" /></div></td>
335
  </tr>
336
+
337
 
338
  <tr valign="top">
339
  <th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
368
  <td><input name="smooth_slider_options[shortcode]" type="checkbox" value="1" <?php checked('1', $smooth_slider['shortcode']); ?> />&nbsp;<?php _e('check this if you want to use Smooth Slider Shortcode i.e [smoothslider]','smooth-slider'); ?></td>
369
  </tr>
370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  <tr valign="top">
372
  <th scope="row"><?php _e('Multiple Slider Feature','smooth-slider'); ?></th>
373
  <td><label for="smooth_slider_multiple">
405
  </div><!--#basics-->
406
 
407
  <div id="slides">
408
+ <div class="sub_settings toggle_settings">
409
+ <h2 class="sub-heading"><?php _e('Slider Title','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
410
  <p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
411
  <table class="form-table">
412
 
450
 
451
  <tr valign="top">
452
  <th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
453
+ <td><input type="text" name="smooth_slider_options[title_fcolor]" id="smooth_slider_title_fcolor" value="<?php echo$smooth_slider['title_fcolor']; ?>" class="wp-color-picker-field" data-default-color="#000000" /></div></td>
454
  </tr>
 
455
  <tr valign="top">
456
  <th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
457
+ <td><input type="number" name="smooth_slider_options[title_fsize]" id="smooth_slider_title_fsize" class="small-text" value="<?php echo $smooth_slider['title_fsize']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
458
  </tr>
459
 
460
  <tr valign="top">
473
  </p>
474
  </div>
475
 
476
+ <div class="sub_settings_m toggle_settings">
477
+ <h2 class="sub-heading"><?php _e('Post Title','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
478
  <p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
479
  <table class="form-table">
480
 
504
 
505
  <tr valign="top">
506
  <th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
507
+ <td><input type="text" name="smooth_slider_options[ptitle_fcolor]" id="smooth_slider_ptitle_fcolor" value="<?php echo$smooth_slider['ptitle_fcolor']; ?>" class="wp-color-picker-field" data-default-color="#000000" /></div></td>
508
  </tr>
509
 
510
  <tr valign="top">
511
  <th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
512
+ <td><input type="number" name="smooth_slider_options[ptitle_fsize]" id="smooth_slider_ptitle_fsize" class="small-text" value="<?php echo $smooth_slider['ptitle_fsize']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
513
  </tr>
514
 
515
  <tr valign="top">
528
  </p>
529
  </div>
530
 
531
+ <div class="sub_settings_m toggle_settings">
532
+ <h2 class="sub-heading"><?php _e('Thumbnail Image','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
533
  <p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
534
  <table class="form-table">
535
 
536
  <tr valign="top">
537
  <th scope="row"><?php _e('Image Pick Preferences','smooth-slider'); ?> <small><?php _e('(The first one is having priority over second, the second having priority on third and so on)','smooth-slider'); ?></small></th>
538
  <td><fieldset><legend class="screen-reader-text"><span><?php _e('Image Pick Sequence','smooth-slider'); ?> <small><?php _e('(The first one is having priority over second, the second having priority on third and so on)','smooth-slider'); ?></small> </span></legend>
539
+ <input name="smooth_slider_options[img_pick][0]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][0]); ?> /> <?php _e('Use Custom Field/Key','smooth-slider'); ?> &nbsp; &nbsp; <br/> <br/>
540
+ <?php _e('Name of the Custom Field/Key','smooth-slider'); ?><input type="text" name="smooth_slider_options[img_pick][1]" class="text" value="<?php echo $smooth_slider['img_pick'][1]; ?>" /><br /> <br/>
541
+ <input name="smooth_slider_options[img_pick][2]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][2]); ?> /> <?php _e('Use Featured Post/Thumbnail (Wordpress 3.0 + feature)','smooth-slider'); ?>&nbsp; <br /> <br/>
542
+ <input name="smooth_slider_options[img_pick][3]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][3]); ?> /> <?php _e('Consider Images attached to the post','smooth-slider'); ?> &nbsp; &nbsp; <br/><br/>
543
+ <?php _e('Order of the Image attachment to pick','smooth-slider'); ?><input type="text" name="smooth_slider_options[img_pick][4]" class="small-text" value="<?php echo $smooth_slider['img_pick'][4]; ?>" /> &nbsp; <br /><br/>
 
544
  <input name="smooth_slider_options[img_pick][5]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][5]); ?> /> <?php _e('Scan images from the post, in case there is no attached image to the post','smooth-slider'); ?>&nbsp;
545
  </fieldset></td>
546
  </tr>
588
  <br />
589
  <input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> <?php _e('Custom Size:','smooth-slider'); ?>&nbsp;
590
  <label for="smooth_slider_options[img_width]"><?php _e('Width','smooth-slider'); ?></label>
591
+ <input type="number" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?> &nbsp;&nbsp;
592
  </fieldset></td>
593
  </tr>
594
 
595
  <tr valign="top">
596
  <th scope="row"><?php _e('Maximum Height of the Image','smooth-slider'); ?></th>
597
+ <td><input type="number" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?>
598
  <span class="moreInfo">
599
  &nbsp; <span class="trigger"> ? </span>
600
  <div class="tooltip">
606
 
607
  <tr valign="top">
608
  <th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
609
+ <td><input type="number" min="0" name="smooth_slider_options[img_border]" id="smooth_slider_img_border" class="small-text" value="<?php echo $smooth_slider['img_border']; ?>" />
610
  <span class="moreInfo">
611
  &nbsp; <span class="trigger"> ? </span>
612
  <div class="tooltip">
618
 
619
  <tr valign="top">
620
  <th scope="row"><?php _e('Border Color','smooth-slider'); ?></th>
621
+ <td><input type="text" name="smooth_slider_options[img_brcolor]" id="smooth_slider_img_brcolor" value="<?php echo$smooth_slider['img_brcolor']; ?>" class="wp-color-picker-field" data-default-color="#000000" /></div></td>
622
  </tr>
623
 
624
  <tr valign="top">
640
 
641
  </div>
642
 
643
+ <div class="sub_settings_m toggle_settings">
644
+ <h2 class="sub-heading"><?php _e('Slider Content','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
645
  <p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
646
  <table class="form-table">
647
  <tr valign="top">
670
 
671
  <tr valign="top">
672
  <th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
673
+ <td><input type="text" name="smooth_slider_options[content_fcolor]" id="smooth_slider_content_fcolor" value="<?php echo$smooth_slider['content_fcolor']; ?>" class="wp-color-picker-field" data-default-color="#333333" /></div></td>
674
  </tr>
675
 
676
  <tr valign="top">
677
  <th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
678
+ <td><input type="number" name="smooth_slider_options[content_fsize]" id="smooth_slider_content_fsize" class="small-text" value="<?php echo $smooth_slider['content_fsize']; ?>" min="1" />&nbsp;<?php _e('px','smooth-slider'); ?></td>
679
  </tr>
680
 
681
  <tr valign="top">
701
 
702
  <tr valign="top">
703
  <th scope="row"><?php _e('Maximum content size (in words)','smooth-slider'); ?></th>
704
+ <td><input type="number" name="smooth_slider_options[content_limit]" id="smooth_slider_content_limit" class="small-text" value="<?php echo $smooth_slider['content_limit']; ?>" min="1" />
705
  <span class="moreInfo">
706
  &nbsp; <span class="trigger"> ? </span>
707
  <div class="tooltip">
713
 
714
  <tr valign="top">
715
  <th scope="row"><?php _e('Maximum content size (in characters)','smooth-slider'); ?></th>
716
+ <td><input type="number" name="smooth_slider_options[content_chars]" id="smooth_slider_content_chars" class="small-text" value="<?php echo $smooth_slider['content_chars']; ?>" min="1" />&nbsp;<?php _e('characters','smooth-slider'); ?> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
717
  </tr>
718
 
719
  </table>
722
  </div><!--#slides-->
723
 
724
  <div id="preview">
725
+ <div class="sub_settings toggle_settings">
726
+ <h2 class="sub-heading"><?php _e('Preview on Settings Panel','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
727
 
728
  <table class="form-table">
729
 
741
  </tr>
742
 
743
  <tr valign="top">
744
+ <th scope="row"><?php _e('Type of Smooth Slider','smooth-slider'); ?></th>
745
+ <td><select name="smooth_slider_options[preview]" id="smooth_slider_preview" id="smooth_slider_preview" onchange="checkpreview(this.value);">
746
  <option value="2" <?php if ($smooth_slider['preview'] == "2"){ echo "selected";}?> ><?php _e('Recent Posts Slider','smooth-slider'); ?></option>
747
  <option value="1" <?php if ($smooth_slider['preview'] == "1"){ echo "selected";}?> ><?php _e('Category Slider','smooth-slider'); ?></option>
748
+ <option value="0" <?php if ($smooth_slider['preview'] == "0"){ echo "selected";}?> ><?php _e('Custom Slider','smooth-slider'); ?></option>
749
  </select>
750
  </td>
751
  </tr>
752
+ <?php
753
+ /* Added for category selection in Meta Box 2.6*/
754
+ //category slug
755
+ $categories = get_categories();
756
+ $scat_html='<option value="" selected >Select the Category</option>';
757
+
758
+ foreach ($categories as $category) {
759
+ if($category->slug==$smooth_slider['catg_slug']){$selected = 'selected';} else{$selected='';}
760
+ $scat_html =$scat_html.'<option value="'.$category->slug.'" '.$selected.'>'. $category->name .'</option>';
761
+ }
762
+ //fetching slider names 2.6
763
+ global $smooth_slider;
764
+ if($smooth_slider['multiple_sliders'] == '1') {
765
+ $slider_id = $smooth_slider['slider_id'];
766
+ $sliders = ss_get_sliders();
767
+ $sname_html='<option value="0" selected >Select the Slider</option>';
768
+
769
+ foreach ($sliders as $slider) {
770
+ if($slider['slider_id']==$slider_id){$selected = 'selected';} else{$selected='';}
771
+ $sname_html =$sname_html.'<option value="'.$slider['slider_id'].'" '.$selected.'>'.$slider['slider_name'].'</option>';
772
+ }
773
+ }
774
+ ?>
775
 
776
+ <!-- Added for category selection in Meta Box 2.6-->
777
+ <tr valign="top" class="smooth_slider_params">
778
  <th scope="row"><?php _e('Preview Slider Params','smooth-slider'); ?></th>
779
  <td><fieldset><legend class="screen-reader-text"><span><?php _e('Preview Slider Params','smooth-slider'); ?></span></legend>
780
+
781
+ <label for="smooth_slider_options[slider_id]" class="smooth_sid"><?php _e('Select Slider Name','smooth-slider'); ?></label>
782
+ <select id="smooth_slider_id" name="smooth_slider_options[slider_id]" class="smooth_sid"><?php echo $sname_html;?></select>
783
+
784
+ <label for="smooth_slider_options[catg_slug]" class="smooth_catslug"><?php _e('Select Category','smooth-slider'); ?></label>
785
+ <select id="smooth_slider_catslug" name="smooth_slider_options[catg_slug]" class="smooth_catslug"><?php echo $scat_html;?></select>
786
  </fieldset></td>
787
  </tr>
788
 
789
+
790
  </table>
791
  <p class="submit">
792
  <input type="submit" class="button-primary" id="preview_save" value="<?php _e('Save Changes') ?>" />
793
  </p>
794
  </div>
795
 
796
+ <div class="sub_settings_m toggle_settings">
797
+ <h2 class="sub-heading"><?php _e('Shortcode','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
798
+ <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>
799
+ <?php if ($smooth_slider['preview'] == "0")
 
800
  $preview='[smoothslider id="'.$smooth_slider['slider_id'].'"]';
801
  elseif($smooth_slider['preview'] == "1")
802
  $preview='[smoothcategory catg_slug="'.$smooth_slider['catg_slug'].'"]';
803
  else
804
  $preview='[smoothrecent]';
805
+ echo "<p>".$preview."</p>";
806
  ?>
807
  </div>
808
 
809
+ <div class="sub_settings_m toggle_settings">
810
+ <h2 class="sub-heading"><?php _e('Template Tag','smooth-slider'); ?><img src="<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>" class="toggle_img"></h2>
811
  <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 />
812
  <?php
813
  if ($smooth_slider['preview'] == "0")
867
  <td><select name="smooth_reset_settings" id="smooth_slider_reset_settings" >
868
  <option value="n" selected ><?php _e('None','smooth-slider'); ?></option>
869
  <option value="g" ><?php _e('Global Default','smooth-slider'); ?></option>
870
+ <?php
871
+ $directory = SMOOTH_SLIDER_CSS_DIR;
872
+ if ($handle = opendir($directory)) {
873
+ while (false !== ($file = readdir($handle))) {
874
+ if($file != '.' and $file != '..') {
875
+ if($file!="default" && $file!="sample")
876
+ {?>
877
+ <option value="<?php echo $file;?>"><?php echo "'".$file."' skin";?></option>
878
+ <?php } } }
879
+ closedir($handle);
880
+ }
881
+ ?>
882
  </select>
883
  </td>
884
  </tr>
903
  </div> <!--end of float left -->
904
  <!-- Added for validations - start -->
905
  <script type="text/javascript">
906
+ <?php
907
+ /* To fetch Skin Specific attributes 2.6 */
908
+ $directory = SMOOTH_SLIDER_CSS_DIR;
909
+ if ($handle = opendir($directory)) {
910
+ while (false !== ($file = readdir($handle))) {
911
+ if($file != '.' and $file != '..') {
912
+ $default_settings_str='default_settings_'.$file;
913
+ global ${$default_settings_str};
914
+ echo 'var '.$default_settings_str.' = '.json_encode(${$default_settings_str}).';';
915
+ } }
916
+ closedir($handle);
917
+ }
918
+ ?>
919
+ /* To populate Skin Specific attributes 2.6 */
920
+ function checkskin(skin){
921
+ var skin_array = window['default_settings_'+skin];
922
+ for (var key in skin_array) {
923
+ var html_element='smooth_slider_'+key;
924
+ document.getElementById(html_element).value = skin_array[key];
925
+ }
926
+
927
+ }
928
  jQuery(document).ready(function($) {
929
  <?php if(isset($_GET['settings-updated'])) { if($_GET['settings-updated'] == 'true' and $smooth_slider['popup'] == '1' ) {
930
  ?>
939
 
940
  <?php }} ?>
941
 
942
+ /* jquery code moved to admin.js -2.6 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
943
 
944
+ /* Added for settings tab collapse and expand - 2.6 start */
945
+ jQuery(this).find(".sub-heading").on("click", function(){
946
+ var wrap=jQuery(this).parent('.toggle_settings'),
947
+ tabcontent=wrap.find("p, table, code");
948
+ tabcontent.toggle();
949
+ var imgclass=wrap.find(".toggle_img");
950
+ if (tabcontent.css('display') == 'none') {
951
+ imgclass.attr("src", imgclass.attr("src").replace("<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>", "<?php echo smooth_slider_plugin_url( 'images/info.png' ); ?>"));
952
+ } else {
953
+ imgclass.attr("src", imgclass.attr("src").replace("<?php echo smooth_slider_plugin_url( 'images/info.png' ); ?>", "<?php echo smooth_slider_plugin_url( 'images/close.png' ); ?>"));
954
+ }
 
 
 
 
 
 
 
 
 
 
955
  });
956
+ /* Added for settings tab collapse and expand - 2.6 end */
957
 
958
+
959
+ });
960
  </script>
961
  <!-- Added for validation - end -->
 
 
 
962
  </div> <!--end of float wrap -->
963
 
964
+ <div id="poststuff" class="metabox-holder has-right-sidebar" style="float:left;width:100%;max-width:300px;min-width:inherit;">
965
  <div class="postbox" style="margin:0 0 10px 0;">
966
  <h3 class="hndle"><span></span><?php _e('Quick Embed Shortcode','smooth-slider'); ?></h3>
967
  <div class="inside" id="shortcodeview">
1031
 
1032
  </div> <!--end of poststuff -->
1033
 
1034
+
1035
+
1036
  <?php
1037
  }
1038
  function register_mysettings() { // whitelist options
settings/sliders.php CHANGED
@@ -2,7 +2,6 @@
2
  function smooth_slider_create_multiple_sliders() {
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
@@ -16,6 +15,7 @@ if (isset($_POST['remove_posts_slider'])) {
16
  $wpdb->query($sql);
17
  }
18
  }
 
19
  if ($_POST['remove_all'] == __('Remove All at Once','smooth-slider')) {
20
  global $wpdb, $table_prefix;
21
  $table_name = $table_prefix.SLIDER_TABLE;
@@ -25,6 +25,8 @@ if (isset($_POST['remove_posts_slider'])) {
25
  $wpdb->query($sql);
26
  }
27
  }
 
 
28
  if ($_POST['remove_all'] == __('Delete Slider','smooth-slider')) {
29
  $slider_id = $_POST['current_slider_id'];
30
  global $wpdb, $table_prefix;
@@ -45,6 +47,7 @@ if (isset($_POST['remove_posts_slider'])) {
45
  }
46
  }
47
  }
 
48
  if (isset($_POST['create_new_slider'])) {
49
  $slider_name = $_POST['new_slider_name'];
50
  global $wpdb,$table_prefix;
@@ -63,6 +66,46 @@ if (isset($_POST['reorder_posts_slider'])) {
63
  $i++;
64
  }
65
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ?>
67
  <div style="clear:left"></div>
68
  <?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-settings' ) );?>
@@ -80,11 +123,28 @@ if (isset($_POST['reorder_posts_slider'])) {
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
 
@@ -94,7 +154,7 @@ if (isset($_POST['reorder_posts_slider'])) {
94
  <p><em><?php _e('Check the Post/Page and Press "Remove Selected" to remove them From','smooth-slider'); ?> <?php echo $slider['slider_name'];?>. <?php _e('Press "Remove All at Once" to remove all the posts from the','smooth-slider'); ?> <?php echo $slider['slider_name'];?>.</em></p>
95
 
96
  <table class="widefat">
97
- <thead><tr><th><?php _e('Post/Page Title','smooth-slider'); ?></th><th><?php _e('Author','smooth-slider'); ?></th><th><?php _e('Post Date','smooth-slider'); ?></th><th><?php _e('Remove Post','smooth-slider'); ?></th></tr></thead><tbody>
98
 
99
  <?php
100
  /*global $wpdb, $table_prefix;
@@ -108,19 +168,21 @@ if (isset($_POST['reorder_posts_slider'])) {
108
  <?php $count = 0;
109
  foreach($slider_posts as $slider_post) {
110
  $slider_arr[] = $slider_post->post_id;
111
- $post = get_post($slider_post->post_id);
112
- if ( in_array($post->ID, $slider_arr) ) {
 
113
  $count++;
114
  $sslider_author = get_userdata($post->post_author);
115
  $sslider_author_dname = $sslider_author->display_name;
116
  echo '<tr' . ($count % 2 ? ' class="alternate"' : '') . '><td><strong>' . $post->post_title . '</strong><a href="'.get_edit_post_link( $post->ID, $context = 'display' ).'" target="_blank"> '.__( '(Edit)', 'smooth-slider' ).'</a> <a href="'.get_permalink( $post->ID ).'" target="_blank"> '.__( '(View)', 'smooth-slider' ).' </a></td><td>By ' . $sslider_author_dname . '</td><td>' . date('l, F j. Y',strtotime($post->post_date)) . '</td><td><input type="checkbox" name="slider_posts[' . $post->ID . ']" value="1" /></td></tr>';
117
- }
 
118
  }
119
 
120
  if ($count == 0) {
121
  echo '<tr><td colspan="4">'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'smooth-slider' ).'</td></tr>';
122
  }
123
- echo '</tbody><tfoot><tr><th>'.__( 'Post/Page Title', 'smooth-slider' ).'</th><th>'.__( 'Author', 'smooth-slider' ).'</th><th>'.__( 'Post Date', 'smooth-slider' ).'</th><th>'.__( 'Remove Post', 'smooth-slider' ).'</th></tr></tfoot></table>';
124
 
125
  echo '<div class="submit">';
126
 
@@ -139,9 +201,9 @@ if (isset($_POST['reorder_posts_slider'])) {
139
 
140
  <form action="" method="post">
141
  <input type="hidden" name="reorder_posts_slider" value="1" />
142
- <h3><?php _e('Reorder the Posts/Pages Added To','smooth-slider'); ?> <?php echo $slider['slider_name'];?>(Slider ID = <?php echo $slider['slider_id'];?>)</h3>
143
  <p><em><?php _e('Click on and drag the post/page title to a new spot within the list, and the other items will adjust to fit.','smooth-slider'); ?> </em></p>
144
- <ul id="sslider_sortable_<?php echo $slider['slider_id'];?>" style="color:#326078">
145
  <?php
146
  /*global $wpdb, $table_prefix;
147
  $table_name = $table_prefix.SLIDER_TABLE;*/
@@ -154,14 +216,16 @@ if (isset($_POST['reorder_posts_slider'])) {
154
  <?php $count = 0;
155
  foreach($slider_posts as $slider_post) {
156
  $slider_arr[] = $slider_post->post_id;
157
- $post = get_post($slider_post->post_id);
 
158
  if ( in_array($post->ID, $slider_arr) ) {
159
  $count++;
160
  $sslider_author = get_userdata($post->post_author);
161
  $sslider_author_dname = $sslider_author->display_name;
162
- echo '<li id="'.$post->ID.'"><input type="hidden" name="order[]" value="'.$post->ID.'" /><strong> &raquo; &nbsp; ' . $post->post_title . '</strong></li>';
163
- }
164
- }
 
165
 
166
  if ($count == 0) {
167
  echo '<li>'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'smooth-slider' ).'</li>';
@@ -176,6 +240,22 @@ if (isset($_POST['reorder_posts_slider'])) {
176
  </div>
177
  <input type="hidden" name="active_tab" class="smooth_activetab" value="0" />
178
  </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  </div>
180
 
181
  <?php } ?>
@@ -197,7 +277,7 @@ if (isset($_POST['reorder_posts_slider'])) {
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>
2
  function smooth_slider_create_multiple_sliders() {
3
  global $smooth_slider;
4
  ?>
 
5
  <div class="wrap smooth_sliders_create" id="smooth_sliders_create" style="clear:both;">
6
  <h2 style="float:left;"><?php _e('Sliders Created','smooth-slider'); ?></h2>
7
  <?php
15
  $wpdb->query($sql);
16
  }
17
  }
18
+ if (isset ($_POST['remove_all'])) {
19
  if ($_POST['remove_all'] == __('Remove All at Once','smooth-slider')) {
20
  global $wpdb, $table_prefix;
21
  $table_name = $table_prefix.SLIDER_TABLE;
25
  $wpdb->query($sql);
26
  }
27
  }
28
+ }
29
+ if (isset ($_POST['remove_all'])) {
30
  if ($_POST['remove_all'] == __('Delete Slider','smooth-slider')) {
31
  $slider_id = $_POST['current_slider_id'];
32
  global $wpdb, $table_prefix;
47
  }
48
  }
49
  }
50
+ }
51
  if (isset($_POST['create_new_slider'])) {
52
  $slider_name = $_POST['new_slider_name'];
53
  global $wpdb,$table_prefix;
66
  $i++;
67
  }
68
  }
69
+ /*Added for rename slider-2.6-start*/
70
+ if ((isset ($_POST['rename_slider'])) and ($_POST['rename_slider'] == __('Rename','smooth-slider'))) {
71
+ $slider_name = $_POST['rename_slider_to'];
72
+ $slider_id=$_POST['current_slider_id'];
73
+ if( !empty($slider_name) ) {
74
+ global $wpdb,$table_prefix;
75
+ $slider_meta = $table_prefix.SLIDER_META;
76
+ $sql = 'UPDATE '.$slider_meta.' SET slider_name="'.$slider_name.'" WHERE slider_id='.$slider_id;
77
+ $wpdb->query($sql);
78
+ }
79
+ }
80
+ /*Added for rename slider-2.6-end*/
81
+
82
+ /* Added for upload media save-2.6 */
83
+ if ( isset($_POST['addSave']) and ($_POST['addSave']=='Save') ) {
84
+ $images=(isset($_POST['imgID']))?$_POST['imgID']:array();
85
+ $slider_id=$_POST['current_slider_id'];
86
+ $ids=array_reverse($images);
87
+ global $wpdb,$table_prefix;
88
+ foreach($ids as $id){
89
+ $title=(isset($_POST['title'][$id]))?$_POST['title'][$id]:'';
90
+ $desc=(isset($_POST['desc'][$id]))?$_POST['desc'][$id]:'';
91
+ $link=(isset($_POST['link'][$id]))?$_POST['link'][$id]:'';
92
+ $nolink=(isset($_POST['nolink'][$id]))?$_POST['nolink'][$id]:'';
93
+ $attachment = array(
94
+ 'ID' => $id,
95
+ 'post_title' => $title,
96
+ 'post_content' => $desc
97
+ );
98
+ wp_update_post( $attachment );
99
+ update_post_meta($id, 'smooth_slide_redirect_url', $link);
100
+ update_post_meta($id, 'smooth_sslider_nolink', $nolink);
101
+ if(!slider($id,$slider_id)) {
102
+ $dt = date('Y-m-d H:i:s');
103
+ $sql = "INSERT INTO ".$table_prefix.SLIDER_TABLE." (post_id, date, slider_id) VALUES ('$id', '$dt', '$slider_id')";
104
+ $wpdb->query($sql);
105
+ }
106
+ }
107
+ }
108
+ /* upload media end 2.6 */
109
  ?>
110
  <div style="clear:left"></div>
111
  <?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-settings' ) );?>
123
  </ul>
124
 
125
  <?php foreach($sliders as $slider){?>
126
+ <div id="tabs-<?php echo $slider['slider_id'];?>" style="width:56%;">
127
  <strong>Quick Embed Shortcode:</strong>
128
  <div class="admin_shortcode">
129
  <pre style="padding: 10px 0;">[smoothslider id='<?php echo $slider['slider_id'];?>']</pre>
130
  </div>
131
+ <!-- Add bulk images start 2.6-->
132
+ <?php
133
+ if ( ! did_action( 'wp_enqueue_media' ) ) wp_enqueue_media();
134
+ wp_enqueue_script( 'media-uploader', smooth_slider_plugin_url( 'js/media-uploader.js' ),array( 'jquery', 'iris' ), SMOOTH_SLIDER_VER, false);
135
+ ?>
136
+ <h3 class="sub-heading" style="margin-left:0px;"><?php _e('Add Images to','smooth-slider'); ?> <?php echo $slider['slider_name'];?> (Slider ID = <?php echo $slider['slider_id'];?>)</h3>
137
+
138
+ <div class="uploaded-images">
139
+ <form method="post" class="addImgForm">
140
+ <div style="clear:left;margin-top:20px;" class="image-uploader">
141
+ <input type="submit" class="upload-button slider_images_upload" name="slider_images_upload" value="Upload" />
142
+ </div>
143
+ <input type="hidden" name="current_slider_id" value="<?php echo $slider['slider_id'];?>" />
144
+ <input type="hidden" name="active_tab" class="smooth_activetab" value="0" />
145
+ </form>
146
+ </div>
147
+ <!-- Add bulk images end 2.6-->
148
  <form action="" method="post">
149
  <?php settings_fields('smooth-slider-group'); ?>
150
 
154
  <p><em><?php _e('Check the Post/Page and Press "Remove Selected" to remove them From','smooth-slider'); ?> <?php echo $slider['slider_name'];?>. <?php _e('Press "Remove All at Once" to remove all the posts from the','smooth-slider'); ?> <?php echo $slider['slider_name'];?>.</em></p>
155
 
156
  <table class="widefat">
157
+ <thead class="blue"><tr><th><?php _e('Post/Page Title','smooth-slider'); ?></th><th><?php _e('Author','smooth-slider'); ?></th><th><?php _e('Post Date','smooth-slider'); ?></th><th><?php _e('Remove Post','smooth-slider'); ?></th></tr></thead><tbody>
158
 
159
  <?php
160
  /*global $wpdb, $table_prefix;
168
  <?php $count = 0;
169
  foreach($slider_posts as $slider_post) {
170
  $slider_arr[] = $slider_post->post_id;
171
+ $post = get_post($slider_post->post_id);
172
+ if(isset($post) and isset($slider_arr)){
173
+ if (in_array($post->ID, $slider_arr) ) {
174
  $count++;
175
  $sslider_author = get_userdata($post->post_author);
176
  $sslider_author_dname = $sslider_author->display_name;
177
  echo '<tr' . ($count % 2 ? ' class="alternate"' : '') . '><td><strong>' . $post->post_title . '</strong><a href="'.get_edit_post_link( $post->ID, $context = 'display' ).'" target="_blank"> '.__( '(Edit)', 'smooth-slider' ).'</a> <a href="'.get_permalink( $post->ID ).'" target="_blank"> '.__( '(View)', 'smooth-slider' ).' </a></td><td>By ' . $sslider_author_dname . '</td><td>' . date('l, F j. Y',strtotime($post->post_date)) . '</td><td><input type="checkbox" name="slider_posts[' . $post->ID . ']" value="1" /></td></tr>';
178
+ }
179
+ }
180
  }
181
 
182
  if ($count == 0) {
183
  echo '<tr><td colspan="4">'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'smooth-slider' ).'</td></tr>';
184
  }
185
+ echo '</tbody><tfoot class="blue"><tr><th>'.__( 'Post/Page Title', 'smooth-slider' ).'</th><th>'.__( 'Author', 'smooth-slider' ).'</th><th>'.__( 'Post Date', 'smooth-slider' ).'</th><th>'.__( 'Remove Post', 'smooth-slider' ).'</th></tr></tfoot></table>';
186
 
187
  echo '<div class="submit">';
188
 
201
 
202
  <form action="" method="post">
203
  <input type="hidden" name="reorder_posts_slider" value="1" />
204
+ <h3 class="sub-heading" style="margin-left:0px;"><?php _e('Reorder the Posts/Pages Added To','smooth-slider'); ?> <?php echo $slider['slider_name'];?>(Slider ID = <?php echo $slider['slider_id'];?>)</h3>
205
  <p><em><?php _e('Click on and drag the post/page title to a new spot within the list, and the other items will adjust to fit.','smooth-slider'); ?> </em></p>
206
+ <ul id="sslider_sortable_<?php echo $slider['slider_id'];?>" style="color:#326078;overflow: auto;">
207
  <?php
208
  /*global $wpdb, $table_prefix;
209
  $table_name = $table_prefix.SLIDER_TABLE;*/
216
  <?php $count = 0;
217
  foreach($slider_posts as $slider_post) {
218
  $slider_arr[] = $slider_post->post_id;
219
+ $post = get_post($slider_post->post_id);
220
+ if(isset($post) and isset($slider_arr)){
221
  if ( in_array($post->ID, $slider_arr) ) {
222
  $count++;
223
  $sslider_author = get_userdata($post->post_author);
224
  $sslider_author_dname = $sslider_author->display_name;
225
+ echo '<li id="'.$post->ID.'" class="reorder"><input type="hidden" name="order[]" value="'.$post->ID.'" /><strong> &raquo; &nbsp; ' . $post->post_title . '</strong></li>';
226
+ }
227
+ }
228
+ }
229
 
230
  if ($count == 0) {
231
  echo '<li>'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'smooth-slider' ).'</li>';
240
  </div>
241
  <input type="hidden" name="active_tab" class="smooth_activetab" value="0" />
242
  </form>
243
+ <!-- Added for rename slider -start -->
244
+ <h3 class="sub-heading" style="margin:40px 0px 5px 0;"><?php _e('Rename Slider','smooth-slider'); ?></h3>
245
+ <form action="" method="post">
246
+ <table class="form-table">
247
+ <tr valign="top">
248
+ <th scope="row"><?php _e('Rename Slider to','smooth-slider'); ?></th>
249
+ <td><input type="text" name="rename_slider_to" class="regular-text" value="<?php echo $slider['slider_name'];?>" /></td>
250
+ </tr>
251
+ </table>
252
+ <input type="hidden" name="current_slider_id" value="<?php echo $slider_id;?>" />
253
+ <input type="submit" value="<?php _e('Rename','smooth-slider'); ?>" name="<?php _e('rename_slider','smooth-slider'); ?>" />
254
+
255
+ <input type="hidden" name="active_tab" class="smooth_activetab" value="0" />
256
+
257
+ </form>
258
+ <!-- Added for rename slider -end -->
259
  </div>
260
 
261
  <?php } ?>
277
  </div>
278
 
279
 
280
+ <div id="poststuff" class="metabox-holder has-right-sidebar" style="float:left;width:25%;max-width:300px;margin-top:20px;">
281
 
282
  <div class="postbox">
283
  <h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
slider_versions/shortcodes_1.php CHANGED
@@ -8,10 +8,11 @@ function return_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo
8
  function return_smooth_slider($slider_id='',$offset='0') {
9
  global $smooth_slider;
10
  $slider_html='';
11
- if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
12
  global $post;
13
  $post_id = $post->ID;
14
- $slider_id = get_slider_for_the_post($post_id);
 
15
  }
16
  if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
17
  $slider_id = '1';
@@ -71,4 +72,4 @@ function smooth_slider_recent_shortcode($atts) {
71
  return return_smooth_slider_recent($offset);
72
  }
73
  add_shortcode('smoothrecent', 'smooth_slider_recent_shortcode');
74
- ?>
8
  function return_smooth_slider($slider_id='',$offset='0') {
9
  global $smooth_slider;
10
  $slider_html='';
11
+ if($smooth_slider['multiple_sliders'] == '1' and is_singular()){
12
  global $post;
13
  $post_id = $post->ID;
14
+ if(ss_slider_on_this_post($post_id))
15
+ $slider_id = get_slider_for_the_post($post_id);
16
  }
17
  if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
18
  $slider_id = '1';
72
  return return_smooth_slider_recent($offset);
73
  }
74
  add_shortcode('smoothrecent', 'smooth_slider_recent_shortcode');
75
+ ?>
slider_versions/smooth_1.php CHANGED
@@ -1,276 +1,54 @@
1
  <?php
2
- function smooth_global_posts_processor( $posts, $smooth_slider,$out_echo ){
 
 
 
3
  global $smooth_slider;
4
- $smooth_slider_css = smooth_get_inline_css();
5
- $html = '';
6
- $smooth_sldr_j = 0;
7
 
8
- foreach($posts as $post) {
9
- $post_id = $post->ID;
10
- $post_title = stripslashes($post->post_title);
11
- $post_title = str_replace('"', '', $post_title);
12
- //filter hook
13
- $post_title=apply_filters('smooth_post_title',$post_title,$post_id,$smooth_slider,$smooth_slider_css);
14
- $slider_content = $post->post_content;
15
- //2.1 changes start
16
- $slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
17
- $sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
18
- trim($slide_redirect_url);
19
- if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
20
- $permalink = $slide_redirect_url;
21
- }
22
- else{
23
- $permalink = get_permalink($post_id);
24
- }
25
- if($sslider_nolink=='1'){
26
- $permalink='';
27
- }
28
-
29
- //filter hook
30
- $permalink=apply_filters('smooth_permalink',$permalink,$post_id,$smooth_slider,$smooth_slider_css);
31
- //2.1 changes end
32
- $smooth_sldr_j++;
33
- $html .= '<div class="smooth_slideri" '.$smooth_slider_css['smooth_slideri'].'>
34
- <!-- smooth_slideri -->';
35
-
36
- $thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
37
- //$image_control = get_post_meta($post_id, 'slider_image_control', true);
38
-
39
- if ($smooth_slider['content_from'] == "slider_content") {
40
- $slider_content = get_post_meta($post_id, 'slider_content', true);
41
- }
42
- if ($smooth_slider['content_from'] == "excerpt") {
43
- $slider_content = $post->post_excerpt;
44
- }
45
-
46
- $slider_content = strip_shortcodes( $slider_content );
47
-
48
- $slider_content = stripslashes($slider_content);
49
- $slider_content = str_replace(']]>', ']]&gt;', $slider_content);
50
-
51
- $slider_content = str_replace("\n","<br />",$slider_content);
52
- $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
53
-
54
- //filter hook
55
- $slider_content=apply_filters('smooth_slide_excerpt',$slider_content,$post_id,$smooth_slider,$smooth_slider_css);
56
- if(!isset($smooth_slider['img_pick'][0])) $smooth_slider['img_pick'][0]='';
57
- if(!isset($smooth_slider['img_pick'][2])) $smooth_slider['img_pick'][2]='';
58
- if(!isset($smooth_slider['img_pick'][3])) $smooth_slider['img_pick'][3]='';
59
- if(!isset($smooth_slider['img_pick'][5])) $smooth_slider['img_pick'][5]='';
60
-
61
- if($smooth_slider['img_pick'][0] == '1'){
62
- $custom_key = array($smooth_slider['img_pick'][1]);
63
- }
64
- else {
65
- $custom_key = '';
66
- }
67
-
68
- if($smooth_slider['img_pick'][2] == '1'){
69
- $the_post_thumbnail = true;
70
- }
71
- else {
72
- $the_post_thumbnail = false;
73
- }
74
-
75
- if($smooth_slider['img_pick'][3] == '1'){
76
- $attachment = true;
77
- $order_of_image = $smooth_slider['img_pick'][4];
78
- }
79
- else{
80
- $attachment = false;
81
- $order_of_image = '1';
82
- }
83
-
84
- if($smooth_slider['img_pick'][5] == '1'){
85
- $image_scan = true;
86
- }
87
- else {
88
- $image_scan = false;
89
- }
90
-
91
- if($smooth_slider['img_size'] == '1'){
92
- $gti_width = $smooth_slider['img_width'];
93
- }
94
- else {
95
- $gti_width = false;
96
- }
97
-
98
- if($smooth_slider['crop'] == '0'){
99
- $extract_size = 'full';
100
- }
101
- elseif($smooth_slider['crop'] == '1'){
102
- $extract_size = 'large';
103
- }
104
- elseif($smooth_slider['crop'] == '2'){
105
- $extract_size = 'medium';
106
- }
107
- else{
108
- $extract_size = 'thumbnail';
109
- }
110
-
111
- $img_args = array(
112
- 'custom_key' => $custom_key,
113
- 'post_id' => $post_id,
114
- 'attachment' => $attachment,
115
- 'size' => $extract_size,
116
- 'the_post_thumbnail' => $the_post_thumbnail,
117
- 'default_image' => false,
118
- 'order_of_image' => $order_of_image,
119
- 'link_to_post' => false,
120
- 'image_class' => 'smooth_slider_thumbnail',
121
- 'image_scan' => $image_scan,
122
- 'width' => $gti_width,
123
- 'height' => false,
124
- 'echo' => false,
125
- 'permalink' => $permalink,
126
- 'style'=> $smooth_slider_css['smooth_slider_thumbnail']
127
- );
128
- $smooth_slide_image=smooth_sslider_get_the_image($img_args);
129
- //filter hook
130
- $smooth_slide_image=apply_filters('smooth_slide_image',$smooth_slide_image,$post_id,$smooth_slider,$smooth_slider_css);
131
-
132
- $thumbnail_image=get_post_meta($post_id, '_disable_image', true);
133
- if($thumbnail_image!='1')
134
- $html .= $smooth_slide_image;
135
-
136
- /* Added for embeding any shortcode on slide - start */
137
- $smooth_eshortcode=get_post_meta($post_id, '_smooth_embed_shortcode', true);
138
- if(!empty($smooth_eshortcode)){
139
- $shortcode_html=do_shortcode($smooth_eshortcode);
140
- $html.='<div class="smooth_slider_thumbnail"><div class="smooth_slider_eshortcode" '.$smooth_slider_css['smooth_slider_eshortcode'].'>'.$shortcode_html.'</div></div>';
141
- }
142
- /* Added for embeding any shortcode on slide - end */
143
-
144
- if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
145
- $slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
146
- else
147
- $slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
148
-
149
- if ($smooth_slider['image_only'] == '1') {
150
- $html .= '<!-- /smooth_slideri -->
151
- </div>';
152
- }
153
- else {
154
- if($permalink!='') {
155
- $html .= '<h2 '.$smooth_slider_css['smooth_slider_h2'].'><a '.$smooth_slider_css['smooth_slider_h2_a'].' href="'.$permalink.'">'.$post_title.'</a></h2><span '.$smooth_slider_css['smooth_slider_span'].'> '.$slider_excerpt.'</span>
156
- <p class="smooth_more"><a href="'.$permalink.'" '.$smooth_slider_css['smooth_slider_p_more'].'>'.$smooth_slider['more'].'</a></p>
157
-
158
- <!-- /smooth_slideri -->
159
- </div>'; }
160
- else{
161
- $html .= '<h2 '.$smooth_slider_css['smooth_slider_h2'].'>'.$post_title.'</h2><span '.$smooth_slider_css['smooth_slider_span'].'> '.$slider_excerpt.'</span>
162
- <!-- /smooth_slideri -->
163
- </div>'; }
164
- }
165
- }
166
- if($out_echo == '1') {
167
- echo $html;
168
- }
169
- $r_array = array( $smooth_sldr_j, $html);
170
- $r_array=apply_filters('smooth_r_array',$r_array,$posts, $smooth_slider);
171
- return $r_array;
172
  }
173
-
174
  function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1'){
175
- global $smooth_slider,$default_slider;
176
- foreach($default_slider as $key=>$value){
177
- if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
178
- }
179
- $smooth_sldr_j = $r_array[0];
180
- $smooth_slider_css = smooth_get_inline_css();
181
- $html='';
182
-
183
- wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
184
- wp_enqueue_script( 'smooth-slider', smooth_slider_plugin_url( 'js/smooth.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
185
-
186
- if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){
187
- $fouc='jQuery("html").addClass("smooth_slider_fouc");jQuery(document).ready(function() { jQuery(".smooth_slider_fouc #'.$slider_handle.'").css({"display" : "block"}); });';
188
- }
189
- else{
190
- $fouc='';
191
  }
192
- $html.='<script type="text/javascript">';
193
- $html.=$fouc;
194
- $html.='jQuery(document).ready(function() {
195
- jQuery("#'.$slider_handle.'").cycle({
196
- fx: "'.$smooth_slider['fx'].'",
197
- speed:"'.$smooth_slider['transition'] * 100 .'",
198
- timeout: '. ( ($smooth_slider['autostep'] == '1') ? ( $smooth_slider['speed'] * 1000 ) : 0 ) .',';
199
- if ($smooth_slider['prev_next'] == 1){
200
- $html.='next: "#'.$slider_handle.'_next",
201
- prev:"#'.$slider_handle.'_prev",';
202
- }
203
-
204
- if ($smooth_slider['goto_slide'] == "1" or $smooth_slider['goto_slide'] == "2" or $smooth_slider['goto_slide'] == "4"){
205
- $html.='pager: "#'.$slider_handle.'_nav",';
206
- }
207
-
208
- if ($smooth_slider['goto_slide'] == 1) {
209
- $html.=' pagerAnchorBuilder: function(idx, slide) {
210
- return \'<a class="sldr\'+(idx+1)+\' smooth_slider_nnav" href="#">\'+(idx+1)+\'</a>\';
211
- },';
212
- }
213
- if ($smooth_slider['goto_slide'] == 2) {
214
- $html.='pagerAnchorBuilder: function(idx, slide) {
215
- return \'<a class="sldr\'+(idx+1)+\' smooth_slider_inav" style="background-image:url('. smooth_slider_plugin_url( 'images/' ).'slide\'+(idx+1)+\'.png);background-position:0 0;width:'. $smooth_slider['navimg_w'].'px;height:'.$smooth_slider['navimg_ht'].'px;" href="#"></a>\';
216
- }, ';
217
- }
218
- if ($smooth_slider['goto_slide'] == 4) {
219
- $html.='pagerAnchorBuilder: function(idx, slide) {
220
- return \'<a class="sldr\'+(idx+1)+\' smooth_slider_inav smooth_slider_bnav" style="width:'. $smooth_slider['navimg_w'].'px;height:'.$smooth_slider['navimg_ht'].'px;" href="#"></a>\';
221
- }, ';
222
- }
223
-
224
- $html.='pause: 1
225
- ,slideExpr: "div.smooth_slideri"
226
- });';
227
-
228
- if ($smooth_slider['goto_slide'] == 2 or $smooth_slider['goto_slide'] == 4 ) {
229
- $html.='jQuery("head").append("<style type=\"text/css\">#'.$slider_handle.' .smooth_nav a.smooth_slider_inav.activeSlide{background-position:-'.$smooth_slider['navimg_w'].'px 0 !important;}</style>");';
230
- }
231
-
232
- if(!empty($smooth_media_queries)){
233
- // $html.='jQuery("head").append("<style type=\"text/css\">'. $smooth_media_queries .'</style>");';
234
- }
235
- $html.='jQuery("#'.$slider_handle.'").smoothSliderHeight();';
236
-
237
- $html.='jQuery(window).resize(function() {
238
- smooth_waitForFinalEvent(function(){
239
- jQuery("#'.$slider_handle.'").smoothSliderHeight();
240
- }, 1000, "'.$slider_handle.'");
241
- });';
242
-
243
- $html.='});';
244
- //Action hook
245
- do_action('smooth_global_script',$slider_handle,$smooth_slider);
246
- $html.='</script><noscript><p><strong>'.$smooth_slider['noscript'].'</strong></p></noscript>';
247
-
248
- $html.='<div id="'.$slider_handle.'" class="smooth_slider" '.$smooth_slider_css['smooth_slider'].'>';
249
- if( $smooth_slider['title_from']=='1' and !empty($slider_id) ) $sldr_title = get_smooth_slider_name($slider_id);
250
- else $sldr_title = $smooth_slider['title_text'];
251
- if(!empty($sldr_title)) {
252
- $html.='<div class="sldr_title" '.$smooth_slider_css['sldr_title'].'>'.$sldr_title.'</div> ';
253
  }
254
-
255
- $html.='<div class="smooth_sliderb">'.$r_array[1].'</div>';
256
-
257
- if ($smooth_slider['goto_slide'] == 1 or $smooth_slider['goto_slide'] == 2 or $smooth_slider['goto_slide'] == 4 ) {
258
- $html.='<div id="'.$slider_handle.'_nav" class="smooth_nav"></div>';
259
- }
260
- if ($smooth_slider['goto_slide'] == 3) {
261
- $html.='<div id="'.$slider_handle.'_nav" class="smooth_nav">'.$smooth_slider['custom_nav'].'</div>';
262
  }
263
- if ($smooth_slider['prev_next'] == 1){
264
- $html.='<div id="'.$slider_handle.'_next" class="smooth_next"></div>
265
- <div id="'.$slider_handle.'_prev" class="smooth_prev"></div>';
266
- }
 
 
 
 
 
 
 
267
 
268
- $html.='<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
269
- </div>';
270
- if($echo == '1') {echo $html; }
271
- else { return $html; }
272
  }
273
-
274
  //Basic Smooth Slider
275
  function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
276
  global $smooth_slider,$default_slider;
@@ -287,7 +65,6 @@ function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_e
287
  else {
288
  $orderby = 'a.slide_order ASC, a.date DESC';
289
  }
290
-
291
  $posts = $wpdb->get_results("SELECT b.* FROM
292
  $table_name a LEFT OUTER JOIN $post_table b
293
  ON a.post_id = b.ID
@@ -297,16 +74,15 @@ function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_e
297
  $r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
298
  return $r_array;
299
  }
300
-
301
  function get_smooth_slider($slider_id='',$offset=0) {
302
  global $smooth_slider;
303
 
304
- if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
305
  global $post;
306
  $post_id = $post->ID;
307
- $slider_id = get_slider_for_the_post($post_id);
 
308
  }
309
-
310
  if(empty($slider_id) or !isset($slider_id)) $slider_id = '1';
311
  if(!empty($slider_id)){
312
  $r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset, $slider_id, '0');
@@ -331,8 +107,7 @@ function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offse
331
  $category = get_the_category();
332
  $slider_cat = $category[0]->cat_ID;
333
  }
334
-
335
- $rand = $smooth_slider['rand'];
336
  if(isset($rand) and $rand=='1'){
337
  $orderby = '&orderby=rand';
338
  }
@@ -345,33 +120,28 @@ function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offse
345
  $r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
346
  return $r_array;
347
  }
348
-
349
  function get_smooth_slider_category($catg_slug,$offset=0) {
350
  global $smooth_slider;
351
  $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0');
352
  $slider_handle='smooth_slider_'.$catg_slug;
353
  get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1');
354
  }
355
-
356
  //For displaying recent posts in chronologically reverse order, from Smooth Slider 2.4
357
  function carousel_posts_on_slider_recent($max_posts='5', $offset=0, $out_echo = '1') {
358
  global $smooth_slider;
359
-
360
- $rand = $smooth_slider['rand'];
361
  if(isset($rand) and $rand=='1'){
362
  $orderby = '&orderby=rand';
363
  }
364
  else {
365
  $orderby = '';
366
  }
367
-
368
  //extract posts data
369
  $posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.$orderby);
370
 
371
  $r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
372
  return $r_array;
373
  }
374
-
375
  function get_smooth_slider_recent($offset=0) {
376
  global $smooth_slider;
377
  $r_array = carousel_posts_on_slider_recent($smooth_slider['no_posts'], $offset, '0');
@@ -381,38 +151,6 @@ function get_smooth_slider_recent($offset=0) {
381
  require_once (dirname (__FILE__) . '/shortcodes_1.php');
382
  require_once (dirname (__FILE__) . '/widgets_1.php');
383
 
384
- function smooth_slider_enqueue_scripts() {
385
- //wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
386
- }
387
-
388
- //add_action( 'init', 'smooth_slider_enqueue_scripts' );
389
-
390
- function smooth_slider_enqueue_styles() {
391
- global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
392
- if(is_singular()) {
393
- $smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
394
- //for compatibility with lower versions of Smooth Slider
395
- if( empty($smooth_slider_style) ) $smooth_slider_style=get_post_meta($post->ID,'slider_style',true);
396
- if((is_active_widget(false, false, 'sslider_wid', true) or isset($smooth_slider['shortcode']) ) and (!isset($smooth_slider_style) or empty($smooth_slider_style))){
397
- $smooth_slider_style='default';
398
- }
399
- if (!isset($smooth_slider_style) or empty($smooth_slider_style) ) {
400
- wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),false, SMOOTH_SLIDER_VER, 'all');
401
- }
402
- else {
403
- $smooth_slider_style=str_replace('.css','',$smooth_slider_style);
404
- wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider_style.'/style.css' ),
405
- false, SMOOTH_SLIDER_VER, 'all');
406
- }
407
- }
408
- else {
409
- $smooth_slider_style = $smooth_slider['stylesheet'];
410
- wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider_style.'/style.css' ),
411
- false, SMOOTH_SLIDER_VER, 'all');
412
- }
413
- }
414
- add_action( 'wp', 'smooth_slider_enqueue_styles' );
415
-
416
  //admin settings
417
  function smooth_slider_admin_scripts() {
418
  global $smooth_slider;
@@ -422,19 +160,16 @@ global $smooth_slider;
422
  wp_register_script('jquery', false, false, false, false);
423
  wp_enqueue_script( 'jquery-ui-tabs' );
424
  wp_enqueue_script( 'jquery-ui-core' );
425
- wp_enqueue_script( 'jquery-ui-sortable' );
426
  //wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
427
  wp_enqueue_script( 'smooth_slider_admin_js', smooth_slider_plugin_url( 'js/admin.js' ),
428
  array('jquery'), SMOOTH_SLIDER_VER, false);
429
- wp_enqueue_style( 'smooth_slider_admin_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
430
- false, SMOOTH_SLIDER_VER, 'all');
431
- wp_enqueue_script( 'jquery.bpopup.min', smooth_slider_plugin_url( 'js/jquery.bpopup.min.js' ),'', PINWHEEL_SLIDER_VER, false);
432
  wp_enqueue_style( 'smooth_slider_admin_css', smooth_slider_plugin_url( 'css/admin.css' ),
433
  false, SMOOTH_SLIDER_VER, 'all');
434
  }
435
  }
436
  }
437
-
438
  add_action( 'admin_init', 'smooth_slider_admin_scripts' );
439
 
440
  function smooth_slider_admin_head() {
@@ -445,24 +180,23 @@ if ( is_admin() ){ // admin actions
445
  $active_tab=(isset($smooth_slider_curr['active_tab']))?$smooth_slider_curr['active_tab']:0;
446
  if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page']) ){ if(isset($_POST['active_tab']) ) $active_tab=$_POST['active_tab'];else $active_tab = 0;}
447
  if(empty($active_tab)){$active_tab=0;}
448
-
449
-
450
- ?>
451
  <script type="text/javascript">
452
  // <![CDATA[
453
  jQuery(document).ready(function() {
454
  jQuery("#slider_tabs").tabs({fx: { opacity: "toggle", duration: 300}, active: <?php echo $active_tab;?> }).addClass( "ui-tabs-vertical-left ui-helper-clearfix" );
455
- jQuery( "#slider_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
456
  <?php if ( isset($_GET['page']) && (( 'smooth-slider-settings' == $_GET['page']) or ('smooth-slider-admin' == $_GET['page']) ) ) { ?>
457
- jQuery( "#slider_tabs" ).on( "tabsactivate", function( event, ui ) {
458
- jQuery( "#smooth_activetab, .smooth_activetab" ).val( jQuery( "#slider_tabs" ).tabs( "option", "active" ) );
459
  });
460
  <?php }
461
- $sliders = ss_get_sliders();
462
- foreach($sliders as $slider){ ?>
463
  jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
464
  jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
465
  <?php } ?>
 
466
 
467
  });
468
  </script> <?php
@@ -510,137 +244,14 @@ if ( is_admin() ){ // admin actions
510
  // Settings page only
511
  if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
512
  $smooth_slider_curr=get_option('smooth_slider_options');
513
- wp_print_scripts( 'farbtastic' );
514
- wp_print_styles( 'farbtastic' );
515
  ?>
516
  <script type="text/javascript">
517
- // <![CDATA[
518
  jQuery(document).ready(function() {
519
- jQuery('#colorbox_1').farbtastic('#color_value_1');
520
- jQuery('#color_picker_1').click(function () {
521
- if (jQuery('#colorbox_1').css('display') == "block") {
522
- jQuery('#colorbox_1').fadeOut("slow"); }
523
- else {
524
- jQuery('#colorbox_1').fadeIn("slow"); }
525
- });
526
- var colorpick_1 = false;
527
- jQuery(document).mousedown(function(){
528
- if (colorpick_1 == true) {
529
- return; }
530
- jQuery('#colorbox_1').fadeOut("slow");
531
- });
532
- jQuery(document).mouseup(function(){
533
- colorpick_1 = false;
534
- });
535
- //for second color box
536
- jQuery('#colorbox_2').farbtastic('#color_value_2');
537
- jQuery('#color_picker_2').click(function () {
538
- if (jQuery('#colorbox_2').css('display') == "block") {
539
- jQuery('#colorbox_2').fadeOut("slow"); }
540
- else {
541
- jQuery('#colorbox_2').fadeIn("slow"); }
542
- });
543
- var colorpick_2 = false;
544
- jQuery(document).mousedown(function(){
545
- if (colorpick_2 == true) {
546
- return; }
547
- jQuery('#colorbox_2').fadeOut("slow");
548
- });
549
- jQuery(document).mouseup(function(){
550
- colorpick_2 = false;
551
- });
552
- //for third color box
553
- jQuery('#colorbox_3').farbtastic('#color_value_3');
554
- jQuery('#color_picker_3').click(function () {
555
- if (jQuery('#colorbox_3').css('display') == "block") {
556
- jQuery('#colorbox_3').fadeOut("slow"); }
557
- else {
558
- jQuery('#colorbox_3').fadeIn("slow"); }
559
- });
560
- var colorpick_3 = false;
561
- jQuery(document).mousedown(function(){
562
- if (colorpick_3 == true) {
563
- return; }
564
- jQuery('#colorbox_3').fadeOut("slow");
565
- });
566
- jQuery(document).mouseup(function(){
567
- colorpick_3 = false;
568
- });
569
- //for fourth color box
570
- jQuery('#colorbox_4').farbtastic('#color_value_4');
571
- jQuery('#color_picker_4').click(function () {
572
- if (jQuery('#colorbox_4').css('display') == "block") {
573
- jQuery('#colorbox_4').fadeOut("slow"); }
574
- else {
575
- jQuery('#colorbox_4').fadeIn("slow"); }
576
- });
577
- var colorpick_4 = false;
578
- jQuery(document).mousedown(function(){
579
- if (colorpick_4 == true) {
580
- return; }
581
- jQuery('#colorbox_4').fadeOut("slow");
582
- });
583
- jQuery(document).mouseup(function(){
584
- colorpick_4 = false;
585
- });
586
- //for fifth color box
587
- jQuery('#colorbox_5').farbtastic('#color_value_5');
588
- jQuery('#color_picker_5').click(function () {
589
- if (jQuery('#colorbox_5').css('display') == "block") {
590
- jQuery('#colorbox_5').fadeOut("slow"); }
591
- else {
592
- jQuery('#colorbox_5').fadeIn("slow"); }
593
- });
594
- var colorpick_5 = false;
595
- jQuery(document).mousedown(function(){
596
- if (colorpick_5 == true) {
597
- return; }
598
- jQuery('#colorbox_5').fadeOut("slow");
599
- });
600
- jQuery(document).mouseup(function(){
601
- colorpick_5 = false;
602
- });
603
- //for sixth color box
604
- jQuery('#colorbox_6').farbtastic('#color_value_6');
605
- jQuery('#color_picker_6').click(function () {
606
- if (jQuery('#colorbox_6').css('display') == "block") {
607
- jQuery('#colorbox_6').fadeOut("slow"); }
608
- else {
609
- jQuery('#colorbox_6').fadeIn("slow"); }
610
- });
611
- var colorpick_6 = false;
612
- jQuery(document).mousedown(function(){
613
- if (colorpick_6 == true) {
614
- return; }
615
- jQuery('#colorbox_6').fadeOut("slow");
616
- });
617
- jQuery(document).mouseup(function(){
618
- colorpick_6 = false;
619
- });
620
- jQuery('#sldr_close').click(function () {
621
- jQuery('#sldr_message').fadeOut("slow");
622
- });
623
- //for seventh color box
624
- jQuery('#colorbox_7').farbtastic('#color_value_7');
625
- jQuery('#color_picker_7').click(function () {
626
- if (jQuery('#colorbox_7').css('display') == "block") {
627
- jQuery('#colorbox_7').fadeOut("slow"); }
628
- else {
629
- jQuery('#colorbox_7').fadeIn("slow"); }
630
- });
631
- var colorpick_7 = false;
632
- jQuery(document).mousedown(function(){
633
- if (colorpick_7 == true) {
634
- return; }
635
- jQuery('#colorbox_7').fadeOut("slow");
636
- });
637
- jQuery(document).mouseup(function(){
638
- colorpick_7 = false;
639
- });
640
- jQuery('#sldr_close').click(function () {
641
- jQuery('#sldr_message').fadeOut("slow");
642
- });
643
  });
 
644
  function confirmSettingsImport()
645
  {
646
  var agree=confirm("Reset these Settings to Imported Settings Set??");
@@ -673,20 +284,51 @@ add_action('admin_head', 'smooth_slider_admin_head');
673
 
674
  //get inline css with style attribute attached
675
  function smooth_get_inline_css($echo='0'){
676
- global $smooth_slider,$default_slider;
677
  foreach($default_slider as $key=>$value){
678
  if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
679
  }
680
- global $post;
 
 
 
681
  if(is_singular()) {
682
  $smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
683
  //for compatibility with lower versions of Smooth Slider
684
  if( empty($smooth_slider_style) ) $smooth_slider_style=get_post_meta($post->ID,'slider_style',true);
685
  }
686
- if((is_singular() and ($smooth_slider_style == 'default' or empty($smooth_slider_style) or !$smooth_slider_style)) or (!is_singular() and $smooth_slider['stylesheet'] == 'default') ) { $default=true; }
687
- else{ $default=false;}
 
 
 
 
 
 
 
 
 
 
 
688
 
689
- $smooth_slider_css=array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
  if($default){
691
  $style_start= ($echo=='0') ? 'style="':'';
692
  $style_end= ($echo=='0') ? '"':'';
@@ -716,7 +358,6 @@ function smooth_get_inline_css($echo='0'){
716
  //smooth_slider_span
717
  $smooth_slider_css['smooth_slider_span']=$style_start.'font-family:'.$smooth_slider['content_font'].';font-size:'.$smooth_slider['content_fsize'].'px;font-weight:'.$content_fweight.';font-style:'.$content_fstyle.';color:'. $smooth_slider['content_fcolor'].';'.$style_end;
718
 
719
- //
720
  if($smooth_slider['img_align'] == "left") {$thumb_margin_right= "10";} else {$thumb_margin_right= "0";}
721
  if($smooth_slider['img_align'] == "right") {$thumb_margin_left = "10";} else {$thumb_margin_left = "0";}
722
  if($smooth_slider['img_size'] == '1'){ $thumb_width= 'width:'. $smooth_slider['img_width'].'px;';} else{$thumb_width='';}
1
  <?php
2
+ function smooth_global_posts_processor( $posts, $smooth_slider,$out_echo ){
3
+ //If no Skin specified, consider Default
4
+ /* Added function call to skin for 2.6 */
5
+ $skin='default';
6
  global $smooth_slider;
7
+ if(isset($smooth_slider['stylesheet'])) $skin=$smooth_slider['stylesheet'];
8
+ if(empty($skin))$skin='default';
 
9
 
10
+ //Always include Default Skin
11
+ require_once ( dirname( dirname(__FILE__) ) . '/css/skins/default/functions.php');
12
+ //Include Skin function file
13
+ if($skin!='default' and file_exists(dirname( dirname(__FILE__) ) . '/css/skins/'.$skin.'/functions.php'))require_once ( dirname( dirname(__FILE__) ) . '/css/skins/'.$skin.'/functions.php');
14
+ //Skin specific post processor and html generation
15
+ $post_processor_fn='smooth_post_processor_'.$skin;
16
+ if(!function_exists($post_processor_fn))$post_processor_fn='smooth_post_processor_default';
17
+ $r_array=$post_processor_fn($posts, $smooth_slider,$out_echo);
18
+ return $r_array;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
 
20
  function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1'){
21
+ //If no Skin specified, consider Default
22
+ /* Added function for call to skin 2.6*/
23
+ $skin='default';
24
+ global $smooth_slider,$post;
25
+ $smooth_slider_style='';
26
+ if(is_singular()) {
27
+ $smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
28
+ //for compatibility with lower versions of Smooth Slider
29
+ if( empty($smooth_slider_style) ) $smooth_slider_style=get_post_meta($post->ID,'slider_style',true);
 
 
 
 
 
 
 
30
  }
31
+ if(empty($smooth_slider_style)){
32
+ if(isset($smooth_slider['stylesheet'])) $skin=$smooth_slider['stylesheet'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
+ else{
35
+ $skin=$smooth_slider_style;
 
 
 
 
 
 
36
  }
37
+ if(empty($skin))$skin='default';
38
+ //Include CSS
39
+ wp_enqueue_style( 'smooth_'.$skin, smooth_slider_plugin_url( 'css/skins/'.$skin.'/style.css' ),false,SMOOTH_SLIDER_VER, 'all');
40
+ //Always include Default Skin
41
+ require_once ( dirname( dirname(__FILE__) ) . '/css/skins/default/functions.php');
42
+ //Include Skin function file
43
+ if($skin!='default' and file_exists(dirname( dirname(__FILE__) ) . '/css/skins/'.$skin.'/functions.php'))
44
+ require_once ( dirname( dirname(__FILE__) ) . '/css/skins/'.$skin.'/functions.php');
45
+ //Skin specific post processor and html generation
46
+ $get_processor_fn='smooth_slider_get_'.$skin;
47
+ if(!function_exists($get_processor_fn))$get_processor_fn='smooth_slider_get_default';
48
 
49
+ $r_array=$get_processor_fn($slider_handle,$r_array,$slider_id,$echo='1');
50
+ return $r_array;
 
 
51
  }
 
52
  //Basic Smooth Slider
53
  function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
54
  global $smooth_slider,$default_slider;
65
  else {
66
  $orderby = 'a.slide_order ASC, a.date DESC';
67
  }
 
68
  $posts = $wpdb->get_results("SELECT b.* FROM
69
  $table_name a LEFT OUTER JOIN $post_table b
70
  ON a.post_id = b.ID
74
  $r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
75
  return $r_array;
76
  }
 
77
  function get_smooth_slider($slider_id='',$offset=0) {
78
  global $smooth_slider;
79
 
80
+ if($smooth_slider['multiple_sliders'] == '1' and is_singular()){
81
  global $post;
82
  $post_id = $post->ID;
83
+ if(ss_slider_on_this_post($post_id))
84
+ $slider_id = get_slider_for_the_post($post_id);
85
  }
 
86
  if(empty($slider_id) or !isset($slider_id)) $slider_id = '1';
87
  if(!empty($slider_id)){
88
  $r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset, $slider_id, '0');
107
  $category = get_the_category();
108
  $slider_cat = $category[0]->cat_ID;
109
  }
110
+ $rand = $smooth_slider['rand'];
 
111
  if(isset($rand) and $rand=='1'){
112
  $orderby = '&orderby=rand';
113
  }
120
  $r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
121
  return $r_array;
122
  }
 
123
  function get_smooth_slider_category($catg_slug,$offset=0) {
124
  global $smooth_slider;
125
  $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0');
126
  $slider_handle='smooth_slider_'.$catg_slug;
127
  get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1');
128
  }
 
129
  //For displaying recent posts in chronologically reverse order, from Smooth Slider 2.4
130
  function carousel_posts_on_slider_recent($max_posts='5', $offset=0, $out_echo = '1') {
131
  global $smooth_slider;
132
+ $rand = isset($smooth_slider['rand'])?$smooth_slider['rand']:'';
 
133
  if(isset($rand) and $rand=='1'){
134
  $orderby = '&orderby=rand';
135
  }
136
  else {
137
  $orderby = '';
138
  }
 
139
  //extract posts data
140
  $posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.$orderby);
141
 
142
  $r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
143
  return $r_array;
144
  }
 
145
  function get_smooth_slider_recent($offset=0) {
146
  global $smooth_slider;
147
  $r_array = carousel_posts_on_slider_recent($smooth_slider['no_posts'], $offset, '0');
151
  require_once (dirname (__FILE__) . '/shortcodes_1.php');
152
  require_once (dirname (__FILE__) . '/widgets_1.php');
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  //admin settings
155
  function smooth_slider_admin_scripts() {
156
  global $smooth_slider;
160
  wp_register_script('jquery', false, false, false, false);
161
  wp_enqueue_script( 'jquery-ui-tabs' );
162
  wp_enqueue_script( 'jquery-ui-core' );
163
+ wp_enqueue_script( 'jquery-ui-sortable' );
164
  //wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),array('jquery'), SMOOTH_SLIDER_VER, false);
165
  wp_enqueue_script( 'smooth_slider_admin_js', smooth_slider_plugin_url( 'js/admin.js' ),
166
  array('jquery'), SMOOTH_SLIDER_VER, false);
167
+ wp_enqueue_script( 'jquery.bpopup.min', smooth_slider_plugin_url( 'js/jquery.bpopup.min.js' ),'', SMOOTH_SLIDER_VER, false);
 
 
168
  wp_enqueue_style( 'smooth_slider_admin_css', smooth_slider_plugin_url( 'css/admin.css' ),
169
  false, SMOOTH_SLIDER_VER, 'all');
170
  }
171
  }
172
  }
 
173
  add_action( 'admin_init', 'smooth_slider_admin_scripts' );
174
 
175
  function smooth_slider_admin_head() {
180
  $active_tab=(isset($smooth_slider_curr['active_tab']))?$smooth_slider_curr['active_tab']:0;
181
  if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page']) ){ if(isset($_POST['active_tab']) ) $active_tab=$_POST['active_tab'];else $active_tab = 0;}
182
  if(empty($active_tab)){$active_tab=0;}
183
+ ?>
 
 
184
  <script type="text/javascript">
185
  // <![CDATA[
186
  jQuery(document).ready(function() {
187
  jQuery("#slider_tabs").tabs({fx: { opacity: "toggle", duration: 300}, active: <?php echo $active_tab;?> }).addClass( "ui-tabs-vertical-left ui-helper-clearfix" );
188
+ jQuery( "#slider_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
189
  <?php if ( isset($_GET['page']) && (( 'smooth-slider-settings' == $_GET['page']) or ('smooth-slider-admin' == $_GET['page']) ) ) { ?>
190
+ jQuery( "#slider_tabs" ).on( "tabsactivate", function( event, ui ) {
191
+ jQuery( "#smooth_activetab, .smooth_activetab" ).val( jQuery( "#slider_tabs" ).tabs( "option", "active" ) );
192
  });
193
  <?php }
194
+ $sliders = ss_get_sliders();
195
+ foreach($sliders as $slider){ ?>
196
  jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
197
  jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
198
  <?php } ?>
199
+ jQuery( ".uploaded-images" ).sortable({ items: ".addedImg" }).disableSelection();
200
 
201
  });
202
  </script> <?php
244
  // Settings page only
245
  if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
246
  $smooth_slider_curr=get_option('smooth_slider_options');
247
+ wp_print_scripts( 'wp-color-picker' );
248
+ wp_print_styles( 'wp-color-picker' );
249
  ?>
250
  <script type="text/javascript">
 
251
  jQuery(document).ready(function() {
252
+ jQuery('.wp-color-picker-field').wpColorPicker();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  });
254
+
255
  function confirmSettingsImport()
256
  {
257
  var agree=confirm("Reset these Settings to Imported Settings Set??");
284
 
285
  //get inline css with style attribute attached
286
  function smooth_get_inline_css($echo='0'){
287
+ global $smooth_slider,$default_slider,$post;
288
  foreach($default_slider as $key=>$value){
289
  if(!isset($smooth_slider[$key])) $smooth_slider[$key]='';
290
  }
291
+ //If no Skin specified, consider Default
292
+ $skin='default';
293
+ $smooth_slider_style='';
294
+
295
  if(is_singular()) {
296
  $smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
297
  //for compatibility with lower versions of Smooth Slider
298
  if( empty($smooth_slider_style) ) $smooth_slider_style=get_post_meta($post->ID,'slider_style',true);
299
  }
300
+
301
+ if(empty($smooth_slider_style)){
302
+ if(isset($smooth_slider['stylesheet'])) $skin=$smooth_slider['stylesheet'];
303
+ }
304
+ else{
305
+ $skin=$smooth_slider_style;
306
+ }
307
+ if(empty($skin))$skin='default';
308
+
309
+ //Always include Default Skin
310
+ require_once ( dirname( dirname(__FILE__) ) . '/css/skins/default/functions.php');
311
+ //Include Skin function file
312
+ if($skin!='default' and file_exists(dirname( dirname(__FILE__) ) . '/css/skins/'.$skin.'/functions.php'))require_once ( dirname( dirname(__FILE__) ) . '/css/skins/'.$skin.'/functions.php');
313
 
314
+ //Skin specific data processor and html generation
315
+ $data_processor_fn='smooth_post_processor_'.$skin;
316
+ if(function_exists($data_processor_fn))$default=true;
317
+ else $default=false;
318
+ $smooth_slider_css=array(
319
+ 'smooth_slider'=>'',
320
+ 'smooth_slider_handle'=>'',
321
+ 'sldr_title'=>'',
322
+ 'smooth_slideri'=>'',
323
+ 'smooth_slider_h2'=>'',
324
+ 'smooth_slider_h2_a'=>'',
325
+ 'smooth_slider_span'=>'',
326
+ 'smooth_slider_thumbnail'=>'',
327
+ 'smooth_slider_p_more'=>'',
328
+ 'smooth_text'=>'',
329
+ 'smooth_next'=>'',
330
+ 'smooth_prev'=>''
331
+ );
332
  if($default){
333
  $style_start= ($echo=='0') ? 'style="':'';
334
  $style_end= ($echo=='0') ? '"':'';
358
  //smooth_slider_span
359
  $smooth_slider_css['smooth_slider_span']=$style_start.'font-family:'.$smooth_slider['content_font'].';font-size:'.$smooth_slider['content_fsize'].'px;font-weight:'.$content_fweight.';font-style:'.$content_fstyle.';color:'. $smooth_slider['content_fcolor'].';'.$style_end;
360
 
 
361
  if($smooth_slider['img_align'] == "left") {$thumb_margin_right= "10";} else {$thumb_margin_right= "0";}
362
  if($smooth_slider['img_align'] == "right") {$thumb_margin_left = "10";} else {$thumb_margin_left = "0";}
363
  if($smooth_slider['img_size'] == '1'){ $thumb_width= 'width:'. $smooth_slider['img_width'].'px;';} else{$thumb_width='';}
smooth-slider.php CHANGED
@@ -3,7 +3,7 @@
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.1
7
  Author: SliderVilla
8
  Author URI: http://slidervilla.com/
9
  Wordpress version supported: 2.9 and above
@@ -30,12 +30,12 @@ Wordpress version supported: 2.9 and above
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.1'; //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.1",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' ) ){
@@ -300,11 +300,7 @@ global $smooth_slider;
300
  $wpdb->query($sql);
301
  }
302
  }
303
- $slider_style = get_post_meta($post_id,'_smooth_slider_style',true);
304
- $post_slider_style=$_POST['_smooth_slider_style'];
305
- if($slider_style != $post_slider_style) {
306
- update_post_meta($post_id, '_smooth_slider_style', $_POST['_smooth_slider_style']);
307
- }
308
 
309
  $thumbnail_key = $smooth_slider['img_pick'][1];
310
  $sslider_thumbnail = get_post_meta($post_id,$thumbnail_key,true);
@@ -337,7 +333,11 @@ global $smooth_slider;
337
  if($smooth_sslider_eshortcode != $post_smooth_sslider_eshortcode) {
338
  update_post_meta($post_id, '_smooth_embed_shortcode', $post_smooth_sslider_eshortcode);
339
  }
340
-
 
 
 
 
341
  /* Added for embed shortcode -end */
342
 
343
  } //sldr_verify
@@ -446,7 +446,38 @@ function add_to_slider_checkbox() {
446
  }
447
 
448
  $sliders = ss_get_sliders();
449
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  <div id="slider_checkbox">
451
  <table class="form-table">
452
  <tr valign="top">
@@ -457,21 +488,31 @@ function add_to_slider_checkbox() {
457
  <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>
458
  <?php } ?>
459
  </select></td></tr>
 
 
 
 
460
 
461
- <?php if($smooth_slider['multiple_sliders'] == '1') {?>
 
 
 
 
 
 
 
 
 
462
  <tr valign="top">
463
- <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>
464
- <td><select name="display_slider_name">
465
  <?php foreach ($sliders as $slider) { ?>
466
  <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>
467
  <?php } ?>
468
- </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>
 
469
  <?php } ?>
470
-
471
- <input type="hidden" name="sldr-verify" id="sldr-verify" value="<?php echo wp_create_nonce('SmoothSlider');?>" />
472
-
473
-
474
-
475
  <tr valign="top">
476
  <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>
477
  <?php
@@ -489,30 +530,18 @@ function add_to_slider_checkbox() {
489
  }
490
  ?>
491
  </select> </td></tr>
492
-
493
- <?php $thumbnail_key = $smooth_slider['img_pick'][1];
494
- $sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
495
- $sslider_link= get_post_meta($post_id, 'slide_redirect_url', true);
496
- $sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
497
- $sslider_disable_image=get_post_meta($post_id, '_disable_image', true);
498
- $smooth_embed_shortcode=get_post_meta($post_id, '_smooth_embed_shortcode', true);
499
- ?>
500
- <tr valign="top">
501
  <th scope="row"><label for="sslider_thumbnail"><?php _e('Custom Thumbnail Image(url)','smooth-slider'); ?></label></th>
502
- <td><input type="text" name="sslider_thumbnail" class="sslider_thumbnail" value="<?php echo $sslider_thumbnail;?>" size="50" />
503
  </td></tr>
504
-
505
- <tr valign="top">
506
- <th scope="row"><label for="sslider_link"><?php _e('Slide Link URL ','smooth-slider'); ?></label></th>
507
- <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>
508
- <tr valign="top">
509
- <th scope="row"><label for="sslider_nolink"> <?php _e('Do not link this slide to any page(url)','smooth-slider'); ?></label></th>
510
- <td><input type="checkbox" name="sslider_nolink" class="sslider_nolink" value="1" <?php if($sslider_nolink=='1'){echo "checked";}?> /> </td></tr>
511
-
512
  <tr valign="top">
513
  <th scope="row"><label for="disable_image"><?php _e('Disable Thumbnail Image','smooth-slider'); ?> </label></th>
514
  <td><input type="checkbox" name="disable_image" value="1" <?php if($sslider_disable_image=='1'){echo "checked";}?> /> </td>
515
  </tr>
 
 
516
  <!-- Added for video - Start -->
517
  <tr valign="top">
518
  <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>
@@ -522,6 +551,7 @@ function add_to_slider_checkbox() {
522
  <!-- Added for video - End -->
523
 
524
  </div>
 
525
 
526
  <?php }
527
  }
@@ -553,7 +583,6 @@ function smooth_slider_plugin_url( $path = '' ) {
553
  }
554
  return plugins_url( $path, __FILE__ );
555
  }
556
-
557
  function get_string_limit($output, $max_char)
558
  {
559
  $output = str_replace(']]>', ']]&gt;', $output);
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.6
7
  Author: SliderVilla
8
  Author URI: http://slidervilla.com/
9
  Wordpress version supported: 2.9 and above
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.6'; //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.6",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' ) ){
300
  $wpdb->query($sql);
301
  }
302
  }
303
+
 
 
 
 
304
 
305
  $thumbnail_key = $smooth_slider['img_pick'][1];
306
  $sslider_thumbnail = get_post_meta($post_id,$thumbnail_key,true);
333
  if($smooth_sslider_eshortcode != $post_smooth_sslider_eshortcode) {
334
  update_post_meta($post_id, '_smooth_embed_shortcode', $post_smooth_sslider_eshortcode);
335
  }
336
+ $slider_style = get_post_meta($post_id,'_smooth_slider_style',true);
337
+ $post_slider_style=$_POST['_smooth_slider_style'];
338
+ if($slider_style != $post_slider_style) {
339
+ update_post_meta($post_id, '_smooth_slider_style', $_POST['_smooth_slider_style']);
340
+ }
341
  /* Added for embed shortcode -end */
342
 
343
  } //sldr_verify
446
  }
447
 
448
  $sliders = ss_get_sliders();
449
+ $sslider_link= get_post_meta($post_id, 'slide_redirect_url', true);
450
+ $sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
451
+ $thumbnail_key = $smooth_slider['img_pick'][1];
452
+ $sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
453
+ $sslider_disable_image=get_post_meta($post_id, '_disable_image', true);
454
+ $smooth_embed_shortcode=get_post_meta($post_id, '_smooth_embed_shortcode', true);
455
+ ?>
456
+ <?php /* start tab 2.6 */ ?>
457
+ <script type="text/javascript">
458
+ jQuery(document).ready(function($) {
459
+ jQuery("#smooth_basic").css({"background":"#222222","color":"#ffffff"});
460
+ jQuery("#smooth_basic").on("click", function(){
461
+ jQuery("#smooth_basic_tab").fadeIn("fast");
462
+ jQuery("#smooth_advaced_tab").fadeOut("fast");
463
+ jQuery(this).css({"background":"#222222","color":"#ffffff"});
464
+ jQuery("#smooth_advanced").css({"background":"buttonface","color":"#222222"});
465
+ });
466
+ jQuery("#smooth_advanced").on("click", function(){
467
+ jQuery("#smooth_basic_tab").fadeOut("fast");
468
+ jQuery("#smooth_advaced_tab").fadeIn("fast");
469
+ jQuery(this).css({"background":"#222222","color":"#ffffff"});
470
+ jQuery("#smooth_basic").css({"background":"buttonface","color":"#222222"});
471
+
472
+ });
473
+ });
474
+ </script>
475
+ <?php /* End tab 2.6 */ ?>
476
+ <div style="border-bottom: 1px solid #ccc;padding-bottom: 0;padding-left: 10px;">
477
+ <button type="button" id="smooth_basic" style="padding:5px 30px 5px 30px;margin: 0;cursor:pointer;border:0;outline:none;">Basic</button>
478
+ <button type="button" id="smooth_advanced" style="padding:5px 30px 5px 30px;margin:0 0 0 10px;cursor:pointer;border:0;outline:none">Advanced</button>
479
+ </div>
480
+ <div id="smooth_basic_tab">
481
  <div id="slider_checkbox">
482
  <table class="form-table">
483
  <tr valign="top">
488
  <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>
489
  <?php } ?>
490
  </select></td></tr>
491
+
492
+ <tr valign="top">
493
+ <th scope="row"><label for="sslider_link"><?php _e('Slide Link URL ','smooth-slider'); ?></label></th>
494
+ <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>
495
 
496
+ <tr valign="top">
497
+ <th scope="row"><label for="sslider_nolink"> <?php _e('Do not link this slide to any page(url)','smooth-slider'); ?></label></th>
498
+ <td><input type="checkbox" name="sslider_nolink" class="sslider_nolink" value="1" <?php if($sslider_nolink=='1'){echo "checked";}?> /> </td></tr>
499
+ </table>
500
+ </div>
501
+ </div>
502
+ <div id="smooth_advaced_tab" style="display:none;">
503
+ <div class="slider_checkbox">
504
+ <table class="form-table">
505
+ <?php if($smooth_slider['multiple_sliders'] == '1') {?>
506
  <tr valign="top">
507
+ <th scope="row"><label for="display_slider"><?php _e('Display ','smooth-slider'); ?>
508
+ <select name="display_slider_name">
509
  <?php foreach ($sliders as $slider) { ?>
510
  <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>
511
  <?php } ?>
512
+ </select><?php _e('on this Post/Page','smooth-slider'); ?></th>
513
+ <td><input type="checkbox" class="sldr_post" name="display_slider" value="1" <?php if(ss_slider_on_this_post($post_id)){echo "checked";}?> /><?php _e('(Add the Smooth Slider template tag manually on your page.php/single.php or whatever page template file)'); ?></label></td></tr>
514
  <?php } ?>
515
+
 
 
 
 
516
  <tr valign="top">
517
  <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>
518
  <?php
530
  }
531
  ?>
532
  </select> </td></tr>
533
+
534
+ <input type="hidden" name="sldr-verify" id="sldr-verify" value="<?php echo wp_create_nonce('SmoothSlider');?>" />
535
+ <tr valign="top">
 
 
 
 
 
 
536
  <th scope="row"><label for="sslider_thumbnail"><?php _e('Custom Thumbnail Image(url)','smooth-slider'); ?></label></th>
537
+ <td><input type="text" name="sslider_thumbnail" class="sslider_thumbnail" value="<?php echo $sslider_thumbnail;?>" size="50" />
538
  </td></tr>
 
 
 
 
 
 
 
 
539
  <tr valign="top">
540
  <th scope="row"><label for="disable_image"><?php _e('Disable Thumbnail Image','smooth-slider'); ?> </label></th>
541
  <td><input type="checkbox" name="disable_image" value="1" <?php if($sslider_disable_image=='1'){echo "checked";}?> /> </td>
542
  </tr>
543
+
544
+
545
  <!-- Added for video - Start -->
546
  <tr valign="top">
547
  <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>
551
  <!-- Added for video - End -->
552
 
553
  </div>
554
+ </div>
555
 
556
  <?php }
557
  }
583
  }
584
  return plugins_url( $path, __FILE__ );
585
  }
 
586
  function get_string_limit($output, $max_char)
587
  {
588
  $output = str_replace(']]>', ']]&gt;', $output);
uninstall.php CHANGED
@@ -5,9 +5,9 @@ delete_option('smooth_db_version');
5
  //This plugin creates its own database tables to save the post ids for the posts and pages added to Smooth Slider. When the plugin will be deleted, the database tables will also get deleted.
6
  global $wpdb, $table_prefix;
7
 
8
- $slider_table = $table_prefix.SLIDER_TABLE;
9
- $slider_meta = $table_prefix.SLIDER_META;
10
- $slider_postmeta = $table_prefix.SLIDER_POST_META;
11
  $sql = "DROP TABLE $slider_table;";
12
  $wpdb->query($sql);
13
  $sql = "DROP TABLE $slider_meta;";
5
  //This plugin creates its own database tables to save the post ids for the posts and pages added to Smooth Slider. When the plugin will be deleted, the database tables will also get deleted.
6
  global $wpdb, $table_prefix;
7
 
8
+ $slider_table = $table_prefix.'smooth_slider';
9
+ $slider_meta = $table_prefix.'smooth_slider_meta';
10
+ $slider_postmeta = $table_prefix.'smooth_slider_postmeta';
11
  $sql = "DROP TABLE $slider_table;";
12
  $wpdb->query($sql);
13
  $sql = "DROP TABLE $slider_meta;";