Smooth Slider - Version 1.2

Version Description

Download this release

Release Info

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

Code changes from version 1.1 to 1.2

images/Thumbs.db CHANGED
Binary file
images/logo.png DELETED
Binary file
images/slide1.png ADDED
Binary file
images/slide2.png ADDED
Binary file
images/slide3.png ADDED
Binary file
images/slide4.png ADDED
Binary file
images/slide5.png ADDED
Binary file
images/smooth_slider_logo.png DELETED
Binary file
readme.txt CHANGED
@@ -4,11 +4,11 @@ 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.1
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�s home page (i.e. Index) as well as in Sidebar.
12
 
13
  Features:
14
 
@@ -20,7 +20,12 @@ Features:
20
  6. No Need Of Knowledge of PHP, HTML or CSS
21
  7. Easy To Install Plugin
22
  8. Full Support Available
23
- 9. Readable by search engine as you can see the screenshot on Lynx browser aavailable on our blog
 
 
 
 
 
24
 
25
  [Demo](http://www.clickonf5.org/) |
26
  [Plugin Information](http://www.clickonf5.org/smooth-slider)
@@ -58,11 +63,11 @@ if(have_posts()) : while(have_posts()) : the_post();
58
 
59
  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.
60
 
61
- Go to the plugin page to see the details (http://www.clickonf5.org/smooth-slider)
62
 
63
  == Frequently Asked Questions ==
64
 
65
- Since this is the first release of this plugin so we will collect some frequently aksed questions from plugin forum and wordpress forum and will provide their answers over here.
66
  Forum link: http://www.clickonf5.org/phpbb/smooth-slider-f12/
67
 
68
  == Screenshots ==
@@ -70,14 +75,20 @@ Forum link: http://www.clickonf5.org/phpbb/smooth-slider-f12/
70
  2. How to make a post a featured post
71
  3. Customize the CSS like background colour, width, height etc of Slider Box
72
 
73
-
74
  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.
75
 
76
  == Changelog ==
77
-
78
- Version 1.0.1 (09/14/2009)
79
- New - Active Slide in the slideshow will now be highlighted with bolder and bigger navigation number
80
- Fixed - Added No Script tag brosers not supporting JavaScript for showing the slideshow
81
- Fixed - Issues with Wordpress MU Smooth Slider Options update from setting page
82
-
83
- Visit the plugin page (http://www.clickonf5.org/smooth-slider) to see the changelog. Since this is our first release of this plugin, we wil update the changelog in future over here as well.
 
 
 
 
 
 
 
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
 
20
  6. No Need Of Knowledge of PHP, HTML or CSS
21
  7. Easy To Install Plugin
22
  8. Full Support Available
23
+ 9. Readable by search engine as you can see the screenshot on Lynx browser available on our blog
24
+ 10. Option for trasparent background, so that rounded corners can be supported
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)
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
 
70
+ Check the FAQs in the Smooth Slider forum on Internet Techies.
71
  Forum link: http://www.clickonf5.org/phpbb/smooth-slider-f12/
72
 
73
  == Screenshots ==
75
  2. How to make a post a featured post
76
  3. Customize the CSS like background colour, width, height etc of Slider Box
77
 
 
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
86
+ 5. New - Custom Images in place of navigation numbers
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
93
+
94
+ Visit the plugin page (http://www.clickonf5.org/smooth-slider) to see the changelog and release notes.
smooth-slider.php CHANGED
@@ -3,7 +3,7 @@
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.1
7
  Author: Tejaswini Deshpande, Sanjeev Mishra
8
  Author URI: http://www.clickonf5.org
9
  Wordpress version supported: 2.7 and above
@@ -25,6 +25,7 @@ Wordpress version supported: 2.7 and above
25
  along with this program; if not, write to the Free Software
26
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
  */
 
28
  //on activation
29
  function install_smooth_slider() {
30
 
@@ -69,7 +70,10 @@ function install_smooth_slider() {
69
  add_option('smooth_slider_content_fstyle','normal');
70
  add_option('smooth_slider_content_fcolor','#333333');
71
  add_option('smooth_slider_content_from','content');
72
- add_option('smooth_slider_content_chars','300');
 
 
 
73
  }
74
 
75
  //This adds the post to the slider
@@ -224,8 +228,8 @@ function carousel_posts_on_slider($max_posts, $offset=0) {
224
  $permalink = get_permalink($data->ID);
225
 
226
  $post_id = $data->ID;
227
- $html .= '<div class="board_item">
228
- <!-- board_item -->';
229
 
230
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
231
 
@@ -241,13 +245,20 @@ function carousel_posts_on_slider($max_posts, $offset=0) {
241
  $slider_content = strip_tags($slider_content);
242
 
243
  if( isset($thumbnail) && !empty($thumbnail) ):
244
- $html .= '<img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" />';
245
  endif;
246
 
247
- $html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.get_string_limit($slider_content,get_option('smooth_slider_content_chars')).'</span>
248
- <p class="more"><a href="'.$permalink.'">Read more</a></p>
249
- <!-- /board_item -->
250
- </div>';
 
 
 
 
 
 
 
251
  }
252
  echo $html;
253
  return $coint_i;
@@ -255,7 +266,7 @@ function carousel_posts_on_slider($max_posts, $offset=0) {
255
 
256
  function smooth_slider_css() {
257
  ?>
258
- <style type="text/css" media="screen">#board{width:<?php echo get_option('smooth_slider_width'); ?>px;height:<?php echo get_option('smooth_slider_height'); ?>px;overflow:hidden;background-color:<?php 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 10px auto;line-height:18px;}#board a{text-decoration:none;}#board_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;}#board_body{width:100%;}#board_carusel{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 $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); ?>px;position:relative;text-align:justify;}#board_carusel .belt{position:absolute;/*dont change this value*/left:0;top:0;}.board_item{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 $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); ?>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;}#board_body h2{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;}#board_body h2 a{color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;}.slider_item {padding-left:1px;}#board_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:12px <?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'); ?>;}#board_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;}#board_body p.more a:hover{text-decoration:none;}#board_carusel_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}#board_carusel_nav li{float:left;margin:0 5px 0 0;display:block;border:1px solid <?php echo get_option('smooth_slider_content_fcolor'); ?>;background-color:<?php echo get_option('smooth_slider_bg_color'); ?>;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;}#board_carusel_nav li a{diaplay:block;padding:1px 5px 1px 5px;color:<?php echo get_option('smooth_slider_ptitle_fcolor'); ?>;outline:none;}.sldrlink{font-size:8px;float:right;padding-right:<?php if (get_option('smooth_slider_prev_next') == 1) {echo "40";} else {echo "25";} ?>px;margin-top:7px;font-family:Verdana, Helvetica, sans-serif;}.sldrlink a{color:<?php echo get_option('smooth_slider_content_fcolor'); ?>;}</style>
259
  <?php
260
  }
261
 
@@ -274,51 +285,71 @@ function get_smooth_slider() {
274
  ?>
275
  <script type="text/javascript">
276
  stepcarousel.setup({
277
- galleryid: 'board_carusel', //id of carousel DIV
278
- beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
279
- panelclass: 'board_item', //class of panel DIVs each holding content
280
  autostep: {enable: true, moveby:1, pause:<?php echo get_option('smooth_slider_speed')*1000; ?>},
281
  panelbehavior: {speed:500, wraparound:false, persist:false},
282
- 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, 60], rightnav: ['<?php echo smooth_slider_plugin_url( 'images/button_next.png' ); ?>', 0, 60]},
283
  statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
284
  contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
285
  onslide:function(){
286
- jQuery("#board_carusel_nav li a").css("fontWeight", "normal");
287
- jQuery("#board_carusel_nav li a").css("fontSize", "<?php echo get_option('smooth_slider_content_fsize'); ?>px");
288
  var curr_slide = imageA;
289
- jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
290
  jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo (get_option('smooth_slider_content_fsize') + 5); ?>px");
 
 
 
 
 
 
 
 
 
 
 
291
  }
292
  })
293
  </script>
294
  <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>
295
- <div id="board">
296
- <div id="board_items">
297
- <div id="board_body">
298
  <?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 } ?>
299
- <div id="board_carusel">
300
- <div class="belt">
301
  <?php global $coint_i; $coint_i = carousel_posts_on_slider(get_option('smooth_slider_no_posts')); ?>
302
  </div>
303
  </div>
304
  </div>
305
  <?php if (get_option('smooth_slider_goto_slide') == 1) { ?>
306
- <ul id="board_carusel_nav">
307
  <?php global $coint_i; for($i=1; $i<=$coint_i; $i++) {
308
- echo "<li><a id=\"sldr".$i."\" title=\"".$i."\" href=\"#\" >".$i."</a></li>\n";
309
  } ?>
310
  </ul>
 
 
 
 
 
 
 
 
 
311
  <?php } ?>
312
- <span class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></span>
 
313
  </div>
314
  </div>
315
  <script type="text/javascript">
316
  jQuery(document).ready(function(){
317
- jQuery('#board_carusel_nav a').click(function() {
318
- var title = jQuery(this).attr('title');
319
  var id = jQuery(this).attr('id');
320
- var step_size = title - imageA;
321
- document.getElementById(id).href = "javascript:stepcarousel.stepBy('board_carusel', "+step_size+")";
322
  });
323
  });
324
  </script>
@@ -331,6 +362,20 @@ if ( is_admin() ){ // admin actions
331
  add_action( 'admin_init', 'register_mysettings' );
332
  }
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  function smooth_slider_admin_head() {
335
  if ( is_admin() ){ // admin actions
336
 
@@ -455,6 +500,8 @@ jQuery(document).ready(function() {
455
  z-index: 1000;
456
  }
457
  </style>
 
 
458
  <?php
459
  } //for smooth slider option page
460
  }//only for admin
@@ -472,8 +519,10 @@ function smooth_slider_settings() {
472
  function smooth_slider_settings_page() {
473
  ?>
474
  <div class="wrap">
475
- <h2>Smooth Slider</h2>
476
- <div id="poststuff" class="metabox-holder has-right-sidebar" style="float:right;" >
 
 
477
  <div id="side-info-column" class="inner-sidebar">
478
  <div class="postbox">
479
  <h3 class="hndle"><span>About this Plugin:</span></h3>
@@ -511,17 +560,27 @@ function smooth_slider_settings_page() {
511
  </ul>
512
  </div>
513
  </div>
514
- </div>
515
-
516
-
517
- </div>
518
-
519
- <form style="float:left;" method="post" action="options.php">
520
- <?php settings_fields('smooth-slider-group'); ?>
521
 
522
- <h3>Slider Box</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  <p>Customize the looks of the Slider box wrapping the complete slideshow from here</p>
524
 
 
525
  <table class="form-table">
526
 
527
  <tr valign="top">
@@ -536,7 +595,8 @@ function smooth_slider_settings_page() {
536
 
537
  <tr valign="top">
538
  <th scope="row">Background Color</th>
539
- <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></td>
 
540
  </tr>
541
 
542
  <tr valign="top">
@@ -566,13 +626,16 @@ function smooth_slider_settings_page() {
566
  <label for="smooth_slider_prev_next">
567
  <input name="smooth_slider_prev_next" type="checkbox" id="smooth_slider_prev_next" value="1" <?php checked("1", get_option('smooth_slider_prev_next')); ?> />
568
  Show Prev/Next navigation arrows</label><br />
569
- <label for="smooth_slider_goto_slide"><input name="smooth_slider_goto_slide" type="checkbox" id="smooth_slider_goto_slide" value="1" <?php checked('1', get_option('smooth_slider_goto_slide')); ?> /> Show go to slide number links at the bottom as 1, 2, 3 etc.</label>
 
 
 
570
  </fieldset></td>
571
  </tr>
572
 
573
  </table>
574
 
575
- <h3>Slider Title</h3>
576
  <p>Customize the looks of the main title of the Slideshow from here</p>
577
  <table class="form-table">
578
 
@@ -622,7 +685,7 @@ function smooth_slider_settings_page() {
622
  </tr>
623
  </table>
624
 
625
- <h3>Post Title</h3>
626
  <p>Customize the looks of the title of each of the sliding post here</p>
627
  <table class="form-table">
628
 
@@ -667,7 +730,7 @@ function smooth_slider_settings_page() {
667
  </tr>
668
  </table>
669
 
670
- <h3>Thumbnail Image</h3>
671
  <p>Customize the looks of the thumbnail image for each of the sliding post here</p>
672
  <table class="form-table">
673
 
@@ -703,7 +766,7 @@ function smooth_slider_settings_page() {
703
 
704
  </table>
705
 
706
- <h3>Slider Content</h3>
707
  <p>Customize the looks of the content of each of the sliding post here</p>
708
  <table class="form-table">
709
 
@@ -759,17 +822,25 @@ function smooth_slider_settings_page() {
759
 
760
  <tr valign="top">
761
  <th scope="row">Maximum content size</th>
762
- <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</td>
763
  </tr>
764
 
765
  </table>
766
 
 
 
 
 
 
767
  <p class="submit">
768
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
769
  </p>
770
  <?php check_admin_referer('smooth-slider-group-options');?>
 
 
 
771
  </form>
772
- </div>
773
  <?php
774
  }
775
  function register_mysettings() { // whitelist options
@@ -802,5 +873,8 @@ function register_mysettings() { // whitelist options
802
  register_setting( 'smooth-slider-group', 'smooth_slider_content_fcolor' );
803
  register_setting( 'smooth-slider-group', 'smooth_slider_content_from' );
804
  register_setting( 'smooth-slider-group', 'smooth_slider_content_chars' );
 
 
 
805
  }
806
  ?>
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
25
  along with this program; if not, write to the Free Software
26
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
  */
28
+ //Please visit Plugin page http://www.clickonf5.org/smooth-slider for Changelog
29
  //on activation
30
  function install_smooth_slider() {
31
 
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
228
  $permalink = get_permalink($data->ID);
229
 
230
  $post_id = $data->ID;
231
+ $html .= '<div class="smooth_slideri">
232
+ <!-- smooth_slideri -->';
233
 
234
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
235
 
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;
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
 
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;
307
+ ?>
308
+ var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
309
+ jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
310
+ jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
311
+ <?php } ?>
312
+
313
  }
314
  })
315
  </script>
316
  <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>
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>
346
  </div>
347
  <script type="text/javascript">
348
  jQuery(document).ready(function(){
349
+ jQuery('#smooth_sliderc_nav a').click(function() {
 
350
  var id = jQuery(this).attr('id');
351
+ var step_to_slide = id.replace(/sldr/, "");
352
+ document.getElementById(id).href = "javascript:stepcarousel.stepTo('smooth_sliderc', "+step_to_slide+")";
353
  });
354
  });
355
  </script>
362
  add_action( 'admin_init', 'register_mysettings' );
363
  }
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
+ }
376
+
377
+ add_action( 'admin_init', 'smooth_slider_admin_scripts' );
378
+
379
  function smooth_slider_admin_head() {
380
  if ( is_admin() ){ // admin actions
381
 
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
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">
528
  <h3 class="hndle"><span>About this Plugin:</span></h3>
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();
578
+ ?> </div>
579
+
580
+ <h2>Slider Box</h2>
581
  <p>Customize the looks of the Slider box wrapping the complete slideshow from here</p>
582
 
583
+ <div style="float:left;">
584
  <table class="form-table">
585
 
586
  <tr valign="top">
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">
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
 
636
  </table>
637
 
638
+ <h2>Slider Title</h2>
639
  <p>Customize the looks of the main title of the Slideshow from here</p>
640
  <table class="form-table">
641
 
685
  </tr>
686
  </table>
687
 
688
+ <h2>Post Title</h2>
689
  <p>Customize the looks of the title of each of the sliding post here</p>
690
  <table class="form-table">
691
 
730
  </tr>
731
  </table>
732
 
733
+ <h2>Thumbnail Image</h2>
734
  <p>Customize the looks of the thumbnail image for each of the sliding post here</p>
735
  <table class="form-table">
736
 
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
 
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
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
  ?>