Smooth Slider - Version 2.0

Version Description

Download this release

Release Info

Developer internet techies
Plugin Icon 128x128 Smooth Slider
Version 2.0
Comparing to
See all releases

Code changes from version 1.2 to 2.0

css/smooth-slider.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document
3
+ Author:Tejaswini
4
+ Website:http://www.clickonf5.org
5
+ */
6
+ #smooth_sldr div,#smooth_sldr p,#smooth_sldr li,#smooth_sldr span,#smooth_sldr img,#smooth_sldr h2,#smooth_sldr ul{list-style:none;background:transparent;vertical-align:baseline;}
7
+ #smooth_sldr div{display:block;}
8
+ #smooth_sldr span{display:inline;}
9
+ #smooth_sldr{overflow:hidden;margin: 10px auto;line-height:18px;}
10
+ #smooth_sldr a{text-decoration:none;}
11
+ #smooth_sldr_items{width:100%;}
12
+ #smooth_sldr_body{width:100%;}
13
+ #smooth_sliderc{position:relative;text-align:justify;}
14
+ #smooth_sliderc .smooth_sliderb{position:absolute;/*dont change this value*/left:0;top:0;}
15
+ .smooth_slideri{padding-right:10px;overflow:hidden;line-height:18px;}
16
+ .sldr_title{margin:0;}
17
+ #smooth_sldr_body h2{clear:none;display:block;padding:0px;}
18
+ .slider_item {padding-left:1px;}
19
+ #smooth_sldr_body p.more a{text-decoration:underline;float:right;}
20
+ #smooth_sldr_body p.more a:hover{text-decoration:none;}
21
+ #smooth_sliderc_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}
22
+ a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;}
23
+ #smooth_sliderc_nav li{float:left;margin:0 5px 0 0;display:block;background-color:transparent;line-height:14px;}
24
+ #smooth_sliderc_nav li a{display:block;padding:1px 5px 1px 5px;outline:none;}
25
+ .sldrbr{line-height:1px;}
26
+ .sldrlink{clear:both;display:block;font-size:8px;float:right;margin-top:-8px;font-family:Verdana, Helvetica, sans-serif;}
27
+ .sldrlink a{color:#333333;}
28
+
images/Thumbs.db CHANGED
Binary file
images/button_next.png CHANGED
Binary file
images/button_prev.png CHANGED
Binary file
images/close.jpg ADDED
Binary file
readme.txt CHANGED
@@ -1,20 +1,20 @@
1
  === Smooth Slider ===
2
  Contributors: Tejaswini Deshpande, Sanjeev Mishra
3
- Tags: slideshow,featured,posts,jquery,slider,content,css,simple,thumbnail,image
4
  Donate link: http://clickonf5.org/go/paypal/smooth-slider/
5
  Requires at least: 2.7
6
  Tested up to: 2.8.4
7
- Stable tag: 1.2
8
 
9
  == Description ==
10
 
11
- Smooth Slider is a Wordpress Plugin for creating a dynamic slideshow for featured posts on a blog. The slideshow created by Smooth Slider are JavaScript and Text based, that is why bloggers will get full benefit of Search Engine Optimization as the texts are readable by Search Engines. You can choose some of your posts as featured posts and show them into a slideshow on your blog home page (i.e. Index) as well as in Sidebar.
12
 
13
  Features:
14
 
15
  1. Search Engine Optimized Slideshow
16
  2. Fully Customizable CSS
17
- 3. Choose Posts as Featured Posts on Single Click
18
  4. Simple but Decent Slideshow
19
  5. Match Slideshow With Wordpress Theme
20
  6. No Need Of Knowledge of PHP, HTML or CSS
@@ -25,10 +25,23 @@ Features:
25
  11. Slider Preview in admin panel
26
  12. Can convert to pure image Slider
27
  13. Facility to put Custom Images in place of navigation numbers
28
- 14. Remove all the posts from the slider at one go
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  [Demo](http://www.clickonf5.org/) |
31
- [Plugin Information](http://www.clickonf5.org/smooth-slider)
 
32
 
33
  == Installation ==
34
 
@@ -44,26 +57,25 @@ This plugin is easy to install like other plug-ins of Wordpress as you need to j
44
 
45
  == Usage ==
46
 
47
- 1. If you want the slideshow on your home page, then open Index.php file from Dashboard by clicking on Tab Appearance / Editor and paste the following piece of code at the suitable place.
48
 
49
  if ( function_exists( 'get_smooth_slider' ) ) {
50
  get_smooth_slider(); }If you want to put the slider before the list of articles on your Wordpress blog homepage, put the above piece of code before the Wordpress Loop (the code is a php code, so ensure that it is enclosed within the php tags). Wordpress loop code is shown below:
51
 
52
- if(have_posts()) : while(have_posts()) : the_post();Complete example:
53
-
54
- <?php if ( function_exists( 'get_smooth_slider' ) ) {
55
- get_smooth_slider(); }
56
  if(have_posts()) : while(have_posts()) : the_post();
57
- ....(rest of the loop code)
58
- ?>
59
 
60
- 2. The content in the slider can be picked up from either the post content or the post excerpt or a new custom field slider_content. You can add the custom field on the Edit Post panel for each of the posts.
 
 
 
 
61
 
62
- 3. You can also put a thumbnail image for each of the featured post on Smooth slider. All you need to do is create a new custom field slider_thumbnail on the edit post panel for the particular post and put the link or source URL of the image in the value column.
63
 
64
- 4. Almost all the fields that appear in the Smooth Slider are customizable, you can change the looks of your Slider and make it suitable for your theme. The defaults set are according to the Default Wordpress theme. Also, you can change the number of posts appearing in the slider and the pause or interval between the two consecutive posts on the slider. For making these changes, there would be a settings page for Smooth Slider in the wp-admin screen of your blog, once you enable the plugin.
65
 
66
  Go to the plugin page to see more details (http://www.clickonf5.org/smooth-slider)
 
67
 
68
  == Frequently Asked Questions ==
69
 
@@ -78,8 +90,26 @@ Forum link: http://www.clickonf5.org/phpbb/smooth-slider-f12/
78
  Visit the plugin page (http://www.clickonf5.org/smooth-slider) and screenshot-post (http://www.clickonf5.org/wordpress/smooth-slider-featured-posts-slideshow-plugin/4333) to see more about it.
79
 
80
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  Version 1.2 (09/22/2009)
82
- 1. New - Slider Preview in Smooth Slider�s setting page
 
83
  2. New - Facility to set transparent background to the slider
84
  3. New - Facility to Convert it to pure Image Slider
85
  4. New - Remove all the posts from Smooth Slider in one click
@@ -87,6 +117,7 @@ Version 1.2 (09/22/2009)
87
  6. Fixed - CSS id names and class name fixed, to avoid probable conflicts with theme styles and other plugin styles
88
 
89
  Version 1.1 (09/14/2009)
 
90
  1. New - Active Slide in the slideshow will now be highlighted with bolder and bigger navigation number
91
  2. Fixed - Added No Script tag brosers not supporting JavaScript for showing the slideshow
92
  3. Fixed - Issues with Wordpress MU Smooth Slider Options update from setting page
1
  === Smooth Slider ===
2
  Contributors: Tejaswini Deshpande, Sanjeev Mishra
3
+ Tags: slideshow,featured,posts,jquery,slider,content,css,simple,thumbnail,image,post,sidebar,plugin,page,category,wpmu,site,blogs,style,home,categories,picture,flash,gallery
4
  Donate link: http://clickonf5.org/go/paypal/smooth-slider/
5
  Requires at least: 2.7
6
  Tested up to: 2.8.4
7
+ Stable tag: 2.0
8
 
9
  == Description ==
10
 
11
+ Smooth Slider is a Wordpress and Wordpress MU Plugin for creating a dynamic slideshow for featured posts on a blog. The slideshow created by Smooth Slider are JavaScript and Text based, that is why bloggers will get full benefit of Search Engine Optimization as the texts are readable by Search Engines. You can choose some of your posts as featured posts and show them into a slideshow on your blog home page (i.e. Index) as well as in Sidebar.
12
 
13
  Features:
14
 
15
  1. Search Engine Optimized Slideshow
16
  2. Fully Customizable CSS
17
+ 3. Choose Posts and Pages as Featured Posts/Pages on Single Click
18
  4. Simple but Decent Slideshow
19
  5. Match Slideshow With Wordpress Theme
20
  6. No Need Of Knowledge of PHP, HTML or CSS
25
  11. Slider Preview in admin panel
26
  12. Can convert to pure image Slider
27
  13. Facility to put Custom Images in place of navigation numbers
28
+ 14. Images Original Size as well as custom size Option
29
+ 15. Pick image from content or the custom field
30
+ 16. New custom field implementation, to allow not to display images on selective posts
31
+ 17. A new template tag to display Category specific posts on Smooth Slider
32
+ 18. A new template tag for WPMU, to get slider posts from all over the WPMU site
33
+ 19. Option to change Read More text and also put it in your language
34
+ 20. Permission setting option to restrict the users from adding posts to Smooth Slider
35
+ 21. Remove posts and pages from Smooth Slider selectively or remove all the posts from the slider at one go from the settings page itself
36
+ 22. Option to retain specific html tags in the slider posts
37
+ 23. Option to specify custom text or html in place of navigation numbers or buttons
38
+ 24. Fixed issue of Smooth Slider settings page with Internet Explorer
39
+ 25. Optimized Smooth Slider code internally
40
+ 26. Smooth Slider complete uninstall on plugin Delete
41
 
42
  [Demo](http://www.clickonf5.org/) |
43
+ [Plugin Information](http://www.clickonf5.org/smooth-slider) |
44
+ [Release 2.0](http://www.clickonf5.org/wordpress/smooth-slider-upgrade-2-0-released/5151)
45
 
46
  == Installation ==
47
 
57
 
58
  == Usage ==
59
 
60
+ 1. If you want the slideshow with all the added featured posts on your home page, then open Index.php file from Dashboard by clicking on Tab Appearance / Editor and paste the following piece of code at the suitable place.
61
 
62
  if ( function_exists( 'get_smooth_slider' ) ) {
63
  get_smooth_slider(); }If you want to put the slider before the list of articles on your Wordpress blog homepage, put the above piece of code before the Wordpress Loop (the code is a php code, so ensure that it is enclosed within the php tags). Wordpress loop code is shown below:
64
 
 
 
 
 
65
  if(have_posts()) : while(have_posts()) : the_post();
 
 
66
 
67
+ 2. You can use the get_smooth_slider_cat(�category-name or category slug�)or get_smooth_slider_cat()to get the posts from specific category on the slider. Please read the intructions on plugin page to know the details which tag to use in which case.
68
+
69
+ 3. Use the template tag get_smooth_slider_wpmu_all to get the site wide posts on your WPMU installation.
70
+
71
+ 4. The content in the slider can be picked up from either the post content or the post excerpt or a new custom field slider_content. You can add the custom field on the Edit Post panel for each of the posts.
72
 
73
+ 5. You can also put a thumbnail image for each of the featured post on Smooth slider. All you need to do is create a new custom field slider_thumbnail on the edit post panel for the particular post and put the link or source URL of the image in the value column.
74
 
75
+ 6. Almost all the fields that appear in the Smooth Slider are customizable, you can change the looks of your Slider and make it suitable for your theme. The defaults set are according to the Default Wordpress theme. Also, you can change the number of posts appearing in the slider and the pause or interval between the two consecutive posts on the slider. For making these changes, there would be a settings page for Smooth Slider in the wp-admin screen of your blog, once you enable the plugin.
76
 
77
  Go to the plugin page to see more details (http://www.clickonf5.org/smooth-slider)
78
+ There are lot many features added in Release version 2.0. To see the upgrade details and usage visit http://www.clickonf5.org/wordpress/smooth-slider-upgrade-2-0-released/5151
79
 
80
  == Frequently Asked Questions ==
81
 
90
  Visit the plugin page (http://www.clickonf5.org/smooth-slider) and screenshot-post (http://www.clickonf5.org/wordpress/smooth-slider-featured-posts-slideshow-plugin/4333) to see more about it.
91
 
92
  == Changelog ==
93
+ Version 2.0 (10/08/2009)
94
+
95
+ 1. New - Now you can add pages to Smooth Slider along with posts
96
+ 2. New - Images Original Size Option
97
+ 3. New - Pick image from content or the custom field
98
+ 4. New - New custom field implementation, to allow not to display images on selective posts
99
+ 5. New - A new template tag to display Category specific posts on Smooth Slider
100
+ 6. New - A new template tag for WPMU, to get slider posts from all over the WPMU site
101
+ 7. New - Option to change �Read More� text and also put it in your language
102
+ 8. New - Permission setting option to restrict the users from adding posts to Smooth Slider
103
+ 9. New - Remove posts and pages from Smooth Slider selectively from the settings page itself
104
+ 10. New - Option to retain specific html tags in the slider posts
105
+ 11. New - Option to specify custom text or html in place of navigation numbers or buttons
106
+ 12. Fix - Fixed issue of Smooth Slider settings page with Internet Explorer
107
+ 13. New - Optimized Smooth Slider code internally
108
+ 14. New - Smooth Slider complete uninstall on plugin Delete
109
+
110
  Version 1.2 (09/22/2009)
111
+
112
+ 1. New - Slider Preview in Smooth Slider setting page
113
  2. New - Facility to set transparent background to the slider
114
  3. New - Facility to Convert it to pure Image Slider
115
  4. New - Remove all the posts from Smooth Slider in one click
117
  6. Fixed - CSS id names and class name fixed, to avoid probable conflicts with theme styles and other plugin styles
118
 
119
  Version 1.1 (09/14/2009)
120
+
121
  1. New - Active Slide in the slideshow will now be highlighted with bolder and bigger navigation number
122
  2. Fixed - Added No Script tag brosers not supporting JavaScript for showing the slideshow
123
  3. Fixed - Issues with Wordpress MU Smooth Slider Options update from setting page
smooth-slider.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: Smooth Slider
4
  Plugin URI: http://www.clickonf5.org/smooth-slider
5
  Description: Smooth Slider adds a smooth content and image slideshow with customizable background and slide intervals to any location of your blog
6
- Version: 1.2
7
  Author: Tejaswini Deshpande, Sanjeev Mishra
8
  Author URI: http://www.clickonf5.org
9
  Wordpress version supported: 2.7 and above
10
  */
11
 
12
- /* Copyright 2009 Internet Techies (email : tejaswini@clickonf5.org)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
@@ -28,11 +28,8 @@ Wordpress version supported: 2.7 and above
28
  //Please visit Plugin page http://www.clickonf5.org/smooth-slider for Changelog
29
  //on activation
30
  function install_smooth_slider() {
31
-
32
  global $wpdb, $table_prefix;
33
-
34
  $table_name = $table_prefix.'slider';
35
-
36
  if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
37
  $sql = "CREATE TABLE $table_name (
38
  id mediumint(9) NOT NULL AUTO_INCREMENT,
@@ -41,40 +38,126 @@ function install_smooth_slider() {
41
  );";
42
  $rs = $wpdb->query($sql);
43
  }
44
-
45
- add_option('smooth_slider_speed','7');
46
- add_option('smooth_slider_no_posts','5');
47
- add_option('smooth_slider_bg_color','#ffffff');
48
- add_option('smooth_slider_height','200');
49
- add_option('smooth_slider_width','450');
50
- add_option('smooth_slider_border','1');
51
- add_option('smooth_slider_brcolor','#999999');
52
- add_option('smooth_slider_prev_next','1');
53
- add_option('smooth_slider_goto_slide','1');
54
- add_option('smooth_slider_title_text','Featured Posts');
55
- add_option('smooth_slider_title_font','Georgia');
56
- add_option('smooth_slider_title_fsize','20');
57
- add_option('smooth_slider_title_fstyle','italic');
58
- add_option('smooth_slider_title_fcolor','#000000');
59
- add_option('smooth_slider_ptitle_font','Trebuchet MS');
60
- add_option('smooth_slider_ptitle_fsize','14');
61
- add_option('smooth_slider_ptitle_fstyle','bold');
62
- add_option('smooth_slider_ptitle_fcolor','#000000');
63
- add_option('smooth_slider_img_align','left');
64
- add_option('smooth_slider_img_height','120');
65
- add_option('smooth_slider_img_width','165');
66
- add_option('smooth_slider_img_border','1');
67
- add_option('smooth_slider_img_brcolor','#000000');
68
- add_option('smooth_slider_content_font','Verdana');
69
- add_option('smooth_slider_content_fsize','12');
70
- add_option('smooth_slider_content_fstyle','normal');
71
- add_option('smooth_slider_content_fcolor','#333333');
72
- add_option('smooth_slider_content_from','content');
73
- add_option('smooth_slider_content_chars','300');
74
- add_option('smooth_slider_bg','0');
75
- add_option('smooth_slider_clear','0');
76
- add_option('smooth_slider_image_only','0');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
 
 
 
 
 
78
 
79
  //This adds the post to the slider
80
  function add_to_slider($post_id) {
@@ -117,20 +200,23 @@ function slider($post_id) {
117
 
118
  // Slider checkbox on the admin page
119
  function add_to_slider_checkbox() {
120
- global $post;
121
-
122
- $extra = "";
123
-
124
- if(isset($post->ID)) {
125
- $post_id = $post->ID;
126
- if(slider($post_id)) { $extra = 'checked="checked"'; }
127
- }
128
 
129
- echo '<div id="slider_checkbox">
130
- <input type="checkbox" class="sldr_post" name="slider" value="slider" '.$extra.' />
131
- <label for="slider">Add this post to Smooth Slider</label>
132
- <input type="hidden" name="sldr-verify" id="sldr-verify" value="'.wp_create_nonce('SmoothSlider').'" />
133
- </div>';
 
 
 
 
 
 
 
 
 
134
  }
135
 
136
  //CSS for the checkbox on the admin page
@@ -139,39 +225,16 @@ function slider_checkbox_css() {
139
  <?php
140
  }
141
 
142
- // Display the posts added to slider
143
- function show_posts_on_slider($max_posts=5, $offset=0, $before='<li>', $after='</li>') {
144
- global $wpdb, $table_prefix;
145
- $table_name = $table_prefix."slider";
146
-
147
- $sql = "SELECT * FROM $table_name ORDER BY date DESC LIMIT $offset, $max_posts";
148
- $posts = $wpdb->get_results($sql);
149
-
150
- $html = '';
151
- foreach($posts as $post) {
152
-
153
- $id = $post->id;
154
- $posts_table = $table_prefix.'posts';
155
- $sql_post = "SELECT * FROM $posts_table where id = $id";
156
- $rs_post = $wpdb->get_results($sql_post);
157
- $data = $rs_post[0];
158
- $post_title = stripslashes($data->post_title);
159
- $post_title = str_replace('"', '', $post_title);
160
- $permalink = get_permalink($data->ID);
161
- $post_id = $data->ID;
162
- $html .= $before .'<a href="'. $permalink .'" title="'. $post_title .'" id="destacado_'.$post_id.'">'. $post_title .'</a>'. $after;
163
- }
164
- echo $html;
165
- }
166
-
167
  add_action('admin_head', 'slider_checkbox_css');
168
  add_action('simple_edit_form', 'add_to_slider_checkbox');
169
  add_action('edit_form_advanced', 'add_to_slider_checkbox');
 
170
  add_action('publish_post', 'add_to_slider');
 
171
  add_action('edit_post', 'add_to_slider');
172
  add_action('publish_post', 'remove_from_slider');
173
  add_action('edit_post', 'remove_from_slider');
174
- register_activation_hook( __FILE__, 'install_smooth_slider' );
175
 
176
  function smooth_slider_plugin_url( $path = '' ) {
177
  global $wp_version;
@@ -201,20 +264,28 @@ function get_string_limit($output, $max_char)
201
  }
202
  }
203
 
 
 
 
 
 
 
 
 
 
204
  function carousel_posts_on_slider($max_posts, $offset=0) {
205
- if(!function_exists('show_posts_on_slider'))
206
- return false;
207
  global $wpdb, $table_prefix;
208
  $table_name = $table_prefix."slider";
209
 
210
  $posts = $wpdb->get_results("SELECT * FROM $table_name ORDER BY date DESC LIMIT $offset, $max_posts", OBJECT);
211
 
212
  $html = '';
213
- $coint_i = 0;
214
 
215
 
216
  foreach($posts as $post) {
217
- $coint_i++;
218
  $id = $post->id;
219
  $posts_table = $table_prefix.'posts';
220
  $sql_post = "SELECT * FROM $posts_table WHERE ID = $id";
@@ -232,75 +303,423 @@ function carousel_posts_on_slider($max_posts, $offset=0) {
232
  <!-- smooth_slideri -->';
233
 
234
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
 
235
 
236
- if (get_option('smooth_slider_content_from') == "slider_content") {
237
  $slider_content = get_post_meta($post_id, 'slider_content', true);
238
  }
239
- if (get_option('smooth_slider_content_from') == "excerpt") {
240
  $slider_content = $data->post_excerpt;
241
  }
242
 
243
  $slider_content = stripslashes($slider_content);
244
  $slider_content = str_replace(']]>', ']]&gt;', $slider_content);
245
- $slider_content = strip_tags($slider_content);
246
-
247
- if( isset($thumbnail) && !empty($thumbnail) ):
248
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
249
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
- if (get_option('smooth_slider_image_only') == '1') {
252
  $html .= '<!-- /smooth_slideri -->
253
  </div>';
254
  }
255
  else {
256
- $html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.get_string_limit($slider_content,get_option('smooth_slider_content_chars')).'</span>
257
- <p class="more"><a href="'.$permalink.'">Read more</a></p>
258
 
259
  <!-- /smooth_slideri -->
260
  </div>';
261
  }
262
  }
263
  echo $html;
264
- return $coint_i;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  }
266
 
267
  function smooth_slider_css() {
 
268
  ?>
269
- <style type="text/css" media="screen">#smooth_sldr div,#smooth_sldr p,#smooth_sldr li,#smooth_sldr a,#smooth_sldr span,#smooth_sldr img,#smooth_sldr h2,#smooth_sldr ul{list-style:none;background:transparent;vertical-align:baseline;}#smooth_sldr div{display:block;}#smooth_sldr span{display:inline;}#smooth_sldr{width:<?php echo get_option('smooth_slider_width'); ?>px;height:<?php echo get_option('smooth_slider_height'); ?>px;overflow:hidden;background-color:<?php if (get_option('smooth_slider_bg') == '1') { echo "transparent";} else { echo get_option('smooth_slider_bg_color'); } ?>;border:<?php echo get_option('smooth_slider_border'); ?>px solid <?php echo get_option('smooth_slider_brcolor'); ?>;margin: 10px auto;line-height:18px;}#smooth_sldr a{text-decoration:none;}#smooth_sldr_items{width:100%;padding:10px <?php if (get_option('smooth_slider_prev_next') == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if (get_option('smooth_slider_prev_next') == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sldr_body{width:100%;}#smooth_sliderc{width:<?php if (get_option('smooth_slider_prev_next') == 1) {echo (get_option('smooth_slider_width') - 44);} else {echo (get_option('smooth_slider_width') - 24);} ?>px;height:<?php if (get_option('smooth_slider_goto_slide') == "1"){$nav_size = get_option('smooth_slider_content_fsize');} elseif (get_option('smooth_slider_goto_slide') == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { $extra_height = get_option('smooth_slider_title_fsize') + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo (get_option('smooth_slider_height') - $extra_height); ?>px;position:relative;text-align:justify;}#smooth_sliderc .smooth_sliderb{position:absolute;/*dont change this value*/left:0;top:0;}.smooth_slideri{width:<?php if (get_option('smooth_slider_prev_next') == 1) {echo (get_option('smooth_slider_width') - 54);} else {echo (get_option('smooth_slider_width') - 24);} ?>px;padding-right:10px;height:<?php if (get_option('smooth_slider_goto_slide') == "1"){$nav_size = get_option('smooth_slider_content_fsize');} elseif (get_option('smooth_slider_goto_slide') == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { $extra_height = get_option('smooth_slider_title_fsize') + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo (get_option('smooth_slider_height') - $extra_height); ?>px;overflow:hidden;line-height:18px;}.sldr_title{color:#000;font-family:<?php echo get_option('smooth_slider_title_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_title_fsize'); ?>px;font-weight:<?php if (get_option('smooth_slider_title_fstyle') == "bold" or get_option('smooth_slider_title_fstyle') == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if (get_option('smooth_slider_title_fstyle') == "italic" or get_option('smooth_slider_title_fstyle') == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo get_option('smooth_slider_title_fcolor'); ?>;margin:0;}#smooth_sldr_body h2{clear:none;line-height:<?php echo (get_option('smooth_slider_ptitle_fsize') + 3); ?>px;font-family:<?php echo get_option('smooth_slider_ptitle_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_ptitle_fsize'); ?>px;font-weight:<?php if (get_option('smooth_slider_ptitle_fstyle') == "bold" or get_option('smooth_slider_ptitle_fstyle') == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if (get_option('smooth_slider_ptitle_fstyle') == "italic" or get_option('smooth_slider_ptitle_fstyle') == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;display:block;margin:<?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;padding:0px;}#smooth_sldr_body h2 a{color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;}.slider_item {padding-left:1px;}#smooth_sldr_body span{font-family:<?php echo get_option('smooth_slider_content_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_content_fsize'); ?>px;font-weight:<?php if (get_option('smooth_slider_content_fstyle') == "bold" or get_option('smooth_slider_content_fstyle') == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if (get_option('smooth_slider_content_fstyle')=="italic" or get_option('smooth_slider_content_fstyle') == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo get_option('smooth_slider_content_fcolor'); ?>;}.smooth_slider_thumbnail{float:<?php echo get_option('smooth_slider_img_align'); ?>;margin:<?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if(get_option('smooth_slider_img_align') == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if(get_option('smooth_slider_img_align') == "right") {echo "5";} else {echo "0";} ?>px;width:<?php echo get_option('smooth_slider_img_width'); ?>px;height:<?php echo get_option('smooth_slider_img_height'); ?>px;border:<?php echo get_option('smooth_slider_img_border'); ?>px solid <?php echo get_option('smooth_slider_img_brcolor'); ?>;}#smooth_sldr_body p.more a{text-decoration:underline;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;float:right;font-family:<?php echo get_option('smooth_slider_content_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_content_fsize'); ?>px;}#smooth_sldr_body p.more a:hover{text-decoration:none;}#smooth_sliderc_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;}#smooth_sliderc_nav li{float:left;margin:0 5px 0 0;display:block;border:1px solid <?php echo get_option('smooth_slider_content_fcolor'); ?>;background-color:transparent;line-height:14px;font-size:<?php echo get_option('smooth_slider_content_fsize'); ?>px;font-family:<?php echo get_option('smooth_slider_content_font'); ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{display:block;padding:1px 5px 1px 5px;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;outline:none;}.sldrbr{line-height:1px;}.sldrlink{clear:both;display:block;font-size:8px;float:right;padding-right:<?php if (get_option('smooth_slider_prev_next') == 1) {echo "40";} else {echo "25";} ?>px;margin-top:-8px;font-family:Verdana, Helvetica, sans-serif;}.sldrlink a{color:<?php echo get_option('smooth_slider_content_fcolor'); ?>;}</style>
270
  <?php
271
  }
272
 
273
  add_action('wp_head', 'smooth_slider_css');
274
 
275
  function smooth_slider_enqueue_scripts() {
276
- wp_register_script('jquery', false, false, false, false);
277
  wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
278
- array('jquery'), false, false);
 
 
279
  }
280
 
281
  add_action( 'init', 'smooth_slider_enqueue_scripts' );
282
 
283
  function get_smooth_slider() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
 
 
 
 
285
  ?>
286
  <script type="text/javascript">
287
  stepcarousel.setup({
288
  galleryid: 'smooth_sliderc', //id of carousel DIV
289
  beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
290
  panelclass: 'smooth_slideri', //class of panel DIVs each holding content
291
- autostep: {enable: true, moveby:1, pause:<?php echo get_option('smooth_slider_speed')*1000; ?>},
292
  panelbehavior: {speed:500, wraparound:false, persist:false},
293
- defaultbuttons: {enable: <?php if (get_option('smooth_slider_prev_next') == 1) {echo "true";} else {echo "false";} ?>, moveby: 1, leftnav: ['<?php echo smooth_slider_plugin_url( 'images/button_prev.png' ); ?>', -25, <?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { $extra_height = get_option('smooth_slider_title_fsize') + get_option('smooth_slider_content_fsize') + 5 + 18; } else { $extra_height = get_option('smooth_slider_content_fsize') + 5 + 5 + 18; } echo ((get_option('smooth_slider_height') - $extra_height)/2); ?>], rightnav: ['<?php echo smooth_slider_plugin_url( 'images/button_next.png' ); ?>', 0, <?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { $extra_height = get_option('smooth_slider_title_fsize') + get_option('smooth_slider_content_fsize') + 5 + 18; } else { $extra_height = get_option('smooth_slider_content_fsize') + 5 + 5 + 18; } echo ((get_option('smooth_slider_height') - $extra_height)/2); ?>]},
294
  statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
295
  contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
296
  onslide:function(){
297
  jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
298
- jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo get_option('smooth_slider_content_fsize'); ?>px");
299
  var curr_slide = imageA;
300
  jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
301
- jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo (get_option('smooth_slider_content_fsize') + 5); ?>px");
302
 
303
- <?php if (get_option('smooth_slider_goto_slide') == 2) {
304
  list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");
305
  global $sldr_nav_width;
306
  $sldr_nav_width = $width/2;
@@ -317,29 +736,32 @@ stepcarousel.setup({
317
  <div id="smooth_sldr">
318
  <div id="smooth_sldr_items">
319
  <div id="smooth_sldr_body">
320
- <?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo get_option('smooth_slider_title_text'); ?></div> <?php } ?>
321
  <div id="smooth_sliderc">
322
  <div class="smooth_sliderb">
323
- <?php global $coint_i; $coint_i = carousel_posts_on_slider(get_option('smooth_slider_no_posts')); ?>
324
  </div>
325
  </div>
326
  </div>
327
- <?php if (get_option('smooth_slider_goto_slide') == 1) { ?>
328
  <ul id="smooth_sliderc_nav">
329
- <?php global $coint_i; for($i=1; $i<=$coint_i; $i++) {
330
  echo "<li><a id=\"sldr".$i."\" href=\"#\" >".$i."</a></li>\n";
331
  } ?>
332
  </ul>
333
  <?php }
334
- if (get_option('smooth_slider_goto_slide') == 2) { ?>
335
  <div id="smooth_sliderc_nav">
336
- <?php global $coint_i; for($i=1; $i<=$coint_i; $i++) {
337
  list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide".$i.".png");
338
  $width = $width/2;
339
  echo "<a class=\"smooth_sliderc_nav\" id=\"sldr".$i."\" style=\"background-image:url(".smooth_slider_plugin_url( 'images/' )."slide".$i.".png);background-position:0 0;width:".$width."px;height:".$height."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
340
  } ?>
341
  </div>
342
- <?php } ?>
 
 
 
343
  <br class="sldrbr" />
344
  <div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
345
  </div>
@@ -364,12 +786,13 @@ if ( is_admin() ){ // admin actions
364
 
365
  function smooth_slider_admin_scripts() {
366
  if ( is_admin() ){ // admin actions
367
-
368
  // Settings page only
369
  if ( isset($_GET['page']) && 'smooth-slider.php' == $_GET['page'] ) {
370
  wp_register_script('jquery', false, false, false, false);
371
  wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
372
- array('jquery'), false, false);
 
 
373
  }
374
  }
375
  }
@@ -377,6 +800,7 @@ function smooth_slider_admin_scripts() {
377
  add_action( 'admin_init', 'smooth_slider_admin_scripts' );
378
 
379
  function smooth_slider_admin_head() {
 
380
  if ( is_admin() ){ // admin actions
381
 
382
  // Settings page only
@@ -488,7 +912,26 @@ jQuery(document).ready(function() {
488
  jQuery(document).mouseup(function(){
489
  colorpick_6 = false;
490
  });
 
 
 
491
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
  </script>
493
  <style type="text/css">
494
  .color-picker-wrap {
@@ -499,9 +942,13 @@ jQuery(document).ready(function() {
499
  padding: 3px;
500
  z-index: 1000;
501
  }
 
 
 
 
 
502
  </style>
503
- <style type="text/css" media="screen">#smooth_sldr div,#smooth_sldr p,#smooth_sldr li,#smooth_sldr span,#smooth_sldr img,#smooth_sldr h2,#smooth_sldr ul{list-style:none;background:transparent;vertical-align:baseline;}#smooth_sldr div{display:block;}#smooth_sldr span{display:inline;}#smooth_sldr{width:<?php echo get_option('smooth_slider_width'); ?>px;height:<?php echo get_option('smooth_slider_height'); ?>px;overflow:hidden;background-color:<?php if (get_option('smooth_slider_bg') == '1') { echo "transparent";} else { echo get_option('smooth_slider_bg_color'); } ?>;border:<?php echo get_option('smooth_slider_border'); ?>px solid <?php echo get_option('smooth_slider_brcolor'); ?>;margin: 10px auto;line-height:18px;}#smooth_sldr a{text-decoration:none;}#smooth_sldr_items{width:100%;padding:10px <?php if (get_option('smooth_slider_prev_next') == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if (get_option('smooth_slider_prev_next') == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sldr_body{width:100%;}#smooth_sliderc{width:<?php if (get_option('smooth_slider_prev_next') == 1) {echo (get_option('smooth_slider_width') - 44);} else {echo (get_option('smooth_slider_width') - 24);} ?>px;height:<?php if (get_option('smooth_slider_goto_slide') == "1"){$nav_size = get_option('smooth_slider_content_fsize');} elseif (get_option('smooth_slider_goto_slide') == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { $extra_height = get_option('smooth_slider_title_fsize') + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo (get_option('smooth_slider_height') - $extra_height); ?>px;position:relative;text-align:justify;}#smooth_sliderc .smooth_sliderb{position:absolute;/*dont change this value*/left:0;top:0;}.smooth_slideri{width:<?php if (get_option('smooth_slider_prev_next') == 1) {echo (get_option('smooth_slider_width') - 54);} else {echo (get_option('smooth_slider_width') - 24);} ?>px;padding-right:10px;height:<?php if (get_option('smooth_slider_goto_slide') == "1"){$nav_size = get_option('smooth_slider_content_fsize');} elseif (get_option('smooth_slider_goto_slide') == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { $extra_height = get_option('smooth_slider_title_fsize') + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo (get_option('smooth_slider_height') - $extra_height); ?>px;overflow:hidden;line-height:18px;}.sldr_title{color:#000;font-family:<?php echo get_option('smooth_slider_title_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_title_fsize'); ?>px;font-weight:<?php if (get_option('smooth_slider_title_fstyle') == "bold" or get_option('smooth_slider_title_fstyle') == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if (get_option('smooth_slider_title_fstyle') == "italic" or get_option('smooth_slider_title_fstyle') == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo get_option('smooth_slider_title_fcolor'); ?>;margin:0;}#smooth_sldr_body h2{clear:none;line-height:<?php echo (get_option('smooth_slider_ptitle_fsize') + 3); ?>px;font-family:<?php echo get_option('smooth_slider_ptitle_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_ptitle_fsize'); ?>px;font-weight:<?php if (get_option('smooth_slider_ptitle_fstyle') == "bold" or get_option('smooth_slider_ptitle_fstyle') == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if (get_option('smooth_slider_ptitle_fstyle') == "italic" or get_option('smooth_slider_ptitle_fstyle') == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;display:block;margin:<?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;padding:0px;}#smooth_sldr_body h2 a{color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;}.slider_item {padding-left:1px;}#smooth_sldr_body span{font-family:<?php echo get_option('smooth_slider_content_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_content_fsize'); ?>px;font-weight:<?php if (get_option('smooth_slider_content_fstyle') == "bold" or get_option('smooth_slider_content_fstyle') == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if (get_option('smooth_slider_content_fstyle')=="italic" or get_option('smooth_slider_content_fstyle') == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo get_option('smooth_slider_content_fcolor'); ?>;}.smooth_slider_thumbnail{float:<?php echo get_option('smooth_slider_img_align'); ?>;margin:<?php $sldr_title = get_option('smooth_slider_title_text'); if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if(get_option('smooth_slider_img_align') == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if(get_option('smooth_slider_img_align') == "right") {echo "5";} else {echo "0";} ?>px;width:<?php echo get_option('smooth_slider_img_width'); ?>px;height:<?php echo get_option('smooth_slider_img_height'); ?>px;border:<?php echo get_option('smooth_slider_img_border'); ?>px solid <?php echo get_option('smooth_slider_img_brcolor'); ?>;}#smooth_sldr_body p.more a{text-decoration:underline;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;float:right;font-family:<?php echo get_option('smooth_slider_content_font'); ?>, Arial, Helvetica, sans-serif;font-size:<?php echo get_option('smooth_slider_content_fsize'); ?>px;}#smooth_sldr_body p.more a:hover{text-decoration:none;}#smooth_sliderc_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;}#smooth_sliderc_nav li{float:left;margin:0 5px 0 0;display:block;border:1px solid <?php echo get_option('smooth_slider_content_fcolor'); ?>;background-color:transparent;line-height:14px;font-size:<?php echo get_option('smooth_slider_content_fsize'); ?>px;font-family:<?php echo get_option('smooth_slider_content_font'); ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{display:block;padding:1px 5px 1px 5px;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;outline:none;}.sldrbr{line-height:1px;}.sldrlink{clear:both;display:block;font-size:8px;float:right;padding-right:<?php if (get_option('smooth_slider_prev_next') == 1) {echo "40";} else {echo "25";} ?>px;margin-top:-8px;font-family:Verdana, Helvetica, sans-serif;}.sldrlink a{color:<?php echo get_option('smooth_slider_content_fcolor'); ?>;}
504
- </style>
505
  <?php
506
  } //for smooth slider option page
507
  }//only for admin
@@ -517,11 +964,30 @@ function smooth_slider_settings() {
517
 
518
  // This function displays the page content for the Smooth Slider Options submenu
519
  function smooth_slider_settings_page() {
 
 
 
 
 
 
 
520
  ?>
 
521
  <div class="wrap">
522
- <h2>Smooth Slider Options</h2>
 
 
 
 
 
 
 
 
 
 
 
523
 
524
- <form method="post" action="options.php">
525
  <div id="poststuff" class="metabox-holder has-right-sidebar" >
526
  <div id="side-info-column" class="inner-sidebar">
527
  <div class="postbox">
@@ -532,23 +998,14 @@ function smooth_slider_settings_page() {
532
  <li><a href="http://www.clickonf5.org" title="Visit Internet Techies" >Plugin Parent Site</a></li>
533
  <li><a href="http://www.clickonf5.org/phpbb/smooth-slider-f12/" title="Support Forum for Smooth Slider" >Support Forum</a></li>
534
  <li><a href="http://www.clickonf5.org/about/tejaswini" title="Smooth Slider Author Page" >About the Author</a></li>
 
535
  <li><a href="http://clickonf5.org/go/paypal/smooth-slider/" title="Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins" >Donate with Paypal</a></li>
536
  </ul>
537
  </div>
538
  </div>
539
  </div>
540
 
541
- <div id="side-info-column" class="inner-sidebar">
542
- <div class="inside">
543
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
544
- <input type="hidden" name="cmd" value="_s-xclick">
545
- <input type="hidden" name="hosted_button_id" value="8046056">
546
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
547
- <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
548
- </form>
549
- </div>
550
- </div>
551
- <div id="side-info-column" class="inner-sidebar">
552
  <div class="postbox">
553
  <h3 class="hndle"><span>Credits:</span></h3>
554
  <div class="inside">
@@ -560,18 +1017,43 @@ function smooth_slider_settings_page() {
560
  </ul>
561
  </div>
562
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  </div>
564
 
565
  <h2>Preview</h2>
566
- <?php settings_fields('smooth-slider-group');
567
- if (get_option('smooth_slider_clear') == '1')
568
- {
569
- global $wpdb, $table_prefix;
570
- $table_name = $table_prefix.'slider';
571
- $sql = "DELETE FROM $table_name";
572
- $wpdb->query($sql);
573
- update_option( 'smooth_slider_clear', '0' );
574
- } ?>
575
  <div style="width:70%;">
576
  <?php
577
  get_smooth_slider();
@@ -585,51 +1067,53 @@ get_smooth_slider();
585
 
586
  <tr valign="top">
587
  <th scope="row">Slide Pause Interval</th>
588
- <td><input type="text" name="smooth_slider_speed" id="smooth_slider_speed" class="small-text" value="<?php echo get_option('smooth_slider_speed'); ?>" />&nbsp;(in secs)</td>
589
  </tr>
590
 
591
  <tr valign="top">
592
  <th scope="row">Number of Posts in the Slideshow</th>
593
- <td><input type="text" name="smooth_slider_no_posts" id="smooth_slider_no_posts" class="small-text" value="<?php echo get_option('smooth_slider_no_posts'); ?>" /></td>
594
  </tr>
595
 
596
  <tr valign="top">
597
  <th scope="row">Background Color</th>
598
- <td><input type="text" name="smooth_slider_bg_color" id="color_value_1" value="<?php echo get_option('smooth_slider_bg_color'); ?>" />&nbsp; <img id="color_picker_1" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_1"></div> &nbsp; &nbsp; &nbsp;
599
- <label for="smooth_slider_bg"><input name="smooth_slider_bg" type="checkbox" id="smooth_slider_bg" value="1" <?php checked('1', get_option('smooth_slider_bg')); ?> /> Use Transparent Background</label> </td>
600
  </tr>
601
 
602
  <tr valign="top">
603
  <th scope="row">Slider Height</th>
604
- <td><input type="text" name="smooth_slider_height" id="smooth_slider_height" class="small-text" value="<?php echo get_option('smooth_slider_height'); ?>" />&nbsp;px</td>
605
  </tr>
606
 
607
 
608
  <tr valign="top">
609
  <th scope="row">Slider Width</th>
610
- <td><input type="text" name="smooth_slider_width" id="smooth_slider_width" class="small-text" value="<?php echo get_option('smooth_slider_width'); ?>" />&nbsp;px</td>
611
  </tr>
612
 
613
  <tr valign="top">
614
  <th scope="row">Border Thickness</th>
615
- <td><input type="text" name="smooth_slider_border" id="smooth_slider_border" class="small-text" value="<?php echo get_option('smooth_slider_border'); ?>" />&nbsp;px &nbsp;(put 0 if no border is required)</td>
616
  </tr>
617
 
618
  <tr valign="top">
619
  <th scope="row">Border Color</th>
620
- <td><input type="text" name="smooth_slider_brcolor" id="color_value_6" value="<?php echo get_option('smooth_slider_brcolor'); ?>" />&nbsp; <img id="color_picker_6" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_6"></div></td>
621
  </tr>
622
 
623
  <tr valign="top">
624
  <th scope="row">Navigation Buttons</th>
625
  <td><fieldset><legend class="screen-reader-text"><span>Navigation Buttons</span></legend>
626
  <label for="smooth_slider_prev_next">
627
- <input name="smooth_slider_prev_next" type="checkbox" id="smooth_slider_prev_next" value="1" <?php checked("1", get_option('smooth_slider_prev_next')); ?> />
628
  Show Prev/Next navigation arrows</label><br />
629
  <label for="smooth_slider_goto_slide">Show go to slide number links at the bottom as 1, 2, 3 etc. or images</label><br />
630
- <input name="smooth_slider_goto_slide" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', get_option('smooth_slider_goto_slide')); ?> /> None &nbsp; &nbsp;
631
- <input name="smooth_slider_goto_slide" type="radio" id="smooth_slider_goto_slide" value="1" <?php checked('1', get_option('smooth_slider_goto_slide')); ?> /> Numbers &nbsp; &nbsp;
632
- <input name="smooth_slider_goto_slide" type="radio" id="smooth_slider_goto_slide" value="2" <?php checked('2', get_option('smooth_slider_goto_slide')); ?> /> Custom Images &nbsp; &nbsp;
 
 
633
  </fieldset></td>
634
  </tr>
635
 
@@ -641,45 +1125,45 @@ get_smooth_slider();
641
 
642
  <tr valign="top">
643
  <th scope="row">Text</th>
644
- <td><input type="text" name="smooth_slider_title_text" id="smooth_slider_title_text" value="<?php echo get_option('smooth_slider_title_text'); ?>" /></td>
645
  </tr>
646
 
647
  <tr valign="top">
648
  <th scope="row">Font</th>
649
- <td><select name="smooth_slider_title_font" id="smooth_slider_title_font" >
650
- <option value="Arial" <?php if (get_option('smooth_slider_title_font') == "Arial"){ echo "selected";}?> >Arial</option>
651
- <option value="Book Antiqua" <?php if (get_option('smooth_slider_title_font') == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
652
- <option value="Bookman Old Style" <?php if (get_option('smooth_slider_title_font') == "Bookman Old Style"){ echo "selected";}?> >Bookman Old Style</option>
653
- <option value="Calibri" <?php if (get_option('smooth_slider_title_font') == "Calibri"){ echo "selected";}?> >Calibri</option>
654
- <option value="Century Schoolbook" <?php if (get_option('smooth_slider_title_font') == "Century Schoolbook"){ echo "selected";}?> >Century Schoolbook</option>
655
- <option value="Courier New" <?php if (get_option('smooth_slider_title_font') == "Courier New"){ echo "selected";}?> >Courier New</option>
656
- <option value="Geneva" <?php if (get_option('smooth_slider_title_font') == "Geneva"){ echo "selected";}?> >Geneva</option>
657
- <option value="Georgia" <?php if (get_option('smooth_slider_title_font') == "Georgia"){ echo "selected";} ?> >Georgia</option>
658
- <option value="Helvetica" <?php if (get_option('smooth_slider_title_font') == "Helvetica"){ echo "selected";}?> >Helvetica</option>
659
- <option value="Monotype Corsiva" <?php if (get_option('smooth_slider_title_font') == "Monotype Corsiva"){ echo "selected";}?> >Monotype Corsiva</option>
660
- <option value="Times New Roman" <?php if (get_option('smooth_slider_title_font') == "Times New Roman"){ echo "selected";}?> >Times New Roman</option>
661
- <option value="Trebuchet MS" <?php if (get_option('smooth_slider_title_font') == "Trebuchet MS"){ echo "selected";}?> >Trebuchet MS</option>
662
  </select>
663
  </td>
664
  </tr>
665
 
666
  <tr valign="top">
667
  <th scope="row">Font Color</th>
668
- <td><input type="text" name="smooth_slider_title_fcolor" id="color_value_2" value="<?php echo get_option('smooth_slider_title_fcolor'); ?>" />&nbsp; <img id="color_picker_2" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_2"></div></td>
669
  </tr>
670
 
671
  <tr valign="top">
672
  <th scope="row">Font Size</th>
673
- <td><input type="text" name="smooth_slider_title_fsize" id="smooth_slider_title_fsize" class="small-text" value="<?php echo get_option('smooth_slider_title_fsize'); ?>" />&nbsp;px</td>
674
  </tr>
675
 
676
  <tr valign="top">
677
  <th scope="row">Font Style</th>
678
- <td><select name="smooth_slider_title_fstyle" id="smooth_slider_title_fstyle" >
679
- <option value="bold" <?php if (get_option('smooth_slider_title_fstyle') == "bold"){ echo "selected";}?> >Bold</option>
680
- <option value="bold italic" <?php if (get_option('smooth_slider_title_fstyle') == "bold italic"){ echo "selected";}?> >Bold Italic</option>
681
- <option value="italic" <?php if (get_option('smooth_slider_title_fstyle') == "italic"){ echo "selected";}?> >Italic</option>
682
- <option value="normal" <?php if (get_option('smooth_slider_title_fstyle') == "normal"){ echo "selected";}?> >Normal</option>
683
  </select>
684
  </td>
685
  </tr>
@@ -691,40 +1175,40 @@ get_smooth_slider();
691
 
692
  <tr valign="top">
693
  <th scope="row">Font</th>
694
- <td><select name="smooth_slider_ptitle_font" id="smooth_slider_ptitle_font" >
695
- <option value="Arial" <?php if (get_option('smooth_slider_ptitle_font') == "Arial"){ echo "selected";}?> >Arial</option>
696
- <option value="Book Antiqua" <?php if (get_option('smooth_slider_ptitle_font') == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
697
- <option value="Bookman Old Style" <?php if (get_option('smooth_slider_ptitle_font') == "Bookman Old Style"){ echo "selected";}?> >Bookman Old Style</option>
698
- <option value="Calibri" <?php if (get_option('smooth_slider_ptitle_font') == "Calibri"){ echo "selected";}?> >Calibri</option>
699
- <option value="Century Schoolbook" <?php if (get_option('smooth_slider_ptitle_font') == "Century Schoolbook"){ echo "selected";}?> >Century Schoolbook</option>
700
- <option value="Courier New" <?php if (get_option('smooth_slider_ptitle_font') == "Courier New"){ echo "selected";}?> >Courier New</option>
701
- <option value="Geneva" <?php if (get_option('smooth_slider_ptitle_font') == "Geneva"){ echo "selected";}?> >Geneva</option>
702
- <option value="Georgia" <?php if (get_option('smooth_slider_ptitle_font') == "Georgia"){ echo "selected";} ?> >Georgia</option>
703
- <option value="Helvetica" <?php if (get_option('smooth_slider_ptitle_font') == "Helvetica"){ echo "selected";}?> >Helvetica</option>
704
- <option value="Monotype Corsiva" <?php if (get_option('smooth_slider_ptitle_font') == "Monotype Corsiva"){ echo "selected";}?> >Monotype Corsiva</option>
705
- <option value="Times New Roman" <?php if (get_option('smooth_slider_ptitle_font') == "Times New Roman"){ echo "selected";}?> >Times New Roman</option>
706
- <option value="Trebuchet MS" <?php if (get_option('smooth_slider_ptitle_font') == "Trebuchet MS"){ echo "selected";}?> >Trebuchet MS</option>
707
  </select>
708
  </td>
709
  </tr>
710
 
711
  <tr valign="top">
712
  <th scope="row">Font Color</th>
713
- <td><input type="text" name="smooth_slider_ptitle_fcolor" id="color_value_3" value="<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>" />&nbsp; <img id="color_picker_3" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_3"></div></td>
714
  </tr>
715
 
716
  <tr valign="top">
717
  <th scope="row">Font Size</th>
718
- <td><input type="text" name="smooth_slider_ptitle_fsize" id="smooth_slider_ptitle_fsize" class="small-text" value="<?php echo get_option('smooth_slider_ptitle_fsize'); ?>" />&nbsp;px</td>
719
  </tr>
720
 
721
  <tr valign="top">
722
  <th scope="row">Font Style</th>
723
- <td><select name="smooth_slider_ptitle_fstyle" id="smooth_slider_ptitle_fstyle" >
724
- <option value="bold" <?php if (get_option('smooth_slider_ptitle_fstyle') == "bold"){ echo "selected";}?> >Bold</option>
725
- <option value="bold italic" <?php if (get_option('smooth_slider_ptitle_fstyle') == "bold italic"){ echo "selected";}?> >Bold Italic</option>
726
- <option value="italic" <?php if (get_option('smooth_slider_ptitle_fstyle') == "italic"){ echo "selected";}?> >Italic</option>
727
- <option value="normal" <?php if (get_option('smooth_slider_ptitle_fstyle') == "normal"){ echo "selected";}?> >Normal</option>
728
  </select>
729
  </td>
730
  </tr>
@@ -734,147 +1218,195 @@ get_smooth_slider();
734
  <p>Customize the looks of the thumbnail image for each of the sliding post here</p>
735
  <table class="form-table">
736
 
 
 
 
 
 
 
 
 
737
  <tr valign="top">
738
  <th scope="row">Align to</th>
739
- <td><select name="smooth_slider_img_align" id="smooth_slider_img_align" >
740
- <option value="left" <?php if (get_option('smooth_slider_img_align') == "left"){ echo "selected";}?> >Left</option>
741
- <option value="right" <?php if (get_option('smooth_slider_img_align') == "right"){ echo "selected";}?> >Right</option>
742
- <option value="none" <?php if (get_option('smooth_slider_img_align') == "none"){ echo "selected";}?> >Center</option>
743
  </select>
744
  </td>
745
  </tr>
746
 
747
- <tr valign="top">
748
- <th scope="row">Height</th>
749
- <td><input type="text" name="smooth_slider_img_height" id="smooth_slider_img_height" class="small-text" value="<?php echo get_option('smooth_slider_img_height'); ?>" />&nbsp;px</td>
750
- </tr>
751
-
752
- <tr valign="top">
753
- <th scope="row">Width</th>
754
- <td><input type="text" name="smooth_slider_img_width" id="smooth_slider_img_width" class="small-text" value="<?php echo get_option('smooth_slider_img_width'); ?>" />&nbsp;px</td>
755
- </tr>
 
 
756
 
757
  <tr valign="top">
758
  <th scope="row">Border Thickness</th>
759
- <td><input type="text" name="smooth_slider_img_border" id="smooth_slider_img_border" class="small-text" value="<?php echo get_option('smooth_slider_img_border'); ?>" />&nbsp;px &nbsp;(put 0 if no border is required)</td>
760
  </tr>
761
 
762
  <tr valign="top">
763
  <th scope="row">Border Color</th>
764
- <td><input type="text" name="smooth_slider_img_brcolor" id="color_value_4" value="<?php echo get_option('smooth_slider_img_brcolor'); ?>" />&nbsp; <img id="color_picker_4" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_4"></div></td>
765
  </tr>
766
 
 
 
 
 
767
  </table>
768
 
769
  <h2>Slider Content</h2>
770
  <p>Customize the looks of the content of each of the sliding post here</p>
771
  <table class="form-table">
772
-
773
  <tr valign="top">
774
  <th scope="row">Font</th>
775
- <td><select name="smooth_slider_content_font" id="smooth_slider_content_font" >
776
- <option value="Arial" <?php if (get_option('smooth_slider_content_font') == "Arial"){ echo "selected";}?> >Arial</option>
777
- <option value="Book Antiqua" <?php if (get_option('smooth_slider_content_font') == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
778
- <option value="Bookman Old Style" <?php if (get_option('smooth_slider_content_font') == "Bookman Old Style"){ echo "selected";}?> >Bookman Old Style</option>
779
- <option value="Calibri" <?php if (get_option('smooth_slider_content_font') == "Calibri"){ echo "selected";}?> >Calibri</option>
780
- <option value="Century Schoolbook" <?php if (get_option('smooth_slider_content_font') == "Century Schoolbook"){ echo "selected";}?> >Century Schoolbook</option>
781
- <option value="Courier New" <?php if (get_option('smooth_slider_content_font') == "Courier New"){ echo "selected";}?> >Courier New</option>
782
- <option value="Geneva" <?php if (get_option('smooth_slider_content_font') == "Geneva"){ echo "selected";}?> >Geneva</option>
783
- <option value="Georgia" <?php if (get_option('smooth_slider_content_font') == "Georgia"){ echo "selected";} ?> >Georgia</option>
784
- <option value="Helvetica" <?php if (get_option('smooth_slider_content_font') == "Helvetica"){ echo "selected";}?> >Helvetica</option>
785
- <option value="Monotype Corsiva" <?php if (get_option('smooth_slider_content_font') == "Monotype Corsiva"){ echo "selected";}?> >Monotype Corsiva</option>
786
- <option value="Times New Roman" <?php if (get_option('smooth_slider_content_font') == "Times New Roman"){ echo "selected";}?> >Times New Roman</option>
787
- <option value="Trebuchet MS" <?php if (get_option('smooth_slider_content_font') == "Trebuchet MS"){ echo "selected";}?> >Trebuchet MS</option>
788
  </select>
789
  </td>
790
  </tr>
791
 
792
  <tr valign="top">
793
  <th scope="row">Font Color</th>
794
- <td><input type="text" name="smooth_slider_content_fcolor" id="color_value_5" value="<?php echo get_option('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" /><div class="color-picker-wrap" id="colorbox_5"></div></td>
795
  </tr>
796
 
797
  <tr valign="top">
798
  <th scope="row">Font Size</th>
799
- <td><input type="text" name="smooth_slider_content_fsize" id="smooth_slider_content_fsize" class="small-text" value="<?php echo get_option('smooth_slider_content_fsize'); ?>" />&nbsp;px</td>
800
  </tr>
801
 
802
  <tr valign="top">
803
  <th scope="row">Font Style</th>
804
- <td><select name="smooth_slider_content_fstyle" id="smooth_slider_content_fstyle" >
805
- <option value="bold" <?php if (get_option('smooth_slider_content_fstyle') == "bold"){ echo "selected";}?> >Bold</option>
806
- <option value="bold italic" <?php if (get_option('smooth_slider_content_fstyle') == "bold italic"){ echo "selected";}?> >Bold Italic</option>
807
- <option value="italic" <?php if (get_option('smooth_slider_content_fstyle') == "italic"){ echo "selected";}?> >Italic</option>
808
- <option value="normal" <?php if (get_option('smooth_slider_content_fstyle') == "normal"){ echo "selected";}?> >Normal</option>
809
  </select>
810
  </td>
811
  </tr>
812
 
813
  <tr valign="top">
814
  <th scope="row">Pick content From</th>
815
- <td><select name="smooth_slider_content_from" id="smooth_slider_content_from" >
816
- <option value="slider_content" <?php if (get_option('smooth_slider_content_from') == "slider_content"){ echo "selected";}?> >Slider Content Custom field</option>
817
- <option value="excerpt" <?php if (get_option('smooth_slider_content_from') == "excerpt"){ echo "selected";}?> >Post Excerpt</option>
818
- <option value="content" <?php if (get_option('smooth_slider_content_from') == "content"){ echo "selected";}?> >From Content</option>
819
  </select>
820
  </td>
821
  </tr>
822
 
823
  <tr valign="top">
824
  <th scope="row">Maximum content size</th>
825
- <td><input type="text" name="smooth_slider_content_chars" id="smooth_slider_content_chars" class="small-text" value="<?php echo get_option('smooth_slider_content_chars'); ?>" />&nbsp;characters &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
826
  </tr>
827
 
828
  </table>
829
 
830
  <h2>Miscellaneous</h2>
831
- <p>Check the appropriate box for the action, be sure you want to do this!</p>
832
- <p><label for="smooth_slider_clear" style="font-weight:bolder;color:#990000;font-size:small;"><input name="smooth_slider_clear" type="checkbox" id="smooth_slider_clear" value="1" <?php checked('1', get_option('smooth_slider_clear')); ?> /> Remove all the posts from Smooth Slider</label></p>
833
- <p><label for="smooth_slider_image_only" style="font-weight:bolder;color:#990000;font-size:small;"><input name="smooth_slider_image_only" type="checkbox" id="smooth_slider_image_only" value="1" <?php checked('1', get_option('smooth_slider_image_only')); ?> /> Make pure Image Slider</label></p>
834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
835
  <p class="submit">
836
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
837
  </p>
838
- <?php check_admin_referer('smooth-slider-group-options');?>
839
  </div> <!--end of float left -->
840
-
841
  </div> <!--end of poststuff -->
842
  </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  </div> <!--end of float wrap -->
844
  <?php
845
  }
846
  function register_mysettings() { // whitelist options
847
- register_setting( 'smooth-slider-group', 'smooth_slider_speed' );
848
- register_setting( 'smooth-slider-group', 'smooth_slider_no_posts' );
849
- register_setting( 'smooth-slider-group', 'smooth_slider_bg_color' );
850
- register_setting( 'smooth-slider-group', 'smooth_slider_height' );
851
- register_setting( 'smooth-slider-group', 'smooth_slider_width' );
852
- register_setting( 'smooth-slider-group', 'smooth_slider_border' );
853
- register_setting( 'smooth-slider-group', 'smooth_slider_brcolor' );
854
- register_setting( 'smooth-slider-group', 'smooth_slider_prev_next' );
855
- register_setting( 'smooth-slider-group', 'smooth_slider_goto_slide' );
856
- register_setting( 'smooth-slider-group', 'smooth_slider_title_text' );
857
- register_setting( 'smooth-slider-group', 'smooth_slider_title_font' );
858
- register_setting( 'smooth-slider-group', 'smooth_slider_title_fsize' );
859
- register_setting( 'smooth-slider-group', 'smooth_slider_title_fstyle' );
860
- register_setting( 'smooth-slider-group', 'smooth_slider_title_fcolor' );
861
- register_setting( 'smooth-slider-group', 'smooth_slider_ptitle_font' );
862
- register_setting( 'smooth-slider-group', 'smooth_slider_ptitle_fsize' );
863
- register_setting( 'smooth-slider-group', 'smooth_slider_ptitle_fstyle' );
864
- register_setting( 'smooth-slider-group', 'smooth_slider_ptitle_fcolor' );
865
- register_setting( 'smooth-slider-group', 'smooth_slider_img_align' );
866
- register_setting( 'smooth-slider-group', 'smooth_slider_img_height' );
867
- register_setting( 'smooth-slider-group', 'smooth_slider_img_width' );
868
- register_setting( 'smooth-slider-group', 'smooth_slider_img_border' );
869
- register_setting( 'smooth-slider-group', 'smooth_slider_img_brcolor' );
870
- register_setting( 'smooth-slider-group', 'smooth_slider_content_font' );
871
- register_setting( 'smooth-slider-group', 'smooth_slider_content_fsize' );
872
- register_setting( 'smooth-slider-group', 'smooth_slider_content_fstyle' );
873
- register_setting( 'smooth-slider-group', 'smooth_slider_content_fcolor' );
874
- register_setting( 'smooth-slider-group', 'smooth_slider_content_from' );
875
- register_setting( 'smooth-slider-group', 'smooth_slider_content_chars' );
876
- register_setting( 'smooth-slider-group', 'smooth_slider_bg' );
877
- register_setting( 'smooth-slider-group', 'smooth_slider_clear' );
878
- register_setting( 'smooth-slider-group', 'smooth_slider_image_only' );
879
  }
880
  ?>
3
  Plugin Name: Smooth Slider
4
  Plugin URI: http://www.clickonf5.org/smooth-slider
5
  Description: Smooth Slider adds a smooth content and image slideshow with customizable background and slide intervals to any location of your blog
6
+ Version: 2.0
7
  Author: Tejaswini Deshpande, Sanjeev Mishra
8
  Author URI: http://www.clickonf5.org
9
  Wordpress version supported: 2.7 and above
10
  */
11
 
12
+ /* Copyright 2009 Internet Techies (email : tedeshpa@gmail.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
28
  //Please visit Plugin page http://www.clickonf5.org/smooth-slider for Changelog
29
  //on activation
30
  function install_smooth_slider() {
 
31
  global $wpdb, $table_prefix;
 
32
  $table_name = $table_prefix.'slider';
 
33
  if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
34
  $sql = "CREATE TABLE $table_name (
35
  id mediumint(9) NOT NULL AUTO_INCREMENT,
38
  );";
39
  $rs = $wpdb->query($sql);
40
  }
41
+ // Need to delete the previously created options in old versions and create only one option field for Smooth Slider
42
+ if (!get_option('smooth_slider_speed')) {
43
+ $smooth_slider = array('speed'=>'7',
44
+ 'no_posts'=>'5',
45
+ 'bg_color'=>'#ffffff',
46
+ 'height'=>'200',
47
+ 'width'=>'450',
48
+ 'border'=>'1',
49
+ 'brcolor'=>'#999999',
50
+ 'prev_next'=>'1',
51
+ 'goto_slide'=>'1',
52
+ 'title_text'=>'Featured Posts',
53
+ 'title_font'=>'Georgia',
54
+ 'title_fsize'=>'20',
55
+ 'title_fstyle'=>'bold',
56
+ 'title_fcolor'=>'#000000',
57
+ 'ptitle_font'=>'Trebuchet MS',
58
+ 'ptitle_fsize'=>'14',
59
+ 'ptitle_fstyle'=>'bold',
60
+ 'ptitle_fcolor'=>'#000000',
61
+ 'img_align'=>'left',
62
+ 'img_height'=>'120',
63
+ 'img_width'=>'165',
64
+ 'img_border'=>'1',
65
+ 'img_brcolor'=>'#000000',
66
+ 'content_font'=>'Verdana',
67
+ 'content_fsize'=>'12',
68
+ 'content_fstyle'=>'normal',
69
+ 'content_fcolor'=>'#333333',
70
+ 'content_from'=>'content',
71
+ 'content_chars'=>'300',
72
+ 'bg'=>'0',
73
+ 'image_only'=>'0',
74
+ 'allowable_tags'=>'',
75
+ 'more'=>'Read More',
76
+ 'img_size'=>'1',
77
+ 'img_pick'=>'0',
78
+ 'user_level'=>'5',
79
+ 'custom_nav'=>''
80
+ );
81
+ }
82
+ else {
83
+ $smooth_slider = array('speed'=>get_option('smooth_slider_speed'),
84
+ 'no_posts'=>get_option('smooth_slider_no_posts'),
85
+ 'bg_color'=>get_option('smooth_slider_bg_color'),
86
+ 'height'=>get_option('smooth_slider_height'),
87
+ 'width'=>get_option('smooth_slider_width'),
88
+ 'border'=>get_option('smooth_slider_border'),
89
+ 'brcolor'=>get_option('smooth_slider_brcolor'),
90
+ 'prev_next'=>get_option('smooth_slider_prev_next'),
91
+ 'goto_slide'=>get_option('smooth_slider_goto_slide'),
92
+ 'title_text'=>get_option('smooth_slider_title_text'),
93
+ 'title_font'=>get_option('smooth_slider_title_font'),
94
+ 'title_fsize'=>get_option('smooth_slider_title_fsize'),
95
+ 'title_fstyle'=>get_option('smooth_slider_title_fstyle'),
96
+ 'title_fcolor'=>get_option('smooth_slider_title_fcolor'),
97
+ 'ptitle_font'=>get_option('smooth_slider_ptitle_font'),
98
+ 'ptitle_fsize'=>get_option('smooth_slider_ptitle_fsize'),
99
+ 'ptitle_fstyle'=>get_option('smooth_slider_ptitle_fstyle'),
100
+ 'ptitle_fcolor'=>get_option('smooth_slider_ptitle_fcolor'),
101
+ 'img_align'=>get_option('smooth_slider_img_align'),
102
+ 'img_height'=>get_option('smooth_slider_img_height'),
103
+ 'img_width'=>get_option('smooth_slider_img_width'),
104
+ 'img_border'=>get_option('smooth_slider_img_border'),
105
+ 'img_brcolor'=>get_option('smooth_slider_img_brcolor'),
106
+ 'content_font'=>get_option('smooth_slider_content_font'),
107
+ 'content_fsize'=>get_option('smooth_slider_content_fsize'),
108
+ 'content_fstyle'=>get_option('smooth_slider_content_fstyle'),
109
+ 'content_fcolor'=>get_option('smooth_slider_content_fcolor'),
110
+ 'content_from'=>get_option('smooth_slider_content_from'),
111
+ 'content_chars'=>get_option('smooth_slider_content_chars'),
112
+ 'bg'=>get_option('smooth_slider_bg'),
113
+ 'image_only'=>get_option('smooth_slider_image_only'),
114
+ 'allowable_tags'=>'',
115
+ 'more'=>'Read More',
116
+ 'img_size'=>'1',
117
+ 'img_pick'=>'0',
118
+ 'user_level'=>'5',
119
+ 'custom_nav'=>''
120
+ );
121
+ delete_option('smooth_slider_speed');
122
+ delete_option('smooth_slider_no_posts');
123
+ delete_option('smooth_slider_bg_color');
124
+ delete_option('smooth_slider_height');
125
+ delete_option('smooth_slider_width');
126
+ delete_option('smooth_slider_border');
127
+ delete_option('smooth_slider_brcolor');
128
+ delete_option('smooth_slider_prev_next');
129
+ delete_option('smooth_slider_goto_slide');
130
+ delete_option('smooth_slider_title_text');
131
+ delete_option('smooth_slider_title_font');
132
+ delete_option('smooth_slider_title_fsize');
133
+ delete_option('smooth_slider_title_fstyle');
134
+ delete_option('smooth_slider_title_fcolor');
135
+ delete_option('smooth_slider_ptitle_font');
136
+ delete_option('smooth_slider_ptitle_fsize');
137
+ delete_option('smooth_slider_ptitle_fstyle');
138
+ delete_option('smooth_slider_ptitle_fcolor');
139
+ delete_option('smooth_slider_img_align');
140
+ delete_option('smooth_slider_img_height');
141
+ delete_option('smooth_slider_img_width');
142
+ delete_option('smooth_slider_img_border');
143
+ delete_option('smooth_slider_img_brcolor');
144
+ delete_option('smooth_slider_content_font');
145
+ delete_option('smooth_slider_content_fsize');
146
+ delete_option('smooth_slider_content_fstyle');
147
+ delete_option('smooth_slider_content_fcolor');
148
+ delete_option('smooth_slider_content_from');
149
+ delete_option('smooth_slider_content_chars');
150
+ delete_option('smooth_slider_bg');
151
+ delete_option('smooth_slider_clear');
152
+ delete_option('smooth_slider_image_only');
153
+ }
154
+ add_option('smooth_slider_options',$smooth_slider);
155
  }
156
+ register_activation_hook( __FILE__, 'install_smooth_slider' );
157
+ //defined global variables and constants here
158
+ global $smooth_slider;
159
+ $smooth_slider = get_option('smooth_slider_options');
160
+ define("SMOOTH_SLIDER_VER","2.0",false);
161
 
162
  //This adds the post to the slider
163
  function add_to_slider($post_id) {
200
 
201
  // Slider checkbox on the admin page
202
  function add_to_slider_checkbox() {
203
+ global $post, $current_user, $smooth_slider;
204
+ get_currentuserinfo();
 
 
 
 
 
 
205
 
206
+ if ($current_user->allcaps['level_' . $smooth_slider['user_level']]) {
207
+ $extra = "";
208
+
209
+ if(isset($post->ID)) {
210
+ $post_id = $post->ID;
211
+ if(slider($post_id)) { $extra = 'checked="checked"'; }
212
+ }
213
+
214
+ echo '<div id="slider_checkbox">
215
+ <input type="checkbox" class="sldr_post" name="slider" value="slider" '.$extra.' />
216
+ <label for="slider">Add this post/page to Smooth Slider</label>
217
+ <input type="hidden" name="sldr-verify" id="sldr-verify" value="'.wp_create_nonce('SmoothSlider').'" />
218
+ </div>';
219
+ }
220
  }
221
 
222
  //CSS for the checkbox on the admin page
225
  <?php
226
  }
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  add_action('admin_head', 'slider_checkbox_css');
229
  add_action('simple_edit_form', 'add_to_slider_checkbox');
230
  add_action('edit_form_advanced', 'add_to_slider_checkbox');
231
+ add_action('edit_page_form', 'add_to_slider_checkbox');
232
  add_action('publish_post', 'add_to_slider');
233
+ add_action('publish_page', 'add_to_slider');
234
  add_action('edit_post', 'add_to_slider');
235
  add_action('publish_post', 'remove_from_slider');
236
  add_action('edit_post', 'remove_from_slider');
237
+
238
 
239
  function smooth_slider_plugin_url( $path = '' ) {
240
  global $wp_version;
264
  }
265
  }
266
 
267
+ function smooth_slider_get_first_image($post) {
268
+ $first_img = '';
269
+ ob_start();
270
+ ob_end_clean();
271
+ $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
272
+ $first_img = $matches [1] [0];
273
+ return $first_img;
274
+ }
275
+
276
  function carousel_posts_on_slider($max_posts, $offset=0) {
277
+ global $smooth_slider;
 
278
  global $wpdb, $table_prefix;
279
  $table_name = $table_prefix."slider";
280
 
281
  $posts = $wpdb->get_results("SELECT * FROM $table_name ORDER BY date DESC LIMIT $offset, $max_posts", OBJECT);
282
 
283
  $html = '';
284
+ $smooth_sldr_j = 0;
285
 
286
 
287
  foreach($posts as $post) {
288
+ $smooth_sldr_j++;
289
  $id = $post->id;
290
  $posts_table = $table_prefix.'posts';
291
  $sql_post = "SELECT * FROM $posts_table WHERE ID = $id";
303
  <!-- smooth_slideri -->';
304
 
305
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
306
+ $image_control = get_post_meta($post_id, 'slider_image_control', true);
307
 
308
+ if ($smooth_slider['content_from'] == "slider_content") {
309
  $slider_content = get_post_meta($post_id, 'slider_content', true);
310
  }
311
+ if ($smooth_slider['content_from'] == "excerpt") {
312
  $slider_content = $data->post_excerpt;
313
  }
314
 
315
  $slider_content = stripslashes($slider_content);
316
  $slider_content = str_replace(']]>', ']]&gt;', $slider_content);
317
+
318
+ $slider_content = str_replace("\n","<br />",$slider_content);
319
+ $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
320
+
321
+ if ( !isset($image_control) or empty($image_control) or $image_control != "x"){
322
+ if ($smooth_slider['img_pick'] == '1') {
323
+ $first_image = smooth_slider_get_first_image($data);
324
+ if(!empty($first_image)){
325
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
326
+ }
327
+ else {
328
+ if( isset($thumbnail) && !empty($thumbnail) ):
329
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
330
+ endif;
331
+ }
332
+ }
333
+ else {
334
+ if( isset($thumbnail) && !empty($thumbnail) ):
335
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
336
+ endif;
337
+ }
338
+ }
339
 
340
+ if ($smooth_slider['image_only'] == '1') {
341
  $html .= '<!-- /smooth_slideri -->
342
  </div>';
343
  }
344
  else {
345
+ $html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.substr($slider_content,0,$smooth_slider['content_chars']).'</span>
346
+ <p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
347
 
348
  <!-- /smooth_slideri -->
349
  </div>';
350
  }
351
  }
352
  echo $html;
353
+ return $smooth_sldr_j;
354
+ }
355
+
356
+ function carousel_posts_on_slider_cat($max_posts, $catg_slug, $offset=0) {
357
+ global $smooth_slider;
358
+ global $wpdb, $table_prefix;
359
+ $table_name = $table_prefix."slider";
360
+
361
+ $myposts = $wpdb->get_results("SELECT id FROM $table_name ORDER BY date DESC", OBJECT);
362
+
363
+ $html = '';
364
+ $smooth_sldr_i = 0;
365
+
366
+ if (!empty($catg_slug)) {
367
+ $category = get_category_by_slug($catg_slug);
368
+ $slider_cat = $category->term_id;
369
+ }
370
+ else {
371
+ $category = get_the_category();
372
+ $slider_cat = $category[0]->cat_ID;
373
+ }
374
+
375
+ foreach($myposts as $mypost) {
376
+ $post = get_post($mypost->id);
377
+ $post_cats_arr = get_the_category($post->ID);
378
+
379
+ $post_cats = array();
380
+ foreach($post_cats_arr as $post_cat_arr) {
381
+ $post_cats[] = $post_cat_arr->cat_ID;
382
+ }
383
+
384
+ if (in_array($slider_cat,$post_cats) or is_home() or (is_paged() and !is_category()) or is_tag() or is_author() or (is_archive() and !is_category()))
385
+ {
386
+ $smooth_sldr_i++;
387
+
388
+ $post_title = stripslashes($post->post_title);
389
+ $post_title = str_replace('"', '', $post_title);
390
+ $slider_content = $post->post_content;
391
+
392
+ $permalink = get_permalink($post->ID);
393
+
394
+ $post_id = $post->ID;
395
+ $html .= '<div class="smooth_slideri">
396
+ <!-- smooth_slideri -->';
397
+
398
+ $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
399
+
400
+ if ($smooth_slider['content_from'] == "slider_content") {
401
+ $slider_content = get_post_meta($post_id, 'slider_content', true);
402
+ }
403
+ if ($smooth_slider['content_from'] == "excerpt") {
404
+ $slider_content = $post->post_excerpt;
405
+ }
406
+
407
+ $slider_content = stripslashes($slider_content);
408
+ $slider_content = str_replace(']]>', ']]&gt;', $slider_content);
409
+
410
+ $slider_content = str_replace("\n","<br />",$slider_content);
411
+ $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
412
+
413
+ if ($smooth_slider['img_pick'] == '1') {
414
+ $first_image = smooth_slider_get_first_image($post);
415
+ if(!empty($first_image)){
416
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
417
+ }
418
+ }
419
+ else {
420
+ if( isset($thumbnail) && !empty($thumbnail) ):
421
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
422
+ endif;
423
+ }
424
+
425
+ if ($smooth_slider['image_only'] == '1') {
426
+ $html .= '<!-- /smooth_slideri -->
427
+ </div>';
428
+ }
429
+ else {
430
+ $html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.substr($slider_content,0,$smooth_slider['content_chars']).'</span>
431
+ <p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
432
+
433
+ <!-- /smooth_slideri -->
434
+ </div>';
435
+ }
436
+ }
437
+ if ($smooth_sldr_i >= $max_posts)
438
+ { break; }
439
+ }
440
+ echo $html;
441
+ return $smooth_sldr_i;
442
+ }
443
+
444
+ function smooth_slider_wpmu_carousel_posts($max_posts, $offset=0) {
445
+ global $smooth_slider;
446
+ global $wpdb, $table_prefix, $blog_id;
447
+
448
+ $html = '';
449
+ $smooth_sldr_k = 0;
450
+
451
+ $blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered ASC", $wpdb->siteid), ARRAY_A );
452
+ foreach($blogs as $details) {
453
+
454
+ $table_name = $wpdb->base_prefix.$details['blog_id']."_slider";
455
+
456
+ $myposts = $wpdb->get_results("SELECT id FROM $table_name ORDER BY date DESC", OBJECT);
457
+
458
+ foreach($myposts as $mypost) {
459
+ $posts_table = $wpdb->base_prefix.$details['blog_id']."_posts";
460
+ $id = $mypost->id;
461
+ $post = $wpdb->get_row("SELECT * FROM $posts_table WHERE ID = $id", OBJECT);
462
+ $smooth_sldr_k++;
463
+
464
+ $post_title = stripslashes($post->post_title);
465
+ $post_title = str_replace('"', '', $post_title);
466
+ $slider_content = $post->post_content;
467
+
468
+ $permalink = get_permalink($post->ID);
469
+
470
+ $post_id = $post->ID;
471
+ $html .= '<div class="smooth_slideri">
472
+ <!-- smooth_slideri -->';
473
+
474
+ $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
475
+
476
+ if ($smooth_slider['content_from'] == "slider_content") {
477
+ $slider_content = get_post_meta($post_id, 'slider_content', true);
478
+ }
479
+ if ($smooth_slider['content_from'] == "excerpt") {
480
+ $slider_content = $post->post_excerpt;
481
+ }
482
+
483
+ $slider_content = stripslashes($slider_content);
484
+ $slider_content = str_replace(']]>', ']]&gt;', $slider_content);
485
+
486
+ $slider_content = str_replace("\n","<br />",$slider_content);
487
+ $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
488
+
489
+ if ($smooth_slider['img_pick'] == '1') {
490
+ $first_image = smooth_slider_get_first_image($post);
491
+ if(!empty($first_image)){
492
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
493
+ }
494
+ }
495
+ else {
496
+ if( isset($thumbnail) && !empty($thumbnail) ):
497
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
498
+ endif;
499
+ }
500
+
501
+ if ($smooth_slider['image_only'] == '1') {
502
+ $html .= '<!-- /smooth_slideri -->
503
+ </div>';
504
+ }
505
+ else {
506
+ $html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.substr($slider_content,0,$smooth_slider['content_chars']).'</span>
507
+ <p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
508
+
509
+ <!-- /smooth_slideri -->
510
+ </div>';
511
+ }
512
+ if ($smooth_sldr_k >= $max_posts)
513
+ { break; }
514
+ }
515
+
516
+ if ($smooth_sldr_k >= $max_posts)
517
+ { break; }
518
+ }
519
+ echo $html;
520
+ return $smooth_sldr_k;
521
  }
522
 
523
  function smooth_slider_css() {
524
+ global $smooth_slider;
525
  ?>
526
+ <style type="text/css" media="screen">#smooth_sldr{width:<?php echo $smooth_slider['width']; ?>px;height:<?php echo $smooth_slider['height']; ?>px;background-color:<?php if ($smooth_slider['bg'] == '1') { echo "transparent";} else { echo $smooth_slider['bg_color']; } ?>;border:<?php echo $smooth_slider['border']; ?>px solid <?php echo $smooth_slider['brcolor']; ?>;}#smooth_sldr_items{padding:10px <?php if ($smooth_slider['prev_next'] == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sliderc{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 44);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.smooth_slideri{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 54);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.sldr_title{font-family:<?php echo $smooth_slider['title_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['title_fsize']; ?>px;font-weight:<?php if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['title_fcolor']; ?>;}#smooth_sldr_body h2{line-height:<?php echo ($smooth_slider['ptitle_fsize'] + 3); ?>px;font-family:<?php echo $smooth_slider['ptitle_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['ptitle_fsize']; ?>px;font-weight:<?php if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;}#smooth_sldr_body h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}#smooth_sldr_body span{font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-weight:<?php if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['content_fcolor']; ?>;}.smooth_slider_thumbnail{float:<?php echo $smooth_slider['img_align']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if($smooth_slider['img_align'] == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if($smooth_slider['img_align'] == "right") {echo "5";} else {echo "0";} ?>px;<?php if ($smooth_slider['img_size'] == 1) { ?>width:<?php echo $smooth_slider['img_width']; ?>px;height:<?php echo $smooth_slider['img_height']; ?>px;<?php } ?> border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}#smooth_sldr_body p.more a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;}#smooth_sliderc_nav li{border:1px solid <?php echo $smooth_slider['content_fcolor']; ?>;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "25";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?>;}</style>
527
  <?php
528
  }
529
 
530
  add_action('wp_head', 'smooth_slider_css');
531
 
532
  function smooth_slider_enqueue_scripts() {
533
+ // wp_register_script('jquery', false, false, false, false);
534
  wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
535
+ array('jquery'), SMOOTH_SLIDER_VER, false);
536
+ wp_enqueue_style( 'smooth_slider_css', smooth_slider_plugin_url( 'css/smooth-slider.css' ),
537
+ false, SMOOTH_SLIDER_VER, 'all');
538
  }
539
 
540
  add_action( 'init', 'smooth_slider_enqueue_scripts' );
541
 
542
  function get_smooth_slider() {
543
+ global $smooth_slider;
544
+ ?>
545
+ <script type="text/javascript">
546
+ stepcarousel.setup({
547
+ galleryid: 'smooth_sliderc', //id of carousel DIV
548
+ beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
549
+ panelclass: 'smooth_slideri', //class of panel DIVs each holding content
550
+ autostep: {enable: true, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
551
+ panelbehavior: {speed:500, wraparound:false, persist:false},
552
+ defaultbuttons: {enable: <?php if ($smooth_slider['prev_next'] == 1) {echo "true";} else {echo "false";} ?>, moveby: 1, leftnav: ['<?php echo smooth_slider_plugin_url( 'images/button_prev.png' ); ?>', -25, <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $smooth_slider['content_fsize'] + 5 + 18; } else { $extra_height = $smooth_slider['content_fsize'] + 5 + 5 + 18; } echo (($smooth_slider['height'] - $extra_height)/2); ?>], rightnav: ['<?php echo smooth_slider_plugin_url( 'images/button_next.png' ); ?>', 0, <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $smooth_slider['content_fsize'] + 5 + 18; } else { $extra_height = $smooth_slider['content_fsize'] + 5 + 5 + 18; } echo (($smooth_slider['height'] - $extra_height)/2); ?>]},
553
+ statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
554
+ contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
555
+ onslide:function(){
556
+ jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
557
+ jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
558
+ var curr_slide = imageA;
559
+ jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
560
+ jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
561
+
562
+ <?php if ($smooth_slider['goto_slide'] == 2) {
563
+ list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");
564
+ global $sldr_nav_width;
565
+ $sldr_nav_width = $width/2;
566
+ ?>
567
+ var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
568
+ jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
569
+ jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
570
+ <?php } ?>
571
+
572
+ }
573
+ })
574
+ </script>
575
+ <noscript><strong>This page is having a slideshow that uses Javascript. Your browser either doesn't support Javascript or you have it turned off. To see this page as it is meant to appear please use a Javascript enabled browser.</strong></noscript>
576
+ <div id="smooth_sldr">
577
+ <div id="smooth_sldr_items">
578
+ <div id="smooth_sldr_body">
579
+ <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
580
+ <div id="smooth_sliderc">
581
+ <div class="smooth_sliderb">
582
+ <?php global $smooth_sldr_j; $smooth_sldr_j = carousel_posts_on_slider($smooth_slider['no_posts']); ?>
583
+ </div>
584
+ </div>
585
+ </div>
586
+ <?php if ($smooth_slider['goto_slide'] == 1) { ?>
587
+ <ul id="smooth_sliderc_nav">
588
+ <?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
589
+ echo "<li><a id=\"sldr".$i."\" href=\"#\" >".$i."</a></li>\n";
590
+ } ?>
591
+ </ul>
592
+ <?php }
593
+ if ($smooth_slider['goto_slide'] == 2) { ?>
594
+ <div id="smooth_sliderc_nav">
595
+ <?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
596
+ list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide".$i.".png");
597
+ $width = $width/2;
598
+ echo "<a class=\"smooth_sliderc_nav\" id=\"sldr".$i."\" style=\"background-image:url(".smooth_slider_plugin_url( 'images/' )."slide".$i.".png);background-position:0 0;width:".$width."px;height:".$height."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
599
+ } ?>
600
+ </div>
601
+ <?php }
602
+ if ($smooth_slider['goto_slide'] == 3) { ?>
603
+ <div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
604
+ <?php } ?>
605
+ <br class="sldrbr" />
606
+ <div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
607
+ </div>
608
+ </div>
609
+ <script type="text/javascript">
610
+ jQuery(document).ready(function(){
611
+ jQuery('#smooth_sliderc_nav a').click(function() {
612
+ var id = jQuery(this).attr('id');
613
+ var step_to_slide = id.replace(/sldr/, "");
614
+ document.getElementById(id).href = "javascript:stepcarousel.stepTo('smooth_sliderc', "+step_to_slide+")";
615
+ });
616
+ });
617
+ </script>
618
+ <?php
619
+ }
620
+
621
+ //Smooth Slider template tag to get the Category specific posts in the slider.
622
+ function get_smooth_slider_cat($catg_slug) {
623
+ global $smooth_slider;
624
+ ?>
625
+ <script type="text/javascript">
626
+ stepcarousel.setup({
627
+ galleryid: 'smooth_sliderc', //id of carousel DIV
628
+ beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
629
+ panelclass: 'smooth_slideri', //class of panel DIVs each holding content
630
+ autostep: {enable: true, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
631
+ panelbehavior: {speed:500, wraparound:false, persist:false},
632
+ defaultbuttons: {enable: <?php if ($smooth_slider['prev_next'] == 1) {echo "true";} else {echo "false";} ?>, moveby: 1, leftnav: ['<?php echo smooth_slider_plugin_url( 'images/button_prev.png' ); ?>', -25, <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $smooth_slider['content_fsize'] + 5 + 18; } else { $extra_height = $smooth_slider['content_fsize'] + 5 + 5 + 18; } echo (($smooth_slider['height'] - $extra_height)/2); ?>], rightnav: ['<?php echo smooth_slider_plugin_url( 'images/button_next.png' ); ?>', 0, <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $smooth_slider['content_fsize'] + 5 + 18; } else { $extra_height = $smooth_slider['content_fsize'] + 5 + 5 + 18; } echo (($smooth_slider['height'] - $extra_height)/2); ?>]},
633
+ statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
634
+ contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
635
+ onslide:function(){
636
+ jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
637
+ jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
638
+ var curr_slide = imageA;
639
+ jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
640
+ jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
641
+
642
+ <?php if ($smooth_slider['goto_slide'] == 2) {
643
+ list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");
644
+ global $sldr_nav_width;
645
+ $sldr_nav_width = $width/2;
646
+ ?>
647
+ var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
648
+ jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
649
+ jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
650
+ <?php } ?>
651
+
652
+ }
653
+ })
654
+ </script>
655
+ <noscript><strong>This page is having a slideshow that uses Javascript. Your browser either doesn't support Javascript or you have it turned off. To see this page as it is meant to appear please use a Javascript enabled browser.</strong></noscript>
656
+ <div id="smooth_sldr">
657
+ <div id="smooth_sldr_items">
658
+ <div id="smooth_sldr_body">
659
+ <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
660
+ <div id="smooth_sliderc">
661
+ <div class="smooth_sliderb">
662
+ <?php global $smooth_sldr_i; $smooth_sldr_i = carousel_posts_on_slider_cat($smooth_slider['no_posts'], $catg_slug); ?>
663
+ </div>
664
+ </div>
665
+ </div>
666
+ <?php if ($smooth_slider['goto_slide'] == 1) { ?>
667
+ <ul id="smooth_sliderc_nav">
668
+ <?php global $smooth_sldr_i; for($i=1; $i<=$smooth_sldr_i; $i++) {
669
+ echo "<li><a id=\"sldr".$i."\" href=\"#\" >".$i."</a></li>\n";
670
+ } ?>
671
+ </ul>
672
+ <?php }
673
+ if ($smooth_slider['goto_slide'] == 2) { ?>
674
+ <div id="smooth_sliderc_nav">
675
+ <?php global $smooth_sldr_i; for($i=1; $i<=$smooth_sldr_i; $i++) {
676
+ list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide".$i.".png");
677
+ $width = $width/2;
678
+ echo "<a class=\"smooth_sliderc_nav\" id=\"sldr".$i."\" style=\"background-image:url(".smooth_slider_plugin_url( 'images/' )."slide".$i.".png);background-position:0 0;width:".$width."px;height:".$height."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
679
+ } ?>
680
+ </div>
681
+ <?php }
682
+ if ($smooth_slider['goto_slide'] == 3) { ?>
683
+ <div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
684
+ <?php } ?>
685
+ <br class="sldrbr" />
686
+ <div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
687
+ </div>
688
+ </div>
689
+ <script type="text/javascript">
690
+ jQuery(document).ready(function(){
691
+ jQuery('#smooth_sliderc_nav a').click(function() {
692
+ var id = jQuery(this).attr('id');
693
+ var step_to_slide = id.replace(/sldr/, "");
694
+ document.getElementById(id).href = "javascript:stepcarousel.stepTo('smooth_sliderc', "+step_to_slide+")";
695
+ });
696
+ });
697
+ </script>
698
+ <?php
699
+ }
700
 
701
+ //Smooth Slider especially for WPMU sites, to get the slider posts on the overall WPMU site
702
+ function get_smooth_slider_wpmu_all() {
703
+ global $smooth_slider;
704
  ?>
705
  <script type="text/javascript">
706
  stepcarousel.setup({
707
  galleryid: 'smooth_sliderc', //id of carousel DIV
708
  beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
709
  panelclass: 'smooth_slideri', //class of panel DIVs each holding content
710
+ autostep: {enable: true, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
711
  panelbehavior: {speed:500, wraparound:false, persist:false},
712
+ defaultbuttons: {enable: <?php if ($smooth_slider['prev_next'] == 1) {echo "true";} else {echo "false";} ?>, moveby: 1, leftnav: ['<?php echo smooth_slider_plugin_url( 'images/button_prev.png' ); ?>', -25, <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $smooth_slider['content_fsize'] + 5 + 18; } else { $extra_height = $smooth_slider['content_fsize'] + 5 + 5 + 18; } echo (($smooth_slider['height'] - $extra_height)/2); ?>], rightnav: ['<?php echo smooth_slider_plugin_url( 'images/button_next.png' ); ?>', 0, <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $smooth_slider['content_fsize'] + 5 + 18; } else { $extra_height = $smooth_slider['content_fsize'] + 5 + 5 + 18; } echo (($smooth_slider['height'] - $extra_height)/2); ?>]},
713
  statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
714
  contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
715
  onslide:function(){
716
  jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
717
+ jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
718
  var curr_slide = imageA;
719
  jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
720
+ jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
721
 
722
+ <?php if ($smooth_slider['goto_slide'] == 2) {
723
  list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");
724
  global $sldr_nav_width;
725
  $sldr_nav_width = $width/2;
736
  <div id="smooth_sldr">
737
  <div id="smooth_sldr_items">
738
  <div id="smooth_sldr_body">
739
+ <?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
740
  <div id="smooth_sliderc">
741
  <div class="smooth_sliderb">
742
+ <?php global $smooth_sldr_k; $smooth_sldr_k = smooth_slider_wpmu_carousel_posts($smooth_slider['no_posts']); ?>
743
  </div>
744
  </div>
745
  </div>
746
+ <?php if ($smooth_slider['goto_slide'] == 1) { ?>
747
  <ul id="smooth_sliderc_nav">
748
+ <?php global $smooth_sldr_k; for($i=1; $i<=$smooth_sldr_k; $i++) {
749
  echo "<li><a id=\"sldr".$i."\" href=\"#\" >".$i."</a></li>\n";
750
  } ?>
751
  </ul>
752
  <?php }
753
+ if ($smooth_slider['goto_slide'] == 2) { ?>
754
  <div id="smooth_sliderc_nav">
755
+ <?php global $smooth_sldr_k; for($i=1; $i<=$smooth_sldr_k; $i++) {
756
  list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide".$i.".png");
757
  $width = $width/2;
758
  echo "<a class=\"smooth_sliderc_nav\" id=\"sldr".$i."\" style=\"background-image:url(".smooth_slider_plugin_url( 'images/' )."slide".$i.".png);background-position:0 0;width:".$width."px;height:".$height."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
759
  } ?>
760
  </div>
761
+ <?php }
762
+ if ($smooth_slider['goto_slide'] == 3) { ?>
763
+ <div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
764
+ <?php } ?>
765
  <br class="sldrbr" />
766
  <div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
767
  </div>
786
 
787
  function smooth_slider_admin_scripts() {
788
  if ( is_admin() ){ // admin actions
 
789
  // Settings page only
790
  if ( isset($_GET['page']) && 'smooth-slider.php' == $_GET['page'] ) {
791
  wp_register_script('jquery', false, false, false, false);
792
  wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
793
+ array('jquery'), SMOOTH_SLIDER_VER, false);
794
+ wp_enqueue_style( 'smooth_slider_css', smooth_slider_plugin_url( 'css/smooth-slider.css' ),
795
+ false, SMOOTH_SLIDER_VER, 'all');
796
  }
797
  }
798
  }
800
  add_action( 'admin_init', 'smooth_slider_admin_scripts' );
801
 
802
  function smooth_slider_admin_head() {
803
+ global $smooth_slider;
804
  if ( is_admin() ){ // admin actions
805
 
806
  // Settings page only
912
  jQuery(document).mouseup(function(){
913
  colorpick_6 = false;
914
  });
915
+ jQuery('#sldr_close').click(function () {
916
+ jQuery('#sldr_message').fadeOut("slow");
917
+ });
918
  });
919
+ function confirmRemove()
920
+ {
921
+ var agree=confirm("This will remove selected Posts/Pages from Slider.");
922
+ if (agree)
923
+ return true ;
924
+ else
925
+ return false ;
926
+ }
927
+ function confirmRemoveAll()
928
+ {
929
+ var agree=confirm("Remove all Posts/Pages from Smooth Slider??");
930
+ if (agree)
931
+ return true ;
932
+ else
933
+ return false ;
934
+ }
935
  </script>
936
  <style type="text/css">
937
  .color-picker-wrap {
942
  padding: 3px;
943
  z-index: 1000;
944
  }
945
+ #divFeedityWidget span[style] {
946
+ display:none !important;
947
+ }
948
+ #sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
949
+ #sldr_close {float:right;}
950
  </style>
951
+ <style type="text/css" media="screen">#smooth_sldr{width:<?php echo $smooth_slider['width']; ?>px;height:<?php echo $smooth_slider['height']; ?>px;background-color:<?php if ($smooth_slider['bg'] == '1') { echo "transparent";} else { echo $smooth_slider['bg_color']; } ?>;border:<?php echo $smooth_slider['border']; ?>px solid <?php echo $smooth_slider['brcolor']; ?>;}#smooth_sldr_items{padding:10px <?php if ($smooth_slider['prev_next'] == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sliderc{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 44);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.smooth_slideri{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 54);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.sldr_title{font-family:<?php echo $smooth_slider['title_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['title_fsize']; ?>px;font-weight:<?php if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['title_fcolor']; ?>;}#smooth_sldr_body h2{line-height:<?php echo ($smooth_slider['ptitle_fsize'] + 3); ?>px;font-family:<?php echo $smooth_slider['ptitle_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['ptitle_fsize']; ?>px;font-weight:<?php if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;}#smooth_sldr_body h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}#smooth_sldr_body span{font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-weight:<?php if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['content_fcolor']; ?>;}.smooth_slider_thumbnail{float:<?php echo $smooth_slider['img_align']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if($smooth_slider['img_align'] == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if($smooth_slider['img_align'] == "right") {echo "5";} else {echo "0";} ?>px;<?php if ($smooth_slider['img_size'] == 1) { ?>width:<?php echo $smooth_slider['img_width']; ?>px;height:<?php echo $smooth_slider['img_height']; ?>px;<?php } ?> border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}#smooth_sldr_body p.more a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;}#smooth_sliderc_nav li{border:1px solid <?php echo $smooth_slider['content_fcolor']; ?>;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "25";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?>;}</style>
 
952
  <?php
953
  } //for smooth slider option page
954
  }//only for admin
964
 
965
  // This function displays the page content for the Smooth Slider Options submenu
966
  function smooth_slider_settings_page() {
967
+ global $smooth_slider;
968
+ // displaying plugin version info
969
+ require_once(ABSPATH.'/wp-admin/includes/plugin-install.php');
970
+ $plug_api = plugins_api('plugin_information', array('slug' => sanitize_title('Smooth Slider') ));
971
+ if ( is_wp_error($plug_api) ) {
972
+ wp_die($plug_api);
973
+ }
974
  ?>
975
+
976
  <div class="wrap">
977
+ <?php
978
+ if (SMOOTH_SLIDER_VER != $plug_api->version) {
979
+ echo '<div id="sldr_message">A new version Smooth Slider (version '.$plug_api->version.') is available. Please upgrade to enjoy all available features.<img id="sldr_close" src="'.smooth_slider_plugin_url( 'images/close.jpg' ).'" /></div>';
980
+ }
981
+ ?>
982
+ <h2 style="float:left;">Smooth Slider Options </h2>
983
+ <form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
984
+ <input type="hidden" name="cmd" value="_s-xclick">
985
+ <input type="hidden" name="hosted_button_id" value="8046056">
986
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
987
+ <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
988
+ </form>
989
 
990
+ <form style="clear:both;" method="post" action="options.php">
991
  <div id="poststuff" class="metabox-holder has-right-sidebar" >
992
  <div id="side-info-column" class="inner-sidebar">
993
  <div class="postbox">
998
  <li><a href="http://www.clickonf5.org" title="Visit Internet Techies" >Plugin Parent Site</a></li>
999
  <li><a href="http://www.clickonf5.org/phpbb/smooth-slider-f12/" title="Support Forum for Smooth Slider" >Support Forum</a></li>
1000
  <li><a href="http://www.clickonf5.org/about/tejaswini" title="Smooth Slider Author Page" >About the Author</a></li>
1001
+ <li><a href="http://wordpress.org/extend/plugins/smooth-slider/stats/">Status:Downloaded <strong><?php echo $plug_api->downloaded; ?></strong> times</a></li>
1002
  <li><a href="http://clickonf5.org/go/paypal/smooth-slider/" title="Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins" >Donate with Paypal</a></li>
1003
  </ul>
1004
  </div>
1005
  </div>
1006
  </div>
1007
 
1008
+ <div id="side-info-column" class="inner-sidebar">
 
 
 
 
 
 
 
 
 
 
1009
  <div class="postbox">
1010
  <h3 class="hndle"><span>Credits:</span></h3>
1011
  <div class="inside">
1017
  </ul>
1018
  </div>
1019
  </div>
1020
+ </div>
1021
+
1022
+ <div id="side-info-column" class="inner-sidebar">
1023
+ <div class="postbox">
1024
+ <h3 class="hndle"><span>Support &amp; Donations</span></h3>
1025
+ <div class="inside">
1026
+ <script language="JavaScript" type="text/javascript">
1027
+ <!--
1028
+ // Customize the widget by editing the fields below
1029
+ // All fields are required
1030
+
1031
+ // Your Feedity RSS feed URL
1032
+ feedity_widget_feed = "http://feedity.com/rss.aspx/clickonf5-org/UlVTUldR";
1033
+
1034
+ // Number of items to display in the widget
1035
+ feedity_widget_numberofitems = "5";
1036
+
1037
+ // Show feed item published date (values: yes or no)
1038
+ feedity_widget_showdate = "no";
1039
+
1040
+ // Widget box width (in px, pt, em, or %)
1041
+ feedity_widget_width = "220px";
1042
+
1043
+ // Widget background color in hex or by name (eg: #ffffff or white)
1044
+ feedity_widget_backcolor = "#ffffff";
1045
+
1046
+ // Widget font/link color in hex or by name (eg: #000000 or black)
1047
+ feedity_widget_fontcolor = "#000000";
1048
+ //-->
1049
+ </script>
1050
+ <script language="JavaScript" type="text/javascript" src="http://feedity.com/js/widget.js"></script>
1051
+ </div>
1052
+ </div>
1053
  </div>
1054
 
1055
  <h2>Preview</h2>
1056
+ <?php settings_fields('smooth-slider-group'); ?>
 
 
 
 
 
 
 
 
1057
  <div style="width:70%;">
1058
  <?php
1059
  get_smooth_slider();
1067
 
1068
  <tr valign="top">
1069
  <th scope="row">Slide Pause Interval</th>
1070
+ <td><input type="text" name="smooth_slider_options[speed]" id="smooth_slider_speed" class="small-text" value="<?php echo $smooth_slider['speed']; ?>" />&nbsp;(in secs)</td>
1071
  </tr>
1072
 
1073
  <tr valign="top">
1074
  <th scope="row">Number of Posts in the Slideshow</th>
1075
+ <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']; ?>" /></td>
1076
  </tr>
1077
 
1078
  <tr valign="top">
1079
  <th scope="row">Background Color</th>
1080
+ <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="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_1"></div> &nbsp; &nbsp; &nbsp;
1081
+ <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']); ?> /> Use Transparent Background</label> </td>
1082
  </tr>
1083
 
1084
  <tr valign="top">
1085
  <th scope="row">Slider Height</th>
1086
+ <td><input type="text" name="smooth_slider_options[height]" id="smooth_slider_height" class="small-text" value="<?php echo $smooth_slider['height']; ?>" />&nbsp;px</td>
1087
  </tr>
1088
 
1089
 
1090
  <tr valign="top">
1091
  <th scope="row">Slider Width</th>
1092
+ <td><input type="text" name="smooth_slider_options[width]" id="smooth_slider_width" class="small-text" value="<?php echo $smooth_slider['width']; ?>" />&nbsp;px</td>
1093
  </tr>
1094
 
1095
  <tr valign="top">
1096
  <th scope="row">Border Thickness</th>
1097
+ <td><input type="text" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>" />&nbsp;px &nbsp;(put 0 if no border is required)</td>
1098
  </tr>
1099
 
1100
  <tr valign="top">
1101
  <th scope="row">Border Color</th>
1102
+ <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="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_6"></div></td>
1103
  </tr>
1104
 
1105
  <tr valign="top">
1106
  <th scope="row">Navigation Buttons</th>
1107
  <td><fieldset><legend class="screen-reader-text"><span>Navigation Buttons</span></legend>
1108
  <label for="smooth_slider_prev_next">
1109
+ <input name="smooth_slider_options[prev_next]" type="checkbox" id="smooth_slider_prev_next" value="1" <?php checked("1", $smooth_slider['prev_next']); ?> />
1110
  Show Prev/Next navigation arrows</label><br />
1111
  <label for="smooth_slider_goto_slide">Show go to slide number links at the bottom as 1, 2, 3 etc. or images</label><br />
1112
+ <input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', $smooth_slider['goto_slide']); ?> /> None <br />
1113
+ <input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="1" <?php checked('1', $smooth_slider['goto_slide']); ?> /> Numbers <br />
1114
+ <input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="2" <?php checked('2', $smooth_slider['goto_slide']); ?> /> Custom Images for Navigation <br />
1115
+ <input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="3" <?php checked('3', $smooth_slider['goto_slide']); ?> /> Enter Custom Text or HTML &nbsp; &nbsp;
1116
+ <input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
1117
  </fieldset></td>
1118
  </tr>
1119
 
1125
 
1126
  <tr valign="top">
1127
  <th scope="row">Text</th>
1128
+ <td><input type="text" name="smooth_slider_options[title_text]" id="smooth_slider_title_text" value="<?php echo $smooth_slider['title_text']; ?>" /></td>
1129
  </tr>
1130
 
1131
  <tr valign="top">
1132
  <th scope="row">Font</th>
1133
+ <td><select name="smooth_slider_options[title_font]" id="smooth_slider_title_font" >
1134
+ <option value="Arial" <?php if ($smooth_slider['title_font'] == "Arial"){ echo "selected";}?> >Arial</option>
1135
+ <option value="Book Antiqua" <?php if ($smooth_slider['title_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
1136
+ <option value="Bookman Old Style" <?php if ($smooth_slider['title_font'] == "Bookman Old Style"){ echo "selected";}?> >Bookman Old Style</option>
1137
+ <option value="Calibri" <?php if ($smooth_slider['title_font'] == "Calibri"){ echo "selected";}?> >Calibri</option>
1138
+ <option value="Century Schoolbook" <?php if ($smooth_slider['title_font'] == "Century Schoolbook"){ echo "selected";}?> >Century Schoolbook</option>
1139
+ <option value="Courier New" <?php if ($smooth_slider['title_font'] == "Courier New"){ echo "selected";}?> >Courier New</option>
1140
+ <option value="Geneva" <?php if ($smooth_slider['title_font'] == "Geneva"){ echo "selected";}?> >Geneva</option>
1141
+ <option value="Georgia" <?php if ($smooth_slider['title_font'] == "Georgia"){ echo "selected";} ?> >Georgia</option>
1142
+ <option value="Helvetica" <?php if ($smooth_slider['title_font'] == "Helvetica"){ echo "selected";}?> >Helvetica</option>
1143
+ <option value="Monotype Corsiva" <?php if ($smooth_slider['title_font'] == "Monotype Corsiva"){ echo "selected";}?> >Monotype Corsiva</option>
1144
+ <option value="Times New Roman" <?php if ($smooth_slider['title_font'] == "Times New Roman"){ echo "selected";}?> >Times New Roman</option>
1145
+ <option value="Trebuchet MS" <?php if ($smooth_slider['title_font'] == "Trebuchet MS"){ echo "selected";}?> >Trebuchet MS</option>
1146
  </select>
1147
  </td>
1148
  </tr>
1149
 
1150
  <tr valign="top">
1151
  <th scope="row">Font Color</th>
1152
+ <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="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_2"></div></td>
1153
  </tr>
1154
 
1155
  <tr valign="top">
1156
  <th scope="row">Font Size</th>
1157
+ <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;px</td>
1158
  </tr>
1159
 
1160
  <tr valign="top">
1161
  <th scope="row">Font Style</th>
1162
+ <td><select name="smooth_slider_options[title_fstyle]" id="smooth_slider_title_fstyle" >
1163
+ <option value="bold" <?php if ($smooth_slider['title_fstyle'] == "bold"){ echo "selected";}?> >Bold</option>
1164
+ <option value="bold italic" <?php if ($smooth_slider['title_fstyle'] == "bold italic"){ echo "selected";}?> >Bold Italic</option>
1165
+ <option value="italic" <?php if ($smooth_slider['title_fstyle'] == "italic"){ echo "selected";}?> >Italic</option>
1166
+ <option value="normal" <?php if ($smooth_slider['title_fstyle'] == "normal"){ echo "selected";}?> >Normal</option>
1167
  </select>
1168
  </td>
1169
  </tr>
1175
 
1176
  <tr valign="top">
1177
  <th scope="row">Font</th>
1178
+ <td><select name="smooth_slider_options[ptitle_font]" id="smooth_slider_ptitle_font" >
1179
+ <option value="Arial" <?php if ($smooth_slider['ptitle_font'] == "Arial"){ echo "selected";}?> >Arial</option>
1180
+ <option value="Book Antiqua" <?php if ($smooth_slider['ptitle_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
1181
+ <option value="Bookman Old Style" <?php if ($smooth_slider['ptitle_font'] == "Bookman Old Style"){ echo "selected";}?> >Bookman Old Style</option>
1182
+ <option value="Calibri" <?php if ($smooth_slider['ptitle_font'] == "Calibri"){ echo "selected";}?> >Calibri</option>
1183
+ <option value="Century Schoolbook" <?php if ($smooth_slider['ptitle_font'] == "Century Schoolbook"){ echo "selected";}?> >Century Schoolbook</option>
1184
+ <option value="Courier New" <?php if ($smooth_slider['ptitle_font'] == "Courier New"){ echo "selected";}?> >Courier New</option>
1185
+ <option value="Geneva" <?php if ($smooth_slider['ptitle_font'] == "Geneva"){ echo "selected";}?> >Geneva</option>
1186
+ <option value="Georgia" <?php if ($smooth_slider['ptitle_font'] == "Georgia"){ echo "selected";} ?> >Georgia</option>
1187
+ <option value="Helvetica" <?php if ($smooth_slider['ptitle_font'] == "Helvetica"){ echo "selected";}?> >Helvetica</option>
1188
+ <option value="Monotype Corsiva" <?php if ($smooth_slider['ptitle_font'] == "Monotype Corsiva"){ echo "selected";}?> >Monotype Corsiva</option>
1189
+ <option value="Times New Roman" <?php if ($smooth_slider['ptitle_font'] == "Times New Roman"){ echo "selected";}?> >Times New Roman</option>
1190
+ <option value="Trebuchet MS" <?php if ($smooth_slider['ptitle_font'] == "Trebuchet MS"){ echo "selected";}?> >Trebuchet MS</option>
1191
  </select>
1192
  </td>
1193
  </tr>
1194
 
1195
  <tr valign="top">
1196
  <th scope="row">Font Color</th>
1197
+ <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="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_3"></div></td>
1198
  </tr>
1199
 
1200
  <tr valign="top">
1201
  <th scope="row">Font Size</th>
1202
+ <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;px</td>
1203
  </tr>
1204
 
1205
  <tr valign="top">
1206
  <th scope="row">Font Style</th>
1207
+ <td><select name="smooth_slider_options[ptitle_fstyle]" id="smooth_slider_ptitle_fstyle" >
1208
+ <option value="bold" <?php if ($smooth_slider['ptitle_fstyle'] == "bold"){ echo "selected";}?> >Bold</option>
1209
+ <option value="bold italic" <?php if ($smooth_slider['ptitle_fstyle'] == "bold italic"){ echo "selected";}?> >Bold Italic</option>
1210
+ <option value="italic" <?php if ($smooth_slider['ptitle_fstyle'] == "italic"){ echo "selected";}?> >Italic</option>
1211
+ <option value="normal" <?php if ($smooth_slider['ptitle_fstyle'] == "normal"){ echo "selected";}?> >Normal</option>
1212
  </select>
1213
  </td>
1214
  </tr>
1218
  <p>Customize the looks of the thumbnail image for each of the sliding post here</p>
1219
  <table class="form-table">
1220
 
1221
+ <tr valign="top">
1222
+ <th scope="row">Pick Image From</th>
1223
+ <td><fieldset><legend class="screen-reader-text"><span>Pick Image From</span></legend>
1224
+ <input name="smooth_slider_options[img_pick]" type="radio" value="0" <?php checked('0', $smooth_slider['img_pick']); ?> /> slider_thumbnail Custom Field &nbsp; &nbsp;<br />
1225
+ <input name="smooth_slider_options[img_pick]" type="radio" value="1" <?php checked('1', $smooth_slider['img_pick']); ?> /> First Image from the Content&nbsp;
1226
+ </fieldset></td>
1227
+ </tr>
1228
+
1229
  <tr valign="top">
1230
  <th scope="row">Align to</th>
1231
+ <td><select name="smooth_slider_options[img_align]" id="smooth_slider_img_align" >
1232
+ <option value="left" <?php if ($smooth_slider['img_align'] == "left"){ echo "selected";}?> >Left</option>
1233
+ <option value="right" <?php if ($smooth_slider['img_align'] == "right"){ echo "selected";}?> >Right</option>
1234
+ <option value="none" <?php if ($smooth_slider['img_align'] == "none"){ echo "selected";}?> >Center</option>
1235
  </select>
1236
  </td>
1237
  </tr>
1238
 
1239
+ <tr valign="top">
1240
+ <th scope="row">Image Size</th>
1241
+ <td><fieldset><legend class="screen-reader-text"><span>Image Size</span></legend>
1242
+ <input name="smooth_slider_options[img_size]" type="radio" value="0" <?php checked('0', $smooth_slider['img_size']); ?> /> Original Size &nbsp; &nbsp; <br />
1243
+ <input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> Custom Size:&nbsp;
1244
+ <label for="smooth_slider_options[img_height]">Height</label>
1245
+ <input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" />&nbsp;px &nbsp;&nbsp;
1246
+ <label for="smooth_slider_options[img_width]">Width</label>
1247
+ <input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" />&nbsp;px &nbsp;&nbsp;
1248
+ </fieldset></td>
1249
+ </tr>
1250
 
1251
  <tr valign="top">
1252
  <th scope="row">Border Thickness</th>
1253
+ <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']; ?>" />&nbsp;px &nbsp;(put 0 if no border is required)</td>
1254
  </tr>
1255
 
1256
  <tr valign="top">
1257
  <th scope="row">Border Color</th>
1258
+ <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="Pick the color of your choice" /><div class="color-picker-wrap" id="colorbox_4"></div></td>
1259
  </tr>
1260
 
1261
+ <tr valign="top">
1262
+ <th scope="row">Make pure Image Slider</th>
1263
+ <td><input name="smooth_slider_options[image_only]" type="checkbox" value="1" <?php checked('1', $smooth_slider['image_only']); ?> />&nbsp;(check this to convert Smooth Slider to Image Slider with no content)</td>
1264
+ </tr>
1265
  </table>
1266
 
1267
  <h2>Slider Content</h2>
1268
  <p>Customize the looks of the content of each of the sliding post here</p>
1269
  <table class="form-table">
 
1270
  <tr valign="top">
1271
  <th scope="row">Font</th>
1272
+ <td><select name="smooth_slider_options[content_font]" id="smooth_slider_content_font" >
1273
+ <option value="Arial" <?php if ($smooth_slider['content_font'] == "Arial"){ echo "selected";}?> >Arial</option>
1274
+ <option value="Book Antiqua" <?php if ($smooth_slider['content_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
1275
+ <option value="Bookman Old Style" <?php if ($smooth_slider['content_font'] == "Bookman Old Style"){ echo "selected";}?> >Bookman Old Style</option>
1276
+ <option value="Calibri" <?php if ($smooth_slider['content_font'] == "Calibri"){ echo "selected";}?> >Calibri</option>
1277
+ <option value="Century Schoolbook" <?php if ($smooth_slider['content_font'] == "Century Schoolbook"){ echo "selected";}?> >Century Schoolbook</option>
1278
+ <option value="Courier New" <?php if ($smooth_slider['content_font'] == "Courier New"){ echo "selected";}?> >Courier New</option>
1279
+ <option value="Geneva" <?php if ($smooth_slider['content_font'] == "Geneva"){ echo "selected";}?> >Geneva</option>
1280
+ <option value="Georgia" <?php if ($smooth_slider['content_font'] == "Georgia"){ echo "selected";} ?> >Georgia</option>
1281
+ <option value="Helvetica" <?php if ($smooth_slider['content_font'] == "Helvetica"){ echo "selected";}?> >Helvetica</option>
1282
+ <option value="Monotype Corsiva" <?php if ($smooth_slider['content_font'] == "Monotype Corsiva"){ echo "selected";}?> >Monotype Corsiva</option>
1283
+ <option value="Times New Roman" <?php if ($smooth_slider['content_font'] == "Times New Roman"){ echo "selected";}?> >Times New Roman</option>
1284
+ <option value="Trebuchet MS" <?php if ($smooth_slider['content_font'] == "Trebuchet MS"){ echo "selected";}?> >Trebuchet MS</option>
1285
  </select>
1286
  </td>
1287
  </tr>
1288
 
1289
  <tr valign="top">
1290
  <th scope="row">Font Color</th>
1291
+ <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" /><div class="color-picker-wrap" id="colorbox_5"></div></td>
1292
  </tr>
1293
 
1294
  <tr valign="top">
1295
  <th scope="row">Font Size</th>
1296
+ <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;px</td>
1297
  </tr>
1298
 
1299
  <tr valign="top">
1300
  <th scope="row">Font Style</th>
1301
+ <td><select name="smooth_slider_options[content_fstyle]" id="smooth_slider_content_fstyle" >
1302
+ <option value="bold" <?php if ($smooth_slider['content_fstyle'] == "bold"){ echo "selected";}?> >Bold</option>
1303
+ <option value="bold italic" <?php if ($smooth_slider['content_fstyle'] == "bold italic"){ echo "selected";}?> >Bold Italic</option>
1304
+ <option value="italic" <?php if ($smooth_slider['content_fstyle'] == "italic"){ echo "selected";}?> >Italic</option>
1305
+ <option value="normal" <?php if ($smooth_slider['content_fstyle'] == "normal"){ echo "selected";}?> >Normal</option>
1306
  </select>
1307
  </td>
1308
  </tr>
1309
 
1310
  <tr valign="top">
1311
  <th scope="row">Pick content From</th>
1312
+ <td><select name="smooth_slider_options[content_from]" id="smooth_slider_content_from" >
1313
+ <option value="slider_content" <?php if ($smooth_slider['content_from'] == "slider_content"){ echo "selected";}?> >Slider Content Custom field</option>
1314
+ <option value="excerpt" <?php if ($smooth_slider['content_from'] == "excerpt"){ echo "selected";}?> >Post Excerpt</option>
1315
+ <option value="content" <?php if ($smooth_slider['content_from'] == "content"){ echo "selected";}?> >From Content</option>
1316
  </select>
1317
  </td>
1318
  </tr>
1319
 
1320
  <tr valign="top">
1321
  <th scope="row">Maximum content size</th>
1322
+ <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;characters &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
1323
  </tr>
1324
 
1325
  </table>
1326
 
1327
  <h2>Miscellaneous</h2>
 
 
 
1328
 
1329
+ <table class="form-table">
1330
+ <tr valign="top">
1331
+ <th scope="row">Retain these html tags</th>
1332
+ <td><input type="text" name="smooth_slider_options[allowable_tags]" class="regular-text code" value="<?php echo $smooth_slider['allowable_tags']; ?>" />&nbsp;(read <a href="http://www.clickonf5.org/smooth-slider" title="how to retain html like line breaks and links in the Smooth Slider" target="_blank">Usage section of the plugin page</a> to know more)</td>
1333
+ </tr>
1334
+ <tr valign="top">
1335
+ <th scope="row">Continue Reading Text</th>
1336
+ <td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
1337
+ </tr>
1338
+
1339
+ <tr valign="top">
1340
+ <th scope="row">Minimum User Level to add Post to the Slider</th>
1341
+ <td><select name="smooth_slider_options[user_level]" >
1342
+ <option value="10" <?php if ($smooth_slider['user_level'] == "8"){ echo "selected";}?> >Administrator</option>
1343
+ <option value="7" <?php if ($smooth_slider['user_level'] == "5"){ echo "selected";}?> >Editor and Admininstrator</option>
1344
+ <option value="2" <?php if ($smooth_slider['user_level'] == "2"){ echo "selected";}?> >Author, Editor and Admininstrator</option>
1345
+ <option value="1" <?php if ($smooth_slider['user_level'] == "1"){ echo "selected";}?> >Contributor, Author, Editor and Admininstrator</option>
1346
+ </select>
1347
+ </td>
1348
+ </tr>
1349
+ </table>
1350
  <p class="submit">
1351
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
1352
  </p>
 
1353
  </div> <!--end of float left -->
 
1354
  </div> <!--end of poststuff -->
1355
  </form>
1356
+ <?php
1357
+ if ($_POST['remove_posts_slider']) {
1358
+ if ( $_POST['slider_posts'] ) {
1359
+ global $wpdb, $table_prefix;
1360
+ $table_name = $table_prefix.'slider';
1361
+ foreach ( $_POST['slider_posts'] as $post_id=>$val ) {
1362
+ $sql = "DELETE FROM $table_name where id = $post_id LIMIT 1";
1363
+ $wpdb->query($sql);
1364
+ }
1365
+ }
1366
+ if ($_POST['remove_all'] == "Remove All at Once") {
1367
+ global $wpdb, $table_prefix;
1368
+ $table_name = $table_prefix.'slider';
1369
+ $sql = "DELETE FROM $table_name";
1370
+ $wpdb->query($sql);
1371
+ }
1372
+ }
1373
+ ?>
1374
+ <div style="clear:both"></div>
1375
+ <form action="" method="post">
1376
+ <input type="hidden" name="remove_posts_slider" value="1" />
1377
+ <h3>Posts/Pages Added To Smooth Slider</h3>
1378
+ <p><em>Check the Post/Page and Press "Remove Selected" to remove them From Smooth Slider. Press "Remove All at Once" to remove all the posts from the slider.</em></p>
1379
+
1380
+ <table class="widefat">
1381
+ <thead><tr><th>Post/Page Title</th><th>Author</th><th>Post Date</th><th>Remove Post</th></tr></thead><tbody>
1382
+
1383
+ <?php
1384
+ global $wpdb, $table_prefix;
1385
+ $table_name = $table_prefix."slider";
1386
+ $slider_posts = $wpdb->get_results("SELECT id FROM $table_name", OBJECT);
1387
+
1388
+ $count = 0;
1389
+ foreach($slider_posts as $slider_post) {
1390
+ $slider_arr[] = $slider_post->id;
1391
+ $post = get_post($slider_post->id);
1392
+ if ( in_array($post->ID, $slider_arr) ) {
1393
+ $count++;
1394
+ echo '<tr' . ($count % 2 ? ' class="alternate"' : '') . '><td><strong>' . $post->post_title . '</strong></td><td>By ' . get_userdata($post->post_author)->display_name . '</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>';
1395
+ }
1396
+ }
1397
+ if ($count == 0) {
1398
+ 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</td></tr>';
1399
+ }
1400
+ echo '</tbody><tfoot><tr><th>Post/Page Title</th><th>Author</th><th>Post Date</th><th>Remove Post</th></tr></tfoot></table>';
1401
+ if ($count) echo '<div class="submit"><input type="submit" value="Remove Selected" onclick="return confirmRemove()" /><input type="submit" name="remove_all" value="Remove All at Once" onclick="return confirmRemoveAll()" /></div></form>';
1402
+ ?>
1403
+ </tbody></table>
1404
+ </form>
1405
+ <?php check_admin_referer('smooth-slider-group-options');?>
1406
  </div> <!--end of float wrap -->
1407
  <?php
1408
  }
1409
  function register_mysettings() { // whitelist options
1410
+ register_setting( 'smooth-slider-group', 'smooth_slider_options' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1411
  }
1412
  ?>
uninstall.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //This plugin creates an entry in the options database. When the plugin will be deleted, this code will automatically delete the database entry from the options Wordpress table.
3
+ delete_option('smooth_slider_options');
4
+ //This plugin creates its own database table to save the post ids for the posts and pages added to Smooth Slider. When the plugin will be deleted, the database will aslo get deleted.
5
+ global $wpdb, $table_prefix;
6
+ $table_name = $table_prefix.'slider';
7
+ $sql = "DROP TABLE $table_name";
8
+ $wpdb->query($sql);
9
+ ?>