Version Description
You can selectively upgrade to 2.3.3
Download this release
Release Info
Developer | internet techies |
Plugin | Smooth Slider |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.3.2 to 2.3.3
- css/skins/default/next-horizontal.png +0 -0
- css/skins/default/prev-horizontal.png +0 -0
- css/skins/default/style.css +38 -0
- css/skins/sample/next-horizontal.png +0 -0
- css/skins/sample/prev-horizontal.png +0 -0
- css/skins/sample/style.css +40 -0
- images/Thumbs.db +0 -0
- includes/media-images.php +7 -7
- includes/smooth-slider-functions.php +29 -1
- js/jquery.jcarousel.min.js +16 -0
- js/stepcarousel.js +0 -334
- js/stepcarousel_1.6.1.js +0 -269
- readme.txt +20 -13
- settings/settings.php +191 -424
- settings/sliders.php +37 -70
- slider_versions/j.php +967 -0
- slider_versions/step.php +1135 -0
- smooth-slider.php +44 -942
css/skins/default/next-horizontal.png
ADDED
Binary file
|
css/skins/default/prev-horizontal.png
ADDED
Binary file
|
css/skins/default/style.css
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
/* CSS Document
|
3 |
+
Author:Tejaswini
|
4 |
+
Website:http://www.clickonf5.org
|
5 |
+
*/
|
6 |
+
/*jCarousel specific styles*/
|
7 |
+
.jcarousel-skin-default .jcarousel-item {}
|
8 |
+
.jcarousel-skin-default .jcarousel-item-horizontal {margin-left: 0;margin-right: 10px;}
|
9 |
+
.jcarousel-skin-default .jcarousel-direction-rtl .jcarousel-item-horizontal {margin-left: 10px;margin-right: 0;}
|
10 |
+
|
11 |
+
/* Horizontal Buttons */
|
12 |
+
.jcarousel-skin-default .jcarousel-next-horizontal {position: absolute;top: 40%;right: 5px; width: 20px;height: 20px; cursor: pointer;background: transparent url(next-horizontal.png) no-repeat 0 0;}
|
13 |
+
.jcarousel-skin-default .jcarousel-direction-rtl .jcarousel-next-horizontal {left: 5px;right: auto;background-image: url(prev-horizontal.png);background-position: -24px 0;}
|
14 |
+
.jcarousel-skin-default .jcarousel-next-horizontal:hover {background-position: 0 0;}
|
15 |
+
.jcarousel-skin-default .jcarousel-next-horizontal:active {background-position: 0 0;}
|
16 |
+
.jcarousel-skin-default .jcarousel-next-disabled-horizontal,.jcarousel-skin-default .jcarousel-next-disabled-horizontal:hover,.jcarousel-skin-default .jcarousel-next-disabled-horizontal:active { cursor: default; background-position: -24px 0;}
|
17 |
+
.jcarousel-skin-default .jcarousel-prev-horizontal { position: absolute; top: 40%; left: 5px; width: 20px; height: 20px; cursor: pointer;background: transparent url(prev-horizontal.png) no-repeat -24px 0;}
|
18 |
+
.jcarousel-skin-default .jcarousel-direction-rtl .jcarousel-prev-horizontal { left: auto;right: 5px;background-image: url(next-horizontal.png);background-position: 0 0;}
|
19 |
+
.jcarousel-skin-default .jcarousel-prev-horizontal:hover {background-position: -24px 0;}
|
20 |
+
.jcarousel-skin-default .jcarousel-prev-horizontal:active {background-position: -24px 0;}
|
21 |
+
.jcarousel-skin-default .jcarousel-prev-disabled-horizontal,.jcarousel-skin-default .jcarousel-prev-disabled-horizontal:hover,.jcarousel-skin-default .jcarousel-prev-disabled-horizontal:active { cursor: default; background-position: 0 0;}
|
22 |
+
|
23 |
+
/*Smooth Slider specific styles*/
|
24 |
+
.smooth_slider_fouc .smooth_sliderb {display: none;}
|
25 |
+
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;background:transparent;vertical-align:baseline;}
|
26 |
+
.smooth_slider span{display:inline;}
|
27 |
+
.smooth_slider{overflow:hidden;margin: 10px auto;line-height:18px;}
|
28 |
+
.smooth_slider a{text-decoration:none !important;}
|
29 |
+
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
30 |
+
.smooth_slider p.more a{text-decoration:underline;float:right;}
|
31 |
+
.smooth_slider p.more a:hover{text-decoration:none;}
|
32 |
+
.jcarousel-control{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}
|
33 |
+
a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;line-height:14px;padding:1px 5px 1px 5px;outline:none;}
|
34 |
+
.sldrbr{line-height:1px;}
|
35 |
+
.sldrlink{display:block;font-size:8px;float:right;font-family:Verdana, Helvetica, sans-serif;}
|
36 |
+
.sldrlink a{color:#333333;}
|
37 |
+
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
38 |
+
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
css/skins/sample/next-horizontal.png
ADDED
Binary file
|
css/skins/sample/prev-horizontal.png
ADDED
Binary file
|
css/skins/sample/style.css
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
/* CSS Document
|
3 |
+
Author:Tejaswini
|
4 |
+
Website:http://www.clickonf5.org
|
5 |
+
*/
|
6 |
+
/*jCarousel specific styles*/
|
7 |
+
.jcarousel-skin-default .jcarousel-item {}
|
8 |
+
.jcarousel-skin-sample .jcarousel-item-horizontal {margin-left: 0;margin-right: 10px;}
|
9 |
+
.jcarousel-skin-sample .jcarousel-direction-rtl .jcarousel-item-horizontal {margin-left: 10px;margin-right: 0;}
|
10 |
+
/* Horizontal Buttons */
|
11 |
+
.jcarousel-skin-sample .jcarousel-next-horizontal {position: absolute;top: 40%;right: 5px; width: 20px;height: 20px; cursor: pointer;background: transparent url(next-horizontal.png) no-repeat 0 0;}
|
12 |
+
.jcarousel-skin-sample .jcarousel-direction-rtl .jcarousel-next-horizontal {left: 5px;right: auto;background-image: url(prev-horizontal.png);background-position: -24px 0;}
|
13 |
+
.jcarousel-skin-sample .jcarousel-next-horizontal:hover {background-position: 0 0;}
|
14 |
+
.jcarousel-skin-sample .jcarousel-next-horizontal:active {background-position: 0 0;}
|
15 |
+
.jcarousel-skin-sample .jcarousel-next-disabled-horizontal,.jcarousel-skin-sample .jcarousel-next-disabled-horizontal:hover,.jcarousel-skin-sample .jcarousel-next-disabled-horizontal:active { cursor: default; background-position: -24px 0;}
|
16 |
+
.jcarousel-skin-sample .jcarousel-prev-horizontal { position: absolute; top: 40%; left: 5px; width: 20px; height: 20px; cursor: pointer;background: transparent url(prev-horizontal.png) no-repeat -24px 0;}
|
17 |
+
.jcarousel-skin-sample .jcarousel-direction-rtl .jcarousel-prev-horizontal { left: auto;right: 5px;background-image: url(next-horizontal.png);background-position: 0 0;}
|
18 |
+
.jcarousel-skin-sample .jcarousel-prev-horizontal:hover {background-position: -24px 0;}
|
19 |
+
.jcarousel-skin-sample .jcarousel-prev-horizontal:active {background-position: -24px 0;}
|
20 |
+
.jcarousel-skin-sample .jcarousel-prev-disabled-horizontal,.jcarousel-skin-sample .jcarousel-prev-disabled-horizontal:hover,.jcarousel-skin-sample .jcarousel-prev-disabled-horizontal:active { cursor: default; background-position: 0 0;}
|
21 |
+
|
22 |
+
/*Smooth Slider specific styles*/
|
23 |
+
.smooth_slider_fouc .smooth_sliderb {display: none;}
|
24 |
+
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;background:transparent;vertical-align:baseline;}
|
25 |
+
.smooth_slider span{display:inline;}
|
26 |
+
.smooth_slider{overflow:hidden;margin: 10px auto;line-height:18px;}
|
27 |
+
.smooth_slider a{text-decoration:none !important;}
|
28 |
+
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
29 |
+
.smooth_slider p.more a{text-decoration:underline;float:right;}
|
30 |
+
.smooth_slider p.more a:hover{text-decoration:none;}
|
31 |
+
.jcarousel-control{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}
|
32 |
+
a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;line-height:14px;padding:1px 5px 1px 5px;outline:none;}
|
33 |
+
.sldrbr{line-height:1px;}
|
34 |
+
.sldrlink{display:block;font-size:8px;float:right;font-family:Verdana, Helvetica, sans-serif;}
|
35 |
+
.sldrlink a{color:#333333 !important;}
|
36 |
+
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
37 |
+
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
38 |
+
|
39 |
+
/*Dyanamic css loaded in head when default style is selected*/
|
40 |
+
.jcarousel-skin-default .jcarousel-clip-horizontal {padding:0px 0px 0px 0px;width:450px;}.smooth_slider{width:440px;height:190px;background-color:#ffffff;border:1px solid #999999;padding:0 5px 0 10px;}.sldr_title{font-family:Georgia, Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold;font-style:normal;color:#000000;}.smooth_slider .jcarousel-item{width:440px;height:145px;}.smooth_slider h2{clear:none;line-height:17px;font-family:Trebuchet MS, Arial, Helvetica, sans-serif;font-size:14px;font-weight:bold;font-style:normal;color:#000000;margin:10px 0 5px 0 !important;}.smooth_slider h2 a{color:#000000;}.smooth_slider span{font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#333333;}.smooth_slider_thumbnail{float:left;margin:10px 5px 0 0px;max-height:120px;border:1px solid #000000;}.smooth_slider .smooth_slideri div{margin-right:20px}.smooth_slider p.more a{color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;}.jcarousel-control a{border:1px solid #333333;font-size:12px;font-family:Verdana, Arial, Helvetica, sans-serif;}.jcarousel-control a{color:#000000 !important;}.sldrlink{padding-right:0px;}.sldrlink a{color:#333333 !important;}
|
images/Thumbs.db
CHANGED
Binary file
|
includes/media-images.php
CHANGED
@@ -25,9 +25,9 @@ if (current_user_can( $smooth_slider['user_level'] )) {
|
|
25 |
|
26 |
|
27 |
$form_fields['slider'] = array(
|
28 |
-
'label' => __('Check the box and select the slider'),
|
29 |
'input' => 'html',
|
30 |
-
'html' => "<input type='checkbox' style='margin-top:6px;' name='attachments[".$post->ID."][slider]' value='slider' ".$extra." /> <strong>Add this Image to </strong>",
|
31 |
'value' => 'slider'
|
32 |
);
|
33 |
|
@@ -48,13 +48,13 @@ if (current_user_can( $smooth_slider['user_level'] )) {
|
|
48 |
$sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
|
49 |
if($sslider_nolink=='1'){$checked= "checked";} else {$checked= "";}
|
50 |
$form_fields['sslider_link'] = array(
|
51 |
-
'label' => __('Slide Link URL'),
|
52 |
'input' => 'html',
|
53 |
-
'html' => "<input type='text' style='clear:left;' class='text urlfield' name='attachments[".$post->ID."][sslider_link]' value='" . esc_attr($sslider_link) . "'
|
54 |
'value' => $sslider_link
|
55 |
);
|
56 |
$form_fields['sslider_nolink'] = array(
|
57 |
-
'label' => __('Do not link this slide to any page(url)'),
|
58 |
'input' => 'html',
|
59 |
'html' => "<input type='checkbox' name='attachments[".$post->ID."][sslider_nolink]' value='1' ".$checked." />",
|
60 |
'value' => 'slider'
|
@@ -114,8 +114,8 @@ if (current_user_can( $smooth_slider['user_level'] )) {
|
|
114 |
|
115 |
$sslider_link = get_post_meta($post_id,'slide_redirect_url',true);
|
116 |
$link=$attachment['sslider_link'];
|
117 |
-
if(!isset($link) or empty($link)){$link=
|
118 |
-
if($sslider_link != $link) {
|
119 |
update_post_meta($post_id, 'slide_redirect_url', $link);
|
120 |
}
|
121 |
|
25 |
|
26 |
|
27 |
$form_fields['slider'] = array(
|
28 |
+
'label' => __('Check the box and select the slider','smooth-slider'),
|
29 |
'input' => 'html',
|
30 |
+
'html' => "<input type='checkbox' style='margin-top:6px;' name='attachments[".$post->ID."][slider]' value='slider' ".$extra." /> <strong>".__( 'Add this Image to ', 'smooth-slider' )."</strong>",
|
31 |
'value' => 'slider'
|
32 |
);
|
33 |
|
48 |
$sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
|
49 |
if($sslider_nolink=='1'){$checked= "checked";} else {$checked= "";}
|
50 |
$form_fields['sslider_link'] = array(
|
51 |
+
'label' => __('Slide Link URL','smooth-slider'),
|
52 |
'input' => 'html',
|
53 |
+
'html' => "<input type='text' style='clear:left;' class='text urlfield' name='attachments[".$post->ID."][sslider_link]' value='" . esc_attr($sslider_link) . "' /><br /><small>".__( '(If left empty, it will be by default linked to attachment permalink.)', 'smooth-slider' )."</small>",
|
54 |
'value' => $sslider_link
|
55 |
);
|
56 |
$form_fields['sslider_nolink'] = array(
|
57 |
+
'label' => __('Do not link this slide to any page(url)','smooth-slider'),
|
58 |
'input' => 'html',
|
59 |
'html' => "<input type='checkbox' name='attachments[".$post->ID."][sslider_nolink]' value='1' ".$checked." />",
|
60 |
'value' => 'slider'
|
114 |
|
115 |
$sslider_link = get_post_meta($post_id,'slide_redirect_url',true);
|
116 |
$link=$attachment['sslider_link'];
|
117 |
+
//if(!isset($link) or empty($link) ){$link=get_attachment_link($post_id);} //from 2.3.3
|
118 |
+
if($sslider_link != $link and isset($link) and !empty($link)) {
|
119 |
update_post_meta($post_id, 'slide_redirect_url', $link);
|
120 |
}
|
121 |
|
includes/smooth-slider-functions.php
CHANGED
@@ -12,6 +12,13 @@ function get_slider_posts_in_order($slider_id) {
|
|
12 |
$slider_posts = $wpdb->get_results("SELECT * FROM $table_name WHERE slider_id = '$slider_id' ORDER BY slide_order ASC, date DESC", OBJECT);
|
13 |
return $slider_posts;
|
14 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
function ss_get_post_sliders($post_id){
|
16 |
global $wpdb,$table_prefix;
|
17 |
$slider_table = $table_prefix.SLIDER_TABLE;
|
@@ -139,7 +146,7 @@ function smooth_slider_table_exists($table, $db) {
|
|
139 |
}
|
140 |
return FALSE;
|
141 |
}
|
142 |
-
function
|
143 |
global $wpdb, $debug;
|
144 |
foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) {
|
145 |
if ($debug) echo("checking $column == $column_name<br />");
|
@@ -157,4 +164,25 @@ function add_column_if_not_exist($table_name, $column_name, $create_ddl) {
|
|
157 |
}
|
158 |
return false;
|
159 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
?>
|
12 |
$slider_posts = $wpdb->get_results("SELECT * FROM $table_name WHERE slider_id = '$slider_id' ORDER BY slide_order ASC, date DESC", OBJECT);
|
13 |
return $slider_posts;
|
14 |
}
|
15 |
+
function get_smooth_slider_name($slider_id) {
|
16 |
+
global $wpdb, $table_prefix;
|
17 |
+
$table_name = $table_prefix.SLIDER_META;
|
18 |
+
$slider_obj = $wpdb->get_results("SELECT * FROM $table_name WHERE slider_id = '$slider_id'", OBJECT);
|
19 |
+
$slider_name = $slider_obj->slider_name;
|
20 |
+
return $slider_name;
|
21 |
+
}
|
22 |
function ss_get_post_sliders($post_id){
|
23 |
global $wpdb,$table_prefix;
|
24 |
$slider_table = $table_prefix.SLIDER_TABLE;
|
146 |
}
|
147 |
return FALSE;
|
148 |
}
|
149 |
+
function add_cf5_column_if_not_exist($table_name, $column_name, $create_ddl) {
|
150 |
global $wpdb, $debug;
|
151 |
foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) {
|
152 |
if ($debug) echo("checking $column == $column_name<br />");
|
164 |
}
|
165 |
return false;
|
166 |
}
|
167 |
+
function cf5_sldr_parse_rss_rand($url,$count=0){
|
168 |
+
$doc = new DOMDocument();
|
169 |
+
$doc->load($url);
|
170 |
+
$arrFeeds = array();
|
171 |
+
foreach ($doc->getElementsByTagName('item') as $node) {
|
172 |
+
$itemRSS = array (
|
173 |
+
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
|
174 |
+
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
|
175 |
+
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
|
176 |
+
);
|
177 |
+
array_push($arrFeeds, $itemRSS);
|
178 |
+
}
|
179 |
+
$outarr=array();
|
180 |
+
if($count==0 or empty($count) or !isset($count)){
|
181 |
+
$count=count($arrFeeds);
|
182 |
+
}
|
183 |
+
for($i=0;$i<$count;$i++) {
|
184 |
+
$outarr[$i]=$arrFeeds[$i];
|
185 |
+
}
|
186 |
+
return $outarr;
|
187 |
+
}
|
188 |
?>
|
js/jquery.jcarousel.min.js
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jCarousel - Riding carousels with jQuery
|
3 |
+
* http://sorgalla.com/jcarousel/
|
4 |
+
*
|
5 |
+
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
|
6 |
+
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
7 |
+
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
8 |
+
*
|
9 |
+
* Built on top of the jQuery library
|
10 |
+
* http://jquery.com
|
11 |
+
*
|
12 |
+
* Inspired by the "Carousel Component" by Bill Scott
|
13 |
+
* http://billwscott.com/carousel/
|
14 |
+
*/
|
15 |
+
|
16 |
+
(function(i){var q={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null, itemFallbackDimension:null},r=false;i(window).bind("load.jcarousel",function(){r=true});i.jcarousel=function(a,c){this.options=i.extend({},q,c||{});this.autoStopped=this.locked=false;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===undefined)this.options.rtl=(i(a).attr("dir")||i("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl? "right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){i(a).removeClass(d[f]);b=d[f];break}if(a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"){this.list=i(a);this.container=this.list.parent();if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container"))this.container=this.container.wrap("<div></div>");this.container=this.container.parent()}else if(!this.container.hasClass("jcarousel-container"))this.container= this.list.wrap("<div></div>").parent()}else{this.container=i(a);this.list=this.container.find("ul,ol").eq(0)}b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("<div></div>").parent();this.buttonNext=i(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext= this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=i(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden", position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;b=this.list.children("li");var e=this;if(b.size()>0){var g=0,k=this.options.offset;b.each(function(){e.format(this,k++);g+=e.dimension(this, j)});this.list.css(this.wh,g+100+"px");if(!c||c.size===undefined)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.reload()};this.options.initCallback!==null&&this.options.initCallback(this,"init");if(!r&&i.browser.safari){this.buttons(false,false);i(window).bind("load.jcarousel",function(){e.setup()})}else this.setup()}; var h=i.jcarousel;h.fn=h.prototype={jcarousel:"0.2.7"};h.fn.extend=h.extend=i.extend;h.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(a,false);i(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}}, reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0; this.list.children("li").each(function(f){b+=a.dimension(this,c);if(f+1<a.first)d=b});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(a){if(a!==undefined){this.options.size=a;this.locked||this.buttons()}return this.options.size},has:function(a,c){if(c===undefined||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b= a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return false}return true},get:function(a){return i(".jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,f=i(c);if(b.length===0){var j,e=h.intval(a);for(b=this.create(a);;){j=this.get(--e);if(e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}}else d=this.dimension(b);if(f.get(0).nodeName.toUpperCase()=="LI"){b.replaceWith(f);b=f}else b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")), a);f=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;d=this.dimension(b,f)-d;a>0&&a<this.first&&this.list.css(this.lt,h.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,h.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(!(!c.length||a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,h.intval(this.list.css(this.wh))- b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(false):this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(true):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!(this.locked|| this.animating||!this.tail)){this.pauseAuto();var c=h.intval(this.list.css(this.lt));c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){if(!(this.locked||this.animating)){this.pauseAuto();this.animate(this.pos(a),c)}},pos:function(a,c){var b=h.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;if(this.options.wrap!="circular")a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a;for(var d= this.first>a,f=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(f):this.get(this.last),e=d?f:f-1,g=null,k=0,l=false,m=0;d?--e>=a:++e<a;){g=this.get(e);l=!g.length;if(g.length===0){g=this.create(e).addClass(this.className("jcarousel-item-placeholder"));j[d?"before":"after"](g);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)){j=this.get(this.index(e));if(j.length)g=this.add(e,j.clone(true))}}j=g;m=this.dimension(g);if(l)k+= m;if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<=this.options.size)))b=d?b+m:b-m}f=this.clipping();var p=[],o=0,n=0;j=this.get(a-1);for(e=a;++o;){g=this.get(e);l=!g.length;if(g.length===0){g=this.create(e).addClass(this.className("jcarousel-item-placeholder"));j.length===0?this.list.prepend(g):j[d?"before":"after"](g);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)){j=this.get(this.index(e));if(j.length)g= this.add(e,j.clone(true))}}j=g;m=this.dimension(g);if(m===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");if(this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size)p.push(g);else if(l)k+=m;n+=m;if(n>=f)break;e++}for(g=0;g<p.length;g++)p[g].remove();if(k>0){this.list.css(this.wh,this.dimension(this.list)+k+"px");if(d){b-=k;this.list.css(this.lt,h.intval(this.list.css(this.lt))-k+"px")}}k=a+o-1;if(this.options.wrap!="circular"&& this.options.size&&k>this.options.size)k=this.options.size;if(e>k){o=0;e=k;for(n=0;++o;){g=this.get(e--);if(!g.length)break;n+=this.dimension(g);if(n>=f)break}}e=k-o+1;if(this.options.wrap!="circular"&&e<1)e=1;if(this.inTail&&d){b+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&k==this.options.size&&k-o+1>=1){d=h.margin(this.get(k),!this.options.vertical?"marginRight":"marginBottom");if(n-d>f)this.tail=n-f-d}if(c&&a===this.options.size&&this.tail){b-=this.tail;this.inTail= true}for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=k;return b},animate:function(a,c){if(!(this.locked||this.animating)){this.animating=true;var b=this,d=function(){b.animating=false;a===0&&b.list.css(b.lt,0);if(!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail))b.startAuto();b.buttons();b.notify("onAfterAnimation"); if(b.options.wrap=="circular"&&b.options.size!==null)for(var f=b.prevFirst;f<=b.prevLast;f++)if(f!==null&&!(f>=b.first&&f<=b.last)&&(f<1||f>b.options.size))b.remove(f)};this.notify("onBeforeAnimation");if(!this.options.animation||c===false){this.list.css(this.lt,a+"px");d()}else this.list.animate(!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},this.options.animation,this.options.easing,d)}},startAuto:function(a){if(a!==undefined)this.options.auto=a;if(this.options.auto===0)return this.stopAuto(); if(this.timer===null){this.autoStopped=false;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null}},buttons:function(a,c){if(a==null){a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap== "first")&&this.options.size!==null&&this.last>=this.options.size)a=this.tail!==null&&!this.inTail}if(c==null){c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1)c=this.tail!==null&&this.inTail}var b=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);a&&this.buttonNext.bind(this.options.buttonNextEvent+ ".jcarousel",this.funcNext);this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?false:true);this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)}else this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+ ".jcarousel",this.funcPrev);c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?false:true);this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)}else this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b, null,c);this.buttonNextState=a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",a,c,this.first);this.callback("itemFirstOutCallback",a,c,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",a,c,this.last);this.callback("itemLastOutCallback",a,c,this.prevLast)}this.callback("itemVisibleInCallback", a,c,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var g=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(i.isFunction(g)){var k=this;if(d===undefined)g(k,b,c);else if(f===undefined)this.get(d).each(function(){g(k,this,d,b,c)});else{a=function(m){k.get(m).each(function(){g(k, this,m,b,c)})};for(var l=d;l<=f;l++)l!==null&&!(l>=j&&l<=e)&&a(l)}}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){a=i(a);for(var b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical? "-horizontal":"-vertical")},dimension:function(a,c){var b=a.jquery!==undefined?a[0]:a,d=!this.options.vertical?(b.offsetWidth||h.intval(this.options.itemFallbackDimension))+h.margin(b,"marginLeft")+h.margin(b,"marginRight"):(b.offsetHeight||h.intval(this.options.itemFallbackDimension))+h.margin(b,"marginTop")+h.margin(b,"marginBottom");if(c==null||d==c)return d;d=!this.options.vertical?c-h.margin(b,"marginLeft")-h.margin(b,"marginRight"):c-h.margin(b,"marginTop")-h.margin(b,"marginBottom");i(b).css(this.wh, d+"px");return this.dimension(b)},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-h.intval(this.clip.css("borderLeftWidth"))-h.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-h.intval(this.clip.css("borderTopWidth"))-h.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});h.extend({defaults:function(a){return i.extend(q,a||{})},margin:function(a,c){if(!a)return 0; var b=a.jquery!==undefined?a[0]:a;if(c=="marginRight"&&i.browser.safari){var d={display:"block","float":"none",width:"auto"},f,j;i.swap(b,d,function(){f=b.offsetWidth});d.marginRight=0;i.swap(b,d,function(){j=b.offsetWidth});return j-f}return h.intval(i.css(b,c))},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a}});i.fn.jcarousel=function(a){if(typeof a=="string"){var c=i(this).data("jcarousel"),b=Array.prototype.slice.call(arguments,1);return c[a].apply(c,b)}else return this.each(function(){i(this).data("jcarousel", new h(this,a))})}})(jQuery);
|
js/stepcarousel.js
DELETED
@@ -1,334 +0,0 @@
|
|
1 |
-
//** Step Carousel Viewer- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com
|
2 |
-
//** Script Download/ http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm
|
3 |
-
//** Usage Terms: http://www.dynamicdrive.com/notice.htm
|
4 |
-
//** Current version 1.9 (July 28th, 10'): See http://www.dynamicdrive.com/dynamicindex4/stepcarouselchangelog.txt for details
|
5 |
-
|
6 |
-
//** Modified a little bit to go with the jQuery noconflict on WordPress, for Smooth Slider
|
7 |
-
|
8 |
-
//jQuery.noConflict()
|
9 |
-
|
10 |
-
var stepcarousel={
|
11 |
-
ajaxloadingmsg: '<div style="margin: 1em; font-weight: bold"><img src="ajaxloadr.gif" style="vertical-align: middle" /> Fetching Content. Please wait...</div>', //customize HTML to show while fetching Ajax content
|
12 |
-
defaultbuttonsfade: 0.4, //Fade degree for disabled nav buttons (0=completely transparent, 1=completely opaque)
|
13 |
-
configholder: {},
|
14 |
-
|
15 |
-
getCSSValue:function(val){ //Returns either 0 (if val contains 'auto') or val as an integer
|
16 |
-
return (val=="auto")? 0 : parseInt(val)
|
17 |
-
},
|
18 |
-
|
19 |
-
getremotepanels:function(jQuery, config){ //function to fetch external page containing the panel DIVs
|
20 |
-
config.$belt.html(this.ajaxloadingmsg)
|
21 |
-
jQuery.ajax({
|
22 |
-
url: config.contenttype[1], //path to external content
|
23 |
-
async: true,
|
24 |
-
error:function(ajaxrequest){
|
25 |
-
config.$belt.html('Error fetching content.<br />Server Response: '+ajaxrequest.responseText)
|
26 |
-
},
|
27 |
-
success:function(content){
|
28 |
-
config.$belt.html(content)
|
29 |
-
config.$panels=config.$gallery.find('.'+config.panelclass)
|
30 |
-
stepcarousel.alignpanels(jQuery, config)
|
31 |
-
}
|
32 |
-
})
|
33 |
-
},
|
34 |
-
|
35 |
-
getoffset:function(what, offsettype){
|
36 |
-
return (what.offsetParent)? what[offsettype]+this.getoffset(what.offsetParent, offsettype) : what[offsettype]
|
37 |
-
},
|
38 |
-
|
39 |
-
getCookie:function(Name){
|
40 |
-
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
|
41 |
-
if (document.cookie.match(re)) //if cookie found
|
42 |
-
return document.cookie.match(re)[0].split("=")[1] //return its value
|
43 |
-
return null
|
44 |
-
},
|
45 |
-
|
46 |
-
setCookie:function(name, value){
|
47 |
-
document.cookie = name+"="+value
|
48 |
-
},
|
49 |
-
|
50 |
-
fadebuttons:function(config, currentpanel){
|
51 |
-
config.$leftnavbutton.fadeTo('fast', currentpanel==0? this.defaultbuttonsfade : 1)
|
52 |
-
config.$rightnavbutton.fadeTo('fast', currentpanel==config.lastvisiblepanel? this.defaultbuttonsfade : 1)
|
53 |
-
if (currentpanel==config.lastvisiblepanel){
|
54 |
-
stepcarousel.stopautostep(config)
|
55 |
-
}
|
56 |
-
|
57 |
-
},
|
58 |
-
|
59 |
-
addnavbuttons:function(jQuery, config, currentpanel){
|
60 |
-
config.$leftnavbutton=jQuery('<img src="'+config.defaultbuttons.leftnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('body')
|
61 |
-
config.$rightnavbutton=jQuery('<img src="'+config.defaultbuttons.rightnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('body')
|
62 |
-
config.$leftnavbutton.bind('click', function(){ //assign nav button event handlers
|
63 |
-
stepcarousel.stepBy(config.galleryid, -config.defaultbuttons.moveby)
|
64 |
-
})
|
65 |
-
config.$rightnavbutton.bind('click', function(){ //assign nav button event handlers
|
66 |
-
stepcarousel.stepBy(config.galleryid, config.defaultbuttons.moveby)
|
67 |
-
})
|
68 |
-
if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
|
69 |
-
this.fadebuttons(config, currentpanel)
|
70 |
-
}
|
71 |
-
return config.$leftnavbutton.add(config.$rightnavbutton)
|
72 |
-
},
|
73 |
-
|
74 |
-
alignpanels:function(jQuery, config){
|
75 |
-
var paneloffset=0
|
76 |
-
config.paneloffsets=[paneloffset] //array to store upper left offset of each panel (1st element=0)
|
77 |
-
config.panelwidths=[] //array to store widths of each panel
|
78 |
-
config.$panels.each(function(index){ //loop through panels
|
79 |
-
var $currentpanel=jQuery(this)
|
80 |
-
$currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel
|
81 |
-
$currentpanel.bind('click', function(e){return config.onpanelclick(e.target)}) //bind onpanelclick() to onclick event
|
82 |
-
paneloffset+=stepcarousel.getCSSValue($currentpanel.css('marginRight')) + parseInt($currentpanel.get(0).offsetWidth || $currentpanel.css('width')) //calculate next panel offset
|
83 |
-
config.paneloffsets.push(paneloffset) //remember this offset
|
84 |
-
config.panelwidths.push(paneloffset-config.paneloffsets[config.paneloffsets.length-2]) //remember panel width
|
85 |
-
})
|
86 |
-
config.paneloffsets.pop() //delete last offset (redundant)
|
87 |
-
var addpanelwidths=0
|
88 |
-
var lastpanelindex=config.$panels.length-1
|
89 |
-
config.lastvisiblepanel=lastpanelindex
|
90 |
-
for (var i=config.$panels.length-1; i>=0; i--){
|
91 |
-
addpanelwidths+=(i==lastpanelindex? config.panelwidths[lastpanelindex] : config.paneloffsets[i+1]-config.paneloffsets[i])
|
92 |
-
if (config.gallerywidth>addpanelwidths){
|
93 |
-
config.lastvisiblepanel=i //calculate index of panel that when in 1st position reveals the very last panel all at once based on gallery width
|
94 |
-
}
|
95 |
-
}
|
96 |
-
config.$belt.css({width: paneloffset+'px'}) //Set Belt DIV to total panels' widths
|
97 |
-
config.currentpanel=(config.panelbehavior.persist)? parseInt(this.getCookie(config.galleryid+"persist")) : 0 //determine 1st panel to show by default
|
98 |
-
config.currentpanel=(typeof config.currentpanel=="number" && config.currentpanel<config.$panels.length)? config.currentpanel : 0
|
99 |
-
var endpoint=config.paneloffsets[config.currentpanel]+(config.currentpanel==0? 0 : config.beltoffset)
|
100 |
-
config.$belt.css({left: -endpoint+'px'})
|
101 |
-
if (config.defaultbuttons.enable==true){ //if enable default back/forth nav buttons
|
102 |
-
var $navbuttons=this.addnavbuttons(jQuery, config, config.currentpanel)
|
103 |
-
jQuery(window).bind("load resize", function(){ //refresh position of nav buttons when page loads/resizes, in case offsets weren't available document.oncontentload
|
104 |
-
config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")}
|
105 |
-
config.$leftnavbutton.css({left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px'})
|
106 |
-
config.$rightnavbutton.css({left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px'})
|
107 |
-
})
|
108 |
-
}
|
109 |
-
if (config.autostep && config.autostep.enable){ //enable auto stepping of Carousel?
|
110 |
-
var $carouselparts=config.$gallery.add(typeof $navbuttons!="undefined"? $navbuttons : null)
|
111 |
-
$carouselparts.bind('click', function(){
|
112 |
-
config.autostep.status="stopped"
|
113 |
-
stepcarousel.stopautostep(config)
|
114 |
-
})
|
115 |
-
$carouselparts.hover(function(){ //onMouseover
|
116 |
-
stepcarousel.stopautostep(config)
|
117 |
-
config.autostep.hoverstate="over"
|
118 |
-
}, function(){ //onMouseout
|
119 |
-
if (config.steptimer && config.autostep.hoverstate=="over" && config.autostep.status!="stopped"){
|
120 |
-
config.steptimer=setInterval(function(){stepcarousel.autorotate(config.galleryid)}, config.autostep.pause)
|
121 |
-
config.autostep.hoverstate="out"
|
122 |
-
}
|
123 |
-
})
|
124 |
-
config.steptimer=setInterval(function(){stepcarousel.autorotate(config.galleryid)}, config.autostep.pause) //automatically rotate Carousel Viewer
|
125 |
-
} //end enable auto stepping check
|
126 |
-
this.createpaginate(jQuery, config)
|
127 |
-
this.statusreport(config.galleryid)
|
128 |
-
config.oninit()
|
129 |
-
config.onslideaction(this)
|
130 |
-
},
|
131 |
-
|
132 |
-
stepTo:function(galleryid, pindex){ /*User entered pindex starts at 1 for intuitiveness. Internally pindex still starts at 0 */
|
133 |
-
var config=stepcarousel.configholder[galleryid]
|
134 |
-
if (typeof config=="undefined"){
|
135 |
-
//alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
|
136 |
-
return
|
137 |
-
}
|
138 |
-
stepcarousel.stopautostep(config)
|
139 |
-
var pindex=Math.min(pindex-1, config.paneloffsets.length-1)
|
140 |
-
var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset)
|
141 |
-
if (config.panelbehavior.wraparound==false && config.defaultbuttons.enable==true){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
|
142 |
-
this.fadebuttons(config, pindex)
|
143 |
-
}
|
144 |
-
config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
|
145 |
-
config.currentpanel=pindex
|
146 |
-
this.statusreport(galleryid)
|
147 |
-
},
|
148 |
-
|
149 |
-
stepBy:function(galleryid, steps, isauto){
|
150 |
-
var config=stepcarousel.configholder[galleryid]
|
151 |
-
if (typeof config=="undefined"){
|
152 |
-
//alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
|
153 |
-
return
|
154 |
-
}
|
155 |
-
if (!isauto) //if stepBy() function isn't called by autorotate() function
|
156 |
-
stepcarousel.stopautostep(config)
|
157 |
-
var direction=(steps>0)? 'forward' : 'back' //If "steps" is negative, that means backwards
|
158 |
-
var pindex=config.currentpanel+steps //index of panel to stop at
|
159 |
-
if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
|
160 |
-
pindex=(direction=="back" && pindex<=0)? 0 : (direction=="forward")? Math.min(pindex, config.lastvisiblepanel) : pindex
|
161 |
-
if (config.defaultbuttons.enable==true){ //if default nav buttons are enabled, fade them in and out depending on if at start or end of carousel
|
162 |
-
stepcarousel.fadebuttons(config, pindex)
|
163 |
-
}
|
164 |
-
}
|
165 |
-
else{ //else, for normal stepBy behavior
|
166 |
-
if (pindex>config.lastvisiblepanel && direction=="forward"){
|
167 |
-
//if destination pindex is greater than last visible panel, yet we're currently not at the end of the carousel yet
|
168 |
-
pindex=(config.currentpanel<config.lastvisiblepanel)? config.lastvisiblepanel : 0
|
169 |
-
}
|
170 |
-
else if (pindex<0 && direction=="back"){
|
171 |
-
//if destination pindex is less than 0, yet we're currently not at the beginning of the carousel yet
|
172 |
-
pindex=(config.currentpanel>0)? 0 : config.lastvisiblepanel /*wrap around left*/
|
173 |
-
}
|
174 |
-
}
|
175 |
-
var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to
|
176 |
-
if (config.panelbehavior.wraparound==true && config.panelbehavior.wrapbehavior=="pushpull" && (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back')){ //decide whether to apply "push pull" effect
|
177 |
-
config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){
|
178 |
-
config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
|
179 |
-
})
|
180 |
-
}
|
181 |
-
else
|
182 |
-
config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
|
183 |
-
config.currentpanel=pindex
|
184 |
-
this.statusreport(galleryid)
|
185 |
-
},
|
186 |
-
|
187 |
-
autorotate:function(galleryid){
|
188 |
-
var config=stepcarousel.configholder[galleryid]
|
189 |
-
this.stepBy(galleryid, config.autostep.moveby, true)
|
190 |
-
},
|
191 |
-
|
192 |
-
stopautostep:function(config){
|
193 |
-
clearTimeout(config.steptimer)
|
194 |
-
},
|
195 |
-
|
196 |
-
statusreport:function(galleryid){
|
197 |
-
var config=stepcarousel.configholder[galleryid]
|
198 |
-
if (config.statusvars.length==3){ //if 3 status vars defined
|
199 |
-
var startpoint=config.currentpanel //index of first visible panel
|
200 |
-
var visiblewidth=0
|
201 |
-
for (var endpoint=startpoint; endpoint<config.paneloffsets.length; endpoint++){ //index (endpoint) of last visible panel
|
202 |
-
visiblewidth+=config.panelwidths[endpoint]
|
203 |
-
if (visiblewidth>config.gallerywidth){
|
204 |
-
break
|
205 |
-
}
|
206 |
-
}
|
207 |
-
startpoint+=1 //format startpoint for user friendiness
|
208 |
-
endpoint=(endpoint+1==startpoint)? startpoint : endpoint //If only one image visible on the screen and partially hidden, set endpoint to startpoint
|
209 |
-
var valuearray=[startpoint, endpoint, config.panelwidths.length]
|
210 |
-
for (var i=0; i<config.statusvars.length; i++){
|
211 |
-
window[config.statusvars[i]]=valuearray[i] //Define variable (with user specified name) and set to one of the status values
|
212 |
-
config.$statusobjs[i].text(valuearray[i]+" ") //Populate element on page with ID="user specified name" with one of the status values
|
213 |
-
}
|
214 |
-
}
|
215 |
-
stepcarousel.selectpaginate(jQuery, galleryid)
|
216 |
-
},
|
217 |
-
|
218 |
-
createpaginate:function(jQuery, config){
|
219 |
-
if (config.$paginatediv.length==1){
|
220 |
-
var $templateimg=config.$paginatediv.find('img["data-over"]:eq(0)') //reference first matching image on page
|
221 |
-
var controlpoints=[], controlsrc=[], imgarray=[], moveby=$templateimg.attr("data-moveby") || 1
|
222 |
-
var asize=(moveby==1? 0:1) + Math.floor((config.lastvisiblepanel+1) / moveby) //calculate # of pagination links to create
|
223 |
-
var imghtml=jQuery('<div>').append($templateimg.clone()).html() //get HTML of first matching image
|
224 |
-
srcs=[$templateimg.attr('src'), $templateimg.attr('data-over'), $templateimg.attr('data-select')] //remember control's over and out, and selected image src
|
225 |
-
for (var i=0; i<asize; i++){
|
226 |
-
var moveto=Math.min(i*moveby, config.lastvisiblepanel)
|
227 |
-
imgarray.push(imghtml.replace(/>$/, ' data-index="'+i+'" data-moveto="'+moveto+'" title="Move to Panel '+(moveto+1)+'">') +'\n')
|
228 |
-
controlpoints.push(moveto) //store panel index each control goes to when clicked on
|
229 |
-
}
|
230 |
-
var $controls=jQuery('<span></span>').replaceAll($templateimg).append(imgarray.join('')).find('img') //replace template link with links and return them
|
231 |
-
$controls.css({cursor:'pointer'})
|
232 |
-
config.$paginatediv.bind('click', function(e){
|
233 |
-
var $target=jQuery(e.target)
|
234 |
-
if ($target.is('img') && $target.attr('data-over')){
|
235 |
-
stepcarousel.stepTo(config.galleryid, parseInt($target.attr('data-moveto'))+1)
|
236 |
-
}
|
237 |
-
})
|
238 |
-
config.$paginatediv.bind('mouseover mouseout', function(e){
|
239 |
-
var $target=jQuery(e.target)
|
240 |
-
if ($target.is('img') && $target.attr('data-over')){
|
241 |
-
if (parseInt($target.attr('data-index')) != config.pageinfo.curselected) //if this isn't the selected link
|
242 |
-
$target.attr('src', srcs[(e.type=="mouseover")? 1 : 0])
|
243 |
-
}
|
244 |
-
})
|
245 |
-
config.pageinfo={controlpoints:controlpoints, $controls:$controls, srcs:srcs, prevselected:null, curselected:null}
|
246 |
-
}
|
247 |
-
},
|
248 |
-
|
249 |
-
|
250 |
-
selectpaginate:function(jQuery, galleryid){
|
251 |
-
var config=stepcarousel.configholder[galleryid]
|
252 |
-
if (config.$paginatediv.length==1){
|
253 |
-
for (var i=0; i<config.pageinfo.controlpoints.length; i++){
|
254 |
-
if (config.pageinfo.controlpoints[i] <= config.currentpanel) //find largest control point that's less than or equal to current panel shown
|
255 |
-
config.pageinfo.curselected=i
|
256 |
-
}
|
257 |
-
if (typeof config.pageinfo.prevselected!=null) //deselect previously selected link (if found)
|
258 |
-
config.pageinfo.$controls.eq(config.pageinfo.prevselected).attr('src', config.pageinfo.srcs[0])
|
259 |
-
config.pageinfo.$controls.eq(config.pageinfo.curselected).attr('src', config.pageinfo.srcs[2]) //select current paginate link
|
260 |
-
config.pageinfo.prevselected=config.pageinfo.curselected //set current selected link to previous
|
261 |
-
}
|
262 |
-
},
|
263 |
-
|
264 |
-
|
265 |
-
loadcontent:function(galleryid, url){
|
266 |
-
var config=stepcarousel.configholder[galleryid]
|
267 |
-
config.contenttype=['ajax', url]
|
268 |
-
stepcarousel.stopautostep(config)
|
269 |
-
stepcarousel.resetsettings(jQuery, config)
|
270 |
-
stepcarousel.init(jQuery, config)
|
271 |
-
|
272 |
-
},
|
273 |
-
|
274 |
-
init:function(jQuery, config){
|
275 |
-
config.gallerywidth=config.$gallery.width()
|
276 |
-
config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")}
|
277 |
-
config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels
|
278 |
-
config.$panels=config.$gallery.find('.'+config.panelclass) //Find Panel DIVs that each contain a slide
|
279 |
-
config.panelbehavior.wrapbehavior=config.panelbehavior.wrapbehavior || "pushpull" //default wrap behavior to "pushpull"
|
280 |
-
config.$paginatediv=jQuery('#'+config.galleryid+'-paginate') //get pagination DIV (if defined)
|
281 |
-
if (config.autostep)
|
282 |
-
config.autostep.pause+=config.panelbehavior.speed
|
283 |
-
config.onpanelclick=(typeof config.onpanelclick=="undefined")? function(target){} : config.onpanelclick //attach custom "onpanelclick" event handler
|
284 |
-
config.onslideaction=(typeof config.onslide=="undefined")? function(){} : function(beltobj){jQuery(beltobj).stop(); config.onslide()} //attach custom "onslide" event handler
|
285 |
-
config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler
|
286 |
-
config.beltoffset=stepcarousel.getCSSValue(config.$belt.css('marginLeft')) //Find length of Belt DIV's left margin
|
287 |
-
config.statusvars=config.statusvars || [] //get variable names that will hold "start", "end", and "total" slides info
|
288 |
-
config.$statusobjs=[jQuery('#'+config.statusvars[0]), jQuery('#'+config.statusvars[1]), jQuery('#'+config.statusvars[2])]
|
289 |
-
config.currentpanel=0
|
290 |
-
stepcarousel.configholder[config.galleryid]=config //store config parameter as a variable
|
291 |
-
if (config.contenttype[0]=="ajax" && typeof config.contenttype[1]!="undefined") //fetch ajax content?
|
292 |
-
stepcarousel.getremotepanels(jQuery, config)
|
293 |
-
else
|
294 |
-
stepcarousel.alignpanels(jQuery, config) //align panels and initialize gallery
|
295 |
-
},
|
296 |
-
|
297 |
-
resetsettings:function(jQuery, config){
|
298 |
-
config.$gallery.unbind()
|
299 |
-
config.$belt.stop()
|
300 |
-
config.$panels.remove()
|
301 |
-
if (config.$leftnavbutton){
|
302 |
-
config.$leftnavbutton.remove()
|
303 |
-
config.$rightnavbutton.remove()
|
304 |
-
}
|
305 |
-
if (config.$paginatediv.length==1){
|
306 |
-
config.$paginatediv.unbind()
|
307 |
-
config.pageinfo.$controls.eq(0).attr('src', config.pageinfo.srcs[0]).removeAttr('data-index').removeAttr('data-moveto').removeAttr('title') //reset first pagination link so it acts as template again
|
308 |
-
.end().slice(1).remove() //then remove all but first pagination link
|
309 |
-
}
|
310 |
-
if (config.autostep)
|
311 |
-
config.autostep.status=null
|
312 |
-
if (config.panelbehavior.persist){
|
313 |
-
stepcarousel.setCookie(window[config.galleryid+"persist"], 0) //set initial panel to 0, overridden w/ current panel if window.unload is invoked
|
314 |
-
}
|
315 |
-
},
|
316 |
-
|
317 |
-
setup:function(config){
|
318 |
-
//Disable Step Gallery scrollbars ASAP dynamically (enabled for sake of users with JS disabled)
|
319 |
-
document.write('<style type="text/css">\n#'+config.galleryid+'{overflow: hidden;}\n</style>')
|
320 |
-
jQuery(document).ready(function(jQuery){
|
321 |
-
config.$gallery=jQuery('#'+config.galleryid)
|
322 |
-
stepcarousel.init(jQuery, config)
|
323 |
-
}) //end document.ready
|
324 |
-
jQuery(window).bind('unload', function(){ //clean up on page unload
|
325 |
-
stepcarousel.resetsettings(jQuery, config)
|
326 |
-
if (config.panelbehavior.persist)
|
327 |
-
stepcarousel.setCookie(config.galleryid+"persist", config.currentpanel)
|
328 |
-
jQuery.each(config, function(ai, oi){
|
329 |
-
oi=null
|
330 |
-
})
|
331 |
-
config=null
|
332 |
-
})
|
333 |
-
}
|
334 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/stepcarousel_1.6.1.js
DELETED
@@ -1,269 +0,0 @@
|
|
1 |
-
//Step Carousel Viewer: By Dynamic Drive, at http://www.dynamicdrive.com
|
2 |
-
//** Created: March 19th, 08'
|
3 |
-
//** Aug 16th, 08'- Updated to v 1.4:
|
4 |
-
//1) Adds ability to set speed/duration of panel animation (in milliseconds)
|
5 |
-
//2) Adds persistence support, so the last viewed panel is recalled when viewer returns within same browser session
|
6 |
-
//3) Adds ability to specify whether panels should stop at the very last and first panel, or wrap around and start all over again
|
7 |
-
//4) Adds option to specify two navigational image links positioned to the left and right of the Carousel Viewer to move the panels back and forth
|
8 |
-
|
9 |
-
//** Aug 27th, 08'- Nav buttons (if enabled) also repositions themselves now if window is resized
|
10 |
-
|
11 |
-
//** Sept 23rd, 08'- Updated to v 1.6:
|
12 |
-
//1) Carousel now stops at the very last visible panel, instead of the last panel itself. In other words, no more white space at the end.
|
13 |
-
//2) Adds ability for Carousel to auto rotate dictated by the new parameter: autostep: {enable:true, moveby:1, pause:3000}
|
14 |
-
//2i) During Auto Rotate, Carousel pauses onMouseover, resumes onMouseout. Clicking Carousel halts auto rotate.
|
15 |
-
|
16 |
-
//** Oct 22nd, 08'- Updated to v 1.6.1, which fixes functions stepBy() and stepTo() not stopping auto stepping of Carousel when called.
|
17 |
-
|
18 |
-
var stepcarousel={
|
19 |
-
ajaxloadingmsg: '<div style="margin: 1em; font-weight: bold"><img src="ajaxloadr.gif" style="vertical-align: middle" /> Fetching Content. Please wait...</div>', //customize HTML to show while fetching Ajax content
|
20 |
-
defaultbuttonsfade: 0.4, //Fade degree for disabled nav buttons (0=completely transparent, 1=completely opaque)
|
21 |
-
configholder: {},
|
22 |
-
|
23 |
-
getCSSValue:function(val){ //Returns either 0 (if val contains 'auto') or val as an integer
|
24 |
-
return (val=="auto")? 0 : parseInt(val)
|
25 |
-
},
|
26 |
-
|
27 |
-
getremotepanels:function(jQuery, config){ //function to fetch external page containing the panel DIVs
|
28 |
-
config.$belt.html(this.ajaxloadingmsg)
|
29 |
-
jQuery.ajax({
|
30 |
-
url: config.contenttype[1], //path to external content
|
31 |
-
async: true,
|
32 |
-
error:function(ajaxrequest){
|
33 |
-
config.$belt.html('Error fetching content.<br />Server Response: '+ajaxrequest.responseText)
|
34 |
-
},
|
35 |
-
success:function(content){
|
36 |
-
config.$belt.html(content)
|
37 |
-
config.$panels=config.$gallery.find('.'+config.panelclass)
|
38 |
-
stepcarousel.alignpanels(jQuery, config)
|
39 |
-
}
|
40 |
-
})
|
41 |
-
},
|
42 |
-
|
43 |
-
getoffset:function(what, offsettype){
|
44 |
-
return (what.offsetParent)? what[offsettype]+this.getoffset(what.offsetParent, offsettype) : what[offsettype]
|
45 |
-
},
|
46 |
-
|
47 |
-
getCookie:function(Name){
|
48 |
-
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
|
49 |
-
if (document.cookie.match(re)) //if cookie found
|
50 |
-
return document.cookie.match(re)[0].split("=")[1] //return its value
|
51 |
-
return null
|
52 |
-
},
|
53 |
-
|
54 |
-
setCookie:function(name, value){
|
55 |
-
document.cookie = name+"="+value
|
56 |
-
},
|
57 |
-
|
58 |
-
fadebuttons:function(config, currentpanel){
|
59 |
-
config.$leftnavbutton.fadeTo('fast', currentpanel==0? this.defaultbuttonsfade : 1)
|
60 |
-
config.$rightnavbutton.fadeTo('fast', currentpanel==config.lastvisiblepanel? this.defaultbuttonsfade : 1)
|
61 |
-
},
|
62 |
-
|
63 |
-
addnavbuttons:function(config, currentpanel){
|
64 |
-
config.$leftnavbutton=jQuery('<img src="'+config.defaultbuttons.leftnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('body')
|
65 |
-
config.$rightnavbutton=jQuery('<img src="'+config.defaultbuttons.rightnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('body')
|
66 |
-
config.$leftnavbutton.bind('click', function(){ //assign nav button event handlers
|
67 |
-
stepcarousel.stepBy(config.galleryid, -config.defaultbuttons.moveby)
|
68 |
-
})
|
69 |
-
config.$rightnavbutton.bind('click', function(){ //assign nav button event handlers
|
70 |
-
stepcarousel.stepBy(config.galleryid, config.defaultbuttons.moveby)
|
71 |
-
})
|
72 |
-
if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
|
73 |
-
this.fadebuttons(config, currentpanel)
|
74 |
-
}
|
75 |
-
return config.$leftnavbutton.add(config.$rightnavbutton)
|
76 |
-
},
|
77 |
-
|
78 |
-
stopautostep:function(config){
|
79 |
-
clearTimeout(config.steptimer)
|
80 |
-
clearTimeout(config.resumeautostep)
|
81 |
-
},
|
82 |
-
|
83 |
-
alignpanels:function(jQuery, config){
|
84 |
-
var paneloffset=0
|
85 |
-
config.paneloffsets=[paneloffset] //array to store upper left offset of each panel (1st element=0)
|
86 |
-
config.panelwidths=[] //array to store widths of each panel
|
87 |
-
config.$panels.each(function(index){ //loop through panels
|
88 |
-
var $currentpanel=jQuery(this)
|
89 |
-
$currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel
|
90 |
-
$currentpanel.bind('click', function(e){return config.onpanelclick(e.target)}) //bind onpanelclick() to onclick event
|
91 |
-
paneloffset+=stepcarousel.getCSSValue($currentpanel.css('marginRight')) + parseInt($currentpanel.get(0).offsetWidth || $currentpanel.css('width')) //calculate next panel offset
|
92 |
-
config.paneloffsets.push(paneloffset) //remember this offset
|
93 |
-
config.panelwidths.push(paneloffset-config.paneloffsets[config.paneloffsets.length-2]) //remember panel width
|
94 |
-
})
|
95 |
-
config.paneloffsets.pop() //delete last offset (redundant)
|
96 |
-
var addpanelwidths=0
|
97 |
-
var lastpanelindex=config.$panels.length-1
|
98 |
-
config.lastvisiblepanel=lastpanelindex
|
99 |
-
for (var i=config.$panels.length-1; i>=0; i--){
|
100 |
-
addpanelwidths+=(i==lastpanelindex? config.panelwidths[lastpanelindex] : config.paneloffsets[i+1]-config.paneloffsets[i])
|
101 |
-
if (config.gallerywidth>addpanelwidths){
|
102 |
-
config.lastvisiblepanel=i //calculate index of panel that when in 1st position reveals the very last panel all at once based on gallery width
|
103 |
-
}
|
104 |
-
}
|
105 |
-
config.$belt.css({width: paneloffset+'px'}) //Set Belt DIV to total panels' widths
|
106 |
-
config.currentpanel=(config.panelbehavior.persist)? parseInt(this.getCookie(window[config.galleryid+"persist"])) : 0 //determine 1st panel to show by default
|
107 |
-
config.currentpanel=(typeof config.currentpanel=="number" && config.currentpanel<config.$panels.length)? config.currentpanel : 0
|
108 |
-
if (config.currentpanel!=0){
|
109 |
-
var endpoint=config.paneloffsets[config.currentpanel]+(config.currentpanel==0? 0 : config.beltoffset)
|
110 |
-
config.$belt.css({left: -endpoint+'px'})
|
111 |
-
}
|
112 |
-
if (config.defaultbuttons.enable==true){ //if enable default back/forth nav buttons
|
113 |
-
var $navbuttons=this.addnavbuttons(config, config.currentpanel)
|
114 |
-
jQuery(window).bind("load resize", function(){ //refresh position of nav buttons when page loads/resizes, in case offsets weren't available document.oncontentload
|
115 |
-
config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")}
|
116 |
-
config.$leftnavbutton.css({left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px'})
|
117 |
-
config.$rightnavbutton.css({left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px'})
|
118 |
-
})
|
119 |
-
}
|
120 |
-
if (config.autostep && config.autostep.enable){ //enable auto stepping of Carousel?
|
121 |
-
var $carouselparts=config.$gallery.add(typeof $navbuttons!="undefined"? $navbuttons : null)
|
122 |
-
$carouselparts.bind('click', function(){
|
123 |
-
stepcarousel.stopautostep(config)
|
124 |
-
config.autostep.status="stopped"
|
125 |
-
})
|
126 |
-
$carouselparts.hover(function(){ //onMouseover
|
127 |
-
stepcarousel.stopautostep(config)
|
128 |
-
config.autostep.hoverstate="over"
|
129 |
-
}, function(){ //onMouseout
|
130 |
-
if (config.steptimer && config.autostep.hoverstate=="over" && config.autostep.status!="stopped"){
|
131 |
-
config.resumeautostep=setTimeout(function(){
|
132 |
-
stepcarousel.autorotate(config.galleryid)
|
133 |
-
config.autostep.hoverstate="out"
|
134 |
-
}, 500)
|
135 |
-
}
|
136 |
-
})
|
137 |
-
config.steptimer=setTimeout(function(){stepcarousel.autorotate(config.galleryid)}, config.autostep.pause) //automatically rotate Carousel Viewer
|
138 |
-
} //end enable auto stepping check
|
139 |
-
this.statusreport(config.galleryid)
|
140 |
-
config.oninit()
|
141 |
-
config.onslideaction(this)
|
142 |
-
},
|
143 |
-
|
144 |
-
stepTo:function(galleryid, pindex){ /*User entered pindex starts at 1 for intuitiveness. Internally pindex still starts at 0 */
|
145 |
-
var config=stepcarousel.configholder[galleryid]
|
146 |
-
if (typeof config=="undefined"){
|
147 |
-
alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
|
148 |
-
return
|
149 |
-
}
|
150 |
-
stepcarousel.stopautostep(config)
|
151 |
-
var pindex=Math.min(pindex-1, config.paneloffsets.length-1)
|
152 |
-
var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset)
|
153 |
-
if (config.panelbehavior.wraparound==false && config.defaultbuttons.enable==true){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
|
154 |
-
this.fadebuttons(config, pindex)
|
155 |
-
}
|
156 |
-
config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
|
157 |
-
config.currentpanel=pindex
|
158 |
-
this.statusreport(galleryid)
|
159 |
-
|
160 |
-
this.setlinkclass(pindex)
|
161 |
-
},
|
162 |
-
|
163 |
-
stepBy:function(galleryid, steps){ //isauto if defined indicates stepBy() is being called automatically
|
164 |
-
var config=stepcarousel.configholder[galleryid]
|
165 |
-
if (typeof config=="undefined"){
|
166 |
-
alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
|
167 |
-
return
|
168 |
-
}
|
169 |
-
stepcarousel.stopautostep(config)
|
170 |
-
var direction=(steps>0)? 'forward' : 'back' //If "steps" is negative, that means backwards
|
171 |
-
var pindex=config.currentpanel+steps //index of panel to stop at
|
172 |
-
if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
|
173 |
-
pindex=(direction=="back" && pindex<=0)? 0 : (direction=="forward")? Math.min(pindex, config.lastvisiblepanel) : pindex
|
174 |
-
if (config.defaultbuttons.enable==true){ //if default nav buttons are enabled, fade them in and out depending on if at start or end of carousel
|
175 |
-
stepcarousel.fadebuttons(config, pindex)
|
176 |
-
}
|
177 |
-
}
|
178 |
-
else{ //else, for normal stepBy behavior
|
179 |
-
if (pindex>config.lastvisiblepanel && direction=="forward"){
|
180 |
-
//if destination pindex is greater than last visible panel, yet we're currently not at the end of the carousel yet
|
181 |
-
pindex=(config.currentpanel<config.lastvisiblepanel)? config.lastvisiblepanel : 0
|
182 |
-
}
|
183 |
-
else if (pindex<0 && direction=="back"){
|
184 |
-
//if destination pindex is less than 0, yet we're currently not at the beginning of the carousel yet
|
185 |
-
pindex=(config.currentpanel>0)? 0 : config.lastvisiblepanel /*wrap around left*/
|
186 |
-
}
|
187 |
-
}
|
188 |
-
var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to
|
189 |
-
if (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back' && config.panelbehavior.wraparound==true){ //decide whether to apply "push pull" effect
|
190 |
-
config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){
|
191 |
-
config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
|
192 |
-
})
|
193 |
-
}
|
194 |
-
else
|
195 |
-
config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
|
196 |
-
config.currentpanel=pindex
|
197 |
-
this.statusreport(galleryid)
|
198 |
-
|
199 |
-
this.setlinkclass(pindex)
|
200 |
-
},
|
201 |
-
|
202 |
-
/* CALSS FOR NAVIGATION BAR */
|
203 |
-
setlinkclass:function(pindex){
|
204 |
-
jQuery("#board_carusel_nav a").removeClass("selected");
|
205 |
-
jQuery("#board_carusel_nav #board_carusel_nav_"+(pindex+1)+" a").addClass("selected");
|
206 |
-
},
|
207 |
-
|
208 |
-
autorotate:function(galleryid){
|
209 |
-
var config=stepcarousel.configholder[galleryid]
|
210 |
-
if (config.$gallery.attr('_ismouseover')!="yes"){
|
211 |
-
this.stepBy(galleryid, config.autostep.moveby)
|
212 |
-
}
|
213 |
-
config.steptimer=setTimeout(function(){stepcarousel.autorotate(galleryid)}, config.autostep.pause)
|
214 |
-
},
|
215 |
-
|
216 |
-
statusreport:function(galleryid){
|
217 |
-
var config=stepcarousel.configholder[galleryid]
|
218 |
-
var startpoint=config.currentpanel //index of first visible panel
|
219 |
-
var visiblewidth=0
|
220 |
-
for (var endpoint=startpoint; endpoint<config.paneloffsets.length; endpoint++){ //index (endpoint) of last visible panel
|
221 |
-
visiblewidth+=config.panelwidths[endpoint]
|
222 |
-
if (visiblewidth>config.gallerywidth){
|
223 |
-
break
|
224 |
-
}
|
225 |
-
}
|
226 |
-
startpoint+=1 //format startpoint for user friendiness
|
227 |
-
endpoint=(endpoint+1==startpoint)? startpoint : endpoint //If only one image visible on the screen and partially hidden, set endpoint to startpoint
|
228 |
-
var valuearray=[startpoint, endpoint, config.panelwidths.length]
|
229 |
-
for (var i=0; i<config.statusvars.length; i++){
|
230 |
-
window[config.statusvars[i]]=valuearray[i] //Define variable (with user specified name) and set to one of the status values
|
231 |
-
config.$statusobjs[i].text(valuearray[i]+" ") //Populate element on page with ID="user specified name" with one of the status values
|
232 |
-
}
|
233 |
-
},
|
234 |
-
|
235 |
-
setup:function(config){
|
236 |
-
//Disable Step Gallery scrollbars ASAP dynamically (enabled for sake of users with JS disabled)
|
237 |
-
document.write('<style type="text/css">\n#'+config.galleryid+'{overflow: hidden;}\n</style>')
|
238 |
-
jQuery(document).ready(function(jQuery){
|
239 |
-
config.$gallery=jQuery('#'+config.galleryid)
|
240 |
-
config.gallerywidth=config.$gallery.width()
|
241 |
-
config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")}
|
242 |
-
config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels
|
243 |
-
config.$panels=config.$gallery.find('.'+config.panelclass) //Find Panel DIVs that each contain a slide
|
244 |
-
config.panelbehavior.wraparound=(config.autostep && config.autostep.enable)? true : config.panelbehavior.wraparound //if auto step enabled, set "wraparound" to true
|
245 |
-
config.onpanelclick=(typeof config.onpanelclick=="undefined")? function(target){} : config.onpanelclick //attach custom "onpanelclick" event handler
|
246 |
-
config.onslideaction=(typeof config.onslide=="undefined")? function(){} : function(beltobj){jQuery(beltobj).stop(); config.onslide()} //attach custom "onslide" event handler
|
247 |
-
config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler
|
248 |
-
config.beltoffset=stepcarousel.getCSSValue(config.$belt.css('marginLeft')) //Find length of Belt DIV's left margin
|
249 |
-
config.statusvars=config.statusvars || [] //get variable names that will hold "start", "end", and "total" slides info
|
250 |
-
config.$statusobjs=[jQuery('#'+config.statusvars[0]), jQuery('#'+config.statusvars[1]), jQuery('#'+config.statusvars[2])]
|
251 |
-
config.currentpanel=0
|
252 |
-
stepcarousel.configholder[config.galleryid]=config //store config parameter as a variable
|
253 |
-
if (config.contenttype[0]=="ajax" && typeof config.contenttype[1]!="undefined") //fetch ajax content?
|
254 |
-
stepcarousel.getremotepanels(jQuery, config)
|
255 |
-
else
|
256 |
-
stepcarousel.alignpanels(jQuery, config) //align panels and initialize gallery
|
257 |
-
}) //end document.ready
|
258 |
-
jQuery(window).bind('unload', function(){ //clean up
|
259 |
-
if (config.panelbehavior.persist){
|
260 |
-
stepcarousel.setCookie(window[config.galleryid+"persist"], config.currentpanel)
|
261 |
-
}
|
262 |
-
jQuery.each(config, function(ai, oi){
|
263 |
-
oi=null
|
264 |
-
})
|
265 |
-
config=null
|
266 |
-
})
|
267 |
-
}
|
268 |
-
}
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,12 +3,12 @@ Contributors: internet techies
|
|
3 |
Tags: slideshow,featured,posts,jquery,slider,content,widget,shortcode,carousel,css,simple,thumbnail,image,post,sidebar,plugin,page,category,wpmu,site,blogs,style,home,categories,picture,flash,gallery
|
4 |
Donate link: http://www.clickonf5.org/go/smooth-slider/
|
5 |
Requires at least: 2.9
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.3.
|
8 |
|
9 |
== Description ==
|
10 |
|
11 |
-
Smooth Slider is a Wordpress
|
12 |
|
13 |
=Features=
|
14 |
|
@@ -25,7 +25,7 @@ Along with posts, pages and media images, Smooth Slider now supports Custom Post
|
|
25 |
5. Customized Slideshow as per your Wordpress Theme
|
26 |
6. No Need Of Knowledge of PHP, HTML or CSS. But for those having knowledge of CSS, can have multiple settings for the slider on different pages of the same WP site.
|
27 |
7. Easy To Install Plugin
|
28 |
-
8.
|
29 |
9. Readable by search engine as you can see the screenshot on Lynx browser available on our blog
|
30 |
10. Option for transparent background, so that rounded corners can be supported
|
31 |
11. Slider Preview in admin panel
|
@@ -61,12 +61,17 @@ This plugin is easy to install like other plug-ins of Wordpress as you need to j
|
|
61 |
|
62 |
4. Now Plugin is Activated, Go to the Usage section to see how to use Smooth Slider.
|
63 |
|
|
|
|
|
|
|
64 |
== Usage ==
|
65 |
|
66 |
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.
|
67 |
|
68 |
if ( function_exists( 'get_smooth_slider' ) ) {
|
69 |
-
get_smooth_slider(); }
|
|
|
|
|
70 |
|
71 |
if(have_posts()) : while(have_posts()) : the_post();
|
72 |
|
@@ -74,15 +79,11 @@ if(have_posts()) : while(have_posts()) : the_post();
|
|
74 |
|
75 |
3. You can use the Smooth Slider shortcode [smoothslider] or [smoothslider id='1'] on your edit post/page panel to insert the slider anywhere on the post or page. In case you use multiple sliders feature, just replace the 'id' with your required slider's 'ID' that you would find on Sliders admin panel(settings).
|
76 |
|
77 |
-
4.
|
78 |
-
|
79 |
-
5. Use the template tag get_smooth_slider_wpmu_all to get the site wide posts on your WPMU installation.
|
80 |
-
|
81 |
-
6. 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.
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
|
87 |
Go to the plugin page to see more details on how to use the 'Multiple Slider' feature(http://www.clickonf5.org/smooth-slider)
|
88 |
There are lot many features added from Release version 2.0 and above. To see the upgrade details and usage visit http://www.clickonf5.org/wordpress/smooth-slider-upgrade-2-0-released/5151
|
@@ -100,6 +101,13 @@ Visit the plugin page (http://www.clickonf5.org/smooth-slider) to see more scree
|
|
100 |
|
101 |
== Changelog ==
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
Version 2.3.2 (10/13/2010)
|
104 |
|
105 |
Minor fix to release of version 2.3
|
@@ -138,7 +146,6 @@ Version 2.2 (12/24/2009)
|
|
138 |
5. Fix - When the navigation numbers are used, there was some clicking issue, like the numbers needed to be douoble clicked in order to go to that slide number. This issue was observed with some installations of Smooth Slider (like on demo page). Hopefully this would get fixed with this release.
|
139 |
6. Fix - Changed the name of the database table from slider to smooth_slider to avoid any database conflicts and be more specific
|
140 |
|
141 |
-
|
142 |
Version 2.1.2 (11/26/2009)
|
143 |
|
144 |
1. New - Added an option to change the transition speed between two slides. Now you can control the speed with which one slide slides off and another slides in.
|
3 |
Tags: slideshow,featured,posts,jquery,slider,content,widget,shortcode,carousel,css,simple,thumbnail,image,post,sidebar,plugin,page,category,wpmu,site,blogs,style,home,categories,picture,flash,gallery
|
4 |
Donate link: http://www.clickonf5.org/go/smooth-slider/
|
5 |
Requires at least: 2.9
|
6 |
+
Tested up to: 3.1.1
|
7 |
+
Stable tag: 2.3.3
|
8 |
|
9 |
== Description ==
|
10 |
|
11 |
+
Smooth Slider is a Wordpress Plugin for creating a dynamic slideshow/s for featured posts on a blog. The slideshow created by Smooth Slider are JavaScript and Text based, that is why site owners and 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 |
|
25 |
5. Customized Slideshow as per your Wordpress Theme
|
26 |
6. No Need Of Knowledge of PHP, HTML or CSS. But for those having knowledge of CSS, can have multiple settings for the slider on different pages of the same WP site.
|
27 |
7. Easy To Install Plugin
|
28 |
+
8. Premium Support Available
|
29 |
9. Readable by search engine as you can see the screenshot on Lynx browser available on our blog
|
30 |
10. Option for transparent background, so that rounded corners can be supported
|
31 |
11. Slider Preview in admin panel
|
61 |
|
62 |
4. Now Plugin is Activated, Go to the Usage section to see how to use Smooth Slider.
|
63 |
|
64 |
+
== Upgrade Notice ==
|
65 |
+
You can selectively upgrade to 2.3.3
|
66 |
+
|
67 |
== Usage ==
|
68 |
|
69 |
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.
|
70 |
|
71 |
if ( function_exists( 'get_smooth_slider' ) ) {
|
72 |
+
get_smooth_slider(); }
|
73 |
+
|
74 |
+
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:
|
75 |
|
76 |
if(have_posts()) : while(have_posts()) : the_post();
|
77 |
|
79 |
|
80 |
3. You can use the Smooth Slider shortcode [smoothslider] or [smoothslider id='1'] on your edit post/page panel to insert the slider anywhere on the post or page. In case you use multiple sliders feature, just replace the 'id' with your required slider's 'ID' that you would find on Sliders admin panel(settings).
|
81 |
|
82 |
+
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.
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
5. It is very easy to select which image you want as the thumbnail for the slides. You can choose to get the image from custom field, or 'Post thumbnail' or from the post content.
|
85 |
|
86 |
+
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.
|
87 |
|
88 |
Go to the plugin page to see more details on how to use the 'Multiple Slider' feature(http://www.clickonf5.org/smooth-slider)
|
89 |
There are lot many features added from Release version 2.0 and above. To see the upgrade details and usage visit http://www.clickonf5.org/wordpress/smooth-slider-upgrade-2-0-released/5151
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
+
Version 2.3.3 (04/16/2011)
|
105 |
+
|
106 |
+
1. Randomize the slides in Slider
|
107 |
+
2. Translation ready
|
108 |
+
3. Multiple sliders can have different titles
|
109 |
+
4. No script text option
|
110 |
+
|
111 |
Version 2.3.2 (10/13/2010)
|
112 |
|
113 |
Minor fix to release of version 2.3
|
146 |
5. Fix - When the navigation numbers are used, there was some clicking issue, like the numbers needed to be douoble clicked in order to go to that slide number. This issue was observed with some installations of Smooth Slider (like on demo page). Hopefully this would get fixed with this release.
|
147 |
6. Fix - Changed the name of the database table from slider to smooth_slider to avoid any database conflicts and be more specific
|
148 |
|
|
|
149 |
Version 2.1.2 (11/26/2009)
|
150 |
|
151 |
1. New - Added an option to change the transition speed between two slides. Now you can control the speed with which one slide slides off and another slides in.
|
settings/settings.php
CHANGED
@@ -4,258 +4,13 @@ if ( is_admin() ){ // admin actions
|
|
4 |
add_action( 'admin_init', 'register_mysettings' );
|
5 |
}
|
6 |
|
7 |
-
function smooth_slider_admin_scripts() {
|
8 |
-
if ( is_admin() ){ // admin actions
|
9 |
-
// Settings page only
|
10 |
-
if ( isset($_GET['page']) && ('smooth-slider' == $_GET['page'] or 'smooth-slider-settings' == $_GET['page'] ) ) {
|
11 |
-
wp_register_script('jquery', false, false, false, false);
|
12 |
-
wp_enqueue_script( 'jquery-ui-tabs' );
|
13 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
14 |
-
wp_enqueue_script( 'jquery-ui-sortable' );
|
15 |
-
wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
|
16 |
-
array('jquery'), SMOOTH_SLIDER_VER, false);
|
17 |
-
wp_enqueue_style( 'smooth_slider_css', smooth_slider_plugin_url( 'css/smooth-slider.css' ),
|
18 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
19 |
-
}
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
add_action( 'admin_init', 'smooth_slider_admin_scripts' );
|
24 |
-
|
25 |
-
function smooth_slider_admin_head() {
|
26 |
-
global $smooth_slider;
|
27 |
-
if ( is_admin() ){ // admin actions
|
28 |
-
|
29 |
-
// Sliders page only
|
30 |
-
if ( isset($_GET['page']) && 'smooth-slider' == $_GET['page'] ) {
|
31 |
-
$sliders = ss_get_sliders();
|
32 |
-
?>
|
33 |
-
<script type="text/javascript">
|
34 |
-
// <![CDATA[
|
35 |
-
jQuery(document).ready(function() {
|
36 |
-
jQuery(function() {
|
37 |
-
jQuery("#slider_tabs").tabs();
|
38 |
-
<?php foreach($sliders as $slider){?>
|
39 |
-
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
40 |
-
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
41 |
-
<?php } ?>
|
42 |
-
});
|
43 |
-
});
|
44 |
-
function confirmRemove()
|
45 |
-
{
|
46 |
-
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
47 |
-
if (agree)
|
48 |
-
return true ;
|
49 |
-
else
|
50 |
-
return false ;
|
51 |
-
}
|
52 |
-
function confirmRemoveAll()
|
53 |
-
{
|
54 |
-
var agree=confirm("Remove all Posts/Pages from Smooth Slider??");
|
55 |
-
if (agree)
|
56 |
-
return true ;
|
57 |
-
else
|
58 |
-
return false ;
|
59 |
-
}
|
60 |
-
function confirmSliderDelete()
|
61 |
-
{
|
62 |
-
var agree=confirm("Delete this Slider??");
|
63 |
-
if (agree)
|
64 |
-
return true ;
|
65 |
-
else
|
66 |
-
return false ;
|
67 |
-
}
|
68 |
-
function slider_checkform ( form )
|
69 |
-
{
|
70 |
-
if (form.new_slider_name.value == "") {
|
71 |
-
alert( "Please enter the New Slider name." );
|
72 |
-
form.new_slider_name.focus();
|
73 |
-
return false ;
|
74 |
-
}
|
75 |
-
return true ;
|
76 |
-
}
|
77 |
-
</script>
|
78 |
-
<style type="text/css">
|
79 |
-
/************************************************
|
80 |
-
* ui-tabs *
|
81 |
-
************************************************/
|
82 |
-
.ui-tabs { padding: .2em; zoom: 1; }
|
83 |
-
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
84 |
-
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; background-color:#B9B9B9;}
|
85 |
-
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#FFFFFF;}
|
86 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-bottom-width: 0; background-color:#ABD37E;}
|
87 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#FFF;}
|
88 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
89 |
-
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
90 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
91 |
-
/*tabs complete*/
|
92 |
-
#divFeedityWidget span[style] {
|
93 |
-
display:none !important;
|
94 |
-
}
|
95 |
-
div#smooth_sldr_donations a{
|
96 |
-
color:#366C94 !important;
|
97 |
-
text-decoration:none;
|
98 |
-
}
|
99 |
-
div#smooth_sldr_donations a:hover{
|
100 |
-
text-decoration:underline;
|
101 |
-
}
|
102 |
-
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
103 |
-
#sldr_close {float:right;}
|
104 |
-
</style>
|
105 |
-
<?php
|
106 |
-
} //Sliders page only
|
107 |
-
|
108 |
-
// Settings page only
|
109 |
-
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
|
110 |
-
wp_print_scripts( 'farbtastic' );
|
111 |
-
wp_print_styles( 'farbtastic' );
|
112 |
-
?>
|
113 |
-
<script type="text/javascript">
|
114 |
-
// <![CDATA[
|
115 |
-
jQuery(document).ready(function() {
|
116 |
-
jQuery('#colorbox_1').farbtastic('#color_value_1');
|
117 |
-
jQuery('#color_picker_1').click(function () {
|
118 |
-
if (jQuery('#colorbox_1').css('display') == "block") {
|
119 |
-
jQuery('#colorbox_1').fadeOut("slow"); }
|
120 |
-
else {
|
121 |
-
jQuery('#colorbox_1').fadeIn("slow"); }
|
122 |
-
});
|
123 |
-
var colorpick_1 = false;
|
124 |
-
jQuery(document).mousedown(function(){
|
125 |
-
if (colorpick_1 == true) {
|
126 |
-
return; }
|
127 |
-
jQuery('#colorbox_1').fadeOut("slow");
|
128 |
-
});
|
129 |
-
jQuery(document).mouseup(function(){
|
130 |
-
colorpick_1 = false;
|
131 |
-
});
|
132 |
-
//for second color box
|
133 |
-
jQuery('#colorbox_2').farbtastic('#color_value_2');
|
134 |
-
jQuery('#color_picker_2').click(function () {
|
135 |
-
if (jQuery('#colorbox_2').css('display') == "block") {
|
136 |
-
jQuery('#colorbox_2').fadeOut("slow"); }
|
137 |
-
else {
|
138 |
-
jQuery('#colorbox_2').fadeIn("slow"); }
|
139 |
-
});
|
140 |
-
var colorpick_2 = false;
|
141 |
-
jQuery(document).mousedown(function(){
|
142 |
-
if (colorpick_2 == true) {
|
143 |
-
return; }
|
144 |
-
jQuery('#colorbox_2').fadeOut("slow");
|
145 |
-
});
|
146 |
-
jQuery(document).mouseup(function(){
|
147 |
-
colorpick_2 = false;
|
148 |
-
});
|
149 |
-
//for third color box
|
150 |
-
jQuery('#colorbox_3').farbtastic('#color_value_3');
|
151 |
-
jQuery('#color_picker_3').click(function () {
|
152 |
-
if (jQuery('#colorbox_3').css('display') == "block") {
|
153 |
-
jQuery('#colorbox_3').fadeOut("slow"); }
|
154 |
-
else {
|
155 |
-
jQuery('#colorbox_3').fadeIn("slow"); }
|
156 |
-
});
|
157 |
-
var colorpick_3 = false;
|
158 |
-
jQuery(document).mousedown(function(){
|
159 |
-
if (colorpick_3 == true) {
|
160 |
-
return; }
|
161 |
-
jQuery('#colorbox_3').fadeOut("slow");
|
162 |
-
});
|
163 |
-
jQuery(document).mouseup(function(){
|
164 |
-
colorpick_3 = false;
|
165 |
-
});
|
166 |
-
//for fourth color box
|
167 |
-
jQuery('#colorbox_4').farbtastic('#color_value_4');
|
168 |
-
jQuery('#color_picker_4').click(function () {
|
169 |
-
if (jQuery('#colorbox_4').css('display') == "block") {
|
170 |
-
jQuery('#colorbox_4').fadeOut("slow"); }
|
171 |
-
else {
|
172 |
-
jQuery('#colorbox_4').fadeIn("slow"); }
|
173 |
-
});
|
174 |
-
var colorpick_4 = false;
|
175 |
-
jQuery(document).mousedown(function(){
|
176 |
-
if (colorpick_4 == true) {
|
177 |
-
return; }
|
178 |
-
jQuery('#colorbox_4').fadeOut("slow");
|
179 |
-
});
|
180 |
-
jQuery(document).mouseup(function(){
|
181 |
-
colorpick_4 = false;
|
182 |
-
});
|
183 |
-
//for fifth color box
|
184 |
-
jQuery('#colorbox_5').farbtastic('#color_value_5');
|
185 |
-
jQuery('#color_picker_5').click(function () {
|
186 |
-
if (jQuery('#colorbox_5').css('display') == "block") {
|
187 |
-
jQuery('#colorbox_5').fadeOut("slow"); }
|
188 |
-
else {
|
189 |
-
jQuery('#colorbox_5').fadeIn("slow"); }
|
190 |
-
});
|
191 |
-
var colorpick_5 = false;
|
192 |
-
jQuery(document).mousedown(function(){
|
193 |
-
if (colorpick_5 == true) {
|
194 |
-
return; }
|
195 |
-
jQuery('#colorbox_5').fadeOut("slow");
|
196 |
-
});
|
197 |
-
jQuery(document).mouseup(function(){
|
198 |
-
colorpick_5 = false;
|
199 |
-
});
|
200 |
-
//for sixth color box
|
201 |
-
jQuery('#colorbox_6').farbtastic('#color_value_6');
|
202 |
-
jQuery('#color_picker_6').click(function () {
|
203 |
-
if (jQuery('#colorbox_6').css('display') == "block") {
|
204 |
-
jQuery('#colorbox_6').fadeOut("slow"); }
|
205 |
-
else {
|
206 |
-
jQuery('#colorbox_6').fadeIn("slow"); }
|
207 |
-
});
|
208 |
-
var colorpick_6 = false;
|
209 |
-
jQuery(document).mousedown(function(){
|
210 |
-
if (colorpick_6 == true) {
|
211 |
-
return; }
|
212 |
-
jQuery('#colorbox_6').fadeOut("slow");
|
213 |
-
});
|
214 |
-
jQuery(document).mouseup(function(){
|
215 |
-
colorpick_6 = false;
|
216 |
-
});
|
217 |
-
jQuery('#sldr_close').click(function () {
|
218 |
-
jQuery('#sldr_message').fadeOut("slow");
|
219 |
-
});
|
220 |
-
});
|
221 |
-
</script>
|
222 |
-
<style type="text/css">
|
223 |
-
.color-picker-wrap {
|
224 |
-
position: absolute;
|
225 |
-
display: none;
|
226 |
-
background: #fff;
|
227 |
-
border: 3px solid #ccc;
|
228 |
-
padding: 3px;
|
229 |
-
z-index: 1000;
|
230 |
-
}
|
231 |
-
#divFeedityWidget span[style] {
|
232 |
-
display:none !important;
|
233 |
-
}
|
234 |
-
div#smooth_sldr_donations a{
|
235 |
-
color:#366C94 !important;
|
236 |
-
text-decoration:none;
|
237 |
-
}
|
238 |
-
div#smooth_sldr_donations a:hover{
|
239 |
-
text-decoration:underline;
|
240 |
-
}
|
241 |
-
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
242 |
-
#sldr_close {float:right;}
|
243 |
-
</style>
|
244 |
-
<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"){$nav_size = $smooth_slider['navimg_ht'];} 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"){$nav_size = $smooth_slider['navimg_ht'];} 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;max-height:<?php echo $smooth_slider['img_height']; ?>px;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>
|
245 |
-
<?php
|
246 |
-
} //for smooth slider option page
|
247 |
-
}//only for admin
|
248 |
-
}
|
249 |
-
|
250 |
-
add_action('admin_head', 'smooth_slider_admin_head');
|
251 |
-
|
252 |
// function for adding settings page to wp-admin
|
253 |
function smooth_slider_settings() {
|
254 |
// Add a new submenu under Options:
|
255 |
// add_options_page('Smooth Slider', 'Smooth Slider', 9, basename(__FILE__), 'smooth_slider_settings_page');
|
256 |
-
add_menu_page( 'Smooth Slider', 'Smooth Slider', 'manage_options','smooth-slider', 'smooth_slider_create_multiple_sliders', smooth_slider_plugin_url( 'images/smooth_slider_icon.gif' ) );
|
257 |
-
add_submenu_page('smooth-slider', 'Smooth Sliders', 'Sliders', 'manage_options', 'smooth-slider', 'smooth_slider_create_multiple_sliders');
|
258 |
-
add_submenu_page('smooth-slider', 'Smooth Slider Settings', 'Settings', 'manage_options', 'smooth-slider-settings', 'smooth_slider_settings_page');
|
259 |
}
|
260 |
include('sliders.php');
|
261 |
// This function displays the page content for the Smooth Slider Options submenu
|
@@ -268,14 +23,18 @@ global $smooth_slider;
|
|
268 |
<div id="poststuff" class="metabox-holder has-right-sidebar" style="float:right;width:30%;">
|
269 |
<div id="side-info-column" class="inner-sidebar">
|
270 |
<div class="postbox">
|
271 |
-
<h3 class="hndle"><span
|
272 |
<div class="inside">
|
273 |
<ul>
|
274 |
-
<li><a href="http://www.clickonf5.org/smooth-slider" title="Smooth Slider Homepage
|
275 |
-
|
276 |
-
<li><a href="http://www.clickonf5.org
|
277 |
-
|
278 |
-
<li><a href="http://
|
|
|
|
|
|
|
|
|
279 |
</ul>
|
280 |
</div>
|
281 |
</div>
|
@@ -283,7 +42,7 @@ global $smooth_slider;
|
|
283 |
|
284 |
<div id="side-info-column" class="inner-sidebar">
|
285 |
<div class="postbox">
|
286 |
-
<h3 class="hndle"><span></span
|
287 |
<div class="inside">
|
288 |
<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_GB"></script><script type="text/javascript">FB.init("2aeebe9fb014836a6810ec4426d26f7e");</script><fb:fan profile_id="127760528543" stream="" connections="8" width="270" height="250"></fb:fan>
|
289 |
</div>
|
@@ -292,13 +51,11 @@ global $smooth_slider;
|
|
292 |
|
293 |
<div id="side-info-column" class="inner-sidebar">
|
294 |
<div class="postbox">
|
295 |
-
<h3 class="hndle"><span
|
296 |
<div class="inside">
|
297 |
<ul>
|
298 |
-
|
299 |
-
<li><a href="http://www.bioxd.com/featureme" title="FeatureMe Wordpress Plugin by Oscar Alcalá" >FeatureMe Wordpress Plugin</a></li>
|
300 |
<li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
|
301 |
-
<li><a href="http://code.google.com/p/timthumb/" title="TimThumb script by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks" >TimThumb script</a></li>
|
302 |
<li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
|
303 |
</ul>
|
304 |
</div>
|
@@ -307,152 +64,134 @@ global $smooth_slider;
|
|
307 |
|
308 |
<div id="side-info-column" class="inner-sidebar">
|
309 |
<div class="postbox">
|
310 |
-
<h3 class="hndle"><span
|
311 |
<div class="inside">
|
312 |
<div id="smooth_sldr_donations">
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
<li><a href="http://www.yobeat.com/" target="_blank">Brooke Geery - $10</a></li>
|
323 |
-
</ul>
|
324 |
-
<script language="JavaScript" type="text/javascript">
|
325 |
-
<!--
|
326 |
-
// Customize the widget by editing the fields below
|
327 |
-
// All fields are required
|
328 |
-
|
329 |
-
// Your Feedity RSS feed URL
|
330 |
-
feedity_widget_feed = "http://feedity.com/rss.aspx/clickonf5-org/UlVTUldR";
|
331 |
-
|
332 |
-
// Number of items to display in the widget
|
333 |
-
feedity_widget_numberofitems = "10";
|
334 |
-
|
335 |
-
// Show feed item published date (values: yes or no)
|
336 |
-
feedity_widget_showdate = "no";
|
337 |
-
|
338 |
-
// Widget box width (in px, pt, em, or %)
|
339 |
-
feedity_widget_width = "220px";
|
340 |
-
|
341 |
-
// Widget background color in hex or by name (eg: #ffffff or white)
|
342 |
-
feedity_widget_backcolor = "#ffffff";
|
343 |
-
|
344 |
-
// Widget font/link color in hex or by name (eg: #000000 or black)
|
345 |
-
feedity_widget_fontcolor = "#000000";
|
346 |
-
//-->
|
347 |
-
</script>
|
348 |
-
<script language="JavaScript" type="text/javascript" src="http://feedity.com/js/widget.js"></script>
|
349 |
</div>
|
350 |
</div>
|
351 |
</div>
|
352 |
</div>
|
353 |
</div> <!--end of poststuff -->
|
354 |
|
355 |
-
<h2 style="float:left;"
|
356 |
<form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
357 |
<input type="hidden" name="cmd" value="_s-xclick">
|
358 |
<input type="hidden" name="hosted_button_id" value="8046056">
|
359 |
<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!">
|
360 |
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
361 |
</form>
|
362 |
-
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider' ) );?>
|
363 |
-
<a href="<?php echo $url; ?>" title="Go to Sliders page where you can re-order the slide posts, delete the slides from the slider etc."
|
364 |
|
365 |
<form method="post" action="options.php">
|
366 |
-
<h2 style="clear:left;"
|
367 |
<?php settings_fields('smooth-slider-group'); ?>
|
368 |
<div style="width:70%;">
|
369 |
<?php
|
370 |
get_smooth_slider();
|
371 |
?> </div>
|
372 |
|
373 |
-
<h2
|
374 |
-
<p
|
375 |
|
376 |
<div style="float:left;width:70%;">
|
377 |
<table class="form-table">
|
378 |
|
379 |
<tr valign="top">
|
380 |
-
<th scope="row"
|
381 |
-
<td><input type="text" name="smooth_slider_options[speed]" id="smooth_slider_speed" class="small-text" value="<?php echo $smooth_slider['speed']; ?>"
|
382 |
</tr>
|
383 |
|
384 |
<tr valign="top">
|
385 |
-
<th scope="row"
|
386 |
-
<td><input type="text" name="smooth_slider_options[transition]" id="smooth_slider_transition" class="small-text" value="<?php echo $smooth_slider['transition']; ?>"
|
387 |
</tr>
|
388 |
|
389 |
<tr valign="top">
|
390 |
<th scope="row"></th>
|
391 |
<td><label for="smooth_slider_autostep">
|
392 |
<input name="smooth_slider_options[autostep]" type="checkbox" id="smooth_slider_autostep" value="1" <?php checked("1", $smooth_slider['autostep']); ?> />
|
393 |
-
Enable autostepping of slides
|
394 |
</tr>
|
395 |
|
396 |
<tr valign="top">
|
397 |
-
<th scope="row"
|
398 |
<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>
|
399 |
</tr>
|
400 |
|
401 |
<tr valign="top">
|
402 |
-
<th scope="row"
|
403 |
-
<td><input type="text" name="smooth_slider_options[bg_color]" id="color_value_1" value="<?php echo $smooth_slider['bg_color']; ?>" /> <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>
|
404 |
-
<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']); ?>
|
405 |
</tr>
|
406 |
|
407 |
<tr valign="top">
|
408 |
-
<th scope="row"
|
409 |
-
<td><input type="text" name="smooth_slider_options[height]" id="smooth_slider_height" class="small-text" value="<?php echo $smooth_slider['height']; ?>" />
|
410 |
</tr>
|
411 |
|
412 |
|
413 |
<tr valign="top">
|
414 |
-
<th scope="row"
|
415 |
-
<td><input type="text" name="smooth_slider_options[width]" id="smooth_slider_width" class="small-text" value="<?php echo $smooth_slider['width']; ?>" />
|
416 |
</tr>
|
417 |
|
418 |
<tr valign="top">
|
419 |
-
<th scope="row"
|
420 |
-
<td><input type="text" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>" /> 
|
421 |
</tr>
|
422 |
|
423 |
<tr valign="top">
|
424 |
-
<th scope="row"
|
425 |
-
<td><input type="text" name="smooth_slider_options[brcolor]" id="color_value_6" value="<?php echo $smooth_slider['brcolor']; ?>" /> <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>
|
426 |
</tr>
|
427 |
|
428 |
<tr valign="top">
|
429 |
-
<th scope="row"
|
430 |
-
<td><fieldset><legend class="screen-reader-text"><span
|
431 |
<label for="smooth_slider_prev_next">
|
432 |
<input name="smooth_slider_options[prev_next]" type="checkbox" id="smooth_slider_prev_next" value="1" <?php checked("1", $smooth_slider['prev_next']); ?> />
|
433 |
-
Show Prev/Next navigation arrows
|
434 |
-
<label for="smooth_slider_goto_slide"
|
435 |
-
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', $smooth_slider['goto_slide']); ?> /> None
|
436 |
-
<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 />
|
437 |
-
<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  
|
438 |
-
<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
|
439 |
<input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
|
440 |
</fieldset></td>
|
441 |
</tr>
|
442 |
|
443 |
</table>
|
444 |
|
445 |
-
<h2
|
446 |
-
<p
|
447 |
<table class="form-table">
|
448 |
|
449 |
<tr valign="top">
|
450 |
-
<th scope="row"
|
451 |
<td><input type="text" name="smooth_slider_options[title_text]" id="smooth_slider_title_text" value="<?php echo $smooth_slider['title_text']; ?>" /></td>
|
452 |
</tr>
|
453 |
|
454 |
<tr valign="top">
|
455 |
-
<th scope="row"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
<td><select name="smooth_slider_options[title_font]" id="smooth_slider_title_font" >
|
457 |
<option value="Arial" <?php if ($smooth_slider['title_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
458 |
<option value="Book Antiqua" <?php if ($smooth_slider['title_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
|
@@ -472,33 +211,33 @@ get_smooth_slider();
|
|
472 |
</tr>
|
473 |
|
474 |
<tr valign="top">
|
475 |
-
<th scope="row"
|
476 |
-
<td><input type="text" name="smooth_slider_options[title_fcolor]" id="color_value_2" value="<?php echo $smooth_slider['title_fcolor']; ?>" /> <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>
|
477 |
</tr>
|
478 |
|
479 |
<tr valign="top">
|
480 |
-
<th scope="row"
|
481 |
-
<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']; ?>" />
|
482 |
</tr>
|
483 |
|
484 |
<tr valign="top">
|
485 |
-
<th scope="row"
|
486 |
<td><select name="smooth_slider_options[title_fstyle]" id="smooth_slider_title_fstyle" >
|
487 |
-
<option value="bold" <?php if ($smooth_slider['title_fstyle'] == "bold"){ echo "selected";}?>
|
488 |
-
<option value="bold italic" <?php if ($smooth_slider['title_fstyle'] == "bold italic"){ echo "selected";}?>
|
489 |
-
<option value="italic" <?php if ($smooth_slider['title_fstyle'] == "italic"){ echo "selected";}?>
|
490 |
-
<option value="normal" <?php if ($smooth_slider['title_fstyle'] == "normal"){ echo "selected";}?>
|
491 |
</select>
|
492 |
</td>
|
493 |
</tr>
|
494 |
</table>
|
495 |
|
496 |
-
<h2
|
497 |
-
<p
|
498 |
<table class="form-table">
|
499 |
|
500 |
<tr valign="top">
|
501 |
-
<th scope="row"
|
502 |
<td><select name="smooth_slider_options[ptitle_font]" id="smooth_slider_ptitle_font" >
|
503 |
<option value="Arial" <?php if ($smooth_slider['ptitle_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
504 |
<option value="Book Antiqua" <?php if ($smooth_slider['ptitle_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
|
@@ -518,107 +257,105 @@ get_smooth_slider();
|
|
518 |
</tr>
|
519 |
|
520 |
<tr valign="top">
|
521 |
-
<th scope="row"
|
522 |
-
<td><input type="text" name="smooth_slider_options[ptitle_fcolor]" id="color_value_3" value="<?php echo $smooth_slider['ptitle_fcolor']; ?>" /> <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>
|
523 |
</tr>
|
524 |
|
525 |
<tr valign="top">
|
526 |
-
<th scope="row"
|
527 |
-
<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']; ?>" />
|
528 |
</tr>
|
529 |
|
530 |
<tr valign="top">
|
531 |
-
<th scope="row"
|
532 |
<td><select name="smooth_slider_options[ptitle_fstyle]" id="smooth_slider_ptitle_fstyle" >
|
533 |
-
<option value="bold" <?php if ($smooth_slider['ptitle_fstyle'] == "bold"){ echo "selected";}?>
|
534 |
-
<option value="bold italic" <?php if ($smooth_slider['ptitle_fstyle'] == "bold italic"){ echo "selected";}?>
|
535 |
-
<option value="italic" <?php if ($smooth_slider['ptitle_fstyle'] == "italic"){ echo "selected";}?>
|
536 |
-
<option value="normal" <?php if ($smooth_slider['ptitle_fstyle'] == "normal"){ echo "selected";}?>
|
537 |
</select>
|
538 |
</td>
|
539 |
</tr>
|
540 |
</table>
|
541 |
|
542 |
-
<h2
|
543 |
-
<p
|
544 |
<table class="form-table">
|
545 |
|
546 |
<tr valign="top">
|
547 |
-
<th scope="row"
|
548 |
-
<td><fieldset><legend class="screen-reader-text"><span
|
549 |
-
<input name="smooth_slider_options[img_pick][0]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][0]); ?> /> Use Custom Field/Key
|
550 |
-
<input type="text" name="smooth_slider_options[img_pick][1]" class="text" value="<?php echo $smooth_slider['img_pick'][1]; ?>" /> Name of the Custom Field/Key
|
551 |
<br />
|
552 |
-
<input name="smooth_slider_options[img_pick][2]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][2]); ?> /> Use Featured Post/Thumbnail (Wordpress 3.0 + feature)
|
553 |
-
<input name="smooth_slider_options[img_pick][3]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][3]); ?> /> Consider Images attached to the post
|
554 |
-
<input type="text" name="smooth_slider_options[img_pick][4]" class="small-text" value="<?php echo $smooth_slider['img_pick'][4]; ?>" /> Order of the Image attachment to pick <br />
|
555 |
-
<input name="smooth_slider_options[img_pick][5]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][5]); ?> /> Scan images from the post, in case there is no attached image to the post
|
556 |
</fieldset></td>
|
557 |
</tr>
|
558 |
|
559 |
<tr valign="top">
|
560 |
-
<th scope="row"
|
561 |
<td><select name="smooth_slider_options[img_align]" id="smooth_slider_img_align" >
|
562 |
-
<option value="left" <?php if ($smooth_slider['img_align'] == "left"){ echo "selected";}?>
|
563 |
-
<option value="right" <?php if ($smooth_slider['img_align'] == "right"){ echo "selected";}?>
|
564 |
-
<option value="none" <?php if ($smooth_slider['img_align'] == "none"){ echo "selected";}?>
|
565 |
</select>
|
566 |
</td>
|
567 |
</tr>
|
568 |
|
569 |
<tr valign="top">
|
570 |
-
<th scope="row"
|
|
|
571 |
<td><select name="smooth_slider_options[crop]" id="smooth_slider_img_crop" >
|
572 |
-
<option value="0" <?php if ($smooth_slider['crop'] == "0"){ echo "selected";}?>
|
573 |
-
<option value="1" <?php if ($smooth_slider['crop'] == "1"){ echo "selected";}?>
|
574 |
-
<option value="2" <?php if ($smooth_slider['crop'] == "2"){ echo "selected";}?>
|
575 |
-
<option value="3" <?php if ($smooth_slider['crop'] == "3"){ echo "selected";}?>
|
576 |
</select>
|
577 |
-
<small
|
578 |
</td>
|
579 |
</tr>
|
580 |
|
581 |
|
582 |
<tr valign="top">
|
583 |
-
<th scope="row"
|
584 |
-
<td><fieldset><legend class="screen-reader-text"><span
|
585 |
-
<input name="smooth_slider_options[img_size]" type="radio" value="0" <?php checked('0', $smooth_slider['img_size']); ?> /> Original Size <small
|
586 |
-
<input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> Custom Size
|
587 |
-
<label for="smooth_slider_options[img_width]"
|
588 |
-
<input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" />
|
589 |
-
<!--<label for="smooth_slider_options[img_height]">Maximum Height of the Image</label>
|
590 |
-
<input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" /> px <br />-->
|
591 |
-
<!--<input name="smooth_slider_options[crop]" type="checkbox" value="1" <?php checked('1', $smooth_slider['crop']); ?> /> Crop Images if Custom size is selected <small>(this uses timthumb and requires that the images should be in the same folder as of wordpress installation)</small> -->
|
592 |
</fieldset></td>
|
593 |
</tr>
|
594 |
|
595 |
<tr valign="top">
|
596 |
-
<th scope="row"
|
597 |
-
<td><input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" />
|
598 |
</tr>
|
599 |
|
600 |
|
601 |
<tr valign="top">
|
602 |
-
<th scope="row"
|
603 |
-
<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']; ?>" /> 
|
604 |
</tr>
|
605 |
|
606 |
<tr valign="top">
|
607 |
-
<th scope="row"
|
608 |
-
<td><input type="text" name="smooth_slider_options[img_brcolor]" id="color_value_4" value="<?php echo $smooth_slider['img_brcolor']; ?>" /> <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>
|
609 |
</tr>
|
610 |
|
611 |
<tr valign="top">
|
612 |
-
<th scope="row"
|
613 |
-
<td><input name="smooth_slider_options[image_only]" type="checkbox" value="1" <?php checked('1', $smooth_slider['image_only']); ?> /> 
|
614 |
</tr>
|
615 |
</table>
|
616 |
|
617 |
-
<h2
|
618 |
-
<p
|
619 |
<table class="form-table">
|
620 |
<tr valign="top">
|
621 |
-
<th scope="row"
|
622 |
<td><select name="smooth_slider_options[content_font]" id="smooth_slider_content_font" >
|
623 |
<option value="Arial" <?php if ($smooth_slider['content_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
624 |
<option value="Book Antiqua" <?php if ($smooth_slider['content_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
|
@@ -638,77 +375,98 @@ get_smooth_slider();
|
|
638 |
</tr>
|
639 |
|
640 |
<tr valign="top">
|
641 |
-
<th scope="row"
|
642 |
-
<td><input type="text" name="smooth_slider_options[content_fcolor]" id="color_value_5" value="<?php echo $smooth_slider['content_fcolor']; ?>" /> <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>
|
643 |
</tr>
|
644 |
|
645 |
<tr valign="top">
|
646 |
-
<th scope="row"
|
647 |
-
<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']; ?>" />
|
648 |
</tr>
|
649 |
|
650 |
<tr valign="top">
|
651 |
-
<th scope="row"
|
652 |
<td><select name="smooth_slider_options[content_fstyle]" id="smooth_slider_content_fstyle" >
|
653 |
-
<option value="bold" <?php if ($smooth_slider['content_fstyle'] == "bold"){ echo "selected";}?>
|
654 |
-
<option value="bold italic" <?php if ($smooth_slider['content_fstyle'] == "bold italic"){ echo "selected";}?>
|
655 |
-
<option value="italic" <?php if ($smooth_slider['content_fstyle'] == "italic"){ echo "selected";}?>
|
656 |
-
<option value="normal" <?php if ($smooth_slider['content_fstyle'] == "normal"){ echo "selected";}?>
|
657 |
</select>
|
658 |
</td>
|
659 |
</tr>
|
660 |
|
661 |
<tr valign="top">
|
662 |
-
<th scope="row"
|
663 |
<td><select name="smooth_slider_options[content_from]" id="smooth_slider_content_from" >
|
664 |
-
<option value="slider_content" <?php if ($smooth_slider['content_from'] == "slider_content"){ echo "selected";}?>
|
665 |
-
<option value="excerpt" <?php if ($smooth_slider['content_from'] == "excerpt"){ echo "selected";}?>
|
666 |
-
<option value="content" <?php if ($smooth_slider['content_from'] == "content"){ echo "selected";}?>
|
667 |
</select>
|
668 |
</td>
|
669 |
</tr>
|
670 |
|
671 |
<tr valign="top">
|
672 |
-
<th scope="row"
|
673 |
-
<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']; ?>" />
|
674 |
</tr>
|
675 |
<tr valign="top">
|
676 |
-
<th scope="row"
|
677 |
-
<td><input type="text" name="smooth_slider_options[content_limit]" id="smooth_slider_content_limit" class="small-text" value="<?php echo $smooth_slider['content_limit']; ?>" /> 
|
678 |
</tr>
|
679 |
|
680 |
</table>
|
681 |
|
682 |
-
<h2
|
683 |
|
684 |
<table class="form-table">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
<tr valign="top">
|
686 |
-
<th scope="row"
|
687 |
-
<td><input type="text" name="smooth_slider_options[allowable_tags]" class="regular-text code" value="<?php echo $smooth_slider['allowable_tags']; ?>" /> 
|
688 |
</tr>
|
689 |
<tr valign="top">
|
690 |
-
<th scope="row"
|
691 |
<td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
|
692 |
</tr>
|
693 |
|
694 |
<tr valign="top">
|
695 |
-
<th scope="row"
|
696 |
<td><select name="smooth_slider_options[user_level]" >
|
697 |
-
<option value="manage_options" <?php if ($smooth_slider['user_level'] == "manage_options"){ echo "selected";}?>
|
698 |
-
<option value="edit_others_posts" <?php if ($smooth_slider['user_level'] == "edit_others_posts"){ echo "selected";}?>
|
699 |
-
<option value="publish_posts" <?php if ($smooth_slider['user_level'] == "publish_posts"){ echo "selected";}?>
|
700 |
-
<option value="edit_posts" <?php if ($smooth_slider['user_level'] == "edit_posts"){ echo "selected";}?>
|
701 |
</select>
|
702 |
</td>
|
703 |
</tr>
|
704 |
|
705 |
<tr valign="top">
|
706 |
-
<th scope="row"
|
707 |
-
<td><input name="smooth_slider_options[
|
|
|
|
|
|
|
|
|
|
|
708 |
</tr>
|
709 |
|
710 |
<tr valign="top">
|
711 |
-
<th scope="row"
|
|
|
|
|
|
|
|
|
|
|
712 |
<td><select name="smooth_slider_options[stylesheet]" >
|
713 |
<?php
|
714 |
$directory = SMOOTH_SLIDER_CSS_DIR;
|
@@ -720,15 +478,24 @@ if ($handle = opendir($directory)) {
|
|
720 |
closedir($handle);
|
721 |
}
|
722 |
?>
|
723 |
-
</select
|
724 |
</td>
|
725 |
</tr>
|
726 |
|
727 |
<tr valign="top">
|
728 |
-
<th scope="row"
|
729 |
<td><label for="smooth_slider_multiple">
|
730 |
<input name="smooth_slider_options[multiple_sliders]" type="checkbox" id="smooth_slider_multiple" value="1" <?php checked("1", $smooth_slider['multiple_sliders']); ?> />
|
731 |
-
Enable Multiple Slider Function on Edit Post/Page
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
</tr>
|
733 |
|
734 |
</table>
|
4 |
add_action( 'admin_init', 'register_mysettings' );
|
5 |
}
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
// function for adding settings page to wp-admin
|
8 |
function smooth_slider_settings() {
|
9 |
// Add a new submenu under Options:
|
10 |
// add_options_page('Smooth Slider', 'Smooth Slider', 9, basename(__FILE__), 'smooth_slider_settings_page');
|
11 |
+
add_menu_page( 'Smooth Slider', 'Smooth Slider', 'manage_options','smooth-slider-admin', 'smooth_slider_create_multiple_sliders', smooth_slider_plugin_url( 'images/smooth_slider_icon.gif' ) );
|
12 |
+
add_submenu_page('smooth-slider-admin', 'Smooth Sliders', 'Sliders', 'manage_options', 'smooth-slider-admin', 'smooth_slider_create_multiple_sliders');
|
13 |
+
add_submenu_page('smooth-slider-admin', 'Smooth Slider Settings', 'Settings', 'manage_options', 'smooth-slider-settings', 'smooth_slider_settings_page');
|
14 |
}
|
15 |
include('sliders.php');
|
16 |
// This function displays the page content for the Smooth Slider Options submenu
|
23 |
<div id="poststuff" class="metabox-holder has-right-sidebar" style="float:right;width:30%;">
|
24 |
<div id="side-info-column" class="inner-sidebar">
|
25 |
<div class="postbox">
|
26 |
+
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
27 |
<div class="inside">
|
28 |
<ul>
|
29 |
+
<li><a href="http://www.clickonf5.org/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>
|
30 |
+
" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
31 |
+
<li><a href="http://www.clickonf5.org" title="<?php _e('Visit Internet Techies','smooth-slider'); ?>
|
32 |
+
" ><?php _e('Plugin Parent Site','smooth-slider'); ?></a></li>
|
33 |
+
<li><a href="http://clickonf5.com/" title="<?php _e('Support Forum for Smooth Slider','smooth-slider'); ?>
|
34 |
+
" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
35 |
+
<li><a href="http://www.clickonf5.org/about/tejaswini" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>
|
36 |
+
" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
37 |
+
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
38 |
</ul>
|
39 |
</div>
|
40 |
</div>
|
42 |
|
43 |
<div id="side-info-column" class="inner-sidebar">
|
44 |
<div class="postbox">
|
45 |
+
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
46 |
<div class="inside">
|
47 |
<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_GB"></script><script type="text/javascript">FB.init("2aeebe9fb014836a6810ec4426d26f7e");</script><fb:fan profile_id="127760528543" stream="" connections="8" width="270" height="250"></fb:fan>
|
48 |
</div>
|
51 |
|
52 |
<div id="side-info-column" class="inner-sidebar">
|
53 |
<div class="postbox">
|
54 |
+
<h3 class="hndle"><span><?php _e('Credits:','smooth-slider'); ?></span></h3>
|
55 |
<div class="inside">
|
56 |
<ul>
|
57 |
+
<li><a href="http://sorgalla.com/jcarousel/" title="jCarousel jQuey plugin" >Riding carousels with jQuery</a></li>
|
|
|
58 |
<li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
|
|
|
59 |
<li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
|
60 |
</ul>
|
61 |
</div>
|
64 |
|
65 |
<div id="side-info-column" class="inner-sidebar">
|
66 |
<div class="postbox">
|
67 |
+
<h3 class="hndle"><span><?php _e('Top Supporters','smooth-slider'); ?></span></h3>
|
68 |
<div class="inside">
|
69 |
<div id="smooth_sldr_donations">
|
70 |
+
<?php $donations = cf5_sldr_parse_rss_rand('http://support.clickonf5.com/donations.xml','10');
|
71 |
+
if($donations) {?>
|
72 |
+
<ul>
|
73 |
+
<?php foreach($donations as $donation) { ?>
|
74 |
+
<li><a href="<?php echo $donation['link'];?>" title="<?php _e('Visit','smooth-slider'); ?> <?php echo $donation['title'];?>" ><?php echo $donation['title'];?></a></li>
|
75 |
+
<?php } ?>
|
76 |
+
</ul>
|
77 |
+
<?php } ?>
|
78 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
</div>
|
80 |
</div>
|
81 |
</div>
|
82 |
</div>
|
83 |
</div> <!--end of poststuff -->
|
84 |
|
85 |
+
<h2 style="float:left;"><?php _e('Smooth Slider Settings ','smooth-slider'); ?></h2>
|
86 |
<form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
87 |
<input type="hidden" name="cmd" value="_s-xclick">
|
88 |
<input type="hidden" name="hosted_button_id" value="8046056">
|
89 |
<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!">
|
90 |
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
91 |
</form>
|
92 |
+
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-admin' ) );?>
|
93 |
+
<a href="<?php echo $url; ?>" title="<?php _e('Go to Sliders page where you can re-order the slide posts, delete the slides from the slider etc.','smooth-slider'); ?>"><?php _e('Go to Sliders Admin','smooth-slider'); ?></a>
|
94 |
|
95 |
<form method="post" action="options.php">
|
96 |
+
<h2 style="clear:left;"><?php _e('Preview','smooth-slider'); ?></h2>
|
97 |
<?php settings_fields('smooth-slider-group'); ?>
|
98 |
<div style="width:70%;">
|
99 |
<?php
|
100 |
get_smooth_slider();
|
101 |
?> </div>
|
102 |
|
103 |
+
<h2><?php _e('Slider Box','smooth-slider'); ?></h2>
|
104 |
+
<p><?php _e('Customize the looks of the Slider box wrapping the complete slideshow from here','smooth-slider'); ?></p>
|
105 |
|
106 |
<div style="float:left;width:70%;">
|
107 |
<table class="form-table">
|
108 |
|
109 |
<tr valign="top">
|
110 |
+
<th scope="row"><?php _e('Slide Pause Interval','smooth-slider'); ?></th>
|
111 |
+
<td><input type="text" name="smooth_slider_options[speed]" id="smooth_slider_speed" class="small-text" value="<?php echo $smooth_slider['speed']; ?>" /> <?php _e('(in secs)','smooth-slider'); ?></td>
|
112 |
</tr>
|
113 |
|
114 |
<tr valign="top">
|
115 |
+
<th scope="row"><?php _e('Slide Transition Speed','smooth-slider'); ?></th>
|
116 |
+
<td><input type="text" name="smooth_slider_options[transition]" id="smooth_slider_transition" class="small-text" value="<?php echo $smooth_slider['transition']; ?>" /><?php _e('*100(in millisecs)-duration of the slide animation Lower value indicates faster','smooth-slider'); ?><small style="color:#FF0000"><?php _e(' (IMP!! Enter numeric value > 0)','smooth-slider'); ?></small></td>
|
117 |
</tr>
|
118 |
|
119 |
<tr valign="top">
|
120 |
<th scope="row"></th>
|
121 |
<td><label for="smooth_slider_autostep">
|
122 |
<input name="smooth_slider_options[autostep]" type="checkbox" id="smooth_slider_autostep" value="1" <?php checked("1", $smooth_slider['autostep']); ?> />
|
123 |
+
<?php _e(' Enable autostepping of slides','smooth-slider'); ?></label></td>
|
124 |
</tr>
|
125 |
|
126 |
<tr valign="top">
|
127 |
+
<th scope="row"><?php _e('Number of Posts in the Slideshow','smooth-slider'); ?></th>
|
128 |
<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>
|
129 |
</tr>
|
130 |
|
131 |
<tr valign="top">
|
132 |
+
<th scope="row"><?php _e('Background Color','smooth-slider'); ?></th>
|
133 |
+
<td><input type="text" name="smooth_slider_options[bg_color]" id="color_value_1" value="<?php echo $smooth_slider['bg_color']; ?>" /> <img id="color_picker_1" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="<?php _e('Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_1"></div>
|
134 |
+
<label for="smooth_slider_bg"><input name="smooth_slider_options[bg]" type="checkbox" id="smooth_slider_bg" value="1" <?php checked('1', $smooth_slider['bg']); ?> /><?php _e(' Use Transparent Background','smooth-slider'); ?></label> </td>
|
135 |
</tr>
|
136 |
|
137 |
<tr valign="top">
|
138 |
+
<th scope="row"><?php _e('Slider Height','smooth-slider'); ?></th>
|
139 |
+
<td><input type="text" name="smooth_slider_options[height]" id="smooth_slider_height" class="small-text" value="<?php echo $smooth_slider['height']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
140 |
</tr>
|
141 |
|
142 |
|
143 |
<tr valign="top">
|
144 |
+
<th scope="row"><?php _e('Slider Width','smooth-slider'); ?></th>
|
145 |
+
<td><input type="text" name="smooth_slider_options[width]" id="smooth_slider_width" class="small-text" value="<?php echo $smooth_slider['width']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
146 |
</tr>
|
147 |
|
148 |
<tr valign="top">
|
149 |
+
<th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
|
150 |
+
<td><input type="text" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>" /> <?php _e('px (put 0 if no border is required)','smooth-slider'); ?></td>
|
151 |
</tr>
|
152 |
|
153 |
<tr valign="top">
|
154 |
+
<th scope="row"><?php _e('Border Color','smooth-slider'); ?></th>
|
155 |
+
<td><input type="text" name="smooth_slider_options[brcolor]" id="color_value_6" value="<?php echo $smooth_slider['brcolor']; ?>" /> <img id="color_picker_6" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="<?php _e('Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_6"></div></td>
|
156 |
</tr>
|
157 |
|
158 |
<tr valign="top">
|
159 |
+
<th scope="row"><?php _e('Navigation Buttons','smooth-slider'); ?></th>
|
160 |
+
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Navigation Buttons','smooth-slider'); ?></span></legend>
|
161 |
<label for="smooth_slider_prev_next">
|
162 |
<input name="smooth_slider_options[prev_next]" type="checkbox" id="smooth_slider_prev_next" value="1" <?php checked("1", $smooth_slider['prev_next']); ?> />
|
163 |
+
<?php _e('Show Prev/Next navigation arrows','smooth-slider'); ?></label><br />
|
164 |
+
<label for="smooth_slider_goto_slide"><?php _e('Show go to slide number links or images','smooth-slider'); ?></label><br />
|
165 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', $smooth_slider['goto_slide']); ?> /> <?php _e('None ','smooth-slider'); ?><br />
|
166 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="1" <?php checked('1', $smooth_slider['goto_slide']); ?> /> <?php _e('Numbers','smooth-slider'); ?> <br />
|
167 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="2" <?php checked('2', $smooth_slider['goto_slide']); ?> /> <?php _e('Custom Images for Navigation','smooth-slider'); ?> <?php _e('Width: ','smooth-slider'); ?><input type="text" name="smooth_slider_options[navimg_w]" id="smooth_slider_navimg_w" class="small-text" value="<?php echo $smooth_slider['navimg_w']; ?>" /> <?php _e('px','smooth-slider'); ?> <?php _e('Height: ','smooth-slider'); ?><input type="text" name="smooth_slider_options[navimg_ht]" id="smooth_slider_navimg_ht" class="small-text" value="<?php echo $smooth_slider['navimg_ht']; ?>" /> <?php _e('px','smooth-slider'); ?><br />
|
168 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="3" <?php checked('3', $smooth_slider['goto_slide']); ?> /> <?php _e('Enter Custom Text or HTML','smooth-slider'); ?>
|
169 |
<input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
|
170 |
</fieldset></td>
|
171 |
</tr>
|
172 |
|
173 |
</table>
|
174 |
|
175 |
+
<h2><?php _e('Slider Title','smooth-slider'); ?></h2>
|
176 |
+
<p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
|
177 |
<table class="form-table">
|
178 |
|
179 |
<tr valign="top">
|
180 |
+
<th scope="row"><?php _e('Default Title Text','smooth-slider'); ?></th>
|
181 |
<td><input type="text" name="smooth_slider_options[title_text]" id="smooth_slider_title_text" value="<?php echo $smooth_slider['title_text']; ?>" /></td>
|
182 |
</tr>
|
183 |
|
184 |
<tr valign="top">
|
185 |
+
<th scope="row"><?php _e('Pick Slider Title From','smooth-slider'); ?></th>
|
186 |
+
<td><select name="smooth_slider_options[title_from]" >
|
187 |
+
<option value="0" <?php if ($smooth_slider['title_from'] == "0"){ echo "selected";}?> ><?php _e('Default Title Text','smooth-slider'); ?></option>
|
188 |
+
<option value="1" <?php if ($smooth_slider['title_from'] == "1"){ echo "selected";}?> ><?php _e('Slider Name','smooth-slider'); ?></option>
|
189 |
+
</select>
|
190 |
+
</td>
|
191 |
+
</tr>
|
192 |
+
|
193 |
+
<tr valign="top">
|
194 |
+
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
195 |
<td><select name="smooth_slider_options[title_font]" id="smooth_slider_title_font" >
|
196 |
<option value="Arial" <?php if ($smooth_slider['title_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
197 |
<option value="Book Antiqua" <?php if ($smooth_slider['title_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
|
211 |
</tr>
|
212 |
|
213 |
<tr valign="top">
|
214 |
+
<th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
|
215 |
+
<td><input type="text" name="smooth_slider_options[title_fcolor]" id="color_value_2" value="<?php echo $smooth_slider['title_fcolor']; ?>" /> <img id="color_picker_2" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="<?php _e('Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_2"></div></td>
|
216 |
</tr>
|
217 |
|
218 |
<tr valign="top">
|
219 |
+
<th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
|
220 |
+
<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']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
221 |
</tr>
|
222 |
|
223 |
<tr valign="top">
|
224 |
+
<th scope="row"><?php _e('Font Style','smooth-slider'); ?></th>
|
225 |
<td><select name="smooth_slider_options[title_fstyle]" id="smooth_slider_title_fstyle" >
|
226 |
+
<option value="bold" <?php if ($smooth_slider['title_fstyle'] == "bold"){ echo "selected";}?> ><?php _e('Bold','smooth-slider'); ?></option>
|
227 |
+
<option value="bold italic" <?php if ($smooth_slider['title_fstyle'] == "bold italic"){ echo "selected";}?> ><?php _e('Bold Italic','smooth-slider'); ?></option>
|
228 |
+
<option value="italic" <?php if ($smooth_slider['title_fstyle'] == "italic"){ echo "selected";}?> ><?php _e('Italic','smooth-slider'); ?></option>
|
229 |
+
<option value="normal" <?php if ($smooth_slider['title_fstyle'] == "normal"){ echo "selected";}?> ><?php _e('Normal','smooth-slider'); ?></option>
|
230 |
</select>
|
231 |
</td>
|
232 |
</tr>
|
233 |
</table>
|
234 |
|
235 |
+
<h2><?php _e('Post Title','smooth-slider'); ?></h2>
|
236 |
+
<p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
|
237 |
<table class="form-table">
|
238 |
|
239 |
<tr valign="top">
|
240 |
+
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
241 |
<td><select name="smooth_slider_options[ptitle_font]" id="smooth_slider_ptitle_font" >
|
242 |
<option value="Arial" <?php if ($smooth_slider['ptitle_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
243 |
<option value="Book Antiqua" <?php if ($smooth_slider['ptitle_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
|
257 |
</tr>
|
258 |
|
259 |
<tr valign="top">
|
260 |
+
<th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
|
261 |
+
<td><input type="text" name="smooth_slider_options[ptitle_fcolor]" id="color_value_3" value="<?php echo $smooth_slider['ptitle_fcolor']; ?>" /> <img id="color_picker_3" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="<?php _e('Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_3"></div></td>
|
262 |
</tr>
|
263 |
|
264 |
<tr valign="top">
|
265 |
+
<th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
|
266 |
+
<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']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
267 |
</tr>
|
268 |
|
269 |
<tr valign="top">
|
270 |
+
<th scope="row"><?php _e('Font Style','smooth-slider'); ?></th>
|
271 |
<td><select name="smooth_slider_options[ptitle_fstyle]" id="smooth_slider_ptitle_fstyle" >
|
272 |
+
<option value="bold" <?php if ($smooth_slider['ptitle_fstyle'] == "bold"){ echo "selected";}?> ><?php _e('Bold','smooth-slider'); ?></option>
|
273 |
+
<option value="bold italic" <?php if ($smooth_slider['ptitle_fstyle'] == "bold italic"){ echo "selected";}?> ><?php _e('Bold Italic','smooth-slider'); ?></option>
|
274 |
+
<option value="italic" <?php if ($smooth_slider['ptitle_fstyle'] == "italic"){ echo "selected";}?> ><?php _e('Italic','smooth-slider'); ?></option>
|
275 |
+
<option value="normal" <?php if ($smooth_slider['ptitle_fstyle'] == "normal"){ echo "selected";}?> ><?php _e('Normal','smooth-slider'); ?></option>
|
276 |
</select>
|
277 |
</td>
|
278 |
</tr>
|
279 |
</table>
|
280 |
|
281 |
+
<h2><?php _e('Thumbnail Image','smooth-slider'); ?></h2>
|
282 |
+
<p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
|
283 |
<table class="form-table">
|
284 |
|
285 |
<tr valign="top">
|
286 |
+
<th scope="row"><?php _e('Image Pick Preferences','smooth-slider'); ?> <small><?php _e('(The first one is having priority over second, the second having priority on third and so on)','smooth-slider'); ?></small></th>
|
287 |
+
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Image Pick Sequence','smooth-slider'); ?> <small><?php _e('(The first one is having priority over second, the second having priority on third and so on)','smooth-slider'); ?></small> </span></legend>
|
288 |
+
<input name="smooth_slider_options[img_pick][0]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][0]); ?> /> <?php _e('Use Custom Field/Key','smooth-slider'); ?>
|
289 |
+
<input type="text" name="smooth_slider_options[img_pick][1]" class="text" value="<?php echo $smooth_slider['img_pick'][1]; ?>" /> <?php _e('Name of the Custom Field/Key','smooth-slider'); ?>
|
290 |
<br />
|
291 |
+
<input name="smooth_slider_options[img_pick][2]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][2]); ?> /> <?php _e('Use Featured Post/Thumbnail (Wordpress 3.0 + feature)','smooth-slider'); ?> <br />
|
292 |
+
<input name="smooth_slider_options[img_pick][3]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][3]); ?> /> <?php _e('Consider Images attached to the post','smooth-slider'); ?>
|
293 |
+
<input type="text" name="smooth_slider_options[img_pick][4]" class="small-text" value="<?php echo $smooth_slider['img_pick'][4]; ?>" /> <?php _e('Order of the Image attachment to pick','smooth-slider'); ?> <br />
|
294 |
+
<input name="smooth_slider_options[img_pick][5]" type="checkbox" value="1" <?php checked('1', $smooth_slider['img_pick'][5]); ?> /> <?php _e('Scan images from the post, in case there is no attached image to the post','smooth-slider'); ?>
|
295 |
</fieldset></td>
|
296 |
</tr>
|
297 |
|
298 |
<tr valign="top">
|
299 |
+
<th scope="row"><?php _e('Align to','smooth-slider'); ?></th>
|
300 |
<td><select name="smooth_slider_options[img_align]" id="smooth_slider_img_align" >
|
301 |
+
<option value="left" <?php if ($smooth_slider['img_align'] == "left"){ echo "selected";}?> ><?php _e('Left','smooth-slider'); ?></option>
|
302 |
+
<option value="right" <?php if ($smooth_slider['img_align'] == "right"){ echo "selected";}?> ><?php _e('Right','smooth-slider'); ?></option>
|
303 |
+
<option value="none" <?php if ($smooth_slider['img_align'] == "none"){ echo "selected";}?> ><?php _e('Center','smooth-slider'); ?></option>
|
304 |
</select>
|
305 |
</td>
|
306 |
</tr>
|
307 |
|
308 |
<tr valign="top">
|
309 |
+
<th scope="row"><?php _e('Wordpress Image Extract Size','smooth-slider'); ?>
|
310 |
+
</th>
|
311 |
<td><select name="smooth_slider_options[crop]" id="smooth_slider_img_crop" >
|
312 |
+
<option value="0" <?php if ($smooth_slider['crop'] == "0"){ echo "selected";}?> ><?php _e('Full','smooth-slider'); ?></option>
|
313 |
+
<option value="1" <?php if ($smooth_slider['crop'] == "1"){ echo "selected";}?> ><?php _e('Large','smooth-slider'); ?></option>
|
314 |
+
<option value="2" <?php if ($smooth_slider['crop'] == "2"){ echo "selected";}?> ><?php _e('Medium','smooth-slider'); ?></option>
|
315 |
+
<option value="3" <?php if ($smooth_slider['crop'] == "3"){ echo "selected";}?> ><?php _e('Thumbnail','smooth-slider'); ?></option>
|
316 |
</select>
|
317 |
+
<small><?php _e('This is for fast page load, in case you choose \'Custom Size\' setting from below, you would not like to extract \'full\' size image from the media library. In this case you can use, \'medium\' or \'thumbnail\' image. This is because, for every image upload to the media gallery WordPress creates four sizes of the same image. So you can choose which to load in the slider and then specify the actual size.','smooth-slider'); ?></small>
|
318 |
</td>
|
319 |
</tr>
|
320 |
|
321 |
|
322 |
<tr valign="top">
|
323 |
+
<th scope="row"><?php _e('Image Size','smooth-slider'); ?></th>
|
324 |
+
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Image Size','smooth-slider'); ?></span></legend>
|
325 |
+
<input name="smooth_slider_options[img_size]" type="radio" value="0" <?php checked('0', $smooth_slider['img_size']); ?> /> <?php _e('Original Size','smooth-slider'); ?> <small><?php _e('(In this case, the size would be equal to the extracted image (full/large/medium/thumbnail) from the above settings','smooth-slider'); ?></small><br />
|
326 |
+
<input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> <?php _e('Custom Size:','smooth-slider'); ?>
|
327 |
+
<label for="smooth_slider_options[img_width]"><?php _e('Width','smooth-slider'); ?></label>
|
328 |
+
<input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" /> <?php _e('px','smooth-slider'); ?>
|
|
|
|
|
|
|
329 |
</fieldset></td>
|
330 |
</tr>
|
331 |
|
332 |
<tr valign="top">
|
333 |
+
<th scope="row"><?php _e('Maximum Height of the Image','smooth-slider'); ?></th>
|
334 |
+
<td><input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" /> <?php _e('px','smooth-slider'); ?> <?php _e('(This is necessary in order to keep the maximum image height in control)','smooth-slider'); ?></td>
|
335 |
</tr>
|
336 |
|
337 |
|
338 |
<tr valign="top">
|
339 |
+
<th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
|
340 |
+
<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']; ?>" /> <?php _e('px (put 0 if no border is required)','smooth-slider'); ?></td>
|
341 |
</tr>
|
342 |
|
343 |
<tr valign="top">
|
344 |
+
<th scope="row"><?php _e('Border Color','smooth-slider'); ?></th>
|
345 |
+
<td><input type="text" name="smooth_slider_options[img_brcolor]" id="color_value_4" value="<?php echo $smooth_slider['img_brcolor']; ?>" /> <img id="color_picker_4" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="<?php _e('Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_4"></div></td>
|
346 |
</tr>
|
347 |
|
348 |
<tr valign="top">
|
349 |
+
<th scope="row"><?php _e('Make pure Image Slider','smooth-slider'); ?></th>
|
350 |
+
<td><input name="smooth_slider_options[image_only]" type="checkbox" value="1" <?php checked('1', $smooth_slider['image_only']); ?> /> <?php _e('(check this to convert Smooth Slider to Image Slider with no content)','smooth-slider'); ?></td>
|
351 |
</tr>
|
352 |
</table>
|
353 |
|
354 |
+
<h2><?php _e('Slider Content','smooth-slider'); ?></h2>
|
355 |
+
<p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
|
356 |
<table class="form-table">
|
357 |
<tr valign="top">
|
358 |
+
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
359 |
<td><select name="smooth_slider_options[content_font]" id="smooth_slider_content_font" >
|
360 |
<option value="Arial" <?php if ($smooth_slider['content_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
361 |
<option value="Book Antiqua" <?php if ($smooth_slider['content_font'] == "Book Antiqua"){ echo "selected";}?> >Book Antiqua</option>
|
375 |
</tr>
|
376 |
|
377 |
<tr valign="top">
|
378 |
+
<th scope="row"><?php _e('Font Color','smooth-slider'); ?></th>
|
379 |
+
<td><input type="text" name="smooth_slider_options[content_fcolor]" id="color_value_5" value="<?php echo $smooth_slider['content_fcolor']; ?>" /> <img id="color_picker_5" src="<?php echo smooth_slider_plugin_url( 'images/color_picker.png' ); ?>" alt="Pick the color of your choice','smooth-slider'); ?>" /><div class="color-picker-wrap" id="colorbox_5"></div></td>
|
380 |
</tr>
|
381 |
|
382 |
<tr valign="top">
|
383 |
+
<th scope="row"><?php _e('Font Size','smooth-slider'); ?></th>
|
384 |
+
<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']; ?>" /> <?php _e('px','smooth-slider'); ?></td>
|
385 |
</tr>
|
386 |
|
387 |
<tr valign="top">
|
388 |
+
<th scope="row"><?php _e('Font Style','smooth-slider'); ?></th>
|
389 |
<td><select name="smooth_slider_options[content_fstyle]" id="smooth_slider_content_fstyle" >
|
390 |
+
<option value="bold" <?php if ($smooth_slider['content_fstyle'] == "bold"){ echo "selected";}?> ><?php _e('Bold','smooth-slider'); ?></option>
|
391 |
+
<option value="bold italic" <?php if ($smooth_slider['content_fstyle'] == "bold italic"){ echo "selected";}?> ><?php _e('Bold Italic','smooth-slider'); ?></option>
|
392 |
+
<option value="italic" <?php if ($smooth_slider['content_fstyle'] == "italic"){ echo "selected";}?> ><?php _e('Italic','smooth-slider'); ?></option>
|
393 |
+
<option value="normal" <?php if ($smooth_slider['content_fstyle'] == "normal"){ echo "selected";}?> ><?php _e('Normal','smooth-slider'); ?></option>
|
394 |
</select>
|
395 |
</td>
|
396 |
</tr>
|
397 |
|
398 |
<tr valign="top">
|
399 |
+
<th scope="row"><?php _e('Pick content From','smooth-slider'); ?></th>
|
400 |
<td><select name="smooth_slider_options[content_from]" id="smooth_slider_content_from" >
|
401 |
+
<option value="slider_content" <?php if ($smooth_slider['content_from'] == "slider_content"){ echo "selected";}?> ><?php _e('Slider Content Custom field','smooth-slider'); ?></option>
|
402 |
+
<option value="excerpt" <?php if ($smooth_slider['content_from'] == "excerpt"){ echo "selected";}?> ><?php _e('Post Excerpt','smooth-slider'); ?></option>
|
403 |
+
<option value="content" <?php if ($smooth_slider['content_from'] == "content"){ echo "selected";}?> ><?php _e('From Content','smooth-slider'); ?></option>
|
404 |
</select>
|
405 |
</td>
|
406 |
</tr>
|
407 |
|
408 |
<tr valign="top">
|
409 |
+
<th scope="row"><?php _e('Maximum content size (in characters)','smooth-slider'); ?></th>
|
410 |
+
<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']; ?>" /> <?php _e('characters','smooth-slider'); ?> </td>
|
411 |
</tr>
|
412 |
<tr valign="top">
|
413 |
+
<th scope="row"><?php _e('Maximum content size (in words)','smooth-slider'); ?></th>
|
414 |
+
<td><input type="text" name="smooth_slider_options[content_limit]" id="smooth_slider_content_limit" class="small-text" value="<?php echo $smooth_slider['content_limit']; ?>" /> <?php _e('words (if specified will override the \'Maximum Content Size in Chracters\' setting above)','smooth-slider'); ?></td>
|
415 |
</tr>
|
416 |
|
417 |
</table>
|
418 |
|
419 |
+
<h2><?php _e('Miscellaneous','smooth-slider'); ?></h2>
|
420 |
|
421 |
<table class="form-table">
|
422 |
+
|
423 |
+
<tr valign="top" <?php if($smooth_slider['ver']=='step') echo 'style="display:none;"';?>>
|
424 |
+
<th scope="row"><?php _e('Promote Smooth Slider','smooth-slider'); ?></th>
|
425 |
+
<td><select name="smooth_slider_options[support]" >
|
426 |
+
<option value="1" <?php if ($smooth_slider['support'] == "1"){ echo "selected";}?> ><?php _e('Yes','smooth-slider'); ?></option>
|
427 |
+
<option value="0" <?php if ($smooth_slider['support'] == "0"){ echo "selected";}?> ><?php _e('No','smooth-slider'); ?></option>
|
428 |
+
</select>
|
429 |
+
<small><?php _e('Consider donating in case you select "No"','smooth-slider'); ?></small>
|
430 |
+
</td>
|
431 |
+
</tr>
|
432 |
+
|
433 |
<tr valign="top">
|
434 |
+
<th scope="row"><?php _e('Retain these html tags','smooth-slider'); ?></th>
|
435 |
+
<td><input type="text" name="smooth_slider_options[allowable_tags]" class="regular-text code" value="<?php echo $smooth_slider['allowable_tags']; ?>" /> <?php _e('(read','smooth-slider'); ?> <a href="http://www.clickonf5.org/smooth-slider" title="<?php _e('how to retain html like line breaks and links in the Smooth Slider','smooth-slider'); ?>" target="_blank"><?php _e('Usage section of the plugin page','smooth-slider'); ?></a> <?php _e('to know more','smooth-slider'); ?>)</td>
|
436 |
</tr>
|
437 |
<tr valign="top">
|
438 |
+
<th scope="row"><?php _e('Continue Reading Text','smooth-slider'); ?></th>
|
439 |
<td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
|
440 |
</tr>
|
441 |
|
442 |
<tr valign="top">
|
443 |
+
<th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
|
444 |
<td><select name="smooth_slider_options[user_level]" >
|
445 |
+
<option value="manage_options" <?php if ($smooth_slider['user_level'] == "manage_options"){ echo "selected";}?> ><?php _e('Administrator','smooth-slider'); ?></option>
|
446 |
+
<option value="edit_others_posts" <?php if ($smooth_slider['user_level'] == "edit_others_posts"){ echo "selected";}?> ><?php _e('Editor and Admininstrator','smooth-slider'); ?></option>
|
447 |
+
<option value="publish_posts" <?php if ($smooth_slider['user_level'] == "publish_posts"){ echo "selected";}?> ><?php _e('Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
448 |
+
<option value="edit_posts" <?php if ($smooth_slider['user_level'] == "edit_posts"){ echo "selected";}?> ><?php _e('Contributor, Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
449 |
</select>
|
450 |
</td>
|
451 |
</tr>
|
452 |
|
453 |
<tr valign="top">
|
454 |
+
<th scope="row"><?php _e('Randomize Slides in Slider','smooth-slider'); ?></th>
|
455 |
+
<td><input name="smooth_slider_options[rand]" type="checkbox" value="1" <?php checked('1', $smooth_slider['rand']); ?> /> <?php _e('check this if you want the slides added to appear in random order','smooth-slider'); ?></td>
|
456 |
+
</tr>
|
457 |
+
|
458 |
+
<tr valign="top">
|
459 |
+
<th scope="row"><?php _e('Text to display in the JavaScript disabled browser','smooth-slider'); ?></th>
|
460 |
+
<td><input type="text" name="smooth_slider_options[noscript]" class="regular-text code" value="<?php echo $smooth_slider['noscript']; ?>" /></td>
|
461 |
</tr>
|
462 |
|
463 |
<tr valign="top">
|
464 |
+
<th scope="row"><?php _e('Add Shortcode Support','smooth-slider'); ?></th>
|
465 |
+
<td><input name="smooth_slider_options[shortcode]" type="checkbox" value="1" <?php checked('1', $smooth_slider['shortcode']); ?> /> <?php _e('check this if you want to use Smooth Slider Shortcode i.e [smoothslider]','smooth-slider'); ?></td>
|
466 |
+
</tr>
|
467 |
+
|
468 |
+
<tr valign="top">
|
469 |
+
<th scope="row"><?php _e('Smooth Slider Styles to Use on Other than Post/Pages','smooth-slider'); ?> <small><?php _e('(i.e. for index.php,category.php,archive.php etc)','smooth-slider'); ?></small></th>
|
470 |
<td><select name="smooth_slider_options[stylesheet]" >
|
471 |
<?php
|
472 |
$directory = SMOOTH_SLIDER_CSS_DIR;
|
478 |
closedir($handle);
|
479 |
}
|
480 |
?>
|
481 |
+
</select>
|
482 |
</td>
|
483 |
</tr>
|
484 |
|
485 |
<tr valign="top">
|
486 |
+
<th scope="row"><?php _e('Multiple Slider Feature','smooth-slider'); ?></th>
|
487 |
<td><label for="smooth_slider_multiple">
|
488 |
<input name="smooth_slider_options[multiple_sliders]" type="checkbox" id="smooth_slider_multiple" value="1" <?php checked("1", $smooth_slider['multiple_sliders']); ?> />
|
489 |
+
<?php _e('Enable Multiple Slider Function on Edit Post/Page','smooth-slider'); ?></label></td>
|
490 |
+
</tr>
|
491 |
+
|
492 |
+
<tr valign="top">
|
493 |
+
<th scope="row"><?php _e('Version to use','smooth-slider'); ?></th>
|
494 |
+
<td><select name="smooth_slider_options[ver]" >
|
495 |
+
<option value="j" <?php if ($smooth_slider['ver'] == "j"){ echo "selected";}?> ><?php _e('New','smooth-slider'); ?></option>
|
496 |
+
<option value="step" <?php if ($smooth_slider['ver'] == "step"){ echo "selected";}?> ><?php _e('Previous','smooth-slider'); ?></option>
|
497 |
+
</select>
|
498 |
+
</td>
|
499 |
</tr>
|
500 |
|
501 |
</table>
|
settings/sliders.php
CHANGED
@@ -5,7 +5,7 @@ global $smooth_slider;
|
|
5 |
|
6 |
<div class="wrap" style="clear:both;">
|
7 |
|
8 |
-
<h2 style="float:left;"
|
9 |
<form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
10 |
<input type="hidden" name="cmd" value="_s-xclick">
|
11 |
<input type="hidden" name="hosted_button_id" value="8046056">
|
@@ -24,7 +24,7 @@ if ($_POST['remove_posts_slider']) {
|
|
24 |
$wpdb->query($sql);
|
25 |
}
|
26 |
}
|
27 |
-
if ($_POST['remove_all'] ==
|
28 |
global $wpdb, $table_prefix;
|
29 |
$table_name = $table_prefix.SLIDER_TABLE;
|
30 |
$current_slider = $_POST['current_slider_id'];
|
@@ -33,7 +33,7 @@ if ($_POST['remove_posts_slider']) {
|
|
33 |
$wpdb->query($sql);
|
34 |
}
|
35 |
}
|
36 |
-
if ($_POST['remove_all'] == 'Delete Slider') {
|
37 |
$slider_id = $_POST['current_slider_id'];
|
38 |
global $wpdb, $table_prefix;
|
39 |
$slider_table = $table_prefix.SLIDER_TABLE;
|
@@ -74,7 +74,7 @@ if ($_POST['reorder_posts_slider']) {
|
|
74 |
?>
|
75 |
<div style="clear:both"></div>
|
76 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-settings' ) );?>
|
77 |
-
<a href="<?php echo $url; ?>" title="Settings Page for Smooth Slider where you can change the color, font etc. for the sliders"
|
78 |
<?php $sliders = ss_get_sliders(); ?>
|
79 |
|
80 |
<div id="slider_tabs">
|
@@ -83,23 +83,22 @@ if ($_POST['reorder_posts_slider']) {
|
|
83 |
<li><a href="#tabs-<?php echo $slider['slider_id'];?>"><?php echo $slider['slider_name'];?></a></li>
|
84 |
<?php } ?>
|
85 |
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
86 |
-
<li><a href="#new_slider"
|
87 |
<?php } ?>
|
88 |
</ul>
|
89 |
|
90 |
-
<?php foreach($sliders as $slider){
|
91 |
-
?>
|
92 |
<div id="tabs-<?php echo $slider['slider_id'];?>">
|
93 |
<form action="" method="post">
|
94 |
<?php settings_fields('smooth-slider-group'); ?>
|
95 |
|
96 |
<input type="hidden" name="remove_posts_slider" value="1" />
|
97 |
<div id="tabs-<?php echo $slider['slider_id'];?>">
|
98 |
-
<h3
|
99 |
-
<p><em
|
100 |
|
101 |
<table class="widefat">
|
102 |
-
<thead><tr><th
|
103 |
|
104 |
<?php
|
105 |
/*global $wpdb, $table_prefix;
|
@@ -118,21 +117,21 @@ if ($_POST['reorder_posts_slider']) {
|
|
118 |
$count++;
|
119 |
$sslider_author = get_userdata($post->post_author);
|
120 |
$sslider_author_dname = $sslider_author->display_name;
|
121 |
-
echo '<tr' . ($count % 2 ? ' class="alternate"' : '') . '><td><strong>' . $post->post_title . '</strong><a href="'.get_edit_post_link( $post->ID, $context = 'display' ).'" target="_blank"> (Edit)</a> <a href="'.get_permalink( $post->ID ).'" target="_blank"> (View) </a></td><td>By ' . $sslider_author_dname . '</td><td>' . date('l, F j. Y',strtotime($post->post_date)) . '</td><td><input type="checkbox" name="slider_posts[' . $post->ID . ']" value="1" /></td></tr>';
|
122 |
}
|
123 |
}
|
124 |
|
125 |
if ($count == 0) {
|
126 |
-
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>';
|
127 |
}
|
128 |
-
echo '</tbody><tfoot><tr><th>Post/Page Title</th><th>Author</th><th>Post Date</th><th>Remove Post</th></tr></tfoot></table>';
|
129 |
|
130 |
echo '<div class="submit">';
|
131 |
|
132 |
-
if ($count) {echo '<input type="submit" value="Remove Selected" onclick="return confirmRemove()" /><input type="submit" name="remove_all" value="Remove All at Once" onclick="return confirmRemoveAll()" />';}
|
133 |
|
134 |
if($slider_id != '1') {
|
135 |
-
echo '<input type="submit" value="Delete Slider" name="remove_all" onclick="return confirmSliderDelete()" />';
|
136 |
}
|
137 |
|
138 |
echo '</div>';
|
@@ -143,8 +142,8 @@ if ($_POST['reorder_posts_slider']) {
|
|
143 |
|
144 |
<form action="" method="post">
|
145 |
<input type="hidden" name="reorder_posts_slider" value="1" />
|
146 |
-
<h3
|
147 |
-
<p><em
|
148 |
<ul id="sslider_sortable_<?php echo $slider['slider_id'];?>" style="color:#326078">
|
149 |
<?php
|
150 |
/*global $wpdb, $table_prefix;
|
@@ -168,7 +167,7 @@ if ($_POST['reorder_posts_slider']) {
|
|
168 |
}
|
169 |
|
170 |
if ($count == 0) {
|
171 |
-
echo '<li>No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page</li>';
|
172 |
}
|
173 |
|
174 |
echo '</ul><div class="submit">';
|
@@ -186,12 +185,12 @@ if ($_POST['reorder_posts_slider']) {
|
|
186 |
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
187 |
<div id="new_slider">
|
188 |
<form action="" method="post" onsubmit="return slider_checkform(this);" >
|
189 |
-
<h3
|
190 |
<input type="hidden" name="create_new_slider" value="1" />
|
191 |
|
192 |
<input name="new_slider_name" class="regular-text code" value="" style="clear:both;" />
|
193 |
|
194 |
-
<div class="submit"><input type="submit" value="Create New" name="create_new" /></div>
|
195 |
|
196 |
</form>
|
197 |
</div>
|
@@ -201,14 +200,14 @@ if ($_POST['reorder_posts_slider']) {
|
|
201 |
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
202 |
<div id="side-info-column" class="inner-sidebar" style="float:left;">
|
203 |
<div class="postbox">
|
204 |
-
<h3 class="hndle"><span
|
205 |
<div class="inside">
|
206 |
<ul>
|
207 |
-
<li><a href="http://www.clickonf5.org/smooth-slider" title="Smooth Slider Homepage"
|
208 |
-
<li><a href="http://www.clickonf5.org" title="Visit Internet Techies"
|
209 |
-
<li><a href="http://www.clickonf5.org/phpbb/smooth-slider-f12/" title="Support Forum for Smooth Slider"
|
210 |
-
<li><a href="http://www.clickonf5.org/about/tejaswini" title="Smooth Slider Author Page"
|
211 |
-
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins"
|
212 |
</ul>
|
213 |
</div>
|
214 |
</div>
|
@@ -216,7 +215,7 @@ if ($_POST['reorder_posts_slider']) {
|
|
216 |
|
217 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
218 |
<div class="postbox">
|
219 |
-
<h3 class="hndle"><span></span
|
220 |
<div class="inside">
|
221 |
<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_GB"></script><script type="text/javascript">FB.init("2aeebe9fb014836a6810ec4426d26f7e");</script><fb:fan profile_id="127760528543" stream="" connections="8" width="270" height="250"></fb:fan>
|
222 |
</div>
|
@@ -225,13 +224,11 @@ if ($_POST['reorder_posts_slider']) {
|
|
225 |
|
226 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
227 |
<div class="postbox">
|
228 |
-
<h3 class="hndle"><span
|
229 |
<div class="inside">
|
230 |
<ul>
|
231 |
-
<li><a href="http://
|
232 |
-
<li><a href="http://www.bioxd.com/featureme" title="FeatureMe Wordpress Plugin by Oscar Alcalá" >FeatureMe Wordpress Plugin</a></li>
|
233 |
<li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
|
234 |
-
<li><a href="http://code.google.com/p/timthumb/" title="TimThumb script by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks" >TimThumb script</a></li>
|
235 |
<li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
|
236 |
</ul>
|
237 |
</div>
|
@@ -240,45 +237,17 @@ if ($_POST['reorder_posts_slider']) {
|
|
240 |
|
241 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
242 |
<div class="postbox">
|
243 |
-
<h3 class="hndle"><span
|
244 |
<div class="inside">
|
245 |
<div id="smooth_sldr_donations">
|
246 |
-
|
247 |
-
|
248 |
-
<
|
249 |
-
|
250 |
-
<li><a href="
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
<li><a href="http://www.maximotimes.com/maximo/" target="_blank">Chonbury Neth - $10</a></li>
|
255 |
-
<li><a href="http://www.yobeat.com/" target="_blank">Brooke Geery - $10</a></li>
|
256 |
-
</ul>
|
257 |
-
<script language="JavaScript" type="text/javascript">
|
258 |
-
<!--
|
259 |
-
// Customize the widget by editing the fields below
|
260 |
-
// All fields are required
|
261 |
-
|
262 |
-
// Your Feedity RSS feed URL
|
263 |
-
feedity_widget_feed = "http://feedity.com/rss.aspx/clickonf5-org/UlVTUldR";
|
264 |
-
|
265 |
-
// Number of items to display in the widget
|
266 |
-
feedity_widget_numberofitems = "10";
|
267 |
-
|
268 |
-
// Show feed item published date (values: yes or no)
|
269 |
-
feedity_widget_showdate = "no";
|
270 |
-
|
271 |
-
// Widget box width (in px, pt, em, or %)
|
272 |
-
feedity_widget_width = "220px";
|
273 |
-
|
274 |
-
// Widget background color in hex or by name (eg: #ffffff or white)
|
275 |
-
feedity_widget_backcolor = "#ffffff";
|
276 |
-
|
277 |
-
// Widget font/link color in hex or by name (eg: #000000 or black)
|
278 |
-
feedity_widget_fontcolor = "#000000";
|
279 |
-
//-->
|
280 |
-
</script>
|
281 |
-
<script language="JavaScript" type="text/javascript" src="http://feedity.com/js/widget.js"></script>
|
282 |
</div>
|
283 |
</div>
|
284 |
</div>
|
@@ -287,8 +256,6 @@ if ($_POST['reorder_posts_slider']) {
|
|
287 |
</div> <!--end of poststuff -->
|
288 |
|
289 |
|
290 |
-
|
291 |
-
|
292 |
</div> <!--end of float wrap -->
|
293 |
<?php
|
294 |
}
|
5 |
|
6 |
<div class="wrap" style="clear:both;">
|
7 |
|
8 |
+
<h2 style="float:left;"><?php _e('Sliders Created','smooth-slider'); ?></h2>
|
9 |
<form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
10 |
<input type="hidden" name="cmd" value="_s-xclick">
|
11 |
<input type="hidden" name="hosted_button_id" value="8046056">
|
24 |
$wpdb->query($sql);
|
25 |
}
|
26 |
}
|
27 |
+
if ($_POST['remove_all'] == __('Remove All at Once','smooth-slider')) {
|
28 |
global $wpdb, $table_prefix;
|
29 |
$table_name = $table_prefix.SLIDER_TABLE;
|
30 |
$current_slider = $_POST['current_slider_id'];
|
33 |
$wpdb->query($sql);
|
34 |
}
|
35 |
}
|
36 |
+
if ($_POST['remove_all'] == __('Delete Slider','smooth-slider')) {
|
37 |
$slider_id = $_POST['current_slider_id'];
|
38 |
global $wpdb, $table_prefix;
|
39 |
$slider_table = $table_prefix.SLIDER_TABLE;
|
74 |
?>
|
75 |
<div style="clear:both"></div>
|
76 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-settings' ) );?>
|
77 |
+
<a href="<?php echo $url; ?>" title="<?php _e('Settings Page for Smooth Slider where you can change the color, font etc. for the sliders','smooth-slider'); ?>"><?php _e('Go to Smooth Slider Settings page','smooth-slider'); ?></a>
|
78 |
<?php $sliders = ss_get_sliders(); ?>
|
79 |
|
80 |
<div id="slider_tabs">
|
83 |
<li><a href="#tabs-<?php echo $slider['slider_id'];?>"><?php echo $slider['slider_name'];?></a></li>
|
84 |
<?php } ?>
|
85 |
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
86 |
+
<li><a href="#new_slider"><?php _e('Create New Slider','smooth-slider'); ?></a></li>
|
87 |
<?php } ?>
|
88 |
</ul>
|
89 |
|
90 |
+
<?php foreach($sliders as $slider){?>
|
|
|
91 |
<div id="tabs-<?php echo $slider['slider_id'];?>">
|
92 |
<form action="" method="post">
|
93 |
<?php settings_fields('smooth-slider-group'); ?>
|
94 |
|
95 |
<input type="hidden" name="remove_posts_slider" value="1" />
|
96 |
<div id="tabs-<?php echo $slider['slider_id'];?>">
|
97 |
+
<h3><?php _e('Posts/Pages Added To','smooth-slider'); ?> <?php echo $slider['slider_name'];?><?php _e('(Slider ID','smooth-slider'); ?> = <?php echo $slider['slider_id'];?>)</h3>
|
98 |
+
<p><em><?php _e('Check the Post/Page and Press "Remove Selected" to remove them From','smooth-slider'); ?> <?php echo $slider['slider_name'];?>. <?php _e('Press "Remove All at Once" to remove all the posts from the','smooth-slider'); ?> <?php echo $slider['slider_name'];?>.</em></p>
|
99 |
|
100 |
<table class="widefat">
|
101 |
+
<thead><tr><th><?php _e('Post/Page Title','smooth-slider'); ?></th><th><?php _e('Author','smooth-slider'); ?></th><th><?php _e('Post Date','smooth-slider'); ?></th><th><?php _e('Remove Post','smooth-slider'); ?></th></tr></thead><tbody>
|
102 |
|
103 |
<?php
|
104 |
/*global $wpdb, $table_prefix;
|
117 |
$count++;
|
118 |
$sslider_author = get_userdata($post->post_author);
|
119 |
$sslider_author_dname = $sslider_author->display_name;
|
120 |
+
echo '<tr' . ($count % 2 ? ' class="alternate"' : '') . '><td><strong>' . $post->post_title . '</strong><a href="'.get_edit_post_link( $post->ID, $context = 'display' ).'" target="_blank"> '.__( '(Edit)', 'smooth-slider' ).'</a> <a href="'.get_permalink( $post->ID ).'" target="_blank"> '.__( '(View)', 'smooth-slider' ).' </a></td><td>By ' . $sslider_author_dname . '</td><td>' . date('l, F j. Y',strtotime($post->post_date)) . '</td><td><input type="checkbox" name="slider_posts[' . $post->ID . ']" value="1" /></td></tr>';
|
121 |
}
|
122 |
}
|
123 |
|
124 |
if ($count == 0) {
|
125 |
+
echo '<tr><td colspan="4">'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'smooth-slider' ).'</td></tr>';
|
126 |
}
|
127 |
+
echo '</tbody><tfoot><tr><th>'.__( 'Post/Page Title', 'smooth-slider' ).'</th><th>'.__( 'Author', 'smooth-slider' ).'</th><th>'.__( 'Post Date', 'smooth-slider' ).'</th><th>'.__( 'Remove Post', 'smooth-slider' ).'</th></tr></tfoot></table>';
|
128 |
|
129 |
echo '<div class="submit">';
|
130 |
|
131 |
+
if ($count) {echo '<input type="submit" value="'.__( 'Remove Selected', 'smooth-slider' ).'" onclick="return confirmRemove()" /><input type="submit" name="remove_all" value="'.__( 'Remove All at Once', 'smooth-slider' ).'" onclick="return confirmRemoveAll()" />';}
|
132 |
|
133 |
if($slider_id != '1') {
|
134 |
+
echo '<input type="submit" value="'.__( 'Delete Slider', 'smooth-slider' ).'" name="remove_all" onclick="return confirmSliderDelete()" />';
|
135 |
}
|
136 |
|
137 |
echo '</div>';
|
142 |
|
143 |
<form action="" method="post">
|
144 |
<input type="hidden" name="reorder_posts_slider" value="1" />
|
145 |
+
<h3><?php _e('Reorder the Posts/Pages Added To','smooth-slider'); ?> <?php echo $slider['slider_name'];?>(Slider ID = <?php echo $slider['slider_id'];?>)</h3>
|
146 |
+
<p><em><?php _e('Click on and drag the post/page title to a new spot within the list, and the other items will adjust to fit.','smooth-slider'); ?> </em></p>
|
147 |
<ul id="sslider_sortable_<?php echo $slider['slider_id'];?>" style="color:#326078">
|
148 |
<?php
|
149 |
/*global $wpdb, $table_prefix;
|
167 |
}
|
168 |
|
169 |
if ($count == 0) {
|
170 |
+
echo '<li>'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'smooth-slider' ).'</li>';
|
171 |
}
|
172 |
|
173 |
echo '</ul><div class="submit">';
|
185 |
<?php if($smooth_slider['multiple_sliders'] == '1') {?>
|
186 |
<div id="new_slider">
|
187 |
<form action="" method="post" onsubmit="return slider_checkform(this);" >
|
188 |
+
<h3><?php _e('Enter New Slider Name','smooth-slider'); ?></h3>
|
189 |
<input type="hidden" name="create_new_slider" value="1" />
|
190 |
|
191 |
<input name="new_slider_name" class="regular-text code" value="" style="clear:both;" />
|
192 |
|
193 |
+
<div class="submit"><input type="submit" value="<?php _e('Create New','smooth-slider'); ?>" name="create_new" /></div>
|
194 |
|
195 |
</form>
|
196 |
</div>
|
200 |
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
201 |
<div id="side-info-column" class="inner-sidebar" style="float:left;">
|
202 |
<div class="postbox">
|
203 |
+
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
204 |
<div class="inside">
|
205 |
<ul>
|
206 |
+
<li><a href="http://www.clickonf5.org/smooth-slider" title="Smooth Slider Homepage" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
207 |
+
<li><a href="http://www.clickonf5.org" title="Visit Internet Techies" ><?php _e('Plugin Parent Site','smooth-slider'); ?></a></li>
|
208 |
+
<li><a href="http://www.clickonf5.org/phpbb/smooth-slider-f12/" title="Support Forum for Smooth Slider" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
209 |
+
<li><a href="http://www.clickonf5.org/about/tejaswini" title="Smooth Slider Author Page" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
210 |
+
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
211 |
</ul>
|
212 |
</div>
|
213 |
</div>
|
215 |
|
216 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
217 |
<div class="postbox">
|
218 |
+
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
219 |
<div class="inside">
|
220 |
<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_GB"></script><script type="text/javascript">FB.init("2aeebe9fb014836a6810ec4426d26f7e");</script><fb:fan profile_id="127760528543" stream="" connections="8" width="270" height="250"></fb:fan>
|
221 |
</div>
|
224 |
|
225 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
226 |
<div class="postbox">
|
227 |
+
<h3 class="hndle"><span><?php _e('Credits:','smooth-slider'); ?></span></h3>
|
228 |
<div class="inside">
|
229 |
<ul>
|
230 |
+
<li><a href="http://sorgalla.com/jcarousel/" title="jCarousel jQuey plugin" >Riding carousels with jQuery</a></li>
|
|
|
231 |
<li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
|
|
|
232 |
<li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
|
233 |
</ul>
|
234 |
</div>
|
237 |
|
238 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
239 |
<div class="postbox">
|
240 |
+
<h3 class="hndle"><span><?php _e('Top Supporters','smooth-slider'); ?></span></h3>
|
241 |
<div class="inside">
|
242 |
<div id="smooth_sldr_donations">
|
243 |
+
<?php $donations = cf5_sldr_parse_rss_rand('http://support.clickonf5.com/donations.xml','10');
|
244 |
+
if($donations) {?>
|
245 |
+
<ul>
|
246 |
+
<?php foreach($donations as $donation) { ?>
|
247 |
+
<li><a href="<?php echo $donation['link'];?>" title="<?php _e('Visit','smooth-slider'); ?> <?php echo $donation['title'];?>" ><?php echo $donation['title'];?></a></li>
|
248 |
+
<?php } ?>
|
249 |
+
</ul>
|
250 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
</div>
|
252 |
</div>
|
253 |
</div>
|
256 |
</div> <!--end of poststuff -->
|
257 |
|
258 |
|
|
|
|
|
259 |
</div> <!--end of float wrap -->
|
260 |
<?php
|
261 |
}
|
slider_versions/j.php
ADDED
@@ -0,0 +1,967 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function smooth_slider_css() {
|
3 |
+
global $smooth_slider,$post;
|
4 |
+
if(is_singular()) {
|
5 |
+
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
6 |
+
}
|
7 |
+
if((is_singular() and $slider_style == 'default')
|
8 |
+
or (!is_singular() and $smooth_slider['stylesheet'] == 'default')
|
9 |
+
or (is_singular() and is_active_widget(false, false, 'sslider_wid', true) and (!isset($slider_style) or empty($slider_style) ))
|
10 |
+
or (is_singular() and isset($smooth_slider['shortcode']) ) )
|
11 |
+
{
|
12 |
+
?>
|
13 |
+
<style type="text/css" media="screen">.jcarousel-skin-default .jcarousel-clip-horizontal {padding:0px <?php if ($smooth_slider['prev_next'] == 1) {echo "20";} else {echo "0";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "20";} else {echo "0";} ?>px;width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 40);} else {echo ($smooth_slider['width'] - 0);} ?>px;}.smooth_slider{width:<?php echo ($smooth_slider['width']-10); ?>px;height:<?php echo ($smooth_slider['height']-10); ?>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']; ?>;padding:0 5px 0 10px;}.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_slider .jcarousel-item{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 40);} else {echo ($smooth_slider['width'] - 10);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){$nav_size = $smooth_slider['navimg_ht'];} 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_slider h2{clear:none;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 !important;}.smooth_slider h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.smooth_slider 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;max-height:<?php echo $smooth_slider['img_height']; ?>px;border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}.smooth_slider .smooth_slideri div{margin-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "20";} ?>px}.smooth_slider 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;}.jcarousel-control a{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;}.jcarousel-control a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?> !important;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "10";} else {echo "0";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?> !important;}</style>
|
14 |
+
<?php }
|
15 |
+
}
|
16 |
+
|
17 |
+
add_action('wp_head', 'smooth_slider_css');
|
18 |
+
|
19 |
+
function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
|
20 |
+
global $smooth_slider;
|
21 |
+
global $wpdb, $table_prefix;
|
22 |
+
$table_name = $table_prefix.SLIDER_TABLE;
|
23 |
+
$post_table = $table_prefix."posts";
|
24 |
+
$rand = $smooth_slider['rand'];
|
25 |
+
if(isset($rand) and $rand=='1'){
|
26 |
+
$orderby = 'RAND()';
|
27 |
+
}
|
28 |
+
else {
|
29 |
+
$orderby = 'a.slide_order ASC, a.date DESC';
|
30 |
+
}
|
31 |
+
|
32 |
+
$posts = $wpdb->get_results("SELECT a.post_id, a.date FROM
|
33 |
+
$table_name a LEFT OUTER JOIN $post_table b
|
34 |
+
ON a.post_id = b.ID
|
35 |
+
WHERE (b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')) AND a.slider_id = '$slider_id'
|
36 |
+
ORDER BY ".$orderby." LIMIT $offset, $max_posts", OBJECT);
|
37 |
+
|
38 |
+
$html = '';
|
39 |
+
$smooth_sldr_j = 0;
|
40 |
+
|
41 |
+
foreach($posts as $post) {
|
42 |
+
$id = $post->post_id;
|
43 |
+
$posts_table = $table_prefix.'posts';
|
44 |
+
$sql_post = "SELECT * FROM $posts_table WHERE ID = $id";
|
45 |
+
$rs_post = $wpdb->get_results("SELECT * FROM $posts_table WHERE ID = $id", OBJECT);
|
46 |
+
$data = $rs_post[0];
|
47 |
+
|
48 |
+
$post_title = stripslashes($data->post_title);
|
49 |
+
$post_title = str_replace('"', '', $post_title);
|
50 |
+
$slider_content = $data->post_content;
|
51 |
+
|
52 |
+
//2.3 changes
|
53 |
+
// $permalink = get_permalink($data->ID);
|
54 |
+
|
55 |
+
$post_id = $data->ID;
|
56 |
+
|
57 |
+
//2.1 changes start
|
58 |
+
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
59 |
+
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
60 |
+
trim($slide_redirect_url);
|
61 |
+
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
62 |
+
$permalink = $slide_redirect_url;
|
63 |
+
}
|
64 |
+
else{
|
65 |
+
$permalink = get_permalink($post_id);
|
66 |
+
}
|
67 |
+
if($sslider_nolink=='1'){
|
68 |
+
$permalink='';
|
69 |
+
}
|
70 |
+
//2.1 changes end
|
71 |
+
$smooth_sldr_j++;
|
72 |
+
$html .= '<li class="smooth_slideri"><div>
|
73 |
+
<!-- smooth_slideri -->';
|
74 |
+
|
75 |
+
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
76 |
+
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
77 |
+
|
78 |
+
if ($smooth_slider['content_from'] == "slider_content") {
|
79 |
+
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
80 |
+
}
|
81 |
+
if ($smooth_slider['content_from'] == "excerpt") {
|
82 |
+
$slider_content = $data->post_excerpt;
|
83 |
+
}
|
84 |
+
|
85 |
+
$slider_content = stripslashes($slider_content);
|
86 |
+
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
87 |
+
|
88 |
+
$slider_content = str_replace("\n","<br />",$slider_content);
|
89 |
+
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
90 |
+
|
91 |
+
$slider_content = strip_shortcodes( $slider_content );
|
92 |
+
|
93 |
+
if($smooth_slider['img_pick'][0] == '1'){
|
94 |
+
$custom_key = array($smooth_slider['img_pick'][1]);
|
95 |
+
}
|
96 |
+
else {
|
97 |
+
$custom_key = '';
|
98 |
+
}
|
99 |
+
|
100 |
+
if($smooth_slider['img_pick'][2] == '1'){
|
101 |
+
$the_post_thumbnail = true;
|
102 |
+
}
|
103 |
+
else {
|
104 |
+
$the_post_thumbnail = false;
|
105 |
+
}
|
106 |
+
|
107 |
+
if($smooth_slider['img_pick'][3] == '1'){
|
108 |
+
$attachment = true;
|
109 |
+
$order_of_image = $smooth_slider['img_pick'][4];
|
110 |
+
}
|
111 |
+
else{
|
112 |
+
$attachment = false;
|
113 |
+
$order_of_image = '1';
|
114 |
+
}
|
115 |
+
|
116 |
+
if($smooth_slider['img_pick'][5] == '1'){
|
117 |
+
$image_scan = true;
|
118 |
+
}
|
119 |
+
else {
|
120 |
+
$image_scan = false;
|
121 |
+
}
|
122 |
+
|
123 |
+
if($smooth_slider['img_size'] == '1'){
|
124 |
+
$gti_width = $smooth_slider['img_width'];
|
125 |
+
}
|
126 |
+
else {
|
127 |
+
$gti_width = false;
|
128 |
+
}
|
129 |
+
|
130 |
+
if($smooth_slider['crop'] == '0'){
|
131 |
+
$extract_size = 'full';
|
132 |
+
}
|
133 |
+
elseif($smooth_slider['crop'] == '1'){
|
134 |
+
$extract_size = 'large';
|
135 |
+
}
|
136 |
+
elseif($smooth_slider['crop'] == '2'){
|
137 |
+
$extract_size = 'medium';
|
138 |
+
}
|
139 |
+
else{
|
140 |
+
$extract_size = 'thumbnail';
|
141 |
+
}
|
142 |
+
|
143 |
+
$img_args = array(
|
144 |
+
'custom_key' => $custom_key,
|
145 |
+
'post_id' => $post_id,
|
146 |
+
'attachment' => $attachment,
|
147 |
+
'size' => $extract_size,
|
148 |
+
'the_post_thumbnail' => $the_post_thumbnail,
|
149 |
+
'default_image' => false,
|
150 |
+
'order_of_image' => $order_of_image,
|
151 |
+
'link_to_post' => false,
|
152 |
+
'image_class' => 'smooth_slider_thumbnail',
|
153 |
+
'image_scan' => $image_scan,
|
154 |
+
'width' => $gti_width,
|
155 |
+
'height' => false,
|
156 |
+
'echo' => false,
|
157 |
+
'permalink' => $permalink
|
158 |
+
);
|
159 |
+
|
160 |
+
$html .= sslider_get_the_image($img_args);
|
161 |
+
|
162 |
+
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
163 |
+
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
164 |
+
else
|
165 |
+
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
166 |
+
|
167 |
+
if ($smooth_slider['image_only'] == '1') {
|
168 |
+
$html .= '<!-- /smooth_slideri -->
|
169 |
+
</div></li>';
|
170 |
+
}
|
171 |
+
else {
|
172 |
+
if($permalink!='') {
|
173 |
+
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
174 |
+
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
175 |
+
|
176 |
+
<!-- /smooth_slideri -->
|
177 |
+
</div></li>'; }
|
178 |
+
else{
|
179 |
+
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
180 |
+
<!-- /smooth_slideri -->
|
181 |
+
<div></li>'; }
|
182 |
+
}
|
183 |
+
}
|
184 |
+
if($out_echo == '1') {
|
185 |
+
echo $html;
|
186 |
+
}
|
187 |
+
$r_array = array( $smooth_sldr_j, $html);
|
188 |
+
return $r_array;
|
189 |
+
}
|
190 |
+
|
191 |
+
function get_smooth_slider($slider_id='') {
|
192 |
+
global $smooth_slider;
|
193 |
+
|
194 |
+
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
195 |
+
global $post;
|
196 |
+
$post_id = $post->ID;
|
197 |
+
$slider_id = get_slider_for_the_post($post_id);
|
198 |
+
}
|
199 |
+
if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
|
200 |
+
$slider_id = '1';
|
201 |
+
}
|
202 |
+
if(!empty($slider_id)){
|
203 |
+
global $smooth_sldr_j; $r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, '0'); $smooth_sldr_j = $r_array[0];
|
204 |
+
?>
|
205 |
+
<script type="text/javascript">
|
206 |
+
jQuery('html').addClass('smooth_slider_fouc');
|
207 |
+
jQuery(document).ready(function() {
|
208 |
+
jQuery(".smooth_slider_fouc .smooth_sliderb").css({'display' : 'block'});
|
209 |
+
});
|
210 |
+
function smooth_slider_initCallback(carousel) {
|
211 |
+
jQuery('#smooth_slider .jcarousel-control a').bind('click', function() {
|
212 |
+
var navclass = jQuery(this).attr("class");
|
213 |
+
var slide = navclass.replace("sldr", "");
|
214 |
+
carousel.scroll(jQuery.jcarousel.intval(slide));
|
215 |
+
carousel.startAuto(0);
|
216 |
+
return false;
|
217 |
+
});
|
218 |
+
<?php if ($smooth_slider['prev_next'] == 1){ ?>
|
219 |
+
// Disable autoscrolling if the user clicks the prev or next button.
|
220 |
+
carousel.buttonNext.bind('click', function() {
|
221 |
+
carousel.startAuto(0);
|
222 |
+
});
|
223 |
+
|
224 |
+
carousel.buttonPrev.bind('click', function() {
|
225 |
+
carousel.startAuto(0);
|
226 |
+
});
|
227 |
+
<?php } ?>
|
228 |
+
// Pause autoscrolling if the user moves with the cursor over the clip.
|
229 |
+
carousel.clip.hover(function() {
|
230 |
+
carousel.stopAuto();
|
231 |
+
}, function() {
|
232 |
+
carousel.startAuto();
|
233 |
+
});
|
234 |
+
};
|
235 |
+
function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) {
|
236 |
+
jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal");
|
237 |
+
jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
238 |
+
var curr_slide = idx;
|
239 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder");
|
240 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
241 |
+
|
242 |
+
<?php if ($smooth_slider['goto_slide'] == 2) {
|
243 |
+
global $sldr_nav_width;
|
244 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
245 |
+
?>
|
246 |
+
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
247 |
+
jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0");
|
248 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
249 |
+
<?php } ?>
|
250 |
+
};
|
251 |
+
jQuery(document).ready(function() {
|
252 |
+
jQuery("#smooth_slider").jcarousel({
|
253 |
+
size: <?php echo $smooth_sldr_j; ?>,
|
254 |
+
scroll: 1,
|
255 |
+
visible: 1,
|
256 |
+
auto:<?php if ($smooth_slider['autostep'] == '1') echo $smooth_slider['speed']; else echo 0;?>,
|
257 |
+
wrap:"last",
|
258 |
+
animation:<?php echo $smooth_slider['transition']*100; ?>,
|
259 |
+
initCallback: smooth_slider_initCallback,
|
260 |
+
itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }
|
261 |
+
<?php if ($smooth_slider['prev_next'] != 1) {echo ",\n buttonPrevHTML:null,\n ";}
|
262 |
+
if ($smooth_slider['prev_next'] != 1) {echo "buttonNextHTML:null";} ?>
|
263 |
+
});
|
264 |
+
});
|
265 |
+
|
266 |
+
</script>
|
267 |
+
<noscript><strong><?php echo $smooth_slider['noscript'];?></strong></noscript>
|
268 |
+
<div id="smooth_slider" class="jcarousel-skin-<?php echo $smooth_slider['stylesheet']; ?> smooth_slider">
|
269 |
+
<?php
|
270 |
+
if($smooth_slider['title_from']=='1') $sldr_title = get_smooth_slider_name($slider_id);
|
271 |
+
else $sldr_title = $smooth_slider['title_text'];
|
272 |
+
if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
273 |
+
<ul class="smooth_sliderb">
|
274 |
+
<?php echo $r_array[1];?>
|
275 |
+
</ul>
|
276 |
+
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
277 |
+
<div class="jcarousel-control">
|
278 |
+
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
279 |
+
echo "<a href=\"#\" class=\"sldr".$i." smooth_sliderc_nav\" >".$i."</a>\n";
|
280 |
+
} ?>
|
281 |
+
</div>
|
282 |
+
<?php }
|
283 |
+
if ($smooth_slider['goto_slide'] == 2) { ?>
|
284 |
+
<div class="jcarousel-control">
|
285 |
+
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
286 |
+
|
287 |
+
$width = $smooth_slider['navimg_w'];
|
288 |
+
echo "<a class=\"sldr".$i." smooth_sliderc_nav\" style=\"background-image:url(".smooth_slider_plugin_url( 'images/' )."slide".$i.".png);background-position:0 0;width:".$width."px;height:".$smooth_slider['navimg_ht']."px;\" href=\"#\" ></a>\n";
|
289 |
+
} ?>
|
290 |
+
</div>
|
291 |
+
<?php }
|
292 |
+
if ($smooth_slider['goto_slide'] == 3) { ?>
|
293 |
+
<div class="jcarousel-control"><?php echo $smooth_slider['custom_nav']; ?></div>
|
294 |
+
<?php } ?>
|
295 |
+
<?php if($smooth_slider['support'] == '1'){?>
|
296 |
+
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
297 |
+
<?php } ?>
|
298 |
+
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
299 |
+
</div>
|
300 |
+
<?php
|
301 |
+
} //end of not empty slider_id condition
|
302 |
+
}
|
303 |
+
|
304 |
+
//For displaying category specific posts in chronologically reverse order, Smooth Slider 2.3.3
|
305 |
+
function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offset=0, $out_echo = '1') {
|
306 |
+
global $smooth_slider;
|
307 |
+
global $wpdb, $table_prefix;
|
308 |
+
|
309 |
+
if (!empty($catg_slug)) {
|
310 |
+
$category = get_category_by_slug($catg_slug);
|
311 |
+
$slider_cat = $category->term_id;
|
312 |
+
}
|
313 |
+
else {
|
314 |
+
$category = get_the_category();
|
315 |
+
$slider_cat = $category[0]->cat_ID;
|
316 |
+
}
|
317 |
+
|
318 |
+
$posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.'&category='.$slider_cat);
|
319 |
+
|
320 |
+
$html = '';
|
321 |
+
$smooth_sldr_a = 0;
|
322 |
+
|
323 |
+
foreach($posts as $post) {
|
324 |
+
$id = $post->ID;
|
325 |
+
|
326 |
+
$post_title = stripslashes($post->post_title);
|
327 |
+
$post_title = str_replace('"', '', $post_title);
|
328 |
+
$slider_content = $post->post_content;
|
329 |
+
|
330 |
+
//2.3 changes
|
331 |
+
// $permalink = get_permalink($post->ID);
|
332 |
+
|
333 |
+
$post_id = $post->ID;
|
334 |
+
|
335 |
+
//2.1 changes start
|
336 |
+
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
337 |
+
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
338 |
+
trim($slide_redirect_url);
|
339 |
+
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
340 |
+
$permalink = $slide_redirect_url;
|
341 |
+
}
|
342 |
+
else{
|
343 |
+
$permalink = get_permalink($post_id);
|
344 |
+
}
|
345 |
+
if($sslider_nolink=='1'){
|
346 |
+
$permalink='';
|
347 |
+
}
|
348 |
+
//2.1 changes end
|
349 |
+
$smooth_sldr_a++;
|
350 |
+
$html .= '<li class="smooth_slideri"><div>
|
351 |
+
<!-- smooth_slideri -->';
|
352 |
+
|
353 |
+
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
354 |
+
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
355 |
+
|
356 |
+
if ($smooth_slider['content_from'] == "slider_content") {
|
357 |
+
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
358 |
+
}
|
359 |
+
if ($smooth_slider['content_from'] == "excerpt") {
|
360 |
+
$slider_content = $post->post_excerpt;
|
361 |
+
}
|
362 |
+
|
363 |
+
$slider_content = stripslashes($slider_content);
|
364 |
+
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
365 |
+
|
366 |
+
$slider_content = str_replace("\n","<br />",$slider_content);
|
367 |
+
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
368 |
+
|
369 |
+
$slider_content = strip_shortcodes( $slider_content );
|
370 |
+
|
371 |
+
if($smooth_slider['img_pick'][0] == '1'){
|
372 |
+
$custom_key = array($smooth_slider['img_pick'][1]);
|
373 |
+
}
|
374 |
+
else {
|
375 |
+
$custom_key = '';
|
376 |
+
}
|
377 |
+
|
378 |
+
if($smooth_slider['img_pick'][2] == '1'){
|
379 |
+
$the_post_thumbnail = true;
|
380 |
+
}
|
381 |
+
else {
|
382 |
+
$the_post_thumbnail = false;
|
383 |
+
}
|
384 |
+
|
385 |
+
if($smooth_slider['img_pick'][3] == '1'){
|
386 |
+
$attachment = true;
|
387 |
+
$order_of_image = $smooth_slider['img_pick'][4];
|
388 |
+
}
|
389 |
+
else{
|
390 |
+
$attachment = false;
|
391 |
+
$order_of_image = '1';
|
392 |
+
}
|
393 |
+
|
394 |
+
if($smooth_slider['img_pick'][5] == '1'){
|
395 |
+
$image_scan = true;
|
396 |
+
}
|
397 |
+
else {
|
398 |
+
$image_scan = false;
|
399 |
+
}
|
400 |
+
|
401 |
+
if($smooth_slider['img_size'] == '1'){
|
402 |
+
$gti_width = $smooth_slider['img_width'];
|
403 |
+
}
|
404 |
+
else {
|
405 |
+
$gti_width = false;
|
406 |
+
}
|
407 |
+
|
408 |
+
if($smooth_slider['crop'] == '0'){
|
409 |
+
$extract_size = 'full';
|
410 |
+
}
|
411 |
+
elseif($smooth_slider['crop'] == '1'){
|
412 |
+
$extract_size = 'large';
|
413 |
+
}
|
414 |
+
elseif($smooth_slider['crop'] == '2'){
|
415 |
+
$extract_size = 'medium';
|
416 |
+
}
|
417 |
+
else{
|
418 |
+
$extract_size = 'thumbnail';
|
419 |
+
}
|
420 |
+
|
421 |
+
$img_args = array(
|
422 |
+
'custom_key' => $custom_key,
|
423 |
+
'post_id' => $post_id,
|
424 |
+
'attachment' => $attachment,
|
425 |
+
'size' => $extract_size,
|
426 |
+
'the_post_thumbnail' => $the_post_thumbnail,
|
427 |
+
'default_image' => false,
|
428 |
+
'order_of_image' => $order_of_image,
|
429 |
+
'link_to_post' => false,
|
430 |
+
'image_class' => 'smooth_slider_thumbnail',
|
431 |
+
'image_scan' => $image_scan,
|
432 |
+
'width' => $gti_width,
|
433 |
+
'height' => false,
|
434 |
+
'echo' => false,
|
435 |
+
'permalink' => $permalink
|
436 |
+
);
|
437 |
+
|
438 |
+
$html .= sslider_get_the_image($img_args);
|
439 |
+
|
440 |
+
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
441 |
+
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
442 |
+
else
|
443 |
+
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
444 |
+
|
445 |
+
if ($smooth_slider['image_only'] == '1') {
|
446 |
+
$html .= '<!-- /smooth_slideri -->
|
447 |
+
</div></li>';
|
448 |
+
}
|
449 |
+
else {
|
450 |
+
if($permalink!='') {
|
451 |
+
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
452 |
+
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
453 |
+
|
454 |
+
<!-- /smooth_slideri -->
|
455 |
+
</div></li>'; }
|
456 |
+
else{
|
457 |
+
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
458 |
+
<!-- /smooth_slideri -->
|
459 |
+
</div></li>'; }
|
460 |
+
}
|
461 |
+
}
|
462 |
+
if($out_echo == '1') {
|
463 |
+
echo $html;
|
464 |
+
}
|
465 |
+
$r_array = array( $smooth_sldr_a, $html);
|
466 |
+
return $r_array;
|
467 |
+
}
|
468 |
+
|
469 |
+
function get_smooth_slider_category($catg_slug) {
|
470 |
+
global $smooth_slider;
|
471 |
+
global $smooth_sldr_a; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, '0', '0'); $smooth_sldr_a = $r_array[0];
|
472 |
+
?>
|
473 |
+
<script type="text/javascript">
|
474 |
+
jQuery('html').addClass('smooth_slider_fouc');
|
475 |
+
jQuery(document).ready(function() {
|
476 |
+
jQuery(".smooth_slider_fouc .smooth_sliderb").css({'display' : 'block'});
|
477 |
+
});
|
478 |
+
function smooth_slider_initCallback(carousel) {
|
479 |
+
jQuery('#smooth_slider .jcarousel-control a').bind('click', function() {
|
480 |
+
var navclass = jQuery(this).attr("class");
|
481 |
+
var slide = navclass.replace("sldr", "");
|
482 |
+
carousel.scroll(jQuery.jcarousel.intval(slide));
|
483 |
+
carousel.startAuto(0);
|
484 |
+
return false;
|
485 |
+
});
|
486 |
+
<?php if ($smooth_slider['prev_next'] == 1){ ?>
|
487 |
+
// Disable autoscrolling if the user clicks the prev or next button.
|
488 |
+
carousel.buttonNext.bind('click', function() {
|
489 |
+
carousel.startAuto(0);
|
490 |
+
});
|
491 |
+
|
492 |
+
carousel.buttonPrev.bind('click', function() {
|
493 |
+
carousel.startAuto(0);
|
494 |
+
});
|
495 |
+
<?php } ?>
|
496 |
+
// Pause autoscrolling if the user moves with the cursor over the clip.
|
497 |
+
carousel.clip.hover(function() {
|
498 |
+
carousel.stopAuto();
|
499 |
+
}, function() {
|
500 |
+
carousel.startAuto();
|
501 |
+
});
|
502 |
+
};
|
503 |
+
function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) {
|
504 |
+
jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal");
|
505 |
+
jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
506 |
+
var curr_slide = idx;
|
507 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder");
|
508 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
509 |
+
|
510 |
+
<?php if ($smooth_slider['goto_slide'] == 2) {
|
511 |
+
global $sldr_nav_width;
|
512 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
513 |
+
?>
|
514 |
+
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
515 |
+
jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0");
|
516 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
517 |
+
<?php } ?>
|
518 |
+
};
|
519 |
+
jQuery(document).ready(function() {
|
520 |
+
jQuery("#smooth_slider").jcarousel({
|
521 |
+
size: <?php echo $smooth_sldr_a; ?>,
|
522 |
+
scroll: 1,
|
523 |
+
visible: 1,
|
524 |
+
auto:<?php if ($smooth_slider['autostep'] == '1') echo $smooth_slider['speed']; else echo 0;?>,
|
525 |
+
wrap:"last",
|
526 |
+
animation:<?php echo $smooth_slider['transition']*100; ?>,
|
527 |
+
initCallback: smooth_slider_initCallback,
|
528 |
+
itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }<?php if ($smooth_slider['prev_next'] != 1) {echo ",\n buttonPrevHTML:null,\n ";}
|
529 |
+
if ($smooth_slider['prev_next'] != 1) {echo "buttonNextHTML:null";} ?>
|
530 |
+
});
|
531 |
+
});
|
532 |
+
</script>
|
533 |
+
<noscript><strong><?php echo $smooth_slider['noscript'];?></strong></noscript>
|
534 |
+
<div id="smooth_slider" class="jcarousel-skin-<?php echo $smooth_slider['stylesheet']; ?> smooth_slider">
|
535 |
+
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
536 |
+
<ul class="smooth_sliderb">
|
537 |
+
<?php echo $r_array[1];?>
|
538 |
+
</ul>
|
539 |
+
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
540 |
+
<div class="jcarousel-control">
|
541 |
+
<?php global $smooth_sldr_a; for($i=1; $i<=$smooth_sldr_a; $i++) {
|
542 |
+
echo "<a href=\"#\" class=\"sldr".$i." smooth_sliderc_nav\" >".$i."</a>\n";
|
543 |
+
} ?>
|
544 |
+
</div>
|
545 |
+
<?php }
|
546 |
+
if ($smooth_slider['goto_slide'] == 2) { ?>
|
547 |
+
<div class="jcarousel-control">
|
548 |
+
<?php global $smooth_sldr_a; for($i=1; $i<=$smooth_sldr_a; $i++) {
|
549 |
+
|
550 |
+
$width = $smooth_slider['navimg_w'];
|
551 |
+
echo "<a class=\"sldr".$i." smooth_sliderc_nav\" style=\"background-image:url(".smooth_slider_plugin_url( 'images/' )."slide".$i.".png);background-position:0 0;width:".$width."px;height:".$smooth_slider['navimg_ht']."px;\" href=\"#\" ></a>\n";
|
552 |
+
} ?>
|
553 |
+
</div>
|
554 |
+
<?php }
|
555 |
+
if ($smooth_slider['goto_slide'] == 3) { ?>
|
556 |
+
<div id="smooth_sliderc_nav"><?php echo $smooth_slider['custom_nav']; ?></div>
|
557 |
+
<?php } ?>
|
558 |
+
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
559 |
+
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
560 |
+
</div>
|
561 |
+
<?php
|
562 |
+
}
|
563 |
+
|
564 |
+
function return_smooth_slider($slider_id='') {
|
565 |
+
global $smooth_slider;
|
566 |
+
|
567 |
+
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
568 |
+
global $post;
|
569 |
+
$post_id = $post->ID;
|
570 |
+
$slider_id = get_slider_for_the_post($post_id);
|
571 |
+
}
|
572 |
+
if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
|
573 |
+
$slider_id = '1';
|
574 |
+
}
|
575 |
+
$slider_html='';
|
576 |
+
if(!empty($slider_id)){
|
577 |
+
global $smooth_sldr_j;
|
578 |
+
$r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, $echo = '0');
|
579 |
+
$smooth_sldr_j = $r_array[0];
|
580 |
+
|
581 |
+
if ($smooth_slider['autostep'] == '1'){ $autostep = $smooth_slider['speed'];} else {$autostep = "0";}
|
582 |
+
if ($smooth_slider['prev_next'] != 1) {$defaultbuttons = ", buttonPrevHTML:null, buttonNextHTML:null";} else {$defaultbuttons = "";}
|
583 |
+
$prevnext='';
|
584 |
+
if ($smooth_slider['prev_next'] == 1){
|
585 |
+
$prevnext="// Disable autoscrolling if the user clicks the prev or next button.
|
586 |
+
carousel.buttonNext.bind('click', function() {
|
587 |
+
carousel.startAuto(0);
|
588 |
+
});
|
589 |
+
|
590 |
+
carousel.buttonPrev.bind('click', function() {
|
591 |
+
carousel.startAuto(0);
|
592 |
+
}); ";
|
593 |
+
}
|
594 |
+
$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; }
|
595 |
+
$nav_ht = (($smooth_slider['height'] - $extra_height)/2);
|
596 |
+
$fontSize = $smooth_slider['content_fsize'] + 5;
|
597 |
+
$sldrlink='';if($smooth_slider['support'] == '1'){ $sldrlink='<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>';}
|
598 |
+
|
599 |
+
$slider_html=$slider_html.'<script type="text/javascript">
|
600 |
+
jQuery("html").addClass("smooth_slider_fouc");
|
601 |
+
jQuery(document).ready(function() {
|
602 |
+
jQuery(".smooth_slider_fouc .smooth_sliderb").css({"display" : "block"});
|
603 |
+
});
|
604 |
+
function smooth_slider_initCallback(carousel) {
|
605 |
+
jQuery("#smooth_slider .jcarousel-control a").bind("click", function() {
|
606 |
+
var navclass = jQuery(this).attr("class");
|
607 |
+
var slide = navclass.replace("sldr", "");
|
608 |
+
carousel.scroll(jQuery.jcarousel.intval(slide));
|
609 |
+
carousel.startAuto(0);
|
610 |
+
return false;
|
611 |
+
});
|
612 |
+
'.$prevnext.'
|
613 |
+
|
614 |
+
// Pause autoscrolling if the user moves with the cursor over the clip.
|
615 |
+
carousel.clip.hover(function() {
|
616 |
+
carousel.stopAuto();
|
617 |
+
}, function() {
|
618 |
+
carousel.startAuto();
|
619 |
+
});
|
620 |
+
};
|
621 |
+
function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) {
|
622 |
+
jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal");
|
623 |
+
jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "'.$smooth_slider['content_fsize'].'px");
|
624 |
+
var curr_slide = idx;
|
625 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder");
|
626 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "'.$fontSize.'px"); ';
|
627 |
+
|
628 |
+
if ($smooth_slider['goto_slide'] == 2) {
|
629 |
+
|
630 |
+
global $sldr_nav_width;
|
631 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
632 |
+
$slider_html = $slider_html.'jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0");
|
633 |
+
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+'.$sldr_nav_width.'+"px 0");';
|
634 |
+
}
|
635 |
+
$slider_html=$slider_html.' }
|
636 |
+
|
637 |
+
jQuery(document).ready(function() {
|
638 |
+
jQuery("#smooth_slider").jcarousel({
|
639 |
+
size: '.$smooth_sldr_j .',
|
640 |
+
scroll: 1,
|
641 |
+
visible: 1,
|
642 |
+
auto:'.$autostep.',
|
643 |
+
wrap:"last",
|
644 |
+
animation:'.($smooth_slider["transition"]*100).',
|
645 |
+
initCallback: smooth_slider_initCallback,
|
646 |
+
itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }
|
647 |
+
'.$defaultbuttons.'
|
648 |
+
});
|
649 |
+
});
|
650 |
+
</script>
|
651 |
+
<noscript><strong>'.$smooth_slider['noscript'].'</strong></noscript>
|
652 |
+
<div id="smooth_slider" class="jcarousel-skin-'.$smooth_slider['stylesheet'].' smooth_slider">';
|
653 |
+
|
654 |
+
if($smooth_slider['title_from']=='1') $sldr_title = get_smooth_slider_name($slider_id);
|
655 |
+
else $sldr_title = $smooth_slider['title_text'];
|
656 |
+
if(!empty($sldr_title)) {
|
657 |
+
$slider_html=$slider_html.'<div class="sldr_title">'. $smooth_slider['title_text'].'</div>';
|
658 |
+
}
|
659 |
+
|
660 |
+
$slider_html=$slider_html.'<ul class="smooth_sliderb">
|
661 |
+
'.$r_array[1].'
|
662 |
+
</ul>';
|
663 |
+
if ($smooth_slider['goto_slide'] == 1) {
|
664 |
+
$slider_html=$slider_html.'<div class="jcarousel-control">';
|
665 |
+
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
666 |
+
$slider_html=$slider_html.'<a href="#" class="sldr'.$i.' smooth_sliderc_nav" >'.$i.'</a>';
|
667 |
+
}
|
668 |
+
$slider_html=$slider_html.'</div>';
|
669 |
+
}
|
670 |
+
if ($smooth_slider['goto_slide'] == 2) {
|
671 |
+
$slider_html=$slider_html.'<div class="jcarousel-control">';
|
672 |
+
$width = $smooth_slider['navimg_w'];
|
673 |
+
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
674 |
+
$slider_html=$slider_html.'<a class="sldr'.$i.' smooth_sliderc_nav" style="background-image:url('.smooth_slider_plugin_url( "images" ).'slide'.$i.'.png);background-position:0 0;width:".$width."px;height:'.$smooth_slider["navimg_ht"].'px;\" href="#" ></a>';
|
675 |
+
}
|
676 |
+
$slider_html=$slider_html.'</div>';
|
677 |
+
}
|
678 |
+
if ($smooth_slider['goto_slide'] == 3) {
|
679 |
+
$slider_html=$slider_html.'<div id="jcarousel-control">'.$smooth_slider["custom_nav"].'</div>';
|
680 |
+
}
|
681 |
+
$slider_html=$slider_html.'<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div><div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
682 |
+
</div>';
|
683 |
+
} //end of not empty slider_id condition
|
684 |
+
return $slider_html;
|
685 |
+
}
|
686 |
+
|
687 |
+
function smooth_slider_simple_shortcode($atts) {
|
688 |
+
extract(shortcode_atts(array(
|
689 |
+
'id' => '',
|
690 |
+
), $atts));
|
691 |
+
|
692 |
+
return return_smooth_slider($id);
|
693 |
+
}
|
694 |
+
add_shortcode('smoothslider', 'smooth_slider_simple_shortcode');
|
695 |
+
|
696 |
+
function smooth_slider_enqueue_scripts() {
|
697 |
+
// wp_register_script('jquery', false, false, false, false);
|
698 |
+
wp_enqueue_script( 'jcarousel', smooth_slider_plugin_url( 'js/jquery.jcarousel.min.js' ),
|
699 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
700 |
+
}
|
701 |
+
|
702 |
+
add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
703 |
+
|
704 |
+
function smooth_slider_enqueue_styles() {
|
705 |
+
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
706 |
+
if(is_singular()) {
|
707 |
+
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
708 |
+
if((is_active_widget(false, false, 'sslider_wid', true) or isset($smooth_slider['shortcode']) ) and (!isset($slider_style) or empty($slider_style))){
|
709 |
+
$slider_style='default';
|
710 |
+
}
|
711 |
+
if (!isset($slider_style) or empty($slider_style) ) {
|
712 |
+
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
713 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
714 |
+
}
|
715 |
+
else {
|
716 |
+
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$slider_style.'/style.css' ),
|
717 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
718 |
+
}
|
719 |
+
}
|
720 |
+
else {
|
721 |
+
$slider_style = $smooth_slider['stylesheet'];
|
722 |
+
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$slider_style.'/style.css' ),
|
723 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
724 |
+
}
|
725 |
+
}
|
726 |
+
add_action( 'wp', 'smooth_slider_enqueue_styles' );
|
727 |
+
|
728 |
+
//admin settings
|
729 |
+
function smooth_slider_admin_scripts() {
|
730 |
+
global $smooth_slider;
|
731 |
+
if ( is_admin() ){ // admin actions
|
732 |
+
// Settings page only
|
733 |
+
if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page'] or 'smooth-slider-settings' == $_GET['page'] ) ) {
|
734 |
+
wp_register_script('jquery', false, false, false, false);
|
735 |
+
wp_enqueue_script( 'jquery-ui-tabs' );
|
736 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
737 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
738 |
+
wp_enqueue_script( 'jcarousel', smooth_slider_plugin_url( 'js/jquery.jcarousel.min.js' ),
|
739 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
740 |
+
wp_enqueue_style( 'smooth_slider_admin_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
741 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
742 |
+
}
|
743 |
+
}
|
744 |
+
}
|
745 |
+
|
746 |
+
add_action( 'admin_init', 'smooth_slider_admin_scripts' );
|
747 |
+
|
748 |
+
function smooth_slider_admin_head() {
|
749 |
+
global $smooth_slider;
|
750 |
+
if ( is_admin() ){ // admin actions
|
751 |
+
|
752 |
+
// Sliders page only
|
753 |
+
if ( isset($_GET['page']) && 'smooth-slider-admin' == $_GET['page'] ) {
|
754 |
+
$sliders = ss_get_sliders();
|
755 |
+
?>
|
756 |
+
<script type="text/javascript">
|
757 |
+
// <![CDATA[
|
758 |
+
jQuery(document).ready(function() {
|
759 |
+
jQuery(function() {
|
760 |
+
jQuery("#slider_tabs").tabs();
|
761 |
+
<?php foreach($sliders as $slider){?>
|
762 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
763 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
764 |
+
<?php } ?>
|
765 |
+
});
|
766 |
+
});
|
767 |
+
function confirmRemove()
|
768 |
+
{
|
769 |
+
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
770 |
+
if (agree)
|
771 |
+
return true ;
|
772 |
+
else
|
773 |
+
return false ;
|
774 |
+
}
|
775 |
+
function confirmRemoveAll()
|
776 |
+
{
|
777 |
+
var agree=confirm("Remove all Posts/Pages from Smooth Slider??");
|
778 |
+
if (agree)
|
779 |
+
return true ;
|
780 |
+
else
|
781 |
+
return false ;
|
782 |
+
}
|
783 |
+
function confirmSliderDelete()
|
784 |
+
{
|
785 |
+
var agree=confirm("Delete this Slider??");
|
786 |
+
if (agree)
|
787 |
+
return true ;
|
788 |
+
else
|
789 |
+
return false ;
|
790 |
+
}
|
791 |
+
function slider_checkform ( form )
|
792 |
+
{
|
793 |
+
if (form.new_slider_name.value == "") {
|
794 |
+
alert( "Please enter the New Slider name." );
|
795 |
+
form.new_slider_name.focus();
|
796 |
+
return false ;
|
797 |
+
}
|
798 |
+
return true ;
|
799 |
+
}
|
800 |
+
</script>
|
801 |
+
<style type="text/css">
|
802 |
+
/************************************************
|
803 |
+
* ui-tabs *
|
804 |
+
************************************************/
|
805 |
+
.ui-tabs { padding: .2em; zoom: 1; }
|
806 |
+
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
807 |
+
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; background-color:#B9B9B9;}
|
808 |
+
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#FFFFFF;}
|
809 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-bottom-width: 0; background-color:#ABD37E;}
|
810 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#FFF;}
|
811 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
812 |
+
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
813 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
814 |
+
/*tabs complete*/
|
815 |
+
div#smooth_sldr_donations a{
|
816 |
+
color:#366C94 !important;
|
817 |
+
text-decoration:none;
|
818 |
+
}
|
819 |
+
div#smooth_sldr_donations a:hover{
|
820 |
+
text-decoration:underline;
|
821 |
+
}
|
822 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
823 |
+
#sldr_close {float:right;}
|
824 |
+
</style>
|
825 |
+
<?php
|
826 |
+
} //Sliders page only
|
827 |
+
|
828 |
+
// Settings page only
|
829 |
+
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
|
830 |
+
wp_print_scripts( 'farbtastic' );
|
831 |
+
wp_print_styles( 'farbtastic' );
|
832 |
+
?>
|
833 |
+
<script type="text/javascript">
|
834 |
+
// <![CDATA[
|
835 |
+
jQuery(document).ready(function() {
|
836 |
+
jQuery('#colorbox_1').farbtastic('#color_value_1');
|
837 |
+
jQuery('#color_picker_1').click(function () {
|
838 |
+
if (jQuery('#colorbox_1').css('display') == "block") {
|
839 |
+
jQuery('#colorbox_1').fadeOut("slow"); }
|
840 |
+
else {
|
841 |
+
jQuery('#colorbox_1').fadeIn("slow"); }
|
842 |
+
});
|
843 |
+
var colorpick_1 = false;
|
844 |
+
jQuery(document).mousedown(function(){
|
845 |
+
if (colorpick_1 == true) {
|
846 |
+
return; }
|
847 |
+
jQuery('#colorbox_1').fadeOut("slow");
|
848 |
+
});
|
849 |
+
jQuery(document).mouseup(function(){
|
850 |
+
colorpick_1 = false;
|
851 |
+
});
|
852 |
+
//for second color box
|
853 |
+
jQuery('#colorbox_2').farbtastic('#color_value_2');
|
854 |
+
jQuery('#color_picker_2').click(function () {
|
855 |
+
if (jQuery('#colorbox_2').css('display') == "block") {
|
856 |
+
jQuery('#colorbox_2').fadeOut("slow"); }
|
857 |
+
else {
|
858 |
+
jQuery('#colorbox_2').fadeIn("slow"); }
|
859 |
+
});
|
860 |
+
var colorpick_2 = false;
|
861 |
+
jQuery(document).mousedown(function(){
|
862 |
+
if (colorpick_2 == true) {
|
863 |
+
return; }
|
864 |
+
jQuery('#colorbox_2').fadeOut("slow");
|
865 |
+
});
|
866 |
+
jQuery(document).mouseup(function(){
|
867 |
+
colorpick_2 = false;
|
868 |
+
});
|
869 |
+
//for third color box
|
870 |
+
jQuery('#colorbox_3').farbtastic('#color_value_3');
|
871 |
+
jQuery('#color_picker_3').click(function () {
|
872 |
+
if (jQuery('#colorbox_3').css('display') == "block") {
|
873 |
+
jQuery('#colorbox_3').fadeOut("slow"); }
|
874 |
+
else {
|
875 |
+
jQuery('#colorbox_3').fadeIn("slow"); }
|
876 |
+
});
|
877 |
+
var colorpick_3 = false;
|
878 |
+
jQuery(document).mousedown(function(){
|
879 |
+
if (colorpick_3 == true) {
|
880 |
+
return; }
|
881 |
+
jQuery('#colorbox_3').fadeOut("slow");
|
882 |
+
});
|
883 |
+
jQuery(document).mouseup(function(){
|
884 |
+
colorpick_3 = false;
|
885 |
+
});
|
886 |
+
//for fourth color box
|
887 |
+
jQuery('#colorbox_4').farbtastic('#color_value_4');
|
888 |
+
jQuery('#color_picker_4').click(function () {
|
889 |
+
if (jQuery('#colorbox_4').css('display') == "block") {
|
890 |
+
jQuery('#colorbox_4').fadeOut("slow"); }
|
891 |
+
else {
|
892 |
+
jQuery('#colorbox_4').fadeIn("slow"); }
|
893 |
+
});
|
894 |
+
var colorpick_4 = false;
|
895 |
+
jQuery(document).mousedown(function(){
|
896 |
+
if (colorpick_4 == true) {
|
897 |
+
return; }
|
898 |
+
jQuery('#colorbox_4').fadeOut("slow");
|
899 |
+
});
|
900 |
+
jQuery(document).mouseup(function(){
|
901 |
+
colorpick_4 = false;
|
902 |
+
});
|
903 |
+
//for fifth color box
|
904 |
+
jQuery('#colorbox_5').farbtastic('#color_value_5');
|
905 |
+
jQuery('#color_picker_5').click(function () {
|
906 |
+
if (jQuery('#colorbox_5').css('display') == "block") {
|
907 |
+
jQuery('#colorbox_5').fadeOut("slow"); }
|
908 |
+
else {
|
909 |
+
jQuery('#colorbox_5').fadeIn("slow"); }
|
910 |
+
});
|
911 |
+
var colorpick_5 = false;
|
912 |
+
jQuery(document).mousedown(function(){
|
913 |
+
if (colorpick_5 == true) {
|
914 |
+
return; }
|
915 |
+
jQuery('#colorbox_5').fadeOut("slow");
|
916 |
+
});
|
917 |
+
jQuery(document).mouseup(function(){
|
918 |
+
colorpick_5 = false;
|
919 |
+
});
|
920 |
+
//for sixth color box
|
921 |
+
jQuery('#colorbox_6').farbtastic('#color_value_6');
|
922 |
+
jQuery('#color_picker_6').click(function () {
|
923 |
+
if (jQuery('#colorbox_6').css('display') == "block") {
|
924 |
+
jQuery('#colorbox_6').fadeOut("slow"); }
|
925 |
+
else {
|
926 |
+
jQuery('#colorbox_6').fadeIn("slow"); }
|
927 |
+
});
|
928 |
+
var colorpick_6 = false;
|
929 |
+
jQuery(document).mousedown(function(){
|
930 |
+
if (colorpick_6 == true) {
|
931 |
+
return; }
|
932 |
+
jQuery('#colorbox_6').fadeOut("slow");
|
933 |
+
});
|
934 |
+
jQuery(document).mouseup(function(){
|
935 |
+
colorpick_6 = false;
|
936 |
+
});
|
937 |
+
jQuery('#sldr_close').click(function () {
|
938 |
+
jQuery('#sldr_message').fadeOut("slow");
|
939 |
+
});
|
940 |
+
});
|
941 |
+
</script>
|
942 |
+
<style type="text/css">
|
943 |
+
.color-picker-wrap {
|
944 |
+
position: absolute;
|
945 |
+
display: none;
|
946 |
+
background: #fff;
|
947 |
+
border: 3px solid #ccc;
|
948 |
+
padding: 3px;
|
949 |
+
z-index: 1000;
|
950 |
+
}
|
951 |
+
div#smooth_sldr_donations a{
|
952 |
+
color:#366C94 !important;
|
953 |
+
text-decoration:none;
|
954 |
+
}
|
955 |
+
div#smooth_sldr_donations a:hover{
|
956 |
+
text-decoration:underline;
|
957 |
+
}
|
958 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
959 |
+
#sldr_close {float:right;}
|
960 |
+
</style>
|
961 |
+
<style type="text/css" media="screen">.jcarousel-skin-default .jcarousel-clip-horizontal {padding:0px <?php if ($smooth_slider['prev_next'] == 1) {echo "20";} else {echo "0";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "20";} else {echo "0";} ?>px;width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 40);} else {echo ($smooth_slider['width'] - 0);} ?>px;}.smooth_slider{width:<?php echo ($smooth_slider['width']-10); ?>px;height:<?php echo ($smooth_slider['height']-10); ?>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']; ?>;padding:10px 5px 0 10px;}.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_slider .jcarousel-item{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 40);} else {echo ($smooth_slider['width'] - 10);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){$nav_size = $smooth_slider['navimg_ht'];} 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_slider h2{clear:none;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 !important;}.smooth_slider h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.smooth_slider 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;max-height:<?php echo $smooth_slider['img_height']; ?>px;border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}.smooth_slider .smooth_slideri div{margin-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "20";} ?>px}.smooth_slider 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;}.jcarousel-control a{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;}.jcarousel-control a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?> !important;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "10";} else {echo "0";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?> !important;}</style>
|
962 |
+
<?php
|
963 |
+
} //for smooth slider option page
|
964 |
+
}//only for admin
|
965 |
+
}
|
966 |
+
add_action('admin_head', 'smooth_slider_admin_head');
|
967 |
+
?>
|
slider_versions/step.php
ADDED
@@ -0,0 +1,1135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
|
3 |
+
global $smooth_slider;
|
4 |
+
global $wpdb, $table_prefix;
|
5 |
+
$table_name = $table_prefix.SLIDER_TABLE;
|
6 |
+
$post_table = $table_prefix."posts";
|
7 |
+
$rand = $smooth_slider['rand'];
|
8 |
+
if(isset($rand) and $rand=='1'){
|
9 |
+
$orderby = 'RAND()';
|
10 |
+
}
|
11 |
+
else {
|
12 |
+
$orderby = 'a.slide_order ASC, a.date DESC';
|
13 |
+
}
|
14 |
+
|
15 |
+
$posts = $wpdb->get_results("SELECT a.post_id, a.date FROM
|
16 |
+
$table_name a LEFT OUTER JOIN $post_table b
|
17 |
+
ON a.post_id = b.ID
|
18 |
+
WHERE (b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')) AND a.slider_id = '$slider_id'
|
19 |
+
ORDER BY ".$orderby." LIMIT $offset, $max_posts", OBJECT);
|
20 |
+
|
21 |
+
$html = '';
|
22 |
+
$smooth_sldr_j = 0;
|
23 |
+
|
24 |
+
foreach($posts as $post) {
|
25 |
+
$id = $post->post_id;
|
26 |
+
$posts_table = $table_prefix.'posts';
|
27 |
+
$sql_post = "SELECT * FROM $posts_table WHERE ID = $id";
|
28 |
+
$rs_post = $wpdb->get_results("SELECT * FROM $posts_table WHERE ID = $id", OBJECT);
|
29 |
+
$data = $rs_post[0];
|
30 |
+
|
31 |
+
$post_title = stripslashes($data->post_title);
|
32 |
+
$post_title = str_replace('"', '', $post_title);
|
33 |
+
$slider_content = $data->post_content;
|
34 |
+
|
35 |
+
//2.3 changes
|
36 |
+
// $permalink = get_permalink($data->ID);
|
37 |
+
|
38 |
+
$post_id = $data->ID;
|
39 |
+
|
40 |
+
//2.1 changes start
|
41 |
+
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
42 |
+
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
43 |
+
trim($slide_redirect_url);
|
44 |
+
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
45 |
+
$permalink = $slide_redirect_url;
|
46 |
+
}
|
47 |
+
else{
|
48 |
+
$permalink = get_permalink($post_id);
|
49 |
+
}
|
50 |
+
if($sslider_nolink=='1'){
|
51 |
+
$permalink='';
|
52 |
+
}
|
53 |
+
//2.1 changes end
|
54 |
+
$smooth_sldr_j++;
|
55 |
+
$html .= '<div class="smooth_slideri">
|
56 |
+
<!-- smooth_slideri -->';
|
57 |
+
|
58 |
+
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
59 |
+
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
60 |
+
|
61 |
+
if ($smooth_slider['content_from'] == "slider_content") {
|
62 |
+
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
63 |
+
}
|
64 |
+
if ($smooth_slider['content_from'] == "excerpt") {
|
65 |
+
$slider_content = $data->post_excerpt;
|
66 |
+
}
|
67 |
+
|
68 |
+
$slider_content = stripslashes($slider_content);
|
69 |
+
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
70 |
+
|
71 |
+
$slider_content = str_replace("\n","<br />",$slider_content);
|
72 |
+
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
73 |
+
|
74 |
+
$slider_content = strip_shortcodes( $slider_content );
|
75 |
+
|
76 |
+
if($smooth_slider['img_pick'][0] == '1'){
|
77 |
+
$custom_key = array($smooth_slider['img_pick'][1]);
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
$custom_key = '';
|
81 |
+
}
|
82 |
+
|
83 |
+
if($smooth_slider['img_pick'][2] == '1'){
|
84 |
+
$the_post_thumbnail = true;
|
85 |
+
}
|
86 |
+
else {
|
87 |
+
$the_post_thumbnail = false;
|
88 |
+
}
|
89 |
+
|
90 |
+
if($smooth_slider['img_pick'][3] == '1'){
|
91 |
+
$attachment = true;
|
92 |
+
$order_of_image = $smooth_slider['img_pick'][4];
|
93 |
+
}
|
94 |
+
else{
|
95 |
+
$attachment = false;
|
96 |
+
$order_of_image = '1';
|
97 |
+
}
|
98 |
+
|
99 |
+
if($smooth_slider['img_pick'][5] == '1'){
|
100 |
+
$image_scan = true;
|
101 |
+
}
|
102 |
+
else {
|
103 |
+
$image_scan = false;
|
104 |
+
}
|
105 |
+
|
106 |
+
if($smooth_slider['img_size'] == '1'){
|
107 |
+
$gti_width = $smooth_slider['img_width'];
|
108 |
+
}
|
109 |
+
else {
|
110 |
+
$gti_width = false;
|
111 |
+
}
|
112 |
+
|
113 |
+
if($smooth_slider['crop'] == '0'){
|
114 |
+
$extract_size = 'full';
|
115 |
+
}
|
116 |
+
elseif($smooth_slider['crop'] == '1'){
|
117 |
+
$extract_size = 'large';
|
118 |
+
}
|
119 |
+
elseif($smooth_slider['crop'] == '2'){
|
120 |
+
$extract_size = 'medium';
|
121 |
+
}
|
122 |
+
else{
|
123 |
+
$extract_size = 'thumbnail';
|
124 |
+
}
|
125 |
+
|
126 |
+
$img_args = array(
|
127 |
+
'custom_key' => $custom_key,
|
128 |
+
'post_id' => $post_id,
|
129 |
+
'attachment' => $attachment,
|
130 |
+
'size' => $extract_size,
|
131 |
+
'the_post_thumbnail' => $the_post_thumbnail,
|
132 |
+
'default_image' => false,
|
133 |
+
'order_of_image' => $order_of_image,
|
134 |
+
'link_to_post' => false,
|
135 |
+
'image_class' => 'smooth_slider_thumbnail',
|
136 |
+
'image_scan' => $image_scan,
|
137 |
+
'width' => $gti_width,
|
138 |
+
'height' => false,
|
139 |
+
'echo' => false,
|
140 |
+
'permalink' => $permalink
|
141 |
+
);
|
142 |
+
|
143 |
+
$html .= sslider_get_the_image($img_args);
|
144 |
+
|
145 |
+
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
146 |
+
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
147 |
+
else
|
148 |
+
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
149 |
+
|
150 |
+
if ($smooth_slider['image_only'] == '1') {
|
151 |
+
$html .= '<!-- /smooth_slideri -->
|
152 |
+
</div>';
|
153 |
+
}
|
154 |
+
else {
|
155 |
+
if($permalink!='') {
|
156 |
+
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
157 |
+
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
158 |
+
|
159 |
+
<!-- /smooth_slideri -->
|
160 |
+
</div>'; }
|
161 |
+
else{
|
162 |
+
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
163 |
+
<!-- /smooth_slideri -->
|
164 |
+
</div>'; }
|
165 |
+
}
|
166 |
+
}
|
167 |
+
if($out_echo == '1') {
|
168 |
+
echo $html;
|
169 |
+
}
|
170 |
+
$r_array = array( $smooth_sldr_j, $html);
|
171 |
+
return $r_array;
|
172 |
+
}
|
173 |
+
|
174 |
+
function carousel_posts_on_slider_cat($max_posts, $catg_slug, $offset=0) {
|
175 |
+
global $smooth_slider;
|
176 |
+
global $wpdb, $table_prefix;
|
177 |
+
$table_name = $table_prefix.SLIDER_TABLE;
|
178 |
+
$post_table = $table_prefix."posts";
|
179 |
+
|
180 |
+
$myposts = $wpdb->get_results("SELECT a.post_id, a.date FROM
|
181 |
+
$table_name a LEFT OUTER JOIN $post_table b
|
182 |
+
ON a.post_id = b.ID
|
183 |
+
WHERE b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')
|
184 |
+
ORDER BY a.slide_order ASC, a.date DESC LIMIT $offset, $max_posts", OBJECT);
|
185 |
+
|
186 |
+
$html = '';
|
187 |
+
$smooth_sldr_i = 0;
|
188 |
+
|
189 |
+
if (!empty($catg_slug)) {
|
190 |
+
$category = get_category_by_slug($catg_slug);
|
191 |
+
$slider_cat = $category->term_id;
|
192 |
+
}
|
193 |
+
else {
|
194 |
+
$category = get_the_category();
|
195 |
+
$slider_cat = $category[0]->cat_ID;
|
196 |
+
}
|
197 |
+
|
198 |
+
foreach($myposts as $mypost) {
|
199 |
+
$post = get_post($mypost->post_id);
|
200 |
+
$post_cats_arr = get_the_category($post->ID);
|
201 |
+
|
202 |
+
$post_cats = array();
|
203 |
+
foreach($post_cats_arr as $post_cat_arr) {
|
204 |
+
$post_cats[] = $post_cat_arr->cat_ID;
|
205 |
+
}
|
206 |
+
|
207 |
+
if ((isset($slider_cat) and in_array($slider_cat,$post_cats)) or (empty($catg_slug) and (is_home() or (is_paged() and !is_category()) or is_tag() or is_author() or (is_archive() and !is_category()))))
|
208 |
+
{
|
209 |
+
$post_title = stripslashes($post->post_title);
|
210 |
+
$post_title = str_replace('"', '', $post_title);
|
211 |
+
$slider_content = $post->post_content;
|
212 |
+
|
213 |
+
// $permalink = get_permalink($post->ID);
|
214 |
+
|
215 |
+
$post_id = $post->ID;
|
216 |
+
//2.1 changes start
|
217 |
+
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
218 |
+
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
219 |
+
trim($slide_redirect_url);
|
220 |
+
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
221 |
+
$permalink = $slide_redirect_url;
|
222 |
+
}
|
223 |
+
else{
|
224 |
+
$permalink = get_permalink($post_id);
|
225 |
+
}
|
226 |
+
if($sslider_nolink=='1'){
|
227 |
+
$permalink='';
|
228 |
+
}
|
229 |
+
|
230 |
+
//2.1 changes end
|
231 |
+
|
232 |
+
$smooth_sldr_i++;
|
233 |
+
|
234 |
+
$html .= '<div class="smooth_slideri">
|
235 |
+
<!-- smooth_slideri -->';
|
236 |
+
|
237 |
+
$thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
|
238 |
+
$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
239 |
+
|
240 |
+
if ($smooth_slider['content_from'] == "slider_content") {
|
241 |
+
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
242 |
+
}
|
243 |
+
if ($smooth_slider['content_from'] == "excerpt") {
|
244 |
+
$slider_content = $post->post_excerpt;
|
245 |
+
}
|
246 |
+
|
247 |
+
$slider_content = stripslashes($slider_content);
|
248 |
+
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
249 |
+
|
250 |
+
$slider_content = str_replace("\n","<br />",$slider_content);
|
251 |
+
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
252 |
+
|
253 |
+
$slider_content = strip_shortcodes( $slider_content );
|
254 |
+
|
255 |
+
if($smooth_slider['img_pick'][0] == '1'){
|
256 |
+
$custom_key = array($smooth_slider['img_pick'][0]);
|
257 |
+
}
|
258 |
+
else {
|
259 |
+
$custom_key = '';
|
260 |
+
}
|
261 |
+
|
262 |
+
if($smooth_slider['img_pick'][2] == '1'){
|
263 |
+
$the_post_thumbnail = true;
|
264 |
+
}
|
265 |
+
else {
|
266 |
+
$the_post_thumbnail = false;
|
267 |
+
}
|
268 |
+
|
269 |
+
if($smooth_slider['img_pick'][3] == '1'){
|
270 |
+
$attachment = true;
|
271 |
+
$order_of_image = $smooth_slider['img_pick'][4];
|
272 |
+
}
|
273 |
+
else{
|
274 |
+
$attachment = false;
|
275 |
+
$order_of_image = '1';
|
276 |
+
}
|
277 |
+
|
278 |
+
if($smooth_slider['img_pick'][5] == '1'){
|
279 |
+
$image_scan = true;
|
280 |
+
}
|
281 |
+
else {
|
282 |
+
$image_scan = false;
|
283 |
+
}
|
284 |
+
|
285 |
+
if($smooth_slider['img_size'] == '1'){
|
286 |
+
$gti_width = false;
|
287 |
+
}
|
288 |
+
else {
|
289 |
+
$gti_width = $smooth_slider['img_width'];
|
290 |
+
}
|
291 |
+
|
292 |
+
if($smooth_slider['crop'] == '0'){
|
293 |
+
$extract_size = 'full';
|
294 |
+
}
|
295 |
+
elseif($smooth_slider['crop'] == '1'){
|
296 |
+
$extract_size = 'large';
|
297 |
+
}
|
298 |
+
elseif($smooth_slider['crop'] == '2'){
|
299 |
+
$extract_size = 'medium';
|
300 |
+
}
|
301 |
+
else{
|
302 |
+
$extract_size = 'thumbnail';
|
303 |
+
}
|
304 |
+
|
305 |
+
$img_args = array(
|
306 |
+
'custom_key' => $custom_key,
|
307 |
+
'attachment' => $attachment,
|
308 |
+
'size' => $extract_size,
|
309 |
+
'the_post_thumbnail' => $the_post_thumbnail,
|
310 |
+
'default_image' => false,
|
311 |
+
'order_of_image' => $order_of_image,
|
312 |
+
'link_to_post' => false,
|
313 |
+
'image_class' => 'smooth_slider_thumbnail',
|
314 |
+
'image_scan' => $image_scan,
|
315 |
+
'width' => $gti_width,
|
316 |
+
'height' => false,
|
317 |
+
'echo' => false,
|
318 |
+
'permalink' => $permalink
|
319 |
+
);
|
320 |
+
|
321 |
+
$html .= sslider_get_the_image($img_args);
|
322 |
+
|
323 |
+
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
324 |
+
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
325 |
+
else
|
326 |
+
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
327 |
+
|
328 |
+
if ($smooth_slider['image_only'] == '1') {
|
329 |
+
$html .= '<!-- /smooth_slideri -->
|
330 |
+
</div>';
|
331 |
+
}
|
332 |
+
else {
|
333 |
+
if($permalink!='') {
|
334 |
+
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
335 |
+
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
336 |
+
|
337 |
+
<!-- /smooth_slideri -->
|
338 |
+
</div>';
|
339 |
+
}
|
340 |
+
else{
|
341 |
+
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
342 |
+
<!-- /smooth_slideri -->
|
343 |
+
</div>';
|
344 |
+
}
|
345 |
+
}
|
346 |
+
}
|
347 |
+
if ($smooth_sldr_i >= $max_posts)
|
348 |
+
{ break; }
|
349 |
+
}
|
350 |
+
echo $html;
|
351 |
+
return $smooth_sldr_i;
|
352 |
+
}
|
353 |
+
|
354 |
+
//For displaying category specific posts in chronologically reverse order, Smooth Slider 2.3.3
|
355 |
+
function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offset=0, $out_echo = '1') {
|
356 |
+
global $smooth_slider;
|
357 |
+
global $wpdb, $table_prefix;
|
358 |
+
|
359 |
+
if (!empty($catg_slug)) {
|
360 |
+
$category = get_category_by_slug($catg_slug);
|
361 |
+
$slider_cat = $category->term_id;
|
362 |
+
}
|
363 |
+
else {
|
364 |
+
$category = get_the_category();
|
365 |
+
$slider_cat = $category[0]->cat_ID;
|
366 |
+
}
|
367 |
+
|
368 |
+
$posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.'&category='.$slider_cat);
|
369 |
+
|
370 |
+
$html = '';
|
371 |
+
$smooth_sldr_a = 0;
|
372 |
+
|
373 |
+
foreach($posts as $post) {
|
374 |
+
$id = $post->ID;
|
375 |
+
|
376 |
+
$post_title = stripslashes($post->post_title);
|
377 |
+
$post_title = str_replace('"', '', $post_title);
|
378 |
+
$slider_content = $post->post_content;
|
379 |
+
|
380 |
+
//2.3 changes
|
381 |
+
// $permalink = get_permalink($post->ID);
|
382 |
+
|
383 |
+
$post_id = $post->ID;
|
384 |
+
|
385 |
+
//2.1 changes start
|
386 |
+
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
387 |
+
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
388 |
+
trim($slide_redirect_url);
|
389 |
+
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
390 |
+
$permalink = $slide_redirect_url;
|
391 |
+
}
|
392 |
+
else{
|
393 |
+
$permalink = get_permalink($post_id);
|
394 |
+
}
|
395 |
+
if($sslider_nolink=='1'){
|
396 |
+
$permalink='';
|
397 |
+
}
|
398 |
+
//2.1 changes end
|
399 |
+
$smooth_sldr_a++;
|
400 |
+
$html .= '<div class="smooth_slideri">
|
401 |
+
<!-- smooth_slideri -->';
|
402 |
+
|
403 |
+
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
404 |
+
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
405 |
+
|
406 |
+
if ($smooth_slider['content_from'] == "slider_content") {
|
407 |
+
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
408 |
+
}
|
409 |
+
if ($smooth_slider['content_from'] == "excerpt") {
|
410 |
+
$slider_content = $post->post_excerpt;
|
411 |
+
}
|
412 |
+
|
413 |
+
$slider_content = stripslashes($slider_content);
|
414 |
+
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
415 |
+
|
416 |
+
$slider_content = str_replace("\n","<br />",$slider_content);
|
417 |
+
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
418 |
+
|
419 |
+
$slider_content = strip_shortcodes( $slider_content );
|
420 |
+
|
421 |
+
if($smooth_slider['img_pick'][0] == '1'){
|
422 |
+
$custom_key = array($smooth_slider['img_pick'][1]);
|
423 |
+
}
|
424 |
+
else {
|
425 |
+
$custom_key = '';
|
426 |
+
}
|
427 |
+
|
428 |
+
if($smooth_slider['img_pick'][2] == '1'){
|
429 |
+
$the_post_thumbnail = true;
|
430 |
+
}
|
431 |
+
else {
|
432 |
+
$the_post_thumbnail = false;
|
433 |
+
}
|
434 |
+
|
435 |
+
if($smooth_slider['img_pick'][3] == '1'){
|
436 |
+
$attachment = true;
|
437 |
+
$order_of_image = $smooth_slider['img_pick'][4];
|
438 |
+
}
|
439 |
+
else{
|
440 |
+
$attachment = false;
|
441 |
+
$order_of_image = '1';
|
442 |
+
}
|
443 |
+
|
444 |
+
if($smooth_slider['img_pick'][5] == '1'){
|
445 |
+
$image_scan = true;
|
446 |
+
}
|
447 |
+
else {
|
448 |
+
$image_scan = false;
|
449 |
+
}
|
450 |
+
|
451 |
+
if($smooth_slider['img_size'] == '1'){
|
452 |
+
$gti_width = $smooth_slider['img_width'];
|
453 |
+
}
|
454 |
+
else {
|
455 |
+
$gti_width = false;
|
456 |
+
}
|
457 |
+
|
458 |
+
if($smooth_slider['crop'] == '0'){
|
459 |
+
$extract_size = 'full';
|
460 |
+
}
|
461 |
+
elseif($smooth_slider['crop'] == '1'){
|
462 |
+
$extract_size = 'large';
|
463 |
+
}
|
464 |
+
elseif($smooth_slider['crop'] == '2'){
|
465 |
+
$extract_size = 'medium';
|
466 |
+
}
|
467 |
+
else{
|
468 |
+
$extract_size = 'thumbnail';
|
469 |
+
}
|
470 |
+
|
471 |
+
$img_args = array(
|
472 |
+
'custom_key' => $custom_key,
|
473 |
+
'post_id' => $post_id,
|
474 |
+
'attachment' => $attachment,
|
475 |
+
'size' => $extract_size,
|
476 |
+
'the_post_thumbnail' => $the_post_thumbnail,
|
477 |
+
'default_image' => false,
|
478 |
+
'order_of_image' => $order_of_image,
|
479 |
+
'link_to_post' => false,
|
480 |
+
'image_class' => 'smooth_slider_thumbnail',
|
481 |
+
'image_scan' => $image_scan,
|
482 |
+
'width' => $gti_width,
|
483 |
+
'height' => false,
|
484 |
+
'echo' => false,
|
485 |
+
'permalink' => $permalink
|
486 |
+
);
|
487 |
+
|
488 |
+
$html .= sslider_get_the_image($img_args);
|
489 |
+
|
490 |
+
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
491 |
+
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
492 |
+
else
|
493 |
+
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
494 |
+
|
495 |
+
if ($smooth_slider['image_only'] == '1') {
|
496 |
+
$html .= '<!-- /smooth_slideri -->
|
497 |
+
</div>';
|
498 |
+
}
|
499 |
+
else {
|
500 |
+
if($permalink!='') {
|
501 |
+
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
502 |
+
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
503 |
+
|
504 |
+
<!-- /smooth_slideri -->
|
505 |
+
</div>'; }
|
506 |
+
else{
|
507 |
+
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
508 |
+
<!-- /smooth_slideri -->
|
509 |
+
</div>'; }
|
510 |
+
}
|
511 |
+
}
|
512 |
+
if($out_echo == '1') {
|
513 |
+
echo $html;
|
514 |
+
}
|
515 |
+
$r_array = array( $smooth_sldr_a, $html);
|
516 |
+
return $r_array;
|
517 |
+
}
|
518 |
+
|
519 |
+
function get_smooth_slider_category($catg_slug) {
|
520 |
+
global $smooth_slider;
|
521 |
+
?>
|
522 |
+
<script type="text/javascript">
|
523 |
+
stepcarousel.setup({
|
524 |
+
galleryid: 'smooth_sliderc', //id of carousel DIV
|
525 |
+
beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
|
526 |
+
panelclass: 'smooth_slideri', //class of panel DIVs each holding content
|
527 |
+
autostep: {<?php if ($smooth_slider['autostep'] == '1'){ echo "enable: true";} else {echo "enable: false";}?>, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
|
528 |
+
panelbehavior: {speed:<?php echo $smooth_slider['transition']*100; ?>, wraparound: true, wrapbehavior: 'slide', persist:false},
|
529 |
+
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); ?>]},
|
530 |
+
statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
531 |
+
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
|
532 |
+
onslide:function(){
|
533 |
+
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
534 |
+
jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
535 |
+
var curr_slide = imageA;
|
536 |
+
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
537 |
+
jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
538 |
+
|
539 |
+
<?php if ($smooth_slider['goto_slide'] == 2) {
|
540 |
+
|
541 |
+
global $sldr_nav_width;
|
542 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
543 |
+
?>
|
544 |
+
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
545 |
+
jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
546 |
+
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
547 |
+
<?php } ?>
|
548 |
+
}
|
549 |
+
})
|
550 |
+
</script>
|
551 |
+
<noscript><strong><?php echo $smooth_slider['noscript'];?></strong></noscript>
|
552 |
+
<div id="smooth_sldr">
|
553 |
+
<div id="smooth_sldr_items">
|
554 |
+
<div id="smooth_sldr_body">
|
555 |
+
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
556 |
+
<div id="smooth_sliderc">
|
557 |
+
<div class="smooth_sliderb">
|
558 |
+
<?php global $smooth_sldr_a; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, '0', '0'); $smooth_sldr_a = $r_array[0]; echo $r_array[1];?>
|
559 |
+
</div>
|
560 |
+
</div>
|
561 |
+
</div>
|
562 |
+
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
563 |
+
<ul id="smooth_sliderc_nav">
|
564 |
+
<?php global $smooth_sldr_a; for($i=1; $i<=$smooth_sldr_a; $i++) {
|
565 |
+
echo "<li><a id=\"sldr".$i."\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" >".$i."</a></li>\n";
|
566 |
+
} ?>
|
567 |
+
</ul>
|
568 |
+
<?php }
|
569 |
+
if ($smooth_slider['goto_slide'] == 2) { ?>
|
570 |
+
<div id="smooth_sliderc_nav">
|
571 |
+
<?php global $smooth_sldr_a; for($i=1; $i<=$smooth_sldr_a; $i++) {
|
572 |
+
|
573 |
+
$width = $smooth_slider['navimg_w'];
|
574 |
+
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:".$smooth_slider['navimg_ht']."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
|
575 |
+
} ?>
|
576 |
+
</div>
|
577 |
+
<?php }
|
578 |
+
if ($smooth_slider['goto_slide'] == 3) { ?>
|
579 |
+
<div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
|
580 |
+
<?php } ?>
|
581 |
+
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
582 |
+
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
583 |
+
</div>
|
584 |
+
</div>
|
585 |
+
<?php
|
586 |
+
}
|
587 |
+
|
588 |
+
function smooth_slider_css() {
|
589 |
+
global $smooth_slider,$post;
|
590 |
+
if(is_singular()) {
|
591 |
+
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
592 |
+
}
|
593 |
+
if((is_singular() and $slider_style == 'default.css')
|
594 |
+
or (!is_singular() and $smooth_slider['stylesheet'] == 'default.css')
|
595 |
+
or (is_singular() and is_active_widget(false, false, 'sslider_wid', true) and (!isset($slider_style) or empty($slider_style) ))
|
596 |
+
or (is_singular() and isset($smooth_slider['shortcode']) ) )
|
597 |
+
{
|
598 |
+
?>
|
599 |
+
<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"){$nav_size = $smooth_slider['navimg_ht'];} 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"){$nav_size = $smooth_slider['navimg_ht'];} 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;max-height:<?php echo $smooth_slider['img_height']; ?>px;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>
|
600 |
+
<?php }
|
601 |
+
}
|
602 |
+
|
603 |
+
add_action('wp_head', 'smooth_slider_css');
|
604 |
+
|
605 |
+
function smooth_slider_enqueue_scripts() {
|
606 |
+
// wp_register_script('jquery', false, false, false, false);
|
607 |
+
wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
|
608 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
609 |
+
}
|
610 |
+
|
611 |
+
add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
612 |
+
|
613 |
+
function smooth_slider_enqueue_styles() {
|
614 |
+
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
615 |
+
if(is_singular()) {
|
616 |
+
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
617 |
+
if((is_active_widget(false, false, 'sslider_wid', true) or isset($smooth_slider['shortcode']) ) and (!isset($slider_style) or empty($slider_style))){
|
618 |
+
$slider_style='default.css';
|
619 |
+
}
|
620 |
+
if (!isset($slider_style) or empty($slider_style) ) {
|
621 |
+
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/styles/'.$smooth_slider['stylesheet'] ),
|
622 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
623 |
+
}
|
624 |
+
else {
|
625 |
+
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/styles/'.$slider_style ),
|
626 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
627 |
+
}
|
628 |
+
}
|
629 |
+
else {
|
630 |
+
$slider_style = $smooth_slider['stylesheet'];
|
631 |
+
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/styles/'.$slider_style ),
|
632 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
633 |
+
}
|
634 |
+
}
|
635 |
+
add_action( 'wp', 'smooth_slider_enqueue_styles' );
|
636 |
+
|
637 |
+
function get_smooth_slider($slider_id='') {
|
638 |
+
global $smooth_slider;
|
639 |
+
|
640 |
+
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
641 |
+
global $post;
|
642 |
+
$post_id = $post->ID;
|
643 |
+
$slider_id = get_slider_for_the_post($post_id);
|
644 |
+
}
|
645 |
+
if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
|
646 |
+
$slider_id = '1';
|
647 |
+
}
|
648 |
+
if(!empty($slider_id)){
|
649 |
+
global $smooth_sldr_j; $r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, '0'); $smooth_sldr_j = $r_array[0];
|
650 |
+
?>
|
651 |
+
<script type="text/javascript">
|
652 |
+
stepcarousel.setup({
|
653 |
+
galleryid: 'smooth_sliderc', //id of carousel DIV
|
654 |
+
beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
|
655 |
+
panelclass: 'smooth_slideri', //class of panel DIVs each holding content
|
656 |
+
autostep: {<?php if ($smooth_slider['autostep'] == '1'){ echo "enable: true";} else {echo "enable: false";}?>, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
|
657 |
+
panelbehavior: {speed:<?php echo $smooth_slider['transition']*100; ?>, wraparound: true, wrapbehavior: 'slide', persist:false},
|
658 |
+
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); ?>]},
|
659 |
+
statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
660 |
+
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
|
661 |
+
onslide:function(){
|
662 |
+
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
663 |
+
jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
664 |
+
var curr_slide = imageA;
|
665 |
+
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
666 |
+
jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
667 |
+
|
668 |
+
<?php if ($smooth_slider['goto_slide'] == 2) {
|
669 |
+
|
670 |
+
global $sldr_nav_width;
|
671 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
672 |
+
?>
|
673 |
+
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
674 |
+
jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
675 |
+
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
676 |
+
<?php } ?>
|
677 |
+
}
|
678 |
+
})
|
679 |
+
</script>
|
680 |
+
<noscript><strong><?php echo $smooth_slider['noscript'];?></strong></noscript>
|
681 |
+
<div id="smooth_sldr">
|
682 |
+
<div id="smooth_sldr_items">
|
683 |
+
<div id="smooth_sldr_body">
|
684 |
+
<?php
|
685 |
+
if($smooth_slider['title_from']=='1') $sldr_title = get_smooth_slider_name($slider_id);
|
686 |
+
else $sldr_title = $smooth_slider['title_text'];
|
687 |
+
if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
688 |
+
<div id="smooth_sliderc">
|
689 |
+
<div class="smooth_sliderb">
|
690 |
+
<?php global $smooth_sldr_j; $r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, '0'); $smooth_sldr_j = $r_array[0]; echo $r_array[1];?>
|
691 |
+
</div>
|
692 |
+
</div>
|
693 |
+
</div>
|
694 |
+
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
695 |
+
<ul id="smooth_sliderc_nav">
|
696 |
+
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
697 |
+
echo "<li><a id=\"sldr".$i."\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" >".$i."</a></li>\n";
|
698 |
+
} ?>
|
699 |
+
</ul>
|
700 |
+
<?php }
|
701 |
+
if ($smooth_slider['goto_slide'] == 2) { ?>
|
702 |
+
<div id="smooth_sliderc_nav">
|
703 |
+
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
704 |
+
|
705 |
+
$width = $smooth_slider['navimg_w'];
|
706 |
+
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:".$smooth_slider['navimg_ht']."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
|
707 |
+
} ?>
|
708 |
+
</div>
|
709 |
+
<?php }
|
710 |
+
if ($smooth_slider['goto_slide'] == 3) { ?>
|
711 |
+
<div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
|
712 |
+
<?php } ?>
|
713 |
+
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
714 |
+
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
715 |
+
</div>
|
716 |
+
</div>
|
717 |
+
<?php
|
718 |
+
} //end of not empty slider_id condition
|
719 |
+
}
|
720 |
+
|
721 |
+
//Smooth Slider template tag to get the Category specific posts in the slider.
|
722 |
+
function get_smooth_slider_cat($catg_slug) {
|
723 |
+
global $smooth_slider;
|
724 |
+
?>
|
725 |
+
<script type="text/javascript">
|
726 |
+
stepcarousel.setup({
|
727 |
+
galleryid: 'smooth_sliderc', //id of carousel DIV
|
728 |
+
beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
|
729 |
+
panelclass: 'smooth_slideri', //class of panel DIVs each holding content
|
730 |
+
autostep: {<?php if ($smooth_slider['autostep'] == '1'){ echo "enable: true";} else {echo "enable: false";}?>, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
|
731 |
+
panelbehavior: {speed:<?php echo $smooth_slider['transition']*100; ?>, wraparound: true, wrapbehavior: 'slide', persist:false},
|
732 |
+
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); ?>]},
|
733 |
+
statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
734 |
+
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
|
735 |
+
onslide:function(){
|
736 |
+
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
737 |
+
jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
738 |
+
var curr_slide = imageA;
|
739 |
+
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
740 |
+
jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
741 |
+
|
742 |
+
<?php if ($smooth_slider['goto_slide'] == 2) {
|
743 |
+
|
744 |
+
global $sldr_nav_width;
|
745 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
746 |
+
?>
|
747 |
+
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
748 |
+
jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
749 |
+
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
750 |
+
<?php } ?>
|
751 |
+
|
752 |
+
}
|
753 |
+
})
|
754 |
+
</script>
|
755 |
+
<noscript><strong><?php echo $smooth_slider['noscript'];?></strong></noscript>
|
756 |
+
<div id="smooth_sldr">
|
757 |
+
<div id="smooth_sldr_items">
|
758 |
+
<div id="smooth_sldr_body">
|
759 |
+
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
760 |
+
<div id="smooth_sliderc">
|
761 |
+
<div class="smooth_sliderb">
|
762 |
+
<?php global $smooth_sldr_i; $smooth_sldr_i = carousel_posts_on_slider_cat($smooth_slider['no_posts'], $catg_slug); ?>
|
763 |
+
</div>
|
764 |
+
</div>
|
765 |
+
</div>
|
766 |
+
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
767 |
+
<ul id="smooth_sliderc_nav">
|
768 |
+
<?php global $smooth_sldr_i; for($i=1; $i<=$smooth_sldr_i; $i++) {
|
769 |
+
echo "<li><a id=\"sldr".$i."\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" >".$i."</a></li>\n";
|
770 |
+
} ?>
|
771 |
+
</ul>
|
772 |
+
<?php }
|
773 |
+
if ($smooth_slider['goto_slide'] == 2) { ?>
|
774 |
+
<div id="smooth_sliderc_nav">
|
775 |
+
<?php global $smooth_sldr_i; for($i=1; $i<=$smooth_sldr_i; $i++) {
|
776 |
+
|
777 |
+
$width = $smooth_slider['navimg_w'];
|
778 |
+
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:".$smooth_slider['navimg_ht']."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
|
779 |
+
} ?>
|
780 |
+
</div>
|
781 |
+
<?php }
|
782 |
+
if ($smooth_slider['goto_slide'] == 3) { ?>
|
783 |
+
<div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
|
784 |
+
<?php } ?>
|
785 |
+
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
786 |
+
</div>
|
787 |
+
</div>
|
788 |
+
<?php
|
789 |
+
}
|
790 |
+
function return_smooth_slider($slider_id='') {
|
791 |
+
global $smooth_slider;
|
792 |
+
|
793 |
+
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
794 |
+
global $post;
|
795 |
+
$post_id = $post->ID;
|
796 |
+
$slider_id = get_slider_for_the_post($post_id);
|
797 |
+
}
|
798 |
+
if($smooth_slider['multiple_sliders'] != '1' and (empty($slider_id) or !isset($slider_id))){
|
799 |
+
$slider_id = '1';
|
800 |
+
}
|
801 |
+
$slider_html='';
|
802 |
+
if(!empty($slider_id)){
|
803 |
+
if ($smooth_slider['autostep'] == '1'){ $autostep = "enable: true";} else {$autostep = "enable: false";}
|
804 |
+
if ($smooth_slider['prev_next'] == 1) {$defaultbuttons = "true";} else {$defaultbuttons = "false";}
|
805 |
+
$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; }
|
806 |
+
$nav_ht = (($smooth_slider['height'] - $extra_height)/2);
|
807 |
+
$fontSize = $smooth_slider['content_fsize'] + 5;
|
808 |
+
|
809 |
+
$slider_html=$slider_html.'<script type="text/javascript">
|
810 |
+
stepcarousel.setup({
|
811 |
+
galleryid: "smooth_sliderc", //id of carousel DIV
|
812 |
+
beltclass: "smooth_sliderb", //class of inner "belt" DIV containing all the panel DIVs
|
813 |
+
panelclass: "smooth_slideri", //class of panel DIVs each holding content
|
814 |
+
autostep: {'.$autostep.', moveby:1, pause:'. $smooth_slider['speed']*1000 .'},
|
815 |
+
panelbehavior: {speed:'. $smooth_slider['transition']*100 .', wraparound: true, wrapbehavior: "slide", persist:false},
|
816 |
+
defaultbuttons: {enable: '.$defaultbuttons.', moveby: 1, leftnav: ["'. smooth_slider_plugin_url( 'images/button_prev.png' ) .'", -25, '.$nav_ht.'], rightnav: ["'. smooth_slider_plugin_url( 'images/button_next.png' ).'", 0, '.$nav_ht.']},
|
817 |
+
statusvars: ["imageA", "imageB", "imageC"], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
818 |
+
contenttype: ["inline"], //content setting ["inline"] or ["external", "path_to_external_file"]
|
819 |
+
onslide:function(){
|
820 |
+
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
821 |
+
jQuery("#smooth_sliderc_nav li a").css("fontSize", "'.$smooth_slider['content_fsize'].'px");
|
822 |
+
var curr_slide = imageA;
|
823 |
+
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
824 |
+
jQuery("#sldr"+curr_slide).css("fontSize", "'.$fontSize.'px");';
|
825 |
+
|
826 |
+
if ($smooth_slider['goto_slide'] == 2) {
|
827 |
+
|
828 |
+
global $sldr_nav_width;
|
829 |
+
$sldr_nav_width = $smooth_slider['navimg_w'];
|
830 |
+
// var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width;
|
831 |
+
$slider_html = $slider_html.'jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
832 |
+
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+'.$sldr_nav_width.'+"px 0")';
|
833 |
+
}
|
834 |
+
$slider_html=$slider_html.' }
|
835 |
+
})
|
836 |
+
</script>
|
837 |
+
<noscript><strong>'.$smooth_slider['noscript'].'</strong></noscript>
|
838 |
+
<div id="smooth_sldr">
|
839 |
+
<div id="smooth_sldr_items">
|
840 |
+
<div id="smooth_sldr_body">';
|
841 |
+
|
842 |
+
if($smooth_slider['title_from']=='1') $sldr_title = get_smooth_slider_name($slider_id);
|
843 |
+
else $sldr_title = $smooth_slider['title_text'];
|
844 |
+
if(!empty($sldr_title)) {
|
845 |
+
$slider_html=$slider_html.'<div class="sldr_title">'. $smooth_slider['title_text'].'</div>';
|
846 |
+
}
|
847 |
+
global $smooth_sldr_j;
|
848 |
+
$r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, $echo = '0');
|
849 |
+
$smooth_sldr_j = $r_array[0];
|
850 |
+
|
851 |
+
$slider_html=$slider_html.'<div id="smooth_sliderc">
|
852 |
+
<div class="smooth_sliderb">
|
853 |
+
'.$r_array[1].'
|
854 |
+
</div>
|
855 |
+
</div>
|
856 |
+
</div>';
|
857 |
+
if ($smooth_slider['goto_slide'] == 1) {
|
858 |
+
$slider_html=$slider_html.'<ul id="smooth_sliderc_nav">';
|
859 |
+
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
860 |
+
$slider_html=$slider_html.'<li><a id="sldr'.$i.'" href="javascript:stepcarousel.stepTo(\'smooth_sliderc\', '.$i.')" >'.$i.'</a></li>';
|
861 |
+
}
|
862 |
+
$slider_html=$slider_html.'</ul>';
|
863 |
+
}
|
864 |
+
if ($smooth_slider['goto_slide'] == 2) {
|
865 |
+
$slider_html=$slider_html.'<div id="smooth_sliderc_nav">';
|
866 |
+
$width = $smooth_slider['navimg_w'];
|
867 |
+
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
868 |
+
$slider_html=$slider_html.'<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:'.$smooth_slider['navimg_ht'].'px;" href="javascript:stepcarousel.stepTo(\'smooth_sliderc\', '.$i.')" ></a>';
|
869 |
+
}
|
870 |
+
$slider_html=$slider_html.'</div>';
|
871 |
+
}
|
872 |
+
if ($smooth_slider['goto_slide'] == 3) {
|
873 |
+
$slider_html=$slider_html.'<div id="smooth_sliderc_nav"><li style="border:none;">'.$smooth_slider["custom_nav"].'</li></div>';
|
874 |
+
}
|
875 |
+
$slider_html=$slider_html.'<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
876 |
+
</div>
|
877 |
+
</div>';
|
878 |
+
} //end of not empty slider_id condition
|
879 |
+
return $slider_html;
|
880 |
+
}
|
881 |
+
|
882 |
+
function smooth_slider_simple_shortcode($atts) {
|
883 |
+
extract(shortcode_atts(array(
|
884 |
+
'id' => '',
|
885 |
+
), $atts));
|
886 |
+
|
887 |
+
return return_smooth_slider($id);
|
888 |
+
}
|
889 |
+
add_shortcode('smoothslider', 'smooth_slider_simple_shortcode');
|
890 |
+
|
891 |
+
//admin settings
|
892 |
+
function smooth_slider_admin_scripts() {
|
893 |
+
if ( is_admin() ){ // admin actions
|
894 |
+
// Settings page only
|
895 |
+
if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page'] or 'smooth-slider-settings' == $_GET['page'] ) ) {
|
896 |
+
wp_register_script('jquery', false, false, false, false);
|
897 |
+
wp_enqueue_script( 'jquery-ui-tabs' );
|
898 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
899 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
900 |
+
wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
|
901 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
902 |
+
wp_enqueue_style( 'smooth_slider_css', smooth_slider_plugin_url( 'css/smooth-slider.css' ),
|
903 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
904 |
+
}
|
905 |
+
}
|
906 |
+
}
|
907 |
+
|
908 |
+
add_action( 'admin_init', 'smooth_slider_admin_scripts' );
|
909 |
+
|
910 |
+
function smooth_slider_admin_head() {
|
911 |
+
global $smooth_slider;
|
912 |
+
if ( is_admin() ){ // admin actions
|
913 |
+
|
914 |
+
// Sliders page only
|
915 |
+
if ( isset($_GET['page']) && 'smooth-slider-admin' == $_GET['page'] ) {
|
916 |
+
$sliders = ss_get_sliders();
|
917 |
+
?>
|
918 |
+
<script type="text/javascript">
|
919 |
+
// <![CDATA[
|
920 |
+
jQuery(document).ready(function() {
|
921 |
+
jQuery(function() {
|
922 |
+
jQuery("#slider_tabs").tabs();
|
923 |
+
<?php foreach($sliders as $slider){?>
|
924 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
925 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
926 |
+
<?php } ?>
|
927 |
+
});
|
928 |
+
});
|
929 |
+
function confirmRemove()
|
930 |
+
{
|
931 |
+
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
932 |
+
if (agree)
|
933 |
+
return true ;
|
934 |
+
else
|
935 |
+
return false ;
|
936 |
+
}
|
937 |
+
function confirmRemoveAll()
|
938 |
+
{
|
939 |
+
var agree=confirm("Remove all Posts/Pages from Smooth Slider??");
|
940 |
+
if (agree)
|
941 |
+
return true ;
|
942 |
+
else
|
943 |
+
return false ;
|
944 |
+
}
|
945 |
+
function confirmSliderDelete()
|
946 |
+
{
|
947 |
+
var agree=confirm("Delete this Slider??");
|
948 |
+
if (agree)
|
949 |
+
return true ;
|
950 |
+
else
|
951 |
+
return false ;
|
952 |
+
}
|
953 |
+
function slider_checkform ( form )
|
954 |
+
{
|
955 |
+
if (form.new_slider_name.value == "") {
|
956 |
+
alert( "Please enter the New Slider name." );
|
957 |
+
form.new_slider_name.focus();
|
958 |
+
return false ;
|
959 |
+
}
|
960 |
+
return true ;
|
961 |
+
}
|
962 |
+
</script>
|
963 |
+
<style type="text/css">
|
964 |
+
/************************************************
|
965 |
+
* ui-tabs *
|
966 |
+
************************************************/
|
967 |
+
.ui-tabs { padding: .2em; zoom: 1; }
|
968 |
+
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
969 |
+
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; background-color:#B9B9B9;}
|
970 |
+
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#FFFFFF;}
|
971 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-bottom-width: 0; background-color:#ABD37E;}
|
972 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#FFF;}
|
973 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
974 |
+
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
975 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
976 |
+
/*tabs complete*/
|
977 |
+
#divFeedityWidget span[style] {
|
978 |
+
display:none !important;
|
979 |
+
}
|
980 |
+
div#smooth_sldr_donations a{
|
981 |
+
color:#366C94 !important;
|
982 |
+
text-decoration:none;
|
983 |
+
}
|
984 |
+
div#smooth_sldr_donations a:hover{
|
985 |
+
text-decoration:underline;
|
986 |
+
}
|
987 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
988 |
+
#sldr_close {float:right;}
|
989 |
+
</style>
|
990 |
+
<?php
|
991 |
+
} //Sliders page only
|
992 |
+
|
993 |
+
// Settings page only
|
994 |
+
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
|
995 |
+
wp_print_scripts( 'farbtastic' );
|
996 |
+
wp_print_styles( 'farbtastic' );
|
997 |
+
?>
|
998 |
+
<script type="text/javascript">
|
999 |
+
// <![CDATA[
|
1000 |
+
jQuery(document).ready(function() {
|
1001 |
+
jQuery('#colorbox_1').farbtastic('#color_value_1');
|
1002 |
+
jQuery('#color_picker_1').click(function () {
|
1003 |
+
if (jQuery('#colorbox_1').css('display') == "block") {
|
1004 |
+
jQuery('#colorbox_1').fadeOut("slow"); }
|
1005 |
+
else {
|
1006 |
+
jQuery('#colorbox_1').fadeIn("slow"); }
|
1007 |
+
});
|
1008 |
+
var colorpick_1 = false;
|
1009 |
+
jQuery(document).mousedown(function(){
|
1010 |
+
if (colorpick_1 == true) {
|
1011 |
+
return; }
|
1012 |
+
jQuery('#colorbox_1').fadeOut("slow");
|
1013 |
+
});
|
1014 |
+
jQuery(document).mouseup(function(){
|
1015 |
+
colorpick_1 = false;
|
1016 |
+
});
|
1017 |
+
//for second color box
|
1018 |
+
jQuery('#colorbox_2').farbtastic('#color_value_2');
|
1019 |
+
jQuery('#color_picker_2').click(function () {
|
1020 |
+
if (jQuery('#colorbox_2').css('display') == "block") {
|
1021 |
+
jQuery('#colorbox_2').fadeOut("slow"); }
|
1022 |
+
else {
|
1023 |
+
jQuery('#colorbox_2').fadeIn("slow"); }
|
1024 |
+
});
|
1025 |
+
var colorpick_2 = false;
|
1026 |
+
jQuery(document).mousedown(function(){
|
1027 |
+
if (colorpick_2 == true) {
|
1028 |
+
return; }
|
1029 |
+
jQuery('#colorbox_2').fadeOut("slow");
|
1030 |
+
});
|
1031 |
+
jQuery(document).mouseup(function(){
|
1032 |
+
colorpick_2 = false;
|
1033 |
+
});
|
1034 |
+
//for third color box
|
1035 |
+
jQuery('#colorbox_3').farbtastic('#color_value_3');
|
1036 |
+
jQuery('#color_picker_3').click(function () {
|
1037 |
+
if (jQuery('#colorbox_3').css('display') == "block") {
|
1038 |
+
jQuery('#colorbox_3').fadeOut("slow"); }
|
1039 |
+
else {
|
1040 |
+
jQuery('#colorbox_3').fadeIn("slow"); }
|
1041 |
+
});
|
1042 |
+
var colorpick_3 = false;
|
1043 |
+
jQuery(document).mousedown(function(){
|
1044 |
+
if (colorpick_3 == true) {
|
1045 |
+
return; }
|
1046 |
+
jQuery('#colorbox_3').fadeOut("slow");
|
1047 |
+
});
|
1048 |
+
jQuery(document).mouseup(function(){
|
1049 |
+
colorpick_3 = false;
|
1050 |
+
});
|
1051 |
+
//for fourth color box
|
1052 |
+
jQuery('#colorbox_4').farbtastic('#color_value_4');
|
1053 |
+
jQuery('#color_picker_4').click(function () {
|
1054 |
+
if (jQuery('#colorbox_4').css('display') == "block") {
|
1055 |
+
jQuery('#colorbox_4').fadeOut("slow"); }
|
1056 |
+
else {
|
1057 |
+
jQuery('#colorbox_4').fadeIn("slow"); }
|
1058 |
+
});
|
1059 |
+
var colorpick_4 = false;
|
1060 |
+
jQuery(document).mousedown(function(){
|
1061 |
+
if (colorpick_4 == true) {
|
1062 |
+
return; }
|
1063 |
+
jQuery('#colorbox_4').fadeOut("slow");
|
1064 |
+
});
|
1065 |
+
jQuery(document).mouseup(function(){
|
1066 |
+
colorpick_4 = false;
|
1067 |
+
});
|
1068 |
+
//for fifth color box
|
1069 |
+
jQuery('#colorbox_5').farbtastic('#color_value_5');
|
1070 |
+
jQuery('#color_picker_5').click(function () {
|
1071 |
+
if (jQuery('#colorbox_5').css('display') == "block") {
|
1072 |
+
jQuery('#colorbox_5').fadeOut("slow"); }
|
1073 |
+
else {
|
1074 |
+
jQuery('#colorbox_5').fadeIn("slow"); }
|
1075 |
+
});
|
1076 |
+
var colorpick_5 = false;
|
1077 |
+
jQuery(document).mousedown(function(){
|
1078 |
+
if (colorpick_5 == true) {
|
1079 |
+
return; }
|
1080 |
+
jQuery('#colorbox_5').fadeOut("slow");
|
1081 |
+
});
|
1082 |
+
jQuery(document).mouseup(function(){
|
1083 |
+
colorpick_5 = false;
|
1084 |
+
});
|
1085 |
+
//for sixth color box
|
1086 |
+
jQuery('#colorbox_6').farbtastic('#color_value_6');
|
1087 |
+
jQuery('#color_picker_6').click(function () {
|
1088 |
+
if (jQuery('#colorbox_6').css('display') == "block") {
|
1089 |
+
jQuery('#colorbox_6').fadeOut("slow"); }
|
1090 |
+
else {
|
1091 |
+
jQuery('#colorbox_6').fadeIn("slow"); }
|
1092 |
+
});
|
1093 |
+
var colorpick_6 = false;
|
1094 |
+
jQuery(document).mousedown(function(){
|
1095 |
+
if (colorpick_6 == true) {
|
1096 |
+
return; }
|
1097 |
+
jQuery('#colorbox_6').fadeOut("slow");
|
1098 |
+
});
|
1099 |
+
jQuery(document).mouseup(function(){
|
1100 |
+
colorpick_6 = false;
|
1101 |
+
});
|
1102 |
+
jQuery('#sldr_close').click(function () {
|
1103 |
+
jQuery('#sldr_message').fadeOut("slow");
|
1104 |
+
});
|
1105 |
+
});
|
1106 |
+
</script>
|
1107 |
+
<style type="text/css">
|
1108 |
+
.color-picker-wrap {
|
1109 |
+
position: absolute;
|
1110 |
+
display: none;
|
1111 |
+
background: #fff;
|
1112 |
+
border: 3px solid #ccc;
|
1113 |
+
padding: 3px;
|
1114 |
+
z-index: 1000;
|
1115 |
+
}
|
1116 |
+
#divFeedityWidget span[style] {
|
1117 |
+
display:none !important;
|
1118 |
+
}
|
1119 |
+
div#smooth_sldr_donations a{
|
1120 |
+
color:#366C94 !important;
|
1121 |
+
text-decoration:none;
|
1122 |
+
}
|
1123 |
+
div#smooth_sldr_donations a:hover{
|
1124 |
+
text-decoration:underline;
|
1125 |
+
}
|
1126 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
1127 |
+
#sldr_close {float:right;}
|
1128 |
+
</style>
|
1129 |
+
<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"){$nav_size = $smooth_slider['navimg_ht'];} 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"){$nav_size = $smooth_slider['navimg_ht'];} 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;max-height:<?php echo $smooth_slider['img_height']; ?>px;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>
|
1130 |
+
<?php
|
1131 |
+
} //for smooth slider option page
|
1132 |
+
}//only for admin
|
1133 |
+
}
|
1134 |
+
add_action('admin_head', 'smooth_slider_admin_head');
|
1135 |
+
?>
|
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: 2.3.
|
7 |
Author: Internet Techies
|
8 |
Author URI: http://www.clickonf5.org/
|
9 |
Wordpress version supported: 2.9 and above
|
@@ -27,15 +27,22 @@ Wordpress version supported: 2.9 and above
|
|
27 |
*/
|
28 |
//Please visit Plugin page http://www.clickonf5.org/smooth-slider for Changelog
|
29 |
//on activation
|
|
|
|
|
|
|
30 |
define('SLIDER_TABLE','smooth_slider'); //Slider TABLE NAME
|
31 |
define('PREV_SLIDER_TABLE','slider'); //Slider TABLE NAME
|
32 |
define('SLIDER_META','smooth_slider_meta'); //Meta TABLE NAME
|
33 |
define('SLIDER_POST_META','smooth_slider_postmeta'); //Meta TABLE NAME
|
34 |
-
define("SMOOTH_SLIDER_VER","2.3.
|
35 |
if ( ! defined( 'SMOOTH_SLIDER_PLUGIN_BASENAME' ) )
|
36 |
define( 'SMOOTH_SLIDER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
37 |
-
if ( ! defined( 'SMOOTH_SLIDER_CSS_DIR' ) )
|
38 |
-
define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/styles/' );
|
|
|
|
|
|
|
|
|
39 |
|
40 |
function install_smooth_slider() {
|
41 |
global $wpdb, $table_prefix;
|
@@ -64,7 +71,7 @@ function install_smooth_slider() {
|
|
64 |
}
|
65 |
}
|
66 |
}
|
67 |
-
|
68 |
|
69 |
$meta_table_name = $table_prefix.SLIDER_META;
|
70 |
if($wpdb->get_var("show tables like '$meta_table_name'") != $meta_table_name) {
|
@@ -100,6 +107,7 @@ function install_smooth_slider() {
|
|
100 |
'prev_next'=>'0',
|
101 |
'goto_slide'=>'1',
|
102 |
'title_text'=>'Featured Posts',
|
|
|
103 |
'title_font'=>'Georgia',
|
104 |
'title_fsize'=>'20',
|
105 |
'title_fstyle'=>'bold',
|
@@ -134,15 +142,22 @@ function install_smooth_slider() {
|
|
134 |
'navimg_w'=>'32',
|
135 |
'navimg_ht'=>'32',
|
136 |
'content_limit'=>'50',
|
137 |
-
'stylesheet'=>'default
|
138 |
-
'shortcode'=>'1'
|
|
|
|
|
|
|
|
|
139 |
);
|
140 |
|
141 |
$smooth_slider = get_option('smooth_slider_options');
|
|
|
|
|
|
|
|
|
142 |
$img_pick = $smooth_slider['img_pick'];
|
143 |
|
144 |
if(is_array($img_pick)) {
|
145 |
-
//if(isset($smooth_slider['img_pick'][1])) {
|
146 |
$cskey = $smooth_slider['img_pick'][1];
|
147 |
}
|
148 |
else{
|
@@ -192,44 +207,8 @@ function install_smooth_slider() {
|
|
192 |
|
193 |
delete_option('smooth_slider_options');
|
194 |
update_option('smooth_slider_options',$smooth_slider);
|
195 |
-
|
196 |
-
delete_option('smooth_slider_speed');
|
197 |
-
delete_option('smooth_slider_no_posts');
|
198 |
-
delete_option('smooth_slider_bg_color');
|
199 |
-
delete_option('smooth_slider_height');
|
200 |
-
delete_option('smooth_slider_width');
|
201 |
-
delete_option('smooth_slider_border');
|
202 |
-
delete_option('smooth_slider_brcolor');
|
203 |
-
delete_option('smooth_slider_prev_next');
|
204 |
-
delete_option('smooth_slider_goto_slide');
|
205 |
-
delete_option('smooth_slider_title_text');
|
206 |
-
delete_option('smooth_slider_title_font');
|
207 |
-
delete_option('smooth_slider_title_fsize');
|
208 |
-
delete_option('smooth_slider_title_fstyle');
|
209 |
-
delete_option('smooth_slider_title_fcolor');
|
210 |
-
delete_option('smooth_slider_ptitle_font');
|
211 |
-
delete_option('smooth_slider_ptitle_fsize');
|
212 |
-
delete_option('smooth_slider_ptitle_fstyle');
|
213 |
-
delete_option('smooth_slider_ptitle_fcolor');
|
214 |
-
delete_option('smooth_slider_img_align');
|
215 |
-
delete_option('smooth_slider_img_height');
|
216 |
-
delete_option('smooth_slider_img_width');
|
217 |
-
delete_option('smooth_slider_img_border');
|
218 |
-
delete_option('smooth_slider_img_brcolor');
|
219 |
-
delete_option('smooth_slider_content_font');
|
220 |
-
delete_option('smooth_slider_content_fsize');
|
221 |
-
delete_option('smooth_slider_content_fstyle');
|
222 |
-
delete_option('smooth_slider_content_fcolor');
|
223 |
-
delete_option('smooth_slider_content_from');
|
224 |
-
delete_option('smooth_slider_content_chars');
|
225 |
-
delete_option('smooth_slider_bg');
|
226 |
-
delete_option('smooth_slider_clear');
|
227 |
-
delete_option('smooth_slider_image_only');
|
228 |
}
|
229 |
register_activation_hook( __FILE__, 'install_smooth_slider' );
|
230 |
-
//defined global variables and constants here
|
231 |
-
global $smooth_slider;
|
232 |
-
$smooth_slider = get_option('smooth_slider_options');
|
233 |
require_once (dirname (__FILE__) . '/includes/smooth-slider-functions.php');
|
234 |
require_once (dirname (__FILE__) . '/includes/sslider-get-the-image-functions.php');
|
235 |
|
@@ -292,25 +271,29 @@ global $smooth_slider;
|
|
292 |
}
|
293 |
}
|
294 |
$slider_style = get_post_meta($post_id,'slider_style',true);
|
295 |
-
|
|
|
296 |
update_post_meta($post_id, 'slider_style', $_POST['slider_style']);
|
297 |
}
|
298 |
|
299 |
$thumbnail_key = $smooth_slider['img_pick'][1];
|
300 |
$sslider_thumbnail = get_post_meta($post_id,$thumbnail_key,true);
|
301 |
-
|
|
|
302 |
update_post_meta($post_id, $thumbnail_key, $_POST['sslider_thumbnail']);
|
303 |
}
|
304 |
|
305 |
$sslider_link = get_post_meta($post_id,'slide_redirect_url',true);
|
306 |
$link=$_POST['sslider_link'];
|
307 |
-
|
308 |
-
if($
|
|
|
309 |
update_post_meta($post_id, 'slide_redirect_url', $link);
|
310 |
}
|
311 |
|
312 |
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
313 |
-
|
|
|
314 |
update_post_meta($post_id, 'sslider_nolink', $_POST['sslider_nolink']);
|
315 |
}
|
316 |
|
@@ -386,7 +369,7 @@ function smooth_slider_add_custom_box() {
|
|
386 |
if( function_exists( 'add_meta_box' ) ) {
|
387 |
$post_types=get_post_types();
|
388 |
foreach($post_types as $post_type) {
|
389 |
-
add_meta_box( 'sslider_box1', __( 'Smooth Slider' ), 'smooth_slider_edit_custom_box', $post_type, 'advanced' );
|
390 |
}
|
391 |
//add_meta_box( $id, $title, $callback, $page, $context, $priority );
|
392 |
} else {
|
@@ -423,7 +406,7 @@ function add_to_slider_checkbox() {
|
|
423 |
?>
|
424 |
<div id="slider_checkbox">
|
425 |
<input type="checkbox" class="sldr_post" name="slider" value="slider" <?php echo $extra;?> />
|
426 |
-
<label for="slider"
|
427 |
<select name="slider_name[]" multiple="multiple" size="2" style="height:4em;">
|
428 |
<?php foreach ($sliders as $slider) { ?>
|
429 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(in_array($slider['slider_id'],$post_slider_arr)){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
@@ -436,12 +419,12 @@ function add_to_slider_checkbox() {
|
|
436 |
<br />
|
437 |
|
438 |
<input type="checkbox" class="sldr_post" name="display_slider" value="1" <?php if(ss_slider_on_this_post($post_id)){echo "checked";}?> />
|
439 |
-
<label for="display_slider"
|
440 |
<select name="display_slider_name">
|
441 |
<?php foreach ($sliders as $slider) { ?>
|
442 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(ss_post_on_slider($post_id,$slider['slider_id'])){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
443 |
<?php } ?>
|
444 |
-
</select> on this Post/Page (you need to add the Smooth Slider template tag manually on your page.php/single.php or whatever page template file)
|
445 |
<?php } ?>
|
446 |
|
447 |
<input type="hidden" name="sldr-verify" id="sldr-verify" value="<?php echo wp_create_nonce('SmoothSlider');?>" />
|
@@ -453,7 +436,7 @@ function add_to_slider_checkbox() {
|
|
453 |
?>
|
454 |
<select name="slider_style" >
|
455 |
<?php
|
456 |
-
$directory =
|
457 |
if ($handle = opendir($directory)) {
|
458 |
while (false !== ($file = readdir($handle))) {
|
459 |
if($file != '.' and $file != '..') { ?>
|
@@ -462,21 +445,21 @@ function add_to_slider_checkbox() {
|
|
462 |
closedir($handle);
|
463 |
}
|
464 |
?>
|
465 |
-
</select> <label for="slider_style"
|
466 |
|
467 |
<?php $thumbnail_key = $smooth_slider['img_pick'][1];
|
468 |
$sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
|
469 |
$sslider_link= get_post_meta($post_id, 'slide_redirect_url', true);
|
470 |
$sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
|
471 |
?>
|
472 |
-
<label for="sslider_thumbnail"
|
473 |
<input type="text" name="sslider_thumbnail" class="sslider_thumbnail" value="<?php echo $sslider_thumbnail;?>" size="75" />
|
474 |
<br /> </label> <br /><br />
|
475 |
<fieldset>
|
476 |
-
<label for="sslider_link"
|
477 |
-
<input type="text" name="sslider_link" class="sslider_link" value="<?php echo $sslider_link;?>" size="50"
|
478 |
<label for="sslider_nolink">
|
479 |
-
<input type="checkbox" name="sslider_nolink" class="sslider_nolink" value="1" <?php if($sslider_nolink=='1'){echo "checked";}?> /> Do not link this slide to any page(url)
|
480 |
</fieldset>
|
481 |
</div>
|
482 |
|
@@ -532,790 +515,6 @@ function smooth_slider_get_first_image($post) {
|
|
532 |
$first_img = $matches [1] [0];
|
533 |
return $first_img;
|
534 |
}
|
535 |
-
|
536 |
-
function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
|
537 |
-
global $smooth_slider;
|
538 |
-
global $wpdb, $table_prefix;
|
539 |
-
$table_name = $table_prefix.SLIDER_TABLE;
|
540 |
-
$post_table = $table_prefix."posts";
|
541 |
-
|
542 |
-
$posts = $wpdb->get_results("SELECT a.post_id, a.date FROM
|
543 |
-
$table_name a LEFT OUTER JOIN $post_table b
|
544 |
-
ON a.post_id = b.ID
|
545 |
-
WHERE (b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')) AND a.slider_id = '$slider_id'
|
546 |
-
ORDER BY a.slide_order ASC, a.date DESC LIMIT $offset, $max_posts", OBJECT);
|
547 |
-
|
548 |
-
$html = '';
|
549 |
-
$smooth_sldr_j = 0;
|
550 |
-
|
551 |
-
foreach($posts as $post) {
|
552 |
-
$id = $post->post_id;
|
553 |
-
$posts_table = $table_prefix.'posts';
|
554 |
-
$sql_post = "SELECT * FROM $posts_table WHERE ID = $id";
|
555 |
-
$rs_post = $wpdb->get_results("SELECT * FROM $posts_table WHERE ID = $id", OBJECT);
|
556 |
-
$data = $rs_post[0];
|
557 |
-
|
558 |
-
$post_title = stripslashes($data->post_title);
|
559 |
-
$post_title = str_replace('"', '', $post_title);
|
560 |
-
$slider_content = $data->post_content;
|
561 |
-
|
562 |
-
//2.3 changes
|
563 |
-
// $permalink = get_permalink($data->ID);
|
564 |
-
|
565 |
-
$post_id = $data->ID;
|
566 |
-
|
567 |
-
//2.1 changes start
|
568 |
-
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
569 |
-
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
570 |
-
trim($slide_redirect_url);
|
571 |
-
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
572 |
-
$permalink = $slide_redirect_url;
|
573 |
-
}
|
574 |
-
else{
|
575 |
-
$permalink = get_permalink($post_id);
|
576 |
-
}
|
577 |
-
if($sslider_nolink=='1'){
|
578 |
-
$permalink='';
|
579 |
-
}
|
580 |
-
//2.1 changes end
|
581 |
-
$smooth_sldr_j++;
|
582 |
-
$html .= '<div class="smooth_slideri">
|
583 |
-
<!-- smooth_slideri -->';
|
584 |
-
|
585 |
-
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
586 |
-
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
587 |
-
|
588 |
-
if ($smooth_slider['content_from'] == "slider_content") {
|
589 |
-
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
590 |
-
}
|
591 |
-
if ($smooth_slider['content_from'] == "excerpt") {
|
592 |
-
$slider_content = $data->post_excerpt;
|
593 |
-
}
|
594 |
-
|
595 |
-
$slider_content = stripslashes($slider_content);
|
596 |
-
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
597 |
-
|
598 |
-
$slider_content = str_replace("\n","<br />",$slider_content);
|
599 |
-
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
600 |
-
|
601 |
-
if($smooth_slider['img_pick'][0] == '1'){
|
602 |
-
$custom_key = array($smooth_slider['img_pick'][1]);
|
603 |
-
}
|
604 |
-
else {
|
605 |
-
$custom_key = '';
|
606 |
-
}
|
607 |
-
|
608 |
-
if($smooth_slider['img_pick'][2] == '1'){
|
609 |
-
$the_post_thumbnail = true;
|
610 |
-
}
|
611 |
-
else {
|
612 |
-
$the_post_thumbnail = false;
|
613 |
-
}
|
614 |
-
|
615 |
-
if($smooth_slider['img_pick'][3] == '1'){
|
616 |
-
$attachment = true;
|
617 |
-
$order_of_image = $smooth_slider['img_pick'][4];
|
618 |
-
}
|
619 |
-
else{
|
620 |
-
$attachment = false;
|
621 |
-
$order_of_image = '1';
|
622 |
-
}
|
623 |
-
|
624 |
-
if($smooth_slider['img_pick'][5] == '1'){
|
625 |
-
$image_scan = true;
|
626 |
-
}
|
627 |
-
else {
|
628 |
-
$image_scan = false;
|
629 |
-
}
|
630 |
-
|
631 |
-
if($smooth_slider['img_size'] == '1'){
|
632 |
-
$gti_width = $smooth_slider['img_width'];
|
633 |
-
}
|
634 |
-
else {
|
635 |
-
$gti_width = false;
|
636 |
-
}
|
637 |
-
|
638 |
-
if($smooth_slider['crop'] == '0'){
|
639 |
-
$extract_size = 'full';
|
640 |
-
}
|
641 |
-
elseif($smooth_slider['crop'] == '1'){
|
642 |
-
$extract_size = 'large';
|
643 |
-
}
|
644 |
-
elseif($smooth_slider['crop'] == '2'){
|
645 |
-
$extract_size = 'medium';
|
646 |
-
}
|
647 |
-
else{
|
648 |
-
$extract_size = 'thumbnail';
|
649 |
-
}
|
650 |
-
|
651 |
-
$img_args = array(
|
652 |
-
'custom_key' => $custom_key,
|
653 |
-
'post_id' => $post_id,
|
654 |
-
'attachment' => $attachment,
|
655 |
-
'size' => $extract_size,
|
656 |
-
'the_post_thumbnail' => $the_post_thumbnail,
|
657 |
-
'default_image' => false,
|
658 |
-
'order_of_image' => $order_of_image,
|
659 |
-
'link_to_post' => false,
|
660 |
-
'image_class' => 'smooth_slider_thumbnail',
|
661 |
-
'image_scan' => $image_scan,
|
662 |
-
'width' => $gti_width,
|
663 |
-
'height' => false,
|
664 |
-
'echo' => false,
|
665 |
-
'permalink' => $permalink
|
666 |
-
);
|
667 |
-
|
668 |
-
$html .= sslider_get_the_image($img_args);
|
669 |
-
|
670 |
-
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
671 |
-
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
672 |
-
else
|
673 |
-
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
674 |
-
|
675 |
-
if ($smooth_slider['image_only'] == '1') {
|
676 |
-
$html .= '<!-- /smooth_slideri -->
|
677 |
-
</div>';
|
678 |
-
}
|
679 |
-
else {
|
680 |
-
if($permalink!='') {
|
681 |
-
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
682 |
-
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
683 |
-
|
684 |
-
<!-- /smooth_slideri -->
|
685 |
-
</div>'; }
|
686 |
-
else{
|
687 |
-
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
688 |
-
<!-- /smooth_slideri -->
|
689 |
-
</div>'; }
|
690 |
-
}
|
691 |
-
}
|
692 |
-
if($out_echo == '1') {
|
693 |
-
echo $html;
|
694 |
-
}
|
695 |
-
$r_array = array( $smooth_sldr_j, $html);
|
696 |
-
return $r_array;
|
697 |
-
}
|
698 |
-
|
699 |
-
function carousel_posts_on_slider_cat($max_posts, $catg_slug, $offset=0) {
|
700 |
-
global $smooth_slider;
|
701 |
-
global $wpdb, $table_prefix;
|
702 |
-
$table_name = $table_prefix.SLIDER_TABLE;
|
703 |
-
$post_table = $table_prefix."posts";
|
704 |
-
|
705 |
-
$myposts = $wpdb->get_results("SELECT a.post_id, a.date FROM
|
706 |
-
$table_name a LEFT OUTER JOIN $post_table b
|
707 |
-
ON a.post_id = b.ID
|
708 |
-
WHERE b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')
|
709 |
-
ORDER BY a.slide_order ASC, a.date DESC LIMIT $offset, $max_posts", OBJECT);
|
710 |
-
|
711 |
-
$html = '';
|
712 |
-
$smooth_sldr_i = 0;
|
713 |
-
|
714 |
-
if (!empty($catg_slug)) {
|
715 |
-
$category = get_category_by_slug($catg_slug);
|
716 |
-
$slider_cat = $category->term_id;
|
717 |
-
}
|
718 |
-
else {
|
719 |
-
$category = get_the_category();
|
720 |
-
$slider_cat = $category[0]->cat_ID;
|
721 |
-
}
|
722 |
-
|
723 |
-
foreach($myposts as $mypost) {
|
724 |
-
$post = get_post($mypost->post_id);
|
725 |
-
$post_cats_arr = get_the_category($post->ID);
|
726 |
-
|
727 |
-
$post_cats = array();
|
728 |
-
foreach($post_cats_arr as $post_cat_arr) {
|
729 |
-
$post_cats[] = $post_cat_arr->cat_ID;
|
730 |
-
}
|
731 |
-
|
732 |
-
if ((isset($slider_cat) and in_array($slider_cat,$post_cats)) or (empty($catg_slug) and (is_home() or (is_paged() and !is_category()) or is_tag() or is_author() or (is_archive() and !is_category()))))
|
733 |
-
{
|
734 |
-
$post_title = stripslashes($post->post_title);
|
735 |
-
$post_title = str_replace('"', '', $post_title);
|
736 |
-
$slider_content = $post->post_content;
|
737 |
-
|
738 |
-
// $permalink = get_permalink($post->ID);
|
739 |
-
|
740 |
-
$post_id = $post->ID;
|
741 |
-
//2.1 changes start
|
742 |
-
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
743 |
-
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
744 |
-
trim($slide_redirect_url);
|
745 |
-
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
746 |
-
$permalink = $slide_redirect_url;
|
747 |
-
}
|
748 |
-
else{
|
749 |
-
$permalink = get_permalink($post_id);
|
750 |
-
}
|
751 |
-
if($sslider_nolink=='1'){
|
752 |
-
$permalink='';
|
753 |
-
}
|
754 |
-
|
755 |
-
//2.1 changes end
|
756 |
-
|
757 |
-
$smooth_sldr_i++;
|
758 |
-
|
759 |
-
$html .= '<div class="smooth_slideri">
|
760 |
-
<!-- smooth_slideri -->';
|
761 |
-
|
762 |
-
$thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
|
763 |
-
$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
764 |
-
|
765 |
-
if ($smooth_slider['content_from'] == "slider_content") {
|
766 |
-
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
767 |
-
}
|
768 |
-
if ($smooth_slider['content_from'] == "excerpt") {
|
769 |
-
$slider_content = $post->post_excerpt;
|
770 |
-
}
|
771 |
-
|
772 |
-
$slider_content = stripslashes($slider_content);
|
773 |
-
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
774 |
-
|
775 |
-
$slider_content = str_replace("\n","<br />",$slider_content);
|
776 |
-
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
777 |
-
|
778 |
-
if($smooth_slider['img_pick'][0] == '1'){
|
779 |
-
$custom_key = array($smooth_slider['img_pick'][0]);
|
780 |
-
}
|
781 |
-
else {
|
782 |
-
$custom_key = '';
|
783 |
-
}
|
784 |
-
|
785 |
-
if($smooth_slider['img_pick'][2] == '1'){
|
786 |
-
$the_post_thumbnail = true;
|
787 |
-
}
|
788 |
-
else {
|
789 |
-
$the_post_thumbnail = false;
|
790 |
-
}
|
791 |
-
|
792 |
-
if($smooth_slider['img_pick'][3] == '1'){
|
793 |
-
$attachment = true;
|
794 |
-
$order_of_image = $smooth_slider['img_pick'][4];
|
795 |
-
}
|
796 |
-
else{
|
797 |
-
$attachment = false;
|
798 |
-
$order_of_image = '1';
|
799 |
-
}
|
800 |
-
|
801 |
-
if($smooth_slider['img_pick'][5] == '1'){
|
802 |
-
$image_scan = true;
|
803 |
-
}
|
804 |
-
else {
|
805 |
-
$image_scan = false;
|
806 |
-
}
|
807 |
-
|
808 |
-
if($smooth_slider['img_size'] == '1'){
|
809 |
-
$gti_width = false;
|
810 |
-
}
|
811 |
-
else {
|
812 |
-
$gti_width = $smooth_slider['img_width'];
|
813 |
-
}
|
814 |
-
|
815 |
-
if($smooth_slider['crop'] == '0'){
|
816 |
-
$extract_size = 'full';
|
817 |
-
}
|
818 |
-
elseif($smooth_slider['crop'] == '1'){
|
819 |
-
$extract_size = 'large';
|
820 |
-
}
|
821 |
-
elseif($smooth_slider['crop'] == '2'){
|
822 |
-
$extract_size = 'medium';
|
823 |
-
}
|
824 |
-
else{
|
825 |
-
$extract_size = 'thumbnail';
|
826 |
-
}
|
827 |
-
|
828 |
-
$img_args = array(
|
829 |
-
'custom_key' => $custom_key,
|
830 |
-
'attachment' => $attachment,
|
831 |
-
'size' => $extract_size,
|
832 |
-
'the_post_thumbnail' => $the_post_thumbnail,
|
833 |
-
'default_image' => false,
|
834 |
-
'order_of_image' => $order_of_image,
|
835 |
-
'link_to_post' => false,
|
836 |
-
'image_class' => 'smooth_slider_thumbnail',
|
837 |
-
'image_scan' => $image_scan,
|
838 |
-
'width' => $gti_width,
|
839 |
-
'height' => false,
|
840 |
-
'echo' => false,
|
841 |
-
'permalink' => $permalink
|
842 |
-
);
|
843 |
-
|
844 |
-
$html .= sslider_get_the_image($img_args);
|
845 |
-
|
846 |
-
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
847 |
-
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
848 |
-
else
|
849 |
-
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
850 |
-
|
851 |
-
if ($smooth_slider['image_only'] == '1') {
|
852 |
-
$html .= '<!-- /smooth_slideri -->
|
853 |
-
</div>';
|
854 |
-
}
|
855 |
-
else {
|
856 |
-
if($permalink!='') {
|
857 |
-
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
858 |
-
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
859 |
-
|
860 |
-
<!-- /smooth_slideri -->
|
861 |
-
</div>';
|
862 |
-
}
|
863 |
-
else{
|
864 |
-
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
865 |
-
<!-- /smooth_slideri -->
|
866 |
-
</div>';
|
867 |
-
}
|
868 |
-
}
|
869 |
-
}
|
870 |
-
if ($smooth_sldr_i >= $max_posts)
|
871 |
-
{ break; }
|
872 |
-
}
|
873 |
-
echo $html;
|
874 |
-
return $smooth_sldr_i;
|
875 |
-
}
|
876 |
-
|
877 |
-
function smooth_slider_wpmu_carousel_posts($max_posts, $offset=0) {
|
878 |
-
global $smooth_slider;
|
879 |
-
global $wpdb, $table_prefix, $blog_id;
|
880 |
-
|
881 |
-
$html = '';
|
882 |
-
$smooth_sldr_k = 0;
|
883 |
-
|
884 |
-
$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 );
|
885 |
-
foreach($blogs as $details) {
|
886 |
-
|
887 |
-
switch_to_blog($details['blog_id']);
|
888 |
-
global $table_prefix;
|
889 |
-
|
890 |
-
$table_name = $table_prefix.SLIDER_TABLE;
|
891 |
-
$post_table = $table_prefix."posts";
|
892 |
-
|
893 |
-
if(smooth_slider_table_exists($table_name, DB_NAME)){
|
894 |
-
|
895 |
-
$myposts = $wpdb->get_results("SELECT a.post_id, a.date FROM
|
896 |
-
$table_name a LEFT OUTER JOIN $post_table b
|
897 |
-
ON a.post_id = b.ID
|
898 |
-
WHERE b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')
|
899 |
-
ORDER BY a.slide_order ASC, a.date DESC LIMIT $offset, $max_posts", OBJECT);
|
900 |
-
|
901 |
-
foreach($myposts as $mypost) {
|
902 |
-
$posts_table = $table_prefix."posts";
|
903 |
-
$id = $mypost->post_id;
|
904 |
-
$post = $wpdb->get_row("SELECT * FROM $posts_table WHERE ID = $id", OBJECT);
|
905 |
-
|
906 |
-
$post_title = stripslashes($post->post_title);
|
907 |
-
$post_title = str_replace('"', '', $post_title);
|
908 |
-
$slider_content = $post->post_content;
|
909 |
-
|
910 |
-
// $permalink = get_permalink($post->ID);
|
911 |
-
|
912 |
-
$post_id = $post->ID;
|
913 |
-
|
914 |
-
//2.1 changes start
|
915 |
-
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
916 |
-
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
917 |
-
trim($slide_redirect_url);
|
918 |
-
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
919 |
-
$permalink = $slide_redirect_url;
|
920 |
-
}
|
921 |
-
else{
|
922 |
-
$permalink = get_permalink($post_id);
|
923 |
-
}
|
924 |
-
if($sslider_nolink=='1'){
|
925 |
-
$permalink='';
|
926 |
-
}
|
927 |
-
|
928 |
-
//2.1 changes end
|
929 |
-
|
930 |
-
$smooth_sldr_k++;
|
931 |
-
$html .= '<div class="smooth_slideri">
|
932 |
-
<!-- smooth_slideri -->';
|
933 |
-
|
934 |
-
$thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
|
935 |
-
$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
936 |
-
|
937 |
-
if ($smooth_slider['content_from'] == "slider_content") {
|
938 |
-
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
939 |
-
}
|
940 |
-
if ($smooth_slider['content_from'] == "excerpt") {
|
941 |
-
$slider_content = $post->post_excerpt;
|
942 |
-
}
|
943 |
-
|
944 |
-
$slider_content = stripslashes($slider_content);
|
945 |
-
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
946 |
-
|
947 |
-
$slider_content = str_replace("\n","<br />",$slider_content);
|
948 |
-
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
949 |
-
|
950 |
-
if($smooth_slider['img_pick'][0] == '1'){
|
951 |
-
$custom_key = array($smooth_slider['img_pick'][0]);
|
952 |
-
}
|
953 |
-
else {
|
954 |
-
$custom_key = '';
|
955 |
-
}
|
956 |
-
|
957 |
-
if($smooth_slider['img_pick'][2] == '1'){
|
958 |
-
$the_post_thumbnail = true;
|
959 |
-
}
|
960 |
-
else {
|
961 |
-
$the_post_thumbnail = false;
|
962 |
-
}
|
963 |
-
|
964 |
-
if($smooth_slider['img_pick'][3] == '1'){
|
965 |
-
$attachment = true;
|
966 |
-
$order_of_image = $smooth_slider['img_pick'][4];
|
967 |
-
}
|
968 |
-
else{
|
969 |
-
$attachment = false;
|
970 |
-
$order_of_image = '1';
|
971 |
-
}
|
972 |
-
|
973 |
-
if($smooth_slider['img_pick'][5] == '1'){
|
974 |
-
$image_scan = true;
|
975 |
-
}
|
976 |
-
else {
|
977 |
-
$image_scan = false;
|
978 |
-
}
|
979 |
-
|
980 |
-
if($smooth_slider['img_size'] == '1'){
|
981 |
-
$gti_width = false;
|
982 |
-
}
|
983 |
-
else {
|
984 |
-
$gti_width = $smooth_slider['img_width'];
|
985 |
-
}
|
986 |
-
|
987 |
-
if($smooth_slider['crop'] == '0'){
|
988 |
-
$extract_size = 'full';
|
989 |
-
}
|
990 |
-
elseif($smooth_slider['crop'] == '1'){
|
991 |
-
$extract_size = 'large';
|
992 |
-
}
|
993 |
-
elseif($smooth_slider['crop'] == '2'){
|
994 |
-
$extract_size = 'medium';
|
995 |
-
}
|
996 |
-
else{
|
997 |
-
$extract_size = 'thumbnail';
|
998 |
-
}
|
999 |
-
|
1000 |
-
$img_args = array(
|
1001 |
-
'custom_key' => $custom_key,
|
1002 |
-
'attachment' => $attachment,
|
1003 |
-
'size' => $extract_size,
|
1004 |
-
'the_post_thumbnail' => $the_post_thumbnail,
|
1005 |
-
'default_image' => false,
|
1006 |
-
'order_of_image' => $order_of_image,
|
1007 |
-
'link_to_post' => false,
|
1008 |
-
'image_class' => 'smooth_slider_thumbnail',
|
1009 |
-
'image_scan' => $image_scan,
|
1010 |
-
'width' => $gti_width,
|
1011 |
-
'height' => false,
|
1012 |
-
'echo' => false,
|
1013 |
-
'permalink' => $permalink
|
1014 |
-
);
|
1015 |
-
|
1016 |
-
$html .= sslider_get_the_image($img_args);
|
1017 |
-
|
1018 |
-
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
1019 |
-
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
1020 |
-
else
|
1021 |
-
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
1022 |
-
|
1023 |
-
if ($smooth_slider['image_only'] == '1') {
|
1024 |
-
$html .= '<!-- /smooth_slideri -->
|
1025 |
-
</div>';
|
1026 |
-
}
|
1027 |
-
else {
|
1028 |
-
if($permalink!='') {
|
1029 |
-
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
1030 |
-
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
1031 |
-
|
1032 |
-
<!-- /smooth_slideri -->
|
1033 |
-
</div>'; }
|
1034 |
-
else{
|
1035 |
-
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
1036 |
-
<!-- /smooth_slideri -->
|
1037 |
-
</div>'; }
|
1038 |
-
}
|
1039 |
-
if ($smooth_sldr_k >= $max_posts)
|
1040 |
-
{ break; }
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
if ($smooth_sldr_k >= $max_posts)
|
1044 |
-
{ break; }
|
1045 |
-
}//smooth slider table exists
|
1046 |
-
}
|
1047 |
-
restore_current_blog();
|
1048 |
-
echo $html;
|
1049 |
-
return $smooth_sldr_k;
|
1050 |
-
}
|
1051 |
-
|
1052 |
-
function smooth_slider_css() {
|
1053 |
-
global $smooth_slider,$post;
|
1054 |
-
if(is_singular()) {
|
1055 |
-
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
1056 |
-
}
|
1057 |
-
if((is_singular() and $slider_style == 'default.css')
|
1058 |
-
or (!is_singular() and $smooth_slider['stylesheet'] == 'default.css')
|
1059 |
-
or (is_singular() and is_active_widget(false, false, 'sslider_wid', true) and (!isset($slider_style) or empty($slider_style) ))
|
1060 |
-
or (is_singular() and isset($smooth_slider['shortcode']) ) )
|
1061 |
-
{
|
1062 |
-
?>
|
1063 |
-
<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"){$nav_size = $smooth_slider['navimg_ht'];} 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"){$nav_size = $smooth_slider['navimg_ht'];} 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;max-height:<?php echo $smooth_slider['img_height']; ?>px;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>
|
1064 |
-
<?php }
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
add_action('wp_head', 'smooth_slider_css');
|
1068 |
-
|
1069 |
-
function smooth_slider_enqueue_scripts() {
|
1070 |
-
// wp_register_script('jquery', false, false, false, false);
|
1071 |
-
wp_enqueue_script( 'stepcarousel', smooth_slider_plugin_url( 'js/stepcarousel.js' ),
|
1072 |
-
array('jquery'), SMOOTH_SLIDER_VER, false);
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
1076 |
-
|
1077 |
-
function smooth_slider_enqueue_styles() {
|
1078 |
-
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
1079 |
-
if(is_singular()) {
|
1080 |
-
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
1081 |
-
if((is_active_widget(false, false, 'sslider_wid', true) or isset($smooth_slider['shortcode']) ) and (!isset($slider_style) or empty($slider_style))){
|
1082 |
-
$slider_style='default.css';
|
1083 |
-
}
|
1084 |
-
if (!isset($slider_style) or empty($slider_style) ) {
|
1085 |
-
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/styles/'.$smooth_slider['stylesheet'] ),
|
1086 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
1087 |
-
}
|
1088 |
-
else {
|
1089 |
-
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/styles/'.$slider_style ),
|
1090 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
1091 |
-
}
|
1092 |
-
}
|
1093 |
-
else {
|
1094 |
-
$slider_style = $smooth_slider['stylesheet'];
|
1095 |
-
wp_enqueue_style( 'smooth_slider_head_css', smooth_slider_plugin_url( 'css/styles/'.$slider_style ),
|
1096 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
1097 |
-
}
|
1098 |
-
}
|
1099 |
-
add_action( 'wp', 'smooth_slider_enqueue_styles' );
|
1100 |
-
|
1101 |
-
function get_smooth_slider($slider_id='') {
|
1102 |
-
global $smooth_slider;
|
1103 |
-
|
1104 |
-
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
1105 |
-
global $post;
|
1106 |
-
$post_id = $post->ID;
|
1107 |
-
$slider_id = get_slider_for_the_post($post_id);
|
1108 |
-
}
|
1109 |
-
if(!is_singular() or ($smooth_slider['multiple_sliders'] != '1' and (empty($slider_id) or !isset($slider_id)))){
|
1110 |
-
$slider_id = '1';
|
1111 |
-
}
|
1112 |
-
if(!empty($slider_id)){
|
1113 |
-
?>
|
1114 |
-
<script type="text/javascript">
|
1115 |
-
stepcarousel.setup({
|
1116 |
-
galleryid: 'smooth_sliderc', //id of carousel DIV
|
1117 |
-
beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
|
1118 |
-
panelclass: 'smooth_slideri', //class of panel DIVs each holding content
|
1119 |
-
autostep: {<?php if ($smooth_slider['autostep'] == '1'){ echo "enable: true";} else {echo "enable: false";}?>, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
|
1120 |
-
panelbehavior: {speed:<?php echo $smooth_slider['transition']*100; ?>, wraparound: true, wrapbehavior: 'slide', persist:false},
|
1121 |
-
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); ?>]},
|
1122 |
-
statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
1123 |
-
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
|
1124 |
-
onslide:function(){
|
1125 |
-
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
1126 |
-
jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
1127 |
-
var curr_slide = imageA;
|
1128 |
-
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
1129 |
-
jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
1130 |
-
|
1131 |
-
<?php if ($smooth_slider['goto_slide'] == 2) {
|
1132 |
-
|
1133 |
-
global $sldr_nav_width;
|
1134 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
1135 |
-
?>
|
1136 |
-
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
1137 |
-
jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
1138 |
-
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
1139 |
-
<?php } ?>
|
1140 |
-
}
|
1141 |
-
})
|
1142 |
-
</script>
|
1143 |
-
<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>
|
1144 |
-
<div id="smooth_sldr">
|
1145 |
-
<div id="smooth_sldr_items">
|
1146 |
-
<div id="smooth_sldr_body">
|
1147 |
-
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
1148 |
-
<div id="smooth_sliderc">
|
1149 |
-
<div class="smooth_sliderb">
|
1150 |
-
<?php global $smooth_sldr_j; $r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, '0'); $smooth_sldr_j = $r_array[0]; echo $r_array[1];?>
|
1151 |
-
</div>
|
1152 |
-
</div>
|
1153 |
-
</div>
|
1154 |
-
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
1155 |
-
<ul id="smooth_sliderc_nav">
|
1156 |
-
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
1157 |
-
echo "<li><a id=\"sldr".$i."\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" >".$i."</a></li>\n";
|
1158 |
-
} ?>
|
1159 |
-
</ul>
|
1160 |
-
<?php }
|
1161 |
-
if ($smooth_slider['goto_slide'] == 2) { ?>
|
1162 |
-
<div id="smooth_sliderc_nav">
|
1163 |
-
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
1164 |
-
|
1165 |
-
$width = $smooth_slider['navimg_w'];
|
1166 |
-
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:".$smooth_slider['navimg_ht']."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
|
1167 |
-
} ?>
|
1168 |
-
</div>
|
1169 |
-
<?php }
|
1170 |
-
if ($smooth_slider['goto_slide'] == 3) { ?>
|
1171 |
-
<div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
|
1172 |
-
<?php } ?>
|
1173 |
-
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
1174 |
-
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
1175 |
-
</div>
|
1176 |
-
</div>
|
1177 |
-
<?php
|
1178 |
-
} //end of not empty slider_id condition
|
1179 |
-
}
|
1180 |
-
|
1181 |
-
//Smooth Slider template tag to get the Category specific posts in the slider.
|
1182 |
-
function get_smooth_slider_cat($catg_slug) {
|
1183 |
-
global $smooth_slider;
|
1184 |
-
?>
|
1185 |
-
<script type="text/javascript">
|
1186 |
-
stepcarousel.setup({
|
1187 |
-
galleryid: 'smooth_sliderc', //id of carousel DIV
|
1188 |
-
beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
|
1189 |
-
panelclass: 'smooth_slideri', //class of panel DIVs each holding content
|
1190 |
-
autostep: {<?php if ($smooth_slider['autostep'] == '1'){ echo "enable: true";} else {echo "enable: false";}?>, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
|
1191 |
-
panelbehavior: {speed:<?php echo $smooth_slider['transition']*100; ?>, wraparound: true, wrapbehavior: 'slide', persist:false},
|
1192 |
-
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); ?>]},
|
1193 |
-
statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
1194 |
-
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
|
1195 |
-
onslide:function(){
|
1196 |
-
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
1197 |
-
jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
1198 |
-
var curr_slide = imageA;
|
1199 |
-
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
1200 |
-
jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
1201 |
-
|
1202 |
-
<?php if ($smooth_slider['goto_slide'] == 2) {
|
1203 |
-
|
1204 |
-
global $sldr_nav_width;
|
1205 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
1206 |
-
?>
|
1207 |
-
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
1208 |
-
jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
1209 |
-
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
1210 |
-
<?php } ?>
|
1211 |
-
|
1212 |
-
}
|
1213 |
-
})
|
1214 |
-
</script>
|
1215 |
-
<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>
|
1216 |
-
<div id="smooth_sldr">
|
1217 |
-
<div id="smooth_sldr_items">
|
1218 |
-
<div id="smooth_sldr_body">
|
1219 |
-
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
1220 |
-
<div id="smooth_sliderc">
|
1221 |
-
<div class="smooth_sliderb">
|
1222 |
-
<?php global $smooth_sldr_i; $smooth_sldr_i = carousel_posts_on_slider_cat($smooth_slider['no_posts'], $catg_slug); ?>
|
1223 |
-
</div>
|
1224 |
-
</div>
|
1225 |
-
</div>
|
1226 |
-
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
1227 |
-
<ul id="smooth_sliderc_nav">
|
1228 |
-
<?php global $smooth_sldr_i; for($i=1; $i<=$smooth_sldr_i; $i++) {
|
1229 |
-
echo "<li><a id=\"sldr".$i."\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" >".$i."</a></li>\n";
|
1230 |
-
} ?>
|
1231 |
-
</ul>
|
1232 |
-
<?php }
|
1233 |
-
if ($smooth_slider['goto_slide'] == 2) { ?>
|
1234 |
-
<div id="smooth_sliderc_nav">
|
1235 |
-
<?php global $smooth_sldr_i; for($i=1; $i<=$smooth_sldr_i; $i++) {
|
1236 |
-
|
1237 |
-
$width = $smooth_slider['navimg_w'];
|
1238 |
-
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:".$smooth_slider['navimg_ht']."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
|
1239 |
-
} ?>
|
1240 |
-
</div>
|
1241 |
-
<?php }
|
1242 |
-
if ($smooth_slider['goto_slide'] == 3) { ?>
|
1243 |
-
<div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
|
1244 |
-
<?php } ?>
|
1245 |
-
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
1246 |
-
</div>
|
1247 |
-
</div>
|
1248 |
-
<?php
|
1249 |
-
}
|
1250 |
-
|
1251 |
-
//Smooth Slider especially for WPMU sites, to get the slider posts on the overall WPMU site
|
1252 |
-
function get_smooth_slider_wpmu_all() {
|
1253 |
-
global $smooth_slider;
|
1254 |
-
?>
|
1255 |
-
<script type="text/javascript">
|
1256 |
-
stepcarousel.setup({
|
1257 |
-
galleryid: 'smooth_sliderc', //id of carousel DIV
|
1258 |
-
beltclass: 'smooth_sliderb', //class of inner "belt" DIV containing all the panel DIVs
|
1259 |
-
panelclass: 'smooth_slideri', //class of panel DIVs each holding content
|
1260 |
-
autostep: {<?php if ($smooth_slider['autostep'] == '1'){ echo "enable: true";} else {echo "enable: false";}?>, moveby:1, pause:<?php echo $smooth_slider['speed']*1000; ?>},
|
1261 |
-
panelbehavior: {speed:<?php echo $smooth_slider['transition']*100; ?>, wraparound: true, wrapbehavior: 'slide', persist:false},
|
1262 |
-
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); ?>]},
|
1263 |
-
statusvars: ['imageA', 'imageB', 'imageC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
1264 |
-
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
|
1265 |
-
onslide:function(){
|
1266 |
-
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
1267 |
-
jQuery("#smooth_sliderc_nav li a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
1268 |
-
var curr_slide = imageA;
|
1269 |
-
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
1270 |
-
jQuery("#sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
1271 |
-
|
1272 |
-
<?php if ($smooth_slider['goto_slide'] == 2) {
|
1273 |
-
global $sldr_nav_width;
|
1274 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
1275 |
-
?>
|
1276 |
-
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
1277 |
-
jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
1278 |
-
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
1279 |
-
<?php } ?>
|
1280 |
-
|
1281 |
-
}
|
1282 |
-
})
|
1283 |
-
</script>
|
1284 |
-
<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>
|
1285 |
-
<div id="smooth_sldr">
|
1286 |
-
<div id="smooth_sldr_items">
|
1287 |
-
<div id="smooth_sldr_body">
|
1288 |
-
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
1289 |
-
<div id="smooth_sliderc">
|
1290 |
-
<div class="smooth_sliderb">
|
1291 |
-
<?php global $smooth_sldr_k; $smooth_sldr_k = smooth_slider_wpmu_carousel_posts($smooth_slider['no_posts']); ?>
|
1292 |
-
</div>
|
1293 |
-
</div>
|
1294 |
-
</div>
|
1295 |
-
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
1296 |
-
<ul id="smooth_sliderc_nav">
|
1297 |
-
<?php global $smooth_sldr_k; for($i=1; $i<=$smooth_sldr_k; $i++) {
|
1298 |
-
echo "<li><a id=\"sldr".$i."\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" >".$i."</a></li>\n";
|
1299 |
-
} ?>
|
1300 |
-
</ul>
|
1301 |
-
<?php }
|
1302 |
-
if ($smooth_slider['goto_slide'] == 2) { ?>
|
1303 |
-
<div id="smooth_sliderc_nav">
|
1304 |
-
<?php global $smooth_sldr_k; for($i=1; $i<=$smooth_sldr_k; $i++) {
|
1305 |
-
$width = $smooth_slider['navimg_w'];
|
1306 |
-
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:".$smooth_slider['navimg_ht']."px;\" href=\"javascript:stepcarousel.stepTo('smooth_sliderc', ".$i.")\" ></a>\n";
|
1307 |
-
} ?>
|
1308 |
-
</div>
|
1309 |
-
<?php }
|
1310 |
-
if ($smooth_slider['goto_slide'] == 3) { ?>
|
1311 |
-
<div id="smooth_sliderc_nav"><li style="border:none;"><?php echo $smooth_slider['custom_nav']; ?></li></div>
|
1312 |
-
<?php } ?>
|
1313 |
-
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
1314 |
-
</div>
|
1315 |
-
</div>
|
1316 |
-
<?php
|
1317 |
-
}
|
1318 |
-
|
1319 |
add_filter( 'plugin_action_links', 'sslider_plugin_action_links', 10, 2 );
|
1320 |
|
1321 |
function sslider_plugin_action_links( $links, $file ) {
|
@@ -1383,105 +582,8 @@ class Smooth_Slider_Simple_Widget extends WP_Widget {
|
|
1383 |
}
|
1384 |
add_action( 'widgets_init', create_function('', 'return register_widget("Smooth_Slider_Simple_Widget");') );
|
1385 |
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
1390 |
-
global $post;
|
1391 |
-
$post_id = $post->ID;
|
1392 |
-
$slider_id = get_slider_for_the_post($post_id);
|
1393 |
-
}
|
1394 |
-
if($smooth_slider['multiple_sliders'] != '1' and (empty($slider_id) or !isset($slider_id))){
|
1395 |
-
$slider_id = '1';
|
1396 |
-
}
|
1397 |
-
$slider_html='';
|
1398 |
-
if(!empty($slider_id)){
|
1399 |
-
if ($smooth_slider['autostep'] == '1'){ $autostep = "enable: true";} else {$autostep = "enable: false";}
|
1400 |
-
if ($smooth_slider['prev_next'] == 1) {$defaultbuttons = "true";} else {$defaultbuttons = "false";}
|
1401 |
-
$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; }
|
1402 |
-
$nav_ht = (($smooth_slider['height'] - $extra_height)/2);
|
1403 |
-
$fontSize = $smooth_slider['content_fsize'] + 5;
|
1404 |
-
|
1405 |
-
$slider_html=$slider_html.'<script type="text/javascript">
|
1406 |
-
stepcarousel.setup({
|
1407 |
-
galleryid: "smooth_sliderc", //id of carousel DIV
|
1408 |
-
beltclass: "smooth_sliderb", //class of inner "belt" DIV containing all the panel DIVs
|
1409 |
-
panelclass: "smooth_slideri", //class of panel DIVs each holding content
|
1410 |
-
autostep: {'.$autostep.', moveby:1, pause:'. $smooth_slider['speed']*1000 .'},
|
1411 |
-
panelbehavior: {speed:'. $smooth_slider['transition']*100 .', wraparound: true, wrapbehavior: "slide", persist:false},
|
1412 |
-
defaultbuttons: {enable: '.$defaultbuttons.', moveby: 1, leftnav: ["'. smooth_slider_plugin_url( 'images/button_prev.png' ) .'", -25, '.$nav_ht.'], rightnav: ["'. smooth_slider_plugin_url( 'images/button_next.png' ).'", 0, '.$nav_ht.']},
|
1413 |
-
statusvars: ["imageA", "imageB", "imageC"], //register 3 variables that contain current panel (start), current panel (last), and total panels
|
1414 |
-
contenttype: ["inline"], //content setting ["inline"] or ["external", "path_to_external_file"]
|
1415 |
-
onslide:function(){
|
1416 |
-
jQuery("#smooth_sliderc_nav li a").css("fontWeight", "normal");
|
1417 |
-
jQuery("#smooth_sliderc_nav li a").css("fontSize", "'.$smooth_slider['content_fsize'].'px");
|
1418 |
-
var curr_slide = imageA;
|
1419 |
-
jQuery("#sldr"+curr_slide).css("fontWeight", "bolder");
|
1420 |
-
jQuery("#sldr"+curr_slide).css("fontSize", "'.$fontSize.'px");';
|
1421 |
-
|
1422 |
-
if ($smooth_slider['goto_slide'] == 2) {
|
1423 |
-
|
1424 |
-
global $sldr_nav_width;
|
1425 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
1426 |
-
// var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width;
|
1427 |
-
$slider_html = $slider_html.'jQuery("#smooth_sliderc_nav a").css("backgroundPosition", "0 0");
|
1428 |
-
jQuery("#sldr"+curr_slide).css("backgroundPosition", "-"+'.$sldr_nav_width.'+"px 0")';
|
1429 |
-
}
|
1430 |
-
$slider_html=$slider_html.' }
|
1431 |
-
})
|
1432 |
-
</script>
|
1433 |
-
<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>
|
1434 |
-
<div id="smooth_sldr">
|
1435 |
-
<div id="smooth_sldr_items">
|
1436 |
-
<div id="smooth_sldr_body">';
|
1437 |
-
|
1438 |
-
$sldr_title = $smooth_slider['title_text'];
|
1439 |
-
if(!empty($sldr_title)) {
|
1440 |
-
$slider_html=$slider_html.'<div class="sldr_title">'. $smooth_slider['title_text'].'</div>';
|
1441 |
-
}
|
1442 |
-
global $smooth_sldr_j;
|
1443 |
-
$r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, $echo = '0');
|
1444 |
-
$smooth_sldr_j = $r_array[0];
|
1445 |
-
|
1446 |
-
$slider_html=$slider_html.'<div id="smooth_sliderc">
|
1447 |
-
<div class="smooth_sliderb">
|
1448 |
-
'.$r_array[1].'
|
1449 |
-
</div>
|
1450 |
-
</div>
|
1451 |
-
</div>';
|
1452 |
-
if ($smooth_slider['goto_slide'] == 1) {
|
1453 |
-
$slider_html=$slider_html.'<ul id="smooth_sliderc_nav">';
|
1454 |
-
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
1455 |
-
$slider_html=$slider_html.'<li><a id="sldr'.$i.'" href="javascript:stepcarousel.stepTo(\'smooth_sliderc\', '.$i.')" >'.$i.'</a></li>';
|
1456 |
-
}
|
1457 |
-
$slider_html=$slider_html.'</ul>';
|
1458 |
-
}
|
1459 |
-
if ($smooth_slider['goto_slide'] == 2) {
|
1460 |
-
$slider_html=$slider_html.'<div id="smooth_sliderc_nav">';
|
1461 |
-
$width = $smooth_slider['navimg_w'];
|
1462 |
-
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
1463 |
-
$slider_html=$slider_html.'<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:'.$smooth_slider['navimg_ht'].'px;" href="javascript:stepcarousel.stepTo(\'smooth_sliderc\', '.$i.')" ></a>';
|
1464 |
-
}
|
1465 |
-
$slider_html=$slider_html.'</div>';
|
1466 |
-
}
|
1467 |
-
if ($smooth_slider['goto_slide'] == 3) {
|
1468 |
-
$slider_html=$slider_html.'<div id="smooth_sliderc_nav"><li style="border:none;">'.$smooth_slider["custom_nav"].'</li></div>';
|
1469 |
-
}
|
1470 |
-
$slider_html=$slider_html.'<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
1471 |
-
</div>
|
1472 |
-
</div>';
|
1473 |
-
} //end of not empty slider_id condition
|
1474 |
-
return $slider_html;
|
1475 |
-
}
|
1476 |
-
|
1477 |
-
function smooth_slider_simple_shortcode($atts) {
|
1478 |
-
extract(shortcode_atts(array(
|
1479 |
-
'id' => '',
|
1480 |
-
), $atts));
|
1481 |
-
|
1482 |
-
return return_smooth_slider($id);
|
1483 |
-
}
|
1484 |
-
add_shortcode('smoothslider', 'smooth_slider_simple_shortcode');
|
1485 |
|
1486 |
require_once (dirname (__FILE__) . '/settings/settings.php');
|
1487 |
require_once (dirname (__FILE__) . '/includes/media-images.php');
|
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.3.3
|
7 |
Author: Internet Techies
|
8 |
Author URI: http://www.clickonf5.org/
|
9 |
Wordpress version supported: 2.9 and above
|
27 |
*/
|
28 |
//Please visit Plugin page http://www.clickonf5.org/smooth-slider for Changelog
|
29 |
//on activation
|
30 |
+
//defined global variables and constants here
|
31 |
+
global $smooth_slider;
|
32 |
+
$smooth_slider = get_option('smooth_slider_options');
|
33 |
define('SLIDER_TABLE','smooth_slider'); //Slider TABLE NAME
|
34 |
define('PREV_SLIDER_TABLE','slider'); //Slider TABLE NAME
|
35 |
define('SLIDER_META','smooth_slider_meta'); //Meta TABLE NAME
|
36 |
define('SLIDER_POST_META','smooth_slider_postmeta'); //Meta TABLE NAME
|
37 |
+
define("SMOOTH_SLIDER_VER","2.3.3",false);//Current Version of Smooth Slider
|
38 |
if ( ! defined( 'SMOOTH_SLIDER_PLUGIN_BASENAME' ) )
|
39 |
define( 'SMOOTH_SLIDER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
40 |
+
if ( ! defined( 'SMOOTH_SLIDER_CSS_DIR' ) ){
|
41 |
+
if($smooth_slider['ver']=='step') define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/styles/' );
|
42 |
+
else define( 'SMOOTH_SLIDER_CSS_DIR', WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'/css/skins/' );
|
43 |
+
}
|
44 |
+
// Create Text Domain For Translations
|
45 |
+
load_plugin_textdomain('smooth-slider', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
|
46 |
|
47 |
function install_smooth_slider() {
|
48 |
global $wpdb, $table_prefix;
|
71 |
}
|
72 |
}
|
73 |
}
|
74 |
+
add_cf5_column_if_not_exist($table_name, 'slide_order', "ALTER TABLE ".$table_name." ADD slide_order int(5) NOT NULL DEFAULT '0';");
|
75 |
|
76 |
$meta_table_name = $table_prefix.SLIDER_META;
|
77 |
if($wpdb->get_var("show tables like '$meta_table_name'") != $meta_table_name) {
|
107 |
'prev_next'=>'0',
|
108 |
'goto_slide'=>'1',
|
109 |
'title_text'=>'Featured Posts',
|
110 |
+
'title_from'=>'0',
|
111 |
'title_font'=>'Georgia',
|
112 |
'title_fsize'=>'20',
|
113 |
'title_fstyle'=>'bold',
|
142 |
'navimg_w'=>'32',
|
143 |
'navimg_ht'=>'32',
|
144 |
'content_limit'=>'50',
|
145 |
+
'stylesheet'=>'default',
|
146 |
+
'shortcode'=>'1',
|
147 |
+
'rand'=>'0',
|
148 |
+
'ver'=>'j',
|
149 |
+
'support'=>'0',
|
150 |
+
'noscript'=>'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.'
|
151 |
);
|
152 |
|
153 |
$smooth_slider = get_option('smooth_slider_options');
|
154 |
+
if($smooth_slider){
|
155 |
+
$default_slider['ver']='step';
|
156 |
+
}
|
157 |
+
|
158 |
$img_pick = $smooth_slider['img_pick'];
|
159 |
|
160 |
if(is_array($img_pick)) {
|
|
|
161 |
$cskey = $smooth_slider['img_pick'][1];
|
162 |
}
|
163 |
else{
|
207 |
|
208 |
delete_option('smooth_slider_options');
|
209 |
update_option('smooth_slider_options',$smooth_slider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
register_activation_hook( __FILE__, 'install_smooth_slider' );
|
|
|
|
|
|
|
212 |
require_once (dirname (__FILE__) . '/includes/smooth-slider-functions.php');
|
213 |
require_once (dirname (__FILE__) . '/includes/sslider-get-the-image-functions.php');
|
214 |
|
271 |
}
|
272 |
}
|
273 |
$slider_style = get_post_meta($post_id,'slider_style',true);
|
274 |
+
$post_slider_style=$_POST['slider_style'];
|
275 |
+
if($slider_style != $post_slider_style and isset($post_slider_style) and !empty($post_slider_style)) {
|
276 |
update_post_meta($post_id, 'slider_style', $_POST['slider_style']);
|
277 |
}
|
278 |
|
279 |
$thumbnail_key = $smooth_slider['img_pick'][1];
|
280 |
$sslider_thumbnail = get_post_meta($post_id,$thumbnail_key,true);
|
281 |
+
$post_slider_thumbnail=$_POST['sslider_thumbnail'];
|
282 |
+
if($sslider_thumbnail != $post_slider_thumbnail and isset($post_slider_thumbnail) and !empty($post_slider_thumbnail)) {
|
283 |
update_post_meta($post_id, $thumbnail_key, $_POST['sslider_thumbnail']);
|
284 |
}
|
285 |
|
286 |
$sslider_link = get_post_meta($post_id,'slide_redirect_url',true);
|
287 |
$link=$_POST['sslider_link'];
|
288 |
+
//$sldr_post=get_post($post_id);
|
289 |
+
//if((!isset($link) or empty($link)) and $sldr_post->post_status == 'publish' ){$link=get_permalink($post_id);}//from 2.3.3
|
290 |
+
if($sslider_link != $link and isset($link) and !empty($link)) {
|
291 |
update_post_meta($post_id, 'slide_redirect_url', $link);
|
292 |
}
|
293 |
|
294 |
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
295 |
+
$post_sslider_nolink = $_POST['sslider_nolink'];
|
296 |
+
if($sslider_nolink != $_POST['sslider_nolink'] and isset($post_sslider_nolink) and !empty($post_sslider_nolink)) {
|
297 |
update_post_meta($post_id, 'sslider_nolink', $_POST['sslider_nolink']);
|
298 |
}
|
299 |
|
369 |
if( function_exists( 'add_meta_box' ) ) {
|
370 |
$post_types=get_post_types();
|
371 |
foreach($post_types as $post_type) {
|
372 |
+
add_meta_box( 'sslider_box1', __( 'Smooth Slider' , 'smooth-slider'), 'smooth_slider_edit_custom_box', $post_type, 'advanced' );
|
373 |
}
|
374 |
//add_meta_box( $id, $title, $callback, $page, $context, $priority );
|
375 |
} else {
|
406 |
?>
|
407 |
<div id="slider_checkbox">
|
408 |
<input type="checkbox" class="sldr_post" name="slider" value="slider" <?php echo $extra;?> />
|
409 |
+
<label for="slider"><?php _e('Add this post/page to','smooth-slider'); ?> </label>
|
410 |
<select name="slider_name[]" multiple="multiple" size="2" style="height:4em;">
|
411 |
<?php foreach ($sliders as $slider) { ?>
|
412 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(in_array($slider['slider_id'],$post_slider_arr)){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
419 |
<br />
|
420 |
|
421 |
<input type="checkbox" class="sldr_post" name="display_slider" value="1" <?php if(ss_slider_on_this_post($post_id)){echo "checked";}?> />
|
422 |
+
<label for="display_slider"><?php _e('Display ','smooth-slider'); ?>
|
423 |
<select name="display_slider_name">
|
424 |
<?php foreach ($sliders as $slider) { ?>
|
425 |
<option value="<?php echo $slider['slider_id'];?>" <?php if(ss_post_on_slider($post_id,$slider['slider_id'])){echo 'selected';} ?>><?php echo $slider['slider_name'];?></option>
|
426 |
<?php } ?>
|
427 |
+
</select> <?php _e('on this Post/Page (you need to add the Smooth Slider template tag manually on your page.php/single.php or whatever page template file)','smooth-slider'); ?></label>
|
428 |
<?php } ?>
|
429 |
|
430 |
<input type="hidden" name="sldr-verify" id="sldr-verify" value="<?php echo wp_create_nonce('SmoothSlider');?>" />
|
436 |
?>
|
437 |
<select name="slider_style" >
|
438 |
<?php
|
439 |
+
$directory = SMOOTH_SLIDER_CSS_DIR;
|
440 |
if ($handle = opendir($directory)) {
|
441 |
while (false !== ($file = readdir($handle))) {
|
442 |
if($file != '.' and $file != '..') { ?>
|
445 |
closedir($handle);
|
446 |
}
|
447 |
?>
|
448 |
+
</select> <label for="slider_style"><?php _e('Stylesheet to use if slider is displayed on this Post/Page','smooth-slider'); ?> </label><br /> <br />
|
449 |
|
450 |
<?php $thumbnail_key = $smooth_slider['img_pick'][1];
|
451 |
$sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
|
452 |
$sslider_link= get_post_meta($post_id, 'slide_redirect_url', true);
|
453 |
$sslider_nolink=get_post_meta($post_id, 'sslider_nolink', true);
|
454 |
?>
|
455 |
+
<label for="sslider_thumbnail"><?php _e('Custom Thumbnail Image(url)','smooth-slider'); ?>
|
456 |
<input type="text" name="sslider_thumbnail" class="sslider_thumbnail" value="<?php echo $sslider_thumbnail;?>" size="75" />
|
457 |
<br /> </label> <br /><br />
|
458 |
<fieldset>
|
459 |
+
<label for="sslider_link"><?php _e('Slide Link URL ','smooth-slider'); ?>
|
460 |
+
<input type="text" name="sslider_link" class="sslider_link" value="<?php echo $sslider_link;?>" size="50" /><small><?php _e('If left empty, it will be by default linked to the permalink.','smooth-slider'); ?></small> </label><br />
|
461 |
<label for="sslider_nolink">
|
462 |
+
<input type="checkbox" name="sslider_nolink" class="sslider_nolink" value="1" <?php if($sslider_nolink=='1'){echo "checked";}?> /> <?php _e('Do not link this slide to any page(url)','smooth-slider'); ?></label>
|
463 |
</fieldset>
|
464 |
</div>
|
465 |
|
515 |
$first_img = $matches [1] [0];
|
516 |
return $first_img;
|
517 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
add_filter( 'plugin_action_links', 'sslider_plugin_action_links', 10, 2 );
|
519 |
|
520 |
function sslider_plugin_action_links( $links, $file ) {
|
582 |
}
|
583 |
add_action( 'widgets_init', create_function('', 'return register_widget("Smooth_Slider_Simple_Widget");') );
|
584 |
|
585 |
+
if($smooth_slider['ver']=='step') require_once (dirname (__FILE__) . '/slider_versions/step.php');
|
586 |
+
else require_once (dirname (__FILE__) . '/slider_versions/j.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
|
588 |
require_once (dirname (__FILE__) . '/settings/settings.php');
|
589 |
require_once (dirname (__FILE__) . '/includes/media-images.php');
|