Version Description
= Before Upgrading =
- Note the Title and Content fonts on your old Smooth Slider.
- Go to 'Settings' panel and 'Save Changes'.
- Recheck the Slider Title, Post Title and the Slider Content fonts on the Settings Panel.
Get older versions
!!IMP!! If you have highly customized Smooth Slider, Before upgrading to 2.4, save your CSS and Settings. You may lose some CSS formatting as in the new versions the slider javascript is changed and is different from previous versions.
Download this release
Release Info
Developer | internet techies |
Plugin | Smooth Slider |
Version | 2.4 |
Comparing to | |
See all releases |
Code changes from version 2.3.5 to 2.4
- css/admin.css +84 -0
- images/button_next.png → css/skins/default/buttons/black/nav.png +0 -0
- images/button_prev.png → css/skins/default/buttons/black/next.png +0 -0
- css/skins/default/buttons/black/prev.png +0 -0
- css/skins/default/buttons/blue/nav.png +0 -0
- css/skins/default/buttons/blue/next.png +0 -0
- css/skins/default/buttons/blue/prev.png +0 -0
- css/skins/default/buttons/default/nav.png +0 -0
- css/skins/default/buttons/default/next.png +0 -0
- css/skins/default/buttons/default/prev.png +0 -0
- css/skins/default/buttons/dots/nav.png +0 -0
- css/skins/default/buttons/dots/next.png +0 -0
- css/skins/default/buttons/dots/prev.png +0 -0
- css/skins/default/buttons/green/nav.png +0 -0
- css/skins/default/buttons/green/next.png +0 -0
- css/skins/default/buttons/green/prev.png +0 -0
- css/skins/default/buttons/orange/nav.png +0 -0
- css/skins/default/buttons/orange/next.png +0 -0
- css/skins/default/buttons/orange/prev.png +0 -0
- css/skins/default/style.css +26 -27
- css/skins/sample/buttons/black/nav.png +0 -0
- css/skins/sample/buttons/black/next.png +0 -0
- css/skins/sample/buttons/black/prev.png +0 -0
- css/skins/sample/buttons/blue/nav.png +0 -0
- css/skins/sample/buttons/blue/next.png +0 -0
- css/skins/sample/buttons/blue/prev.png +0 -0
- css/skins/sample/buttons/default/nav.png +0 -0
- css/skins/sample/buttons/default/next.png +0 -0
- css/skins/sample/buttons/default/prev.png +0 -0
- css/skins/sample/buttons/dots/nav.png +0 -0
- css/skins/sample/buttons/dots/next.png +0 -0
- css/skins/sample/buttons/dots/prev.png +0 -0
- css/skins/sample/buttons/green/nav.png +0 -0
- css/skins/sample/buttons/green/next.png +0 -0
- css/skins/sample/buttons/green/prev.png +0 -0
- css/skins/sample/buttons/orange/nav.png +0 -0
- css/skins/sample/buttons/orange/next.png +0 -0
- css/skins/sample/buttons/orange/prev.png +0 -0
- css/skins/sample/style.css +24 -29
- css/smooth-slider.css +0 -28
- css/styles/default.css +0 -29
- css/styles/sample.css +0 -45
- images/Thumbs.db +0 -0
- images/elegantthemes.gif +0 -0
- images/hostgator.gif +0 -0
- images/slide1.png +0 -0
- images/slide2.png +0 -0
- images/slide3.png +0 -0
- images/slide4.png +0 -0
- images/slide5.png +0 -0
- images/slidervilla-ad1.jpg +0 -0
- includes/sslider-get-the-image-functions.php +30 -57
- js/admin.js +62 -0
- js/jcycle.js +1500 -0
- js/jquery.jcarousel.min.js +0 -16
- readme.txt +85 -69
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- settings/settings.php +349 -201
- settings/sliders.php +22 -63
- slider_versions/j.php +0 -977
- slider_versions/shortcodes_1.php +74 -0
- slider_versions/smooth_1.php +680 -0
- slider_versions/widgets_1.php +53 -0
- smooth-slider.php +14 -62
css/admin.css
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* CSS used for styling the Settings form */
|
2 |
+
form#smooth_slider_form fieldset{margin:0px 0 10px 0px;background:#eee;border:0px;padding:10px 20px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;}
|
3 |
+
form#smooth_slider_form legend{padding:12px 9px 19px;margin:-10px 0 0 30px;background:#efefef;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;background: #fafafa;}
|
4 |
+
form#smooth_slider_form legend span{font-size:100%;font-weight:bold;color:#fff;background:#444;-moz-border-radius-topleft:10px;-webkit-border-top-left-radius:10px;-moz-border-radius-topright:10px;-webkit-border-top-right-radius:10px;border-top-right-radius:10px;padding:5px 11px 0;}
|
5 |
+
form#smooth_slider_form{font-family:arial;font-size:100%;color:#666;}
|
6 |
+
form#smooth_slider_form label {}
|
7 |
+
form#smooth_slider_form input[type="text"] {color:#666;border:1px solid #d8d8d8;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;padding:3px 10px;}
|
8 |
+
|
9 |
+
form#smooth_slider_form select {color:#666;border:1px solid #d8d8d8;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;}
|
10 |
+
form#smooth_slider_form option{display:block;color:#666;}
|
11 |
+
|
12 |
+
form#smooth_slider_form input[type="checkbox"] {background:none;border:0px;width:14px;height:14px;}
|
13 |
+
form#smooth_slider_form input[type="radio"] {background:none;border:0px;width:14px;height:14px;}
|
14 |
+
|
15 |
+
input[type="text"]:disabled {opacity: .5;border:1px solid #eee !important;filter: alpha(opacity=50);}
|
16 |
+
|
17 |
+
form#smooth_slider_form textarea {color:#666;font-size:110%;font-family:arial;border:1px solid #d8d8d8;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;padding:2px 10px;margin-bottom:10px;}
|
18 |
+
form#smooth_slider_form .faulty_field {background:#fff4f4 !important;color:#ff0000;border:1px solid #ff0000 !important;}
|
19 |
+
form#smooth_slider_form label span {color:#ff0000;font-size:85%;}
|
20 |
+
|
21 |
+
/*For Tooltip*/
|
22 |
+
.moreInfo {
|
23 |
+
position: relative;
|
24 |
+
font-weight:bold;
|
25 |
+
vertical-align:top;
|
26 |
+
}
|
27 |
+
.trigger{
|
28 |
+
padding:0px 3px;
|
29 |
+
border:1px solid #ccc;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;
|
30 |
+
cursor:help;
|
31 |
+
border-color: #298CBA;
|
32 |
+
font-weight: bold;
|
33 |
+
color: white;
|
34 |
+
background: #21759B;
|
35 |
+
text-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0;
|
36 |
+
vertical-align:top;
|
37 |
+
}
|
38 |
+
.tooltip {
|
39 |
+
position: absolute;
|
40 |
+
top:-12px;
|
41 |
+
left:25px;
|
42 |
+
z-index:999;
|
43 |
+
width:25em;
|
44 |
+
background:#EFEBCE;
|
45 |
+
font-size:12px;
|
46 |
+
color:#333;
|
47 |
+
border:0px;padding:15px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;
|
48 |
+
display: none; /* keeps the tooltip hidden if no JS available */
|
49 |
+
}
|
50 |
+
/************************************************
|
51 |
+
* ui-tabs *
|
52 |
+
************************************************/
|
53 |
+
.ui-tabs { padding: .2em; zoom: 1; }
|
54 |
+
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
55 |
+
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; background-color:#B9B9B9;}
|
56 |
+
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#FFFFFF;}
|
57 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-bottom-width: 0; background-color:#ABD37E;}
|
58 |
+
.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;}
|
59 |
+
.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... */
|
60 |
+
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
61 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
62 |
+
/*tabs complete*/
|
63 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
64 |
+
#sldr_close {float:right;}
|
65 |
+
|
66 |
+
.color-picker-wrap {
|
67 |
+
position: absolute;
|
68 |
+
display: none;
|
69 |
+
background: #fff;
|
70 |
+
border: 3px solid #ccc;
|
71 |
+
padding: 3px;
|
72 |
+
z-index: 1000;
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
div#smooth_sldr_donations a{
|
77 |
+
color:#366C94 !important;
|
78 |
+
text-decoration:none;
|
79 |
+
}
|
80 |
+
div#smooth_sldr_donations a:hover{
|
81 |
+
text-decoration:underline;
|
82 |
+
}
|
83 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
84 |
+
#sldr_close {float:right;}
|
images/button_next.png → css/skins/default/buttons/black/nav.png
RENAMED
Binary file
|
images/button_prev.png → css/skins/default/buttons/black/next.png
RENAMED
Binary file
|
css/skins/default/buttons/black/prev.png
ADDED
Binary file
|
css/skins/default/buttons/blue/nav.png
ADDED
Binary file
|
css/skins/default/buttons/blue/next.png
ADDED
Binary file
|
css/skins/default/buttons/blue/prev.png
ADDED
Binary file
|
css/skins/default/buttons/default/nav.png
ADDED
Binary file
|
css/skins/default/buttons/default/next.png
ADDED
Binary file
|
css/skins/default/buttons/default/prev.png
ADDED
Binary file
|
css/skins/default/buttons/dots/nav.png
ADDED
Binary file
|
css/skins/default/buttons/dots/next.png
ADDED
Binary file
|
css/skins/default/buttons/dots/prev.png
ADDED
Binary file
|
css/skins/default/buttons/green/nav.png
ADDED
Binary file
|
css/skins/default/buttons/green/next.png
ADDED
Binary file
|
css/skins/default/buttons/green/prev.png
ADDED
Binary file
|
css/skins/default/buttons/orange/nav.png
ADDED
Binary file
|
css/skins/default/buttons/orange/next.png
ADDED
Binary file
|
css/skins/default/buttons/orange/prev.png
ADDED
Binary file
|
css/skins/default/style.css
CHANGED
@@ -3,36 +3,35 @@
|
|
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 .
|
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
|
27 |
-
.smooth_slider{
|
|
|
|
|
|
|
28 |
.smooth_slider a{text-decoration:none !important;}
|
29 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
30 |
-
.smooth_slider p.
|
31 |
-
.smooth_slider p.
|
32 |
-
.
|
33 |
-
|
34 |
.sldrbr{line-height:1px;}
|
35 |
-
.sldrlink{display:block;font-size:8px;
|
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:".";}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Author:Tejaswini
|
4 |
Website:http://www.clickonf5.org
|
5 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
/*Smooth Slider specific styles*/
|
7 |
+
.smooth_slider_fouc .smooth_slider {display: none;}
|
8 |
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;background:transparent;vertical-align:baseline;}
|
9 |
+
.smooth_slider{padding:0 5px;}
|
10 |
+
.smooth_slider .sldr_title{margin:5px 0 10px 0;}
|
11 |
+
.smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
|
12 |
+
.smooth_slider .smooth_sliderb{position:relative;}
|
13 |
+
.smooth_slider .smooth_slideri{position:absolute;}
|
14 |
.smooth_slider a{text-decoration:none !important;}
|
15 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
16 |
+
.smooth_slider p.smooth_more{margin:0;}
|
17 |
+
.smooth_slider p.smooth_more a{text-decoration:underline !important;float:right;}
|
18 |
+
.smooth_slider p.smooth_more a:hover{text-decoration:none;}
|
19 |
+
|
20 |
.sldrbr{line-height:1px;}
|
21 |
+
.sldrlink{display:block;font-size:8px;font-family:Verdana, Helvetica, sans-serif;}
|
22 |
+
.sldrlink a{position:absolute;bottom:0;right:5px;margin:10px auto;color:#333333;}
|
23 |
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
24 |
+
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
25 |
+
|
26 |
+
/*Navigation */
|
27 |
+
/* Next and Previous navigational arrows */
|
28 |
+
.smooth_slider .smooth_next {position: absolute;right: 0px;top:45%; width: 24px; height: 24px; cursor: pointer; background: transparent url(buttons/default/next.png) no-repeat 0 0;}
|
29 |
+
.smooth_slider .smooth_prev { position: absolute;left: 0px;top:45%; width: 24px; height: 24px; cursor: pointer; background: transparent url(buttons/default/prev.png) no-repeat 0 0;}
|
30 |
+
|
31 |
+
/*Navigation numbers*/
|
32 |
+
.smooth_slider .smooth_nav { position:absolute;bottom:0px;text-align:center;margin: 10px auto;}
|
33 |
+
.smooth_slider .smooth_nav a.smooth_slider_nnav { padding: 2px 6px; margin: 3px; border: 1px solid #ccc; text-align: center; text-decoration: none; font-weight:normal;}
|
34 |
+
.smooth_slider .smooth_nav a.smooth_slider_nnav.activeSlide { font-weight:bold;background-color: #efefef ; }
|
35 |
+
.smooth_slider .smooth_nav a.smooth_slider_nnav:focus { outline: none; }
|
36 |
+
.smooth_slider .smooth_nav a.smooth_slider_inav{display:block;float:left;}
|
37 |
+
.smooth_slider .smooth_nav a.smooth_slider_bnav{background: transparent url(buttons/default/nav.png) no-repeat 0 0;margin:0 3px;}
|
css/skins/sample/buttons/black/nav.png
ADDED
Binary file
|
css/skins/sample/buttons/black/next.png
ADDED
Binary file
|
css/skins/sample/buttons/black/prev.png
ADDED
Binary file
|
css/skins/sample/buttons/blue/nav.png
ADDED
Binary file
|
css/skins/sample/buttons/blue/next.png
ADDED
Binary file
|
css/skins/sample/buttons/blue/prev.png
ADDED
Binary file
|
css/skins/sample/buttons/default/nav.png
ADDED
Binary file
|
css/skins/sample/buttons/default/next.png
ADDED
Binary file
|
css/skins/sample/buttons/default/prev.png
ADDED
Binary file
|
css/skins/sample/buttons/dots/nav.png
ADDED
Binary file
|
css/skins/sample/buttons/dots/next.png
ADDED
Binary file
|
css/skins/sample/buttons/dots/prev.png
ADDED
Binary file
|
css/skins/sample/buttons/green/nav.png
ADDED
Binary file
|
css/skins/sample/buttons/green/next.png
ADDED
Binary file
|
css/skins/sample/buttons/green/prev.png
ADDED
Binary file
|
css/skins/sample/buttons/orange/nav.png
ADDED
Binary file
|
css/skins/sample/buttons/orange/next.png
ADDED
Binary file
|
css/skins/sample/buttons/orange/prev.png
ADDED
Binary file
|
css/skins/sample/style.css
CHANGED
@@ -1,40 +1,35 @@
|
|
1 |
@charset "utf-8";
|
2 |
/* CSS Document
|
3 |
Author:Tejaswini
|
4 |
-
Website:http://www.
|
5 |
*/
|
6 |
-
|
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
|
26 |
-
.smooth_slider{
|
|
|
|
|
|
|
27 |
.smooth_slider a{text-decoration:none !important;}
|
28 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
29 |
-
.smooth_slider p.
|
30 |
-
.smooth_slider p.
|
31 |
-
.
|
32 |
-
|
33 |
.sldrbr{line-height:1px;}
|
34 |
-
.sldrlink{display:block;font-size:8px;
|
35 |
-
.sldrlink a{color:#333333
|
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 |
-
/*
|
40 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
@charset "utf-8";
|
2 |
/* CSS Document
|
3 |
Author:Tejaswini
|
4 |
+
Website:http://www.keencodes.com/
|
5 |
*/
|
6 |
+
.smooth_slider_fouc .smooth_slider {display: none;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
.smooth_slider div,.smooth_slider p,.smooth_slider li,.smooth_slider span,.smooth_slider img,.smooth_slider h2,.smooth_slider ul{list-style:none;background:transparent;vertical-align:baseline;}
|
8 |
+
.smooth_slider{padding:0 5px;}
|
9 |
+
.smooth_slider .sldr_title{margin:5px 0 10px 0;}
|
10 |
+
.smooth_slider span{display:inline;overflow:hidden;margin: 10px auto;line-height:18px;}
|
11 |
+
.smooth_slider .smooth_sliderb{position:relative;}
|
12 |
+
.smooth_slider .smooth_slideri{position:absolute;}
|
13 |
.smooth_slider a{text-decoration:none !important;}
|
14 |
.smooth_slider h2{clear:none;display:block;padding:0px;}
|
15 |
+
.smooth_slider p.smooth_more{margin:0;}
|
16 |
+
.smooth_slider p.smooth_more a{text-decoration:underline !important;float:right;}
|
17 |
+
.smooth_slider p.smooth_more a:hover{text-decoration:none;}
|
18 |
+
|
19 |
.sldrbr{line-height:1px;}
|
20 |
+
.sldrlink{display:block;font-size:8px;font-family:Verdana, Helvetica, sans-serif;}
|
21 |
+
.sldrlink a{position:absolute;bottom:0;right:5px;margin:10px auto;color:#333333;}
|
22 |
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
23 |
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
24 |
|
25 |
+
/*If you are not using 'default' stylesheet, Replace the below CSS with the 'Generated CSS' tab on the Settings and then you can modify it*/
|
26 |
+
.smooth_slider{width:450px;height:250px;background-color:#ffffff;border:1px solid #999999;}
|
27 |
+
.smooth_slider .sldr_title{font-family:Georgia, Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold;font-style:normal;color:#000000;}
|
28 |
+
.smooth_slider .smooth_slideri{width:450px;margin:0px 0px 0px 0px;}
|
29 |
+
.smooth_slider .smooth_slider_thumbnail{float:left;margin:0 10px 0 0px;max-height:120px;border:1px solid #000000;width:165px;}
|
30 |
+
.smooth_slider .smooth_slideri h2{clear:none;line-height:17px;font-family:Trebuchet MS;font-size:14px;font-weight:bold;font-style:normal;color:#000000;margin:0 0 5px 0;}
|
31 |
+
.smooth_slider .smooth_slideri h2 a{color:#000000;font-size:14px;font-weight:bold;font-style:normal;}
|
32 |
+
.smooth_slider .smooth_slideri span{font-family:Verdana;font-size:12px;font-weight:normal;font-style:normal;color:#333333;}
|
33 |
+
.smooth_slider .smooth_slideri p.more{color:#000000;font-family:Verdana;font-size:12px;}
|
34 |
+
.smooth_slider .smooth_next{}
|
35 |
+
.smooth_slider .smooth_prev{}
|
css/smooth-slider.css
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
@charset "utf-8";
|
2 |
-
/* CSS Document
|
3 |
-
Author:Tejaswini
|
4 |
-
Website:http://www.clickonf5.org
|
5 |
-
*/
|
6 |
-
#smooth_sldr div,#smooth_sldr p,#smooth_sldr li,#smooth_sldr span,#smooth_sldr img,#smooth_sldr h2,#smooth_sldr ul{list-style:none;background:transparent;vertical-align:baseline;}
|
7 |
-
#smooth_sldr div{display:block;}
|
8 |
-
#smooth_sldr span{display:inline;}
|
9 |
-
#smooth_sldr{overflow:hidden;margin: 10px auto;line-height:18px;}
|
10 |
-
#smooth_sldr a{text-decoration:none;}
|
11 |
-
#smooth_sldr_items{width:100%;}
|
12 |
-
#smooth_sldr_body{width:100%;}
|
13 |
-
#smooth_sliderc{position:relative;text-align:justify;}
|
14 |
-
#smooth_sliderc .smooth_sliderb{position:absolute;/*dont change this value*/left:0;top:0;}
|
15 |
-
.smooth_slideri{padding-right:10px;overflow:hidden;line-height:18px;}
|
16 |
-
.sldr_title{margin:0;}
|
17 |
-
#smooth_sldr_body h2{clear:none;display:block;padding:0px;}
|
18 |
-
.slider_item {padding-left:1px;}
|
19 |
-
#smooth_sldr_body p.more a{text-decoration:underline;float:right;}
|
20 |
-
#smooth_sldr_body p.more a:hover{text-decoration:none;}
|
21 |
-
#smooth_sliderc_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}
|
22 |
-
a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;}
|
23 |
-
#smooth_sliderc_nav li{float:left;margin:0 5px 0 0;display:block;background-color:transparent;line-height:14px;}
|
24 |
-
#smooth_sliderc_nav li a{display:block;padding:1px 5px 1px 5px;outline:none;}
|
25 |
-
.sldrbr{line-height:1px;}
|
26 |
-
.sldrlink{clear:both;display:block;font-size:8px;float:right;margin-top:-8px;font-family:Verdana, Helvetica, sans-serif;}
|
27 |
-
.sldrlink a{color:#333333;}
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/styles/default.css
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
@charset "utf-8";
|
2 |
-
/* CSS Document
|
3 |
-
Author:Tejaswini
|
4 |
-
Website:http://www.clickonf5.org
|
5 |
-
*/
|
6 |
-
#smooth_sldr div,#smooth_sldr p,#smooth_sldr li,#smooth_sldr span,#smooth_sldr img,#smooth_sldr h2,#smooth_sldr ul{list-style:none;background:transparent;vertical-align:baseline;}
|
7 |
-
#smooth_sldr div{display:block;}
|
8 |
-
#smooth_sldr span{display:inline;}
|
9 |
-
#smooth_sldr{overflow:hidden;margin: 10px auto;line-height:18px;}
|
10 |
-
#smooth_sldr a{text-decoration:none;}
|
11 |
-
#smooth_sldr_items{width:100%;}
|
12 |
-
#smooth_sldr_body{width:100%;}
|
13 |
-
#smooth_sliderc{position:relative;text-align:justify;}
|
14 |
-
#smooth_sliderc .smooth_sliderb{position:absolute;/*dont change this value*/left:0;top:0;}
|
15 |
-
.smooth_slideri{padding-right:10px;overflow:hidden;line-height:18px;}
|
16 |
-
.sldr_title{margin:0;}
|
17 |
-
#smooth_sldr_body h2{clear:none;display:block;padding:0px;}
|
18 |
-
.slider_item {padding-left:1px;}
|
19 |
-
#smooth_sldr_body p.more a{text-decoration:underline;float:right;}
|
20 |
-
#smooth_sldr_body p.more a:hover{text-decoration:none;}
|
21 |
-
#smooth_sliderc_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}
|
22 |
-
a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;}
|
23 |
-
#smooth_sliderc_nav li{float:left;margin:0 5px 0 0;display:block;background-color:transparent;line-height:14px;}
|
24 |
-
#smooth_sliderc_nav li a{display:block;padding:1px 5px 1px 5px;outline:none;}
|
25 |
-
.sldrbr{line-height:1px;}
|
26 |
-
.sldrlink{display:block;font-size:8px;float:right;font-family:Verdana, Helvetica, sans-serif;}
|
27 |
-
.sldrlink a{color:#333333;}
|
28 |
-
.sldr_clearlt{display:block;visibility:hidden;clear:left;height:0;content:".";}
|
29 |
-
.sldr_clearrt{display:block;visibility:hidden;clear:right;height:0;content:".";}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/styles/sample.css
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
@charset "utf-8";
|
2 |
-
/* CSS Document
|
3 |
-
Author:Tejaswini
|
4 |
-
Website:http://www.clickonf5.org
|
5 |
-
IMPORTANT!! Change the name of this file, to avoid losing your changes in future upgrades
|
6 |
-
*/
|
7 |
-
/*This is the CSS always needed for Smooth Slider, you would not need to change it */
|
8 |
-
#smooth_sldr div,#smooth_sldr p,#smooth_sldr li,#smooth_sldr span,#smooth_sldr img,#smooth_sldr h2,#smooth_sldr ul{list-style:none;background:transparent;vertical-align:baseline;}
|
9 |
-
#smooth_sldr div{display:block;}
|
10 |
-
#smooth_sldr span{display:inline;}
|
11 |
-
#smooth_sldr{overflow:hidden;margin: 10px auto;line-height:18px;}
|
12 |
-
#smooth_sldr a{text-decoration:none;}
|
13 |
-
#smooth_sldr_items{width:100%;}
|
14 |
-
#smooth_sldr_body{width:100%;}
|
15 |
-
#smooth_sliderc{position:relative;text-align:justify;}
|
16 |
-
#smooth_sliderc .smooth_sliderb{position:absolute;/*dont change this value*/left:0;top:0;}
|
17 |
-
.smooth_slideri{padding-right:10px;overflow:hidden;line-height:18px;}
|
18 |
-
.sldr_title{margin:0;}
|
19 |
-
#smooth_sldr_body h2{clear:none;display:block;padding:0px;}
|
20 |
-
.slider_item {padding-left:1px;}
|
21 |
-
#smooth_sldr_body p.more a{text-decoration:underline;float:right;}
|
22 |
-
#smooth_sldr_body p.more a:hover{text-decoration:none;}
|
23 |
-
#smooth_sliderc_nav{float:left;width:70%;overflow:hidden;padding:0;margin:2px 0 0 0;}
|
24 |
-
a.smooth_sliderc_nav{margin:0 5px 0 0;display:block;float:left;background-repeat:no-repeat;background-position:center;}
|
25 |
-
#smooth_sliderc_nav li{float:left;margin:0 5px 0 0;display:block;background-color:transparent;line-height:14px;}
|
26 |
-
#smooth_sliderc_nav li a{display:block;padding:1px 5px 1px 5px;outline:none;}
|
27 |
-
.sldrbr{line-height:1px;}
|
28 |
-
.sldrlink{clear:both;display:block;font-size:8px;float:right;margin-top:-8px;font-family:Verdana, Helvetica, sans-serif;}
|
29 |
-
.sldrlink a{color:#333333;}
|
30 |
-
|
31 |
-
/*This is the CSS that needs to be changed to enter custom settings (Similar to settings panel)
|
32 |
-
To create these settings, I would suggest you to make changes to Smooth Slider settings, to get the slider as you wish, then go to the head of the page where the slider is displayed, you would get the below kind of css, you just need to paste it here. Then again you can revert back the Smooth Slider default settings on the settings page. Just a trick :)
|
33 |
-
*/
|
34 |
-
#smooth_sldr{width:495px;height:185px;background-color:#ccc;border:0px solid #999999;} /* Change the width and height of the slider here*/
|
35 |
-
#smooth_sldr_items{padding:10px 18px 0px 26px;}
|
36 |
-
#smooth_sliderc{width:451px;height:145px;} /* You need to alter these values retaining the difference with slider height and width*/
|
37 |
-
.smooth_slideri{width:441px;height:145px;} /* You need to alter these values retaining the difference with slider height and width*/
|
38 |
-
.sldr_title{font-family:Verdana, Arial, Helvetica, sans-serif;font-size:18px;font-weight:normal;font-style:normal;color:#43454c;}
|
39 |
-
#smooth_sldr_body h2{line-height:17px;font-family:Arial, Arial, Helvetica, sans-serif;font-size:14px;font-weight:bold;font-style:normal;color:#81423f;margin:0px 0 5px 0;}#smooth_sldr_body h2 a{color:#81423f;}
|
40 |
-
#smooth_sldr_body span{font-family:Arial, Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#333333;}
|
41 |
-
.smooth_slider_thumbnail{float:left;margin:0px 5px 0 0px;max-height:130px;border:0px solid #000000;}
|
42 |
-
#smooth_sldr_body p.more a{color:#81423f;font-family:Arial, Arial, Helvetica, sans-serif;font-size:12px;}
|
43 |
-
#smooth_sliderc_nav li{border:1px solid #333333;font-size:12px;font-family:Arial, Arial, Helvetica, sans-serif;}
|
44 |
-
#smooth_sliderc_nav li a{color:#81423f;}.sldrlink{padding-right:40px;}
|
45 |
-
.sldrlink a{color:#333333;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
images/Thumbs.db
CHANGED
Binary file
|
images/elegantthemes.gif
CHANGED
Binary file
|
images/hostgator.gif
DELETED
Binary file
|
images/slide1.png
CHANGED
Binary file
|
images/slide2.png
CHANGED
Binary file
|
images/slide3.png
CHANGED
Binary file
|
images/slide4.png
CHANGED
Binary file
|
images/slide5.png
CHANGED
Binary file
|
images/slidervilla-ad1.jpg
CHANGED
Binary file
|
includes/sslider-get-the-image-functions.php
CHANGED
@@ -26,25 +26,19 @@
|
|
26 |
/* Adds theme support for post images. */
|
27 |
add_theme_support( 'post-thumbnails' );
|
28 |
|
29 |
-
/* Delete the cache when a post or post metadata is updated. */
|
30 |
-
add_action( 'save_post', 'sslider_get_the_image_delete_cache' );
|
31 |
-
add_action( 'deleted_post_meta', 'sslider_get_the_image_delete_cache' );
|
32 |
-
add_action( 'updated_post_meta', 'sslider_get_the_image_delete_cache' );
|
33 |
-
add_action( 'added_post_meta', 'sslider_get_the_image_delete_cache' );
|
34 |
-
|
35 |
/**
|
36 |
* This is a highly intuitive function that gets images. It first calls for custom field keys. If no
|
37 |
* custom field key is set, check for the_post_thumbnail(). If no post image, check for images
|
38 |
* attached to post. Check for image order if looking for attached images. Scan the post for
|
39 |
* images if $image_scan = true. Check for default image if $default_image = true. If an image
|
40 |
-
* is found, call
|
41 |
*
|
42 |
* @since 0.1
|
43 |
* @global $post The current post's DB object.
|
44 |
* @param array $args Parameters for what image to get.
|
45 |
* @return string|array The HTML for the image. | Image attributes in an array.
|
46 |
*/
|
47 |
-
function
|
48 |
global $post;
|
49 |
$post_id = $post->ID;
|
50 |
$permalink = get_permalink( $post_id );
|
@@ -66,11 +60,13 @@ function sslider_get_the_image( $args = array() ) {
|
|
66 |
'height' => false,
|
67 |
'format' => 'img',
|
68 |
'echo' => true,
|
69 |
-
'permalink' => $permalink
|
|
|
|
|
70 |
);
|
71 |
|
72 |
/* Allow plugins/themes to filter the arguments. */
|
73 |
-
$args = apply_filters( '
|
74 |
|
75 |
/* Merge the input arguments and the defaults. */
|
76 |
$args = wp_parse_args( $args, $defaults );
|
@@ -87,48 +83,32 @@ function sslider_get_the_image( $args = array() ) {
|
|
87 |
/* Extract the array to allow easy use of variables. */
|
88 |
extract( $args );
|
89 |
|
90 |
-
/* Check for a cached image. */
|
91 |
-
$cache = wp_cache_get( 'sslider_get_the_image' );
|
92 |
-
|
93 |
-
if ( !is_array( $cache ) )
|
94 |
-
$cache = array();
|
95 |
-
|
96 |
-
/* If there is no cached image, let's see if one exists. */
|
97 |
-
if ( !isset( $cache[$post_id][$size] ) ) {
|
98 |
-
|
99 |
/* If a custom field key (array) is defined, check for images by custom field. */
|
100 |
if ( $custom_key )
|
101 |
-
$image =
|
102 |
|
103 |
/* If no image found and $the_post_thumbnail is set to true, check for a post image (WP feature). */
|
104 |
if ( !$image && $the_post_thumbnail )
|
105 |
-
$image =
|
106 |
|
107 |
/* If no image found and $attachment is set to true, check for an image by attachment. */
|
108 |
if ( !$image && $attachment )
|
109 |
-
$image =
|
110 |
|
111 |
/* If no image found and $image_scan is set to true, scan the post for images. */
|
112 |
if ( !$image && $image_scan )
|
113 |
-
$image =
|
114 |
|
115 |
/* If no image found and a $default_image is set, get the default image. */
|
116 |
if ( !$image && $default_image )
|
117 |
-
$image =
|
118 |
|
119 |
/* If an image is returned, run it through the display function. */
|
120 |
if ( $image )
|
121 |
-
$image =
|
122 |
-
|
123 |
-
$cache[$post_id][$size] = $image;
|
124 |
-
wp_cache_set( 'sslider_get_the_image', $cache );
|
125 |
-
}
|
126 |
-
else {
|
127 |
-
$image = $cache[$post_id][$size];
|
128 |
-
}
|
129 |
|
130 |
/* Allow plugins/theme to override the final output. */
|
131 |
-
$image = apply_filters( '
|
132 |
|
133 |
/*print_r($image);*/
|
134 |
|
@@ -159,7 +139,7 @@ function sslider_get_the_image( $args = array() ) {
|
|
159 |
* @param array $args
|
160 |
* @return array|bool
|
161 |
*/
|
162 |
-
function
|
163 |
|
164 |
/* If $custom_key is a string, we want to split it by spaces into an array. */
|
165 |
if ( !is_array( $args['custom_key'] ) )
|
@@ -184,13 +164,13 @@ function sslider_image_by_custom_field( $args = array() ) {
|
|
184 |
/**
|
185 |
* Checks for images using a custom version of the WordPress 2.9+ get_the_post_thumbnail()
|
186 |
* function. If an image is found, return it and the $post_thumbnail_id. The WordPress function's
|
187 |
-
* other filters are later added in the
|
188 |
*
|
189 |
* @since 0.4
|
190 |
* @param array $args
|
191 |
* @return array|bool
|
192 |
*/
|
193 |
-
function
|
194 |
|
195 |
/* Check for a post image ID (set by WP as a custom field). */
|
196 |
$post_thumbnail_id = get_post_thumbnail_id( $args['post_id'] );
|
@@ -221,7 +201,7 @@ function sslider_image_by_the_post_thumbnail( $args = array() ) {
|
|
221 |
* @param array $args
|
222 |
* @return array|bool
|
223 |
*/
|
224 |
-
function
|
225 |
|
226 |
/* Get attachments for the inputted $post_id. */
|
227 |
$attachments = get_children( array( 'post_parent' => $args['post_id'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) );
|
@@ -252,7 +232,7 @@ function sslider_image_by_attachment( $args = array() ) {
|
|
252 |
}
|
253 |
|
254 |
/**
|
255 |
-
* Scans the post for images within the content. Not called by default with
|
256 |
* Shouldn't use if using large images within posts, better to use the other options.
|
257 |
*
|
258 |
* @since 0.3
|
@@ -260,7 +240,7 @@ function sslider_image_by_attachment( $args = array() ) {
|
|
260 |
* @param array $args
|
261 |
* @return array|bool
|
262 |
*/
|
263 |
-
function
|
264 |
|
265 |
/* Search the post's content for the <img /> tag and get its URL. */
|
266 |
preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $args['post_id'] ), $matches );
|
@@ -274,13 +254,13 @@ function sslider_image_by_scan( $args = array() ) {
|
|
274 |
|
275 |
/**
|
276 |
* Used for setting a default image. The function simply returns the image URL it was
|
277 |
-
* given in an array. Not used with
|
278 |
*
|
279 |
* @since 0.3
|
280 |
* @param array $args
|
281 |
* @return array
|
282 |
*/
|
283 |
-
function
|
284 |
return array( 'url' => $args['default_image'] );
|
285 |
}
|
286 |
|
@@ -293,7 +273,7 @@ function sslider_image_by_default( $args = array() ) {
|
|
293 |
* @param array $image Array of image info ($image, $classes, $alt, $caption).
|
294 |
* @return string $image Formatted image (w/link to post if the option is set).
|
295 |
*/
|
296 |
-
function
|
297 |
|
298 |
/* If there is no image URL, return false. */
|
299 |
if ( empty( $image['url'] ) )
|
@@ -308,6 +288,8 @@ function sslider_display_the_image( $args = array(), $image = false ) {
|
|
308 |
/* If there is a width or height, set them as HMTL-ready attributes. */
|
309 |
$width = ( ( $width ) ? ' width="' . esc_attr( $width ) . '"' : '' );
|
310 |
$height = ( ( $height ) ? ' height="' . esc_attr( $height ) . '"' : '' );
|
|
|
|
|
311 |
|
312 |
/* Loop through the custom field keys and add them as classes. */
|
313 |
if ( is_array( $custom_key ) ) {
|
@@ -327,14 +309,14 @@ function sslider_display_the_image( $args = array(), $image = false ) {
|
|
327 |
do_action( 'begin_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size );
|
328 |
|
329 |
/* Add the image attributes to the <img /> element. */
|
330 |
-
$html = '<img src="' . $image['url'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '"' . $width . $height . ' />';
|
331 |
|
332 |
/* If $link_to_post is set to true, link the image to its post. */
|
333 |
if ( $link_to_post ) {
|
334 |
-
$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( apply_filters( 'the_title', get_post_field( 'post_title', $post_id ) ) ) . '">' . $html . '</a>';}
|
335 |
else {
|
336 |
if($permalink!='') {
|
337 |
-
$html = '<a href="' . $permalink . '" title="' . esc_attr( apply_filters( 'the_title', get_post_field( 'post_title', $post_id ) ) ) . '">' . $html . '</a>';
|
338 |
}
|
339 |
}
|
340 |
|
@@ -350,22 +332,13 @@ function sslider_display_the_image( $args = array(), $image = false ) {
|
|
350 |
}
|
351 |
|
352 |
/**
|
353 |
-
*
|
354 |
-
*
|
355 |
-
* @since 0.5
|
356 |
-
*/
|
357 |
-
function sslider_get_the_image_delete_cache() {
|
358 |
-
wp_cache_delete( 'sslider_get_the_image' );
|
359 |
-
}
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Get the image with a link to the post. Use sslider_get_the_image() instead.
|
363 |
*
|
364 |
* @since 0.1
|
365 |
* @deprecated 0.3
|
366 |
*/
|
367 |
-
function
|
368 |
-
|
369 |
}
|
370 |
|
371 |
?>
|
26 |
/* Adds theme support for post images. */
|
27 |
add_theme_support( 'post-thumbnails' );
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
/**
|
30 |
* This is a highly intuitive function that gets images. It first calls for custom field keys. If no
|
31 |
* custom field key is set, check for the_post_thumbnail(). If no post image, check for images
|
32 |
* attached to post. Check for image order if looking for attached images. Scan the post for
|
33 |
* images if $image_scan = true. Check for default image if $default_image = true. If an image
|
34 |
+
* is found, call smooth_sslider_display_the_image() to format it.
|
35 |
*
|
36 |
* @since 0.1
|
37 |
* @global $post The current post's DB object.
|
38 |
* @param array $args Parameters for what image to get.
|
39 |
* @return string|array The HTML for the image. | Image attributes in an array.
|
40 |
*/
|
41 |
+
function smooth_sslider_get_the_image( $args = array() ) {
|
42 |
global $post;
|
43 |
$post_id = $post->ID;
|
44 |
$permalink = get_permalink( $post_id );
|
60 |
'height' => false,
|
61 |
'format' => 'img',
|
62 |
'echo' => true,
|
63 |
+
'permalink' => $permalink,
|
64 |
+
'style'=>'',
|
65 |
+
'a_attr'=> ''
|
66 |
);
|
67 |
|
68 |
/* Allow plugins/themes to filter the arguments. */
|
69 |
+
$args = apply_filters( 'smooth_sslider_get_the_image_args', $args );
|
70 |
|
71 |
/* Merge the input arguments and the defaults. */
|
72 |
$args = wp_parse_args( $args, $defaults );
|
83 |
/* Extract the array to allow easy use of variables. */
|
84 |
extract( $args );
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
/* If a custom field key (array) is defined, check for images by custom field. */
|
87 |
if ( $custom_key )
|
88 |
+
$image = smooth_sslider_image_by_custom_field( $args );
|
89 |
|
90 |
/* If no image found and $the_post_thumbnail is set to true, check for a post image (WP feature). */
|
91 |
if ( !$image && $the_post_thumbnail )
|
92 |
+
$image = smooth_sslider_image_by_the_post_thumbnail( $args );
|
93 |
|
94 |
/* If no image found and $attachment is set to true, check for an image by attachment. */
|
95 |
if ( !$image && $attachment )
|
96 |
+
$image = smooth_sslider_image_by_attachment( $args );
|
97 |
|
98 |
/* If no image found and $image_scan is set to true, scan the post for images. */
|
99 |
if ( !$image && $image_scan )
|
100 |
+
$image = smooth_sslider_image_by_scan( $args );
|
101 |
|
102 |
/* If no image found and a $default_image is set, get the default image. */
|
103 |
if ( !$image && $default_image )
|
104 |
+
$image = smooth_sslider_image_by_default( $args );
|
105 |
|
106 |
/* If an image is returned, run it through the display function. */
|
107 |
if ( $image )
|
108 |
+
$image = smooth_sslider_display_the_image( $args, $image );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
/* Allow plugins/theme to override the final output. */
|
111 |
+
$image = apply_filters( 'smooth_sslider_get_the_image', $image );
|
112 |
|
113 |
/*print_r($image);*/
|
114 |
|
139 |
* @param array $args
|
140 |
* @return array|bool
|
141 |
*/
|
142 |
+
function smooth_sslider_image_by_custom_field( $args = array() ) {
|
143 |
|
144 |
/* If $custom_key is a string, we want to split it by spaces into an array. */
|
145 |
if ( !is_array( $args['custom_key'] ) )
|
164 |
/**
|
165 |
* Checks for images using a custom version of the WordPress 2.9+ get_the_post_thumbnail()
|
166 |
* function. If an image is found, return it and the $post_thumbnail_id. The WordPress function's
|
167 |
+
* other filters are later added in the smooth_sslider_display_the_image() function.
|
168 |
*
|
169 |
* @since 0.4
|
170 |
* @param array $args
|
171 |
* @return array|bool
|
172 |
*/
|
173 |
+
function smooth_sslider_image_by_the_post_thumbnail( $args = array() ) {
|
174 |
|
175 |
/* Check for a post image ID (set by WP as a custom field). */
|
176 |
$post_thumbnail_id = get_post_thumbnail_id( $args['post_id'] );
|
201 |
* @param array $args
|
202 |
* @return array|bool
|
203 |
*/
|
204 |
+
function smooth_sslider_image_by_attachment( $args = array() ) {
|
205 |
|
206 |
/* Get attachments for the inputted $post_id. */
|
207 |
$attachments = get_children( array( 'post_parent' => $args['post_id'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) );
|
232 |
}
|
233 |
|
234 |
/**
|
235 |
+
* Scans the post for images within the content. Not called by default with smooth_sslider_get_the_image().
|
236 |
* Shouldn't use if using large images within posts, better to use the other options.
|
237 |
*
|
238 |
* @since 0.3
|
240 |
* @param array $args
|
241 |
* @return array|bool
|
242 |
*/
|
243 |
+
function smooth_sslider_image_by_scan( $args = array() ) {
|
244 |
|
245 |
/* Search the post's content for the <img /> tag and get its URL. */
|
246 |
preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $args['post_id'] ), $matches );
|
254 |
|
255 |
/**
|
256 |
* Used for setting a default image. The function simply returns the image URL it was
|
257 |
+
* given in an array. Not used with smooth_sslider_get_the_image() by default.
|
258 |
*
|
259 |
* @since 0.3
|
260 |
* @param array $args
|
261 |
* @return array
|
262 |
*/
|
263 |
+
function smooth_sslider_image_by_default( $args = array() ) {
|
264 |
return array( 'url' => $args['default_image'] );
|
265 |
}
|
266 |
|
273 |
* @param array $image Array of image info ($image, $classes, $alt, $caption).
|
274 |
* @return string $image Formatted image (w/link to post if the option is set).
|
275 |
*/
|
276 |
+
function smooth_sslider_display_the_image( $args = array(), $image = false ) {
|
277 |
|
278 |
/* If there is no image URL, return false. */
|
279 |
if ( empty( $image['url'] ) )
|
288 |
/* If there is a width or height, set them as HMTL-ready attributes. */
|
289 |
$width = ( ( $width ) ? ' width="' . esc_attr( $width ) . '"' : '' );
|
290 |
$height = ( ( $height ) ? ' height="' . esc_attr( $height ) . '"' : '' );
|
291 |
+
$style = ( ( $style ) ? ' '.$style : '' );
|
292 |
+
$a_attr = ( ( $a_attr ) ? ' '.$a_attr : '' );
|
293 |
|
294 |
/* Loop through the custom field keys and add them as classes. */
|
295 |
if ( is_array( $custom_key ) ) {
|
309 |
do_action( 'begin_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size );
|
310 |
|
311 |
/* Add the image attributes to the <img /> element. */
|
312 |
+
$html = '<img src="' . $image['url'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '"' . $width . $height . $style .' />';
|
313 |
|
314 |
/* If $link_to_post is set to true, link the image to its post. */
|
315 |
if ( $link_to_post ) {
|
316 |
+
$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( apply_filters( 'the_title', get_post_field( 'post_title', $post_id ) ) ) . '" '.$a_attr.'>' . $html . '</a>';}
|
317 |
else {
|
318 |
if($permalink!='') {
|
319 |
+
$html = '<a href="' . $permalink . '" title="' . esc_attr( apply_filters( 'the_title', get_post_field( 'post_title', $post_id ) ) ) . '" '.$a_attr.'>' . $html . '</a>';
|
320 |
}
|
321 |
}
|
322 |
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
+
* Get the image with a link to the post. Use smooth_sslider_get_the_image() instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
*
|
337 |
* @since 0.1
|
338 |
* @deprecated 0.3
|
339 |
*/
|
340 |
+
function smooth_sslider_get_the_image_link( $deprecated = '', $deprecated_2 = '', $deprecated_3 = '' ) {
|
341 |
+
smooth_sslider_get_the_image();
|
342 |
}
|
343 |
|
344 |
?>
|
js/admin.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function () {
|
2 |
+
jQuery('.moreInfo').each(function () {
|
3 |
+
// options
|
4 |
+
var distance = 10;
|
5 |
+
var time = 250;
|
6 |
+
var hideDelay = 200;
|
7 |
+
|
8 |
+
var hideDelayTimer = null;
|
9 |
+
|
10 |
+
// tracker
|
11 |
+
var beingShown = false;
|
12 |
+
var shown = false;
|
13 |
+
|
14 |
+
var trigger = jQuery('.trigger', this);
|
15 |
+
var tooltip = jQuery('.tooltip', this).css('opacity', 0);
|
16 |
+
|
17 |
+
// set the mouseover and mouseout on both element
|
18 |
+
jQuery([trigger.get(0), tooltip.get(0)]).mouseover(function () {
|
19 |
+
// stops the hide event if we move from the trigger to the tooltip element
|
20 |
+
if (hideDelayTimer) clearTimeout(hideDelayTimer);
|
21 |
+
|
22 |
+
// don't trigger the animation again if we're being shown, or already visible
|
23 |
+
if (beingShown || shown) {
|
24 |
+
return;
|
25 |
+
} else {
|
26 |
+
beingShown = true;
|
27 |
+
|
28 |
+
// reset position of tooltip box
|
29 |
+
tooltip.css({
|
30 |
+
display: 'block' // brings the tooltip back in to view
|
31 |
+
})
|
32 |
+
|
33 |
+
// (we're using chaining on the tooltip) now animate it's opacity and position
|
34 |
+
.animate({
|
35 |
+
/*top: '-=' + distance + 'px',*/
|
36 |
+
opacity: 1
|
37 |
+
}, time, 'swing', function() {
|
38 |
+
// once the animation is complete, set the tracker variables
|
39 |
+
beingShown = false;
|
40 |
+
shown = true;
|
41 |
+
});
|
42 |
+
}
|
43 |
+
}).mouseout(function () {
|
44 |
+
// reset the timer if we get fired again - avoids double animations
|
45 |
+
if (hideDelayTimer) clearTimeout(hideDelayTimer);
|
46 |
+
|
47 |
+
// store the timer so that it can be cleared in the mouseover if required
|
48 |
+
hideDelayTimer = setTimeout(function () {
|
49 |
+
hideDelayTimer = null;
|
50 |
+
tooltip.animate({
|
51 |
+
/*top: '-=' + distance + 'px',*/
|
52 |
+
opacity: 0
|
53 |
+
}, time, 'swing', function () {
|
54 |
+
// once the animate is complete, set the tracker variables
|
55 |
+
shown = false;
|
56 |
+
// hide the tooltip entirely after the effect (opacity alone doesn't do the job)
|
57 |
+
tooltip.css('display', 'none');
|
58 |
+
});
|
59 |
+
}, hideDelay);
|
60 |
+
});
|
61 |
+
});
|
62 |
+
});
|
js/jcycle.js
ADDED
@@ -0,0 +1,1500 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Cycle Plugin (with Transition Definitions)
|
3 |
+
* Examples and documentation at: http://jquery.malsup.com/cycle/
|
4 |
+
* Copyright (c) 2007-2010 M. Alsup
|
5 |
+
* Version: 2.9996 (07-OCT-2011)
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* http://jquery.malsup.com/license.html
|
8 |
+
* Requires: jQuery v1.3.2 or later
|
9 |
+
*/
|
10 |
+
;(function($) {
|
11 |
+
|
12 |
+
var ver = '2.9996';
|
13 |
+
|
14 |
+
// if $.support is not defined (pre jQuery 1.3) add what I need
|
15 |
+
if ($.support == undefined) {
|
16 |
+
$.support = {
|
17 |
+
opacity: !($.browser.msie)
|
18 |
+
};
|
19 |
+
}
|
20 |
+
|
21 |
+
function debug(s) {
|
22 |
+
$.fn.cycle.debug && log(s);
|
23 |
+
}
|
24 |
+
function log() {
|
25 |
+
window.console && console.log && console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
|
26 |
+
}
|
27 |
+
$.expr[':'].paused = function(el) {
|
28 |
+
return el.cyclePause;
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
// the options arg can be...
|
33 |
+
// a number - indicates an immediate transition should occur to the given slide index
|
34 |
+
// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
|
35 |
+
// an object - properties to control the slideshow
|
36 |
+
//
|
37 |
+
// the arg2 arg can be...
|
38 |
+
// the name of an fx (only used in conjunction with a numeric value for 'options')
|
39 |
+
// the value true (only used in first arg == 'resume') and indicates
|
40 |
+
// that the resume should occur immediately (not wait for next timeout)
|
41 |
+
|
42 |
+
$.fn.cycle = function(options, arg2) {
|
43 |
+
var o = { s: this.selector, c: this.context };
|
44 |
+
|
45 |
+
// in 1.3+ we can fix mistakes with the ready state
|
46 |
+
if (this.length === 0 && options != 'stop') {
|
47 |
+
if (!$.isReady && o.s) {
|
48 |
+
log('DOM not ready, queuing slideshow');
|
49 |
+
$(function() {
|
50 |
+
$(o.s,o.c).cycle(options,arg2);
|
51 |
+
});
|
52 |
+
return this;
|
53 |
+
}
|
54 |
+
// is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
|
55 |
+
log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
|
56 |
+
return this;
|
57 |
+
}
|
58 |
+
|
59 |
+
// iterate the matched nodeset
|
60 |
+
return this.each(function() {
|
61 |
+
var opts = handleArguments(this, options, arg2);
|
62 |
+
if (opts === false)
|
63 |
+
return;
|
64 |
+
|
65 |
+
opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
|
66 |
+
|
67 |
+
// stop existing slideshow for this container (if there is one)
|
68 |
+
if (this.cycleTimeout)
|
69 |
+
clearTimeout(this.cycleTimeout);
|
70 |
+
this.cycleTimeout = this.cyclePause = 0;
|
71 |
+
|
72 |
+
var $cont = $(this);
|
73 |
+
var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
|
74 |
+
var els = $slides.get();
|
75 |
+
|
76 |
+
var opts2 = buildOptions($cont, $slides, els, opts, o);
|
77 |
+
if (opts2 === false)
|
78 |
+
return;
|
79 |
+
|
80 |
+
if (els.length < 2) {
|
81 |
+
log('terminating; too few slides: ' + els.length);
|
82 |
+
return;
|
83 |
+
}
|
84 |
+
|
85 |
+
var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
|
86 |
+
|
87 |
+
// if it's an auto slideshow, kick it off
|
88 |
+
if (startTime) {
|
89 |
+
startTime += (opts2.delay || 0);
|
90 |
+
if (startTime < 10)
|
91 |
+
startTime = 10;
|
92 |
+
debug('first timeout: ' + startTime);
|
93 |
+
this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime);
|
94 |
+
}
|
95 |
+
});
|
96 |
+
};
|
97 |
+
|
98 |
+
function triggerPause(cont, byHover, onPager) {
|
99 |
+
var opts = $(cont).data('cycle.opts');
|
100 |
+
var paused = !!cont.cyclePause;
|
101 |
+
if (paused && opts.paused)
|
102 |
+
opts.paused(cont, opts, byHover, onPager);
|
103 |
+
else if (!paused && opts.resumed)
|
104 |
+
opts.resumed(cont, opts, byHover, onPager);
|
105 |
+
}
|
106 |
+
|
107 |
+
// process the args that were passed to the plugin fn
|
108 |
+
function handleArguments(cont, options, arg2) {
|
109 |
+
if (cont.cycleStop == undefined)
|
110 |
+
cont.cycleStop = 0;
|
111 |
+
if (options === undefined || options === null)
|
112 |
+
options = {};
|
113 |
+
if (options.constructor == String) {
|
114 |
+
switch(options) {
|
115 |
+
case 'destroy':
|
116 |
+
case 'stop':
|
117 |
+
var opts = $(cont).data('cycle.opts');
|
118 |
+
if (!opts)
|
119 |
+
return false;
|
120 |
+
cont.cycleStop++; // callbacks look for change
|
121 |
+
if (cont.cycleTimeout)
|
122 |
+
clearTimeout(cont.cycleTimeout);
|
123 |
+
cont.cycleTimeout = 0;
|
124 |
+
opts.elements && $(opts.elements).stop();
|
125 |
+
$(cont).removeData('cycle.opts');
|
126 |
+
if (options == 'destroy')
|
127 |
+
destroy(opts);
|
128 |
+
return false;
|
129 |
+
case 'toggle':
|
130 |
+
cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
|
131 |
+
checkInstantResume(cont.cyclePause, arg2, cont);
|
132 |
+
triggerPause(cont);
|
133 |
+
return false;
|
134 |
+
case 'pause':
|
135 |
+
cont.cyclePause = 1;
|
136 |
+
triggerPause(cont);
|
137 |
+
return false;
|
138 |
+
case 'resume':
|
139 |
+
cont.cyclePause = 0;
|
140 |
+
checkInstantResume(false, arg2, cont);
|
141 |
+
triggerPause(cont);
|
142 |
+
return false;
|
143 |
+
case 'prev':
|
144 |
+
case 'next':
|
145 |
+
var opts = $(cont).data('cycle.opts');
|
146 |
+
if (!opts) {
|
147 |
+
log('options not found, "prev/next" ignored');
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
$.fn.cycle[options](opts);
|
151 |
+
return false;
|
152 |
+
default:
|
153 |
+
options = { fx: options };
|
154 |
+
};
|
155 |
+
return options;
|
156 |
+
}
|
157 |
+
else if (options.constructor == Number) {
|
158 |
+
// go to the requested slide
|
159 |
+
var num = options;
|
160 |
+
options = $(cont).data('cycle.opts');
|
161 |
+
if (!options) {
|
162 |
+
log('options not found, can not advance slide');
|
163 |
+
return false;
|
164 |
+
}
|
165 |
+
if (num < 0 || num >= options.elements.length) {
|
166 |
+
log('invalid slide index: ' + num);
|
167 |
+
return false;
|
168 |
+
}
|
169 |
+
options.nextSlide = num;
|
170 |
+
if (cont.cycleTimeout) {
|
171 |
+
clearTimeout(cont.cycleTimeout);
|
172 |
+
cont.cycleTimeout = 0;
|
173 |
+
}
|
174 |
+
if (typeof arg2 == 'string')
|
175 |
+
options.oneTimeFx = arg2;
|
176 |
+
go(options.elements, options, 1, num >= options.currSlide);
|
177 |
+
return false;
|
178 |
+
}
|
179 |
+
return options;
|
180 |
+
|
181 |
+
function checkInstantResume(isPaused, arg2, cont) {
|
182 |
+
if (!isPaused && arg2 === true) { // resume now!
|
183 |
+
var options = $(cont).data('cycle.opts');
|
184 |
+
if (!options) {
|
185 |
+
log('options not found, can not resume');
|
186 |
+
return false;
|
187 |
+
}
|
188 |
+
if (cont.cycleTimeout) {
|
189 |
+
clearTimeout(cont.cycleTimeout);
|
190 |
+
cont.cycleTimeout = 0;
|
191 |
+
}
|
192 |
+
go(options.elements, options, 1, !options.backwards);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
};
|
196 |
+
|
197 |
+
function removeFilter(el, opts) {
|
198 |
+
if (!$.support.opacity && opts.cleartype && el.style.filter) {
|
199 |
+
try { el.style.removeAttribute('filter'); }
|
200 |
+
catch(smother) {} // handle old opera versions
|
201 |
+
}
|
202 |
+
};
|
203 |
+
|
204 |
+
// unbind event handlers
|
205 |
+
function destroy(opts) {
|
206 |
+
if (opts.next)
|
207 |
+
$(opts.next).unbind(opts.prevNextEvent);
|
208 |
+
if (opts.prev)
|
209 |
+
$(opts.prev).unbind(opts.prevNextEvent);
|
210 |
+
|
211 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
212 |
+
$.each(opts.pagerAnchors || [], function() {
|
213 |
+
this.unbind().remove();
|
214 |
+
});
|
215 |
+
opts.pagerAnchors = null;
|
216 |
+
if (opts.destroy) // callback
|
217 |
+
opts.destroy(opts);
|
218 |
+
};
|
219 |
+
|
220 |
+
// one-time initialization
|
221 |
+
function buildOptions($cont, $slides, els, options, o) {
|
222 |
+
// support metadata plugin (v1.0 and v2.0)
|
223 |
+
var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
|
224 |
+
var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
|
225 |
+
if (meta)
|
226 |
+
opts = $.extend(opts, meta);
|
227 |
+
if (opts.autostop)
|
228 |
+
opts.countdown = opts.autostopCount || els.length;
|
229 |
+
|
230 |
+
var cont = $cont[0];
|
231 |
+
$cont.data('cycle.opts', opts);
|
232 |
+
opts.$cont = $cont;
|
233 |
+
opts.stopCount = cont.cycleStop;
|
234 |
+
opts.elements = els;
|
235 |
+
opts.before = opts.before ? [opts.before] : [];
|
236 |
+
opts.after = opts.after ? [opts.after] : [];
|
237 |
+
|
238 |
+
// push some after callbacks
|
239 |
+
if (!$.support.opacity && opts.cleartype)
|
240 |
+
opts.after.push(function() { removeFilter(this, opts); });
|
241 |
+
if (opts.continuous)
|
242 |
+
opts.after.push(function() { go(els,opts,0,!opts.backwards); });
|
243 |
+
|
244 |
+
saveOriginalOpts(opts);
|
245 |
+
|
246 |
+
// clearType corrections
|
247 |
+
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
248 |
+
clearTypeFix($slides);
|
249 |
+
|
250 |
+
// container requires non-static position so that slides can be position within
|
251 |
+
if ($cont.css('position') == 'static')
|
252 |
+
$cont.css('position', 'relative');
|
253 |
+
if (opts.width)
|
254 |
+
$cont.width(opts.width);
|
255 |
+
if (opts.height && opts.height != 'auto')
|
256 |
+
$cont.height(opts.height);
|
257 |
+
|
258 |
+
if (opts.startingSlide)
|
259 |
+
opts.startingSlide = parseInt(opts.startingSlide,10);
|
260 |
+
else if (opts.backwards)
|
261 |
+
opts.startingSlide = els.length - 1;
|
262 |
+
|
263 |
+
// if random, mix up the slide array
|
264 |
+
if (opts.random) {
|
265 |
+
opts.randomMap = [];
|
266 |
+
for (var i = 0; i < els.length; i++)
|
267 |
+
opts.randomMap.push(i);
|
268 |
+
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
269 |
+
opts.randomIndex = 1;
|
270 |
+
opts.startingSlide = opts.randomMap[1];
|
271 |
+
}
|
272 |
+
else if (opts.startingSlide >= els.length)
|
273 |
+
opts.startingSlide = 0; // catch bogus input
|
274 |
+
opts.currSlide = opts.startingSlide || 0;
|
275 |
+
var first = opts.startingSlide;
|
276 |
+
|
277 |
+
// set position and zIndex on all the slides
|
278 |
+
$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
|
279 |
+
var z;
|
280 |
+
if (opts.backwards)
|
281 |
+
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
|
282 |
+
else
|
283 |
+
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
|
284 |
+
$(this).css('z-index', z)
|
285 |
+
});
|
286 |
+
|
287 |
+
// make sure first slide is visible
|
288 |
+
$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
|
289 |
+
removeFilter(els[first], opts);
|
290 |
+
|
291 |
+
// stretch slides
|
292 |
+
if (opts.fit) {
|
293 |
+
if (!opts.aspect) {
|
294 |
+
if (opts.width)
|
295 |
+
$slides.width(opts.width);
|
296 |
+
if (opts.height && opts.height != 'auto')
|
297 |
+
$slides.height(opts.height);
|
298 |
+
} else {
|
299 |
+
$slides.each(function(){
|
300 |
+
var $slide = $(this);
|
301 |
+
var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
|
302 |
+
if( opts.width && $slide.width() != opts.width ) {
|
303 |
+
$slide.width( opts.width );
|
304 |
+
$slide.height( opts.width / ratio );
|
305 |
+
}
|
306 |
+
|
307 |
+
if( opts.height && $slide.height() < opts.height ) {
|
308 |
+
$slide.height( opts.height );
|
309 |
+
$slide.width( opts.height * ratio );
|
310 |
+
}
|
311 |
+
});
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
if (opts.center && ((!opts.fit) || opts.aspect)) {
|
316 |
+
$slides.each(function(){
|
317 |
+
var $slide = $(this);
|
318 |
+
$slide.css({
|
319 |
+
"margin-left": opts.width ?
|
320 |
+
((opts.width - $slide.width()) / 2) + "px" :
|
321 |
+
0,
|
322 |
+
"margin-top": opts.height ?
|
323 |
+
((opts.height - $slide.height()) / 2) + "px" :
|
324 |
+
0
|
325 |
+
});
|
326 |
+
});
|
327 |
+
}
|
328 |
+
|
329 |
+
if (opts.center && !opts.fit && !opts.slideResize) {
|
330 |
+
$slides.each(function(){
|
331 |
+
var $slide = $(this);
|
332 |
+
$slide.css({
|
333 |
+
"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
|
334 |
+
"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
|
335 |
+
});
|
336 |
+
});
|
337 |
+
}
|
338 |
+
|
339 |
+
// stretch container
|
340 |
+
var reshape = opts.containerResize && !$cont.innerHeight();
|
341 |
+
if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
|
342 |
+
var maxw = 0, maxh = 0;
|
343 |
+
for(var j=0; j < els.length; j++) {
|
344 |
+
var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
|
345 |
+
if (!w) w = e.offsetWidth || e.width || $e.attr('width');
|
346 |
+
if (!h) h = e.offsetHeight || e.height || $e.attr('height');
|
347 |
+
maxw = w > maxw ? w : maxw;
|
348 |
+
maxh = h > maxh ? h : maxh;
|
349 |
+
}
|
350 |
+
if (maxw > 0 && maxh > 0)
|
351 |
+
$cont.css({width:maxw+'px',height:maxh+'px'});
|
352 |
+
}
|
353 |
+
|
354 |
+
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
355 |
+
if (opts.pause)
|
356 |
+
$cont.hover(
|
357 |
+
function(){
|
358 |
+
pauseFlag = true;
|
359 |
+
this.cyclePause++;
|
360 |
+
triggerPause(cont, true);
|
361 |
+
},
|
362 |
+
function(){
|
363 |
+
pauseFlag && this.cyclePause--;
|
364 |
+
triggerPause(cont, true);
|
365 |
+
}
|
366 |
+
);
|
367 |
+
|
368 |
+
if (supportMultiTransitions(opts) === false)
|
369 |
+
return false;
|
370 |
+
|
371 |
+
// apparently a lot of people use image slideshows without height/width attributes on the images.
|
372 |
+
// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
|
373 |
+
var requeue = false;
|
374 |
+
options.requeueAttempts = options.requeueAttempts || 0;
|
375 |
+
$slides.each(function() {
|
376 |
+
// try to get height/width of each slide
|
377 |
+
var $el = $(this);
|
378 |
+
this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
|
379 |
+
this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
|
380 |
+
|
381 |
+
if ( $el.is('img') ) {
|
382 |
+
// sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
|
383 |
+
// an image is being downloaded and the markup did not include sizing info (height/width attributes);
|
384 |
+
// there seems to be some "default" sizes used in this situation
|
385 |
+
var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
|
386 |
+
var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
|
387 |
+
var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
|
388 |
+
var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
|
389 |
+
// don't requeue for images that are still loading but have a valid size
|
390 |
+
if (loadingIE || loadingFF || loadingOp || loadingOther) {
|
391 |
+
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
|
392 |
+
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
|
393 |
+
setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
|
394 |
+
requeue = true;
|
395 |
+
return false; // break each loop
|
396 |
+
}
|
397 |
+
else {
|
398 |
+
log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
|
399 |
+
}
|
400 |
+
}
|
401 |
+
}
|
402 |
+
return true;
|
403 |
+
});
|
404 |
+
|
405 |
+
if (requeue)
|
406 |
+
return false;
|
407 |
+
|
408 |
+
opts.cssBefore = opts.cssBefore || {};
|
409 |
+
opts.cssAfter = opts.cssAfter || {};
|
410 |
+
opts.cssFirst = opts.cssFirst || {};
|
411 |
+
opts.animIn = opts.animIn || {};
|
412 |
+
opts.animOut = opts.animOut || {};
|
413 |
+
|
414 |
+
$slides.not(':eq('+first+')').css(opts.cssBefore);
|
415 |
+
$($slides[first]).css(opts.cssFirst);
|
416 |
+
|
417 |
+
if (opts.timeout) {
|
418 |
+
opts.timeout = parseInt(opts.timeout,10);
|
419 |
+
// ensure that timeout and speed settings are sane
|
420 |
+
if (opts.speed.constructor == String)
|
421 |
+
opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
|
422 |
+
if (!opts.sync)
|
423 |
+
opts.speed = opts.speed / 2;
|
424 |
+
|
425 |
+
var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
|
426 |
+
while((opts.timeout - opts.speed) < buffer) // sanitize timeout
|
427 |
+
opts.timeout += opts.speed;
|
428 |
+
}
|
429 |
+
if (opts.easing)
|
430 |
+
opts.easeIn = opts.easeOut = opts.easing;
|
431 |
+
if (!opts.speedIn)
|
432 |
+
opts.speedIn = opts.speed;
|
433 |
+
if (!opts.speedOut)
|
434 |
+
opts.speedOut = opts.speed;
|
435 |
+
|
436 |
+
opts.slideCount = els.length;
|
437 |
+
opts.currSlide = opts.lastSlide = first;
|
438 |
+
if (opts.random) {
|
439 |
+
if (++opts.randomIndex == els.length)
|
440 |
+
opts.randomIndex = 0;
|
441 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
442 |
+
}
|
443 |
+
else if (opts.backwards)
|
444 |
+
opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1;
|
445 |
+
else
|
446 |
+
opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
|
447 |
+
|
448 |
+
// run transition init fn
|
449 |
+
if (!opts.multiFx) {
|
450 |
+
var init = $.fn.cycle.transitions[opts.fx];
|
451 |
+
if ($.isFunction(init))
|
452 |
+
init($cont, $slides, opts);
|
453 |
+
else if (opts.fx != 'custom' && !opts.multiFx) {
|
454 |
+
log('unknown transition: ' + opts.fx,'; slideshow terminating');
|
455 |
+
return false;
|
456 |
+
}
|
457 |
+
}
|
458 |
+
|
459 |
+
// fire artificial events
|
460 |
+
var e0 = $slides[first];
|
461 |
+
if (!opts.skipInitializationCallbacks) {
|
462 |
+
if (opts.before.length)
|
463 |
+
opts.before[0].apply(e0, [e0, e0, opts, true]);
|
464 |
+
if (opts.after.length)
|
465 |
+
opts.after[0].apply(e0, [e0, e0, opts, true]);
|
466 |
+
}
|
467 |
+
if (opts.next)
|
468 |
+
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});
|
469 |
+
if (opts.prev)
|
470 |
+
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});
|
471 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
472 |
+
buildPager(els,opts);
|
473 |
+
|
474 |
+
exposeAddSlide(opts, els);
|
475 |
+
|
476 |
+
return opts;
|
477 |
+
};
|
478 |
+
|
479 |
+
// save off original opts so we can restore after clearing state
|
480 |
+
function saveOriginalOpts(opts) {
|
481 |
+
opts.original = { before: [], after: [] };
|
482 |
+
opts.original.cssBefore = $.extend({}, opts.cssBefore);
|
483 |
+
opts.original.cssAfter = $.extend({}, opts.cssAfter);
|
484 |
+
opts.original.animIn = $.extend({}, opts.animIn);
|
485 |
+
opts.original.animOut = $.extend({}, opts.animOut);
|
486 |
+
$.each(opts.before, function() { opts.original.before.push(this); });
|
487 |
+
$.each(opts.after, function() { opts.original.after.push(this); });
|
488 |
+
};
|
489 |
+
|
490 |
+
function supportMultiTransitions(opts) {
|
491 |
+
var i, tx, txs = $.fn.cycle.transitions;
|
492 |
+
// look for multiple effects
|
493 |
+
if (opts.fx.indexOf(',') > 0) {
|
494 |
+
opts.multiFx = true;
|
495 |
+
opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
|
496 |
+
// discard any bogus effect names
|
497 |
+
for (i=0; i < opts.fxs.length; i++) {
|
498 |
+
var fx = opts.fxs[i];
|
499 |
+
tx = txs[fx];
|
500 |
+
if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
|
501 |
+
log('discarding unknown transition: ',fx);
|
502 |
+
opts.fxs.splice(i,1);
|
503 |
+
i--;
|
504 |
+
}
|
505 |
+
}
|
506 |
+
// if we have an empty list then we threw everything away!
|
507 |
+
if (!opts.fxs.length) {
|
508 |
+
log('No valid transitions named; slideshow terminating.');
|
509 |
+
return false;
|
510 |
+
}
|
511 |
+
}
|
512 |
+
else if (opts.fx == 'all') { // auto-gen the list of transitions
|
513 |
+
opts.multiFx = true;
|
514 |
+
opts.fxs = [];
|
515 |
+
for (p in txs) {
|
516 |
+
tx = txs[p];
|
517 |
+
if (txs.hasOwnProperty(p) && $.isFunction(tx))
|
518 |
+
opts.fxs.push(p);
|
519 |
+
}
|
520 |
+
}
|
521 |
+
if (opts.multiFx && opts.randomizeEffects) {
|
522 |
+
// munge the fxs array to make effect selection random
|
523 |
+
var r1 = Math.floor(Math.random() * 20) + 30;
|
524 |
+
for (i = 0; i < r1; i++) {
|
525 |
+
var r2 = Math.floor(Math.random() * opts.fxs.length);
|
526 |
+
opts.fxs.push(opts.fxs.splice(r2,1)[0]);
|
527 |
+
}
|
528 |
+
debug('randomized fx sequence: ',opts.fxs);
|
529 |
+
}
|
530 |
+
return true;
|
531 |
+
};
|
532 |
+
|
533 |
+
// provide a mechanism for adding slides after the slideshow has started
|
534 |
+
function exposeAddSlide(opts, els) {
|
535 |
+
opts.addSlide = function(newSlide, prepend) {
|
536 |
+
var $s = $(newSlide), s = $s[0];
|
537 |
+
if (!opts.autostopCount)
|
538 |
+
opts.countdown++;
|
539 |
+
els[prepend?'unshift':'push'](s);
|
540 |
+
if (opts.els)
|
541 |
+
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
|
542 |
+
opts.slideCount = els.length;
|
543 |
+
|
544 |
+
$s.css('position','absolute');
|
545 |
+
$s[prepend?'prependTo':'appendTo'](opts.$cont);
|
546 |
+
|
547 |
+
if (prepend) {
|
548 |
+
opts.currSlide++;
|
549 |
+
opts.nextSlide++;
|
550 |
+
}
|
551 |
+
|
552 |
+
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
553 |
+
clearTypeFix($s);
|
554 |
+
|
555 |
+
if (opts.fit && opts.width)
|
556 |
+
$s.width(opts.width);
|
557 |
+
if (opts.fit && opts.height && opts.height != 'auto')
|
558 |
+
$s.height(opts.height);
|
559 |
+
s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
|
560 |
+
s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
|
561 |
+
|
562 |
+
$s.css(opts.cssBefore);
|
563 |
+
|
564 |
+
if (opts.pager || opts.pagerAnchorBuilder)
|
565 |
+
$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
|
566 |
+
|
567 |
+
if ($.isFunction(opts.onAddSlide))
|
568 |
+
opts.onAddSlide($s);
|
569 |
+
else
|
570 |
+
$s.hide(); // default behavior
|
571 |
+
};
|
572 |
+
}
|
573 |
+
|
574 |
+
// reset internal state; we do this on every pass in order to support multiple effects
|
575 |
+
$.fn.cycle.resetState = function(opts, fx) {
|
576 |
+
fx = fx || opts.fx;
|
577 |
+
opts.before = []; opts.after = [];
|
578 |
+
opts.cssBefore = $.extend({}, opts.original.cssBefore);
|
579 |
+
opts.cssAfter = $.extend({}, opts.original.cssAfter);
|
580 |
+
opts.animIn = $.extend({}, opts.original.animIn);
|
581 |
+
opts.animOut = $.extend({}, opts.original.animOut);
|
582 |
+
opts.fxFn = null;
|
583 |
+
$.each(opts.original.before, function() { opts.before.push(this); });
|
584 |
+
$.each(opts.original.after, function() { opts.after.push(this); });
|
585 |
+
|
586 |
+
// re-init
|
587 |
+
var init = $.fn.cycle.transitions[fx];
|
588 |
+
if ($.isFunction(init))
|
589 |
+
init(opts.$cont, $(opts.elements), opts);
|
590 |
+
};
|
591 |
+
|
592 |
+
// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
|
593 |
+
function go(els, opts, manual, fwd) {
|
594 |
+
// opts.busy is true if we're in the middle of an animation
|
595 |
+
if (manual && opts.busy && opts.manualTrump) {
|
596 |
+
// let manual transitions requests trump active ones
|
597 |
+
debug('manualTrump in go(), stopping active transition');
|
598 |
+
$(els).stop(true,true);
|
599 |
+
opts.busy = 0;
|
600 |
+
}
|
601 |
+
// don't begin another timeout-based transition if there is one active
|
602 |
+
if (opts.busy) {
|
603 |
+
debug('transition active, ignoring new tx request');
|
604 |
+
return;
|
605 |
+
}
|
606 |
+
|
607 |
+
var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
|
608 |
+
|
609 |
+
// stop cycling if we have an outstanding stop request
|
610 |
+
if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
|
611 |
+
return;
|
612 |
+
|
613 |
+
// check to see if we should stop cycling based on autostop options
|
614 |
+
if (!manual && !p.cyclePause && !opts.bounce &&
|
615 |
+
((opts.autostop && (--opts.countdown <= 0)) ||
|
616 |
+
(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
|
617 |
+
if (opts.end)
|
618 |
+
opts.end(opts);
|
619 |
+
return;
|
620 |
+
}
|
621 |
+
|
622 |
+
// if slideshow is paused, only transition on a manual trigger
|
623 |
+
var changed = false;
|
624 |
+
if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
|
625 |
+
changed = true;
|
626 |
+
var fx = opts.fx;
|
627 |
+
// keep trying to get the slide size if we don't have it yet
|
628 |
+
curr.cycleH = curr.cycleH || $(curr).height();
|
629 |
+
curr.cycleW = curr.cycleW || $(curr).width();
|
630 |
+
next.cycleH = next.cycleH || $(next).height();
|
631 |
+
next.cycleW = next.cycleW || $(next).width();
|
632 |
+
|
633 |
+
// support multiple transition types
|
634 |
+
if (opts.multiFx) {
|
635 |
+
if (fwd && (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length))
|
636 |
+
opts.lastFx = 0;
|
637 |
+
else if (!fwd && (opts.lastFx == undefined || --opts.lastFx < 0))
|
638 |
+
opts.lastFx = opts.fxs.length - 1;
|
639 |
+
fx = opts.fxs[opts.lastFx];
|
640 |
+
}
|
641 |
+
|
642 |
+
// one-time fx overrides apply to: $('div').cycle(3,'zoom');
|
643 |
+
if (opts.oneTimeFx) {
|
644 |
+
fx = opts.oneTimeFx;
|
645 |
+
opts.oneTimeFx = null;
|
646 |
+
}
|
647 |
+
|
648 |
+
$.fn.cycle.resetState(opts, fx);
|
649 |
+
|
650 |
+
// run the before callbacks
|
651 |
+
if (opts.before.length)
|
652 |
+
$.each(opts.before, function(i,o) {
|
653 |
+
if (p.cycleStop != opts.stopCount) return;
|
654 |
+
o.apply(next, [curr, next, opts, fwd]);
|
655 |
+
});
|
656 |
+
|
657 |
+
// stage the after callacks
|
658 |
+
var after = function() {
|
659 |
+
opts.busy = 0;
|
660 |
+
$.each(opts.after, function(i,o) {
|
661 |
+
if (p.cycleStop != opts.stopCount) return;
|
662 |
+
o.apply(next, [curr, next, opts, fwd]);
|
663 |
+
});
|
664 |
+
if (!p.cycleStop) {
|
665 |
+
// queue next transition
|
666 |
+
queueNext();
|
667 |
+
}
|
668 |
+
};
|
669 |
+
|
670 |
+
debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
|
671 |
+
|
672 |
+
// get ready to perform the transition
|
673 |
+
opts.busy = 1;
|
674 |
+
if (opts.fxFn) // fx function provided?
|
675 |
+
opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
676 |
+
else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
|
677 |
+
$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
678 |
+
else
|
679 |
+
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
680 |
+
}
|
681 |
+
|
682 |
+
if (changed || opts.nextSlide == opts.currSlide) {
|
683 |
+
// calculate the next slide
|
684 |
+
opts.lastSlide = opts.currSlide;
|
685 |
+
if (opts.random) {
|
686 |
+
opts.currSlide = opts.nextSlide;
|
687 |
+
if (++opts.randomIndex == els.length)
|
688 |
+
opts.randomIndex = 0;
|
689 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
690 |
+
if (opts.nextSlide == opts.currSlide)
|
691 |
+
opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
|
692 |
+
}
|
693 |
+
else if (opts.backwards) {
|
694 |
+
var roll = (opts.nextSlide - 1) < 0;
|
695 |
+
if (roll && opts.bounce) {
|
696 |
+
opts.backwards = !opts.backwards;
|
697 |
+
opts.nextSlide = 1;
|
698 |
+
opts.currSlide = 0;
|
699 |
+
}
|
700 |
+
else {
|
701 |
+
opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
|
702 |
+
opts.currSlide = roll ? 0 : opts.nextSlide+1;
|
703 |
+
}
|
704 |
+
}
|
705 |
+
else { // sequence
|
706 |
+
var roll = (opts.nextSlide + 1) == els.length;
|
707 |
+
if (roll && opts.bounce) {
|
708 |
+
opts.backwards = !opts.backwards;
|
709 |
+
opts.nextSlide = els.length-2;
|
710 |
+
opts.currSlide = els.length-1;
|
711 |
+
}
|
712 |
+
else {
|
713 |
+
opts.nextSlide = roll ? 0 : opts.nextSlide+1;
|
714 |
+
opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
|
715 |
+
}
|
716 |
+
}
|
717 |
+
}
|
718 |
+
if (changed && opts.pager)
|
719 |
+
opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
|
720 |
+
|
721 |
+
function queueNext() {
|
722 |
+
// stage the next transition
|
723 |
+
var ms = 0, timeout = opts.timeout;
|
724 |
+
if (opts.timeout && !opts.continuous) {
|
725 |
+
ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
|
726 |
+
if (opts.fx == 'shuffle')
|
727 |
+
ms -= opts.speedOut;
|
728 |
+
}
|
729 |
+
else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
|
730 |
+
ms = 10;
|
731 |
+
if (ms > 0)
|
732 |
+
p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms);
|
733 |
+
}
|
734 |
+
};
|
735 |
+
|
736 |
+
// invoked after transition
|
737 |
+
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
|
738 |
+
$(pager).each(function() {
|
739 |
+
$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
|
740 |
+
});
|
741 |
+
};
|
742 |
+
|
743 |
+
// calculate timeout value for current transition
|
744 |
+
function getTimeout(curr, next, opts, fwd) {
|
745 |
+
if (opts.timeoutFn) {
|
746 |
+
// call user provided calc fn
|
747 |
+
var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
|
748 |
+
while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
|
749 |
+
t += opts.speed;
|
750 |
+
debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
|
751 |
+
if (t !== false)
|
752 |
+
return t;
|
753 |
+
}
|
754 |
+
return opts.timeout;
|
755 |
+
};
|
756 |
+
|
757 |
+
// expose next/prev function, caller must pass in state
|
758 |
+
$.fn.cycle.next = function(opts) { advance(opts,1); };
|
759 |
+
$.fn.cycle.prev = function(opts) { advance(opts,0);};
|
760 |
+
|
761 |
+
// advance slide forward or back
|
762 |
+
function advance(opts, moveForward) {
|
763 |
+
var val = moveForward ? 1 : -1;
|
764 |
+
var els = opts.elements;
|
765 |
+
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
766 |
+
if (timeout) {
|
767 |
+
clearTimeout(timeout);
|
768 |
+
p.cycleTimeout = 0;
|
769 |
+
}
|
770 |
+
if (opts.random && val < 0) {
|
771 |
+
// move back to the previously display slide
|
772 |
+
opts.randomIndex--;
|
773 |
+
if (--opts.randomIndex == -2)
|
774 |
+
opts.randomIndex = els.length-2;
|
775 |
+
else if (opts.randomIndex == -1)
|
776 |
+
opts.randomIndex = els.length-1;
|
777 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
778 |
+
}
|
779 |
+
else if (opts.random) {
|
780 |
+
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
781 |
+
}
|
782 |
+
else {
|
783 |
+
opts.nextSlide = opts.currSlide + val;
|
784 |
+
if (opts.nextSlide < 0) {
|
785 |
+
if (opts.nowrap) return false;
|
786 |
+
opts.nextSlide = els.length - 1;
|
787 |
+
}
|
788 |
+
else if (opts.nextSlide >= els.length) {
|
789 |
+
if (opts.nowrap) return false;
|
790 |
+
opts.nextSlide = 0;
|
791 |
+
}
|
792 |
+
}
|
793 |
+
|
794 |
+
var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
|
795 |
+
if ($.isFunction(cb))
|
796 |
+
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
|
797 |
+
go(els, opts, 1, moveForward);
|
798 |
+
return false;
|
799 |
+
};
|
800 |
+
|
801 |
+
function buildPager(els, opts) {
|
802 |
+
var $p = $(opts.pager);
|
803 |
+
$.each(els, function(i,o) {
|
804 |
+
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
|
805 |
+
});
|
806 |
+
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
|
807 |
+
};
|
808 |
+
|
809 |
+
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
810 |
+
var a;
|
811 |
+
if ($.isFunction(opts.pagerAnchorBuilder)) {
|
812 |
+
a = opts.pagerAnchorBuilder(i,el);
|
813 |
+
debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
|
814 |
+
}
|
815 |
+
else
|
816 |
+
a = '<a href="#">'+(i+1)+'</a>';
|
817 |
+
|
818 |
+
if (!a)
|
819 |
+
return;
|
820 |
+
var $a = $(a);
|
821 |
+
// don't reparent if anchor is in the dom
|
822 |
+
if ($a.parents('body').length === 0) {
|
823 |
+
var arr = [];
|
824 |
+
if ($p.length > 1) {
|
825 |
+
$p.each(function() {
|
826 |
+
var $clone = $a.clone(true);
|
827 |
+
$(this).append($clone);
|
828 |
+
arr.push($clone[0]);
|
829 |
+
});
|
830 |
+
$a = $(arr);
|
831 |
+
}
|
832 |
+
else {
|
833 |
+
$a.appendTo($p);
|
834 |
+
}
|
835 |
+
}
|
836 |
+
|
837 |
+
opts.pagerAnchors = opts.pagerAnchors || [];
|
838 |
+
opts.pagerAnchors.push($a);
|
839 |
+
|
840 |
+
var pagerFn = function(e) {
|
841 |
+
e.preventDefault();
|
842 |
+
opts.nextSlide = i;
|
843 |
+
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
844 |
+
if (timeout) {
|
845 |
+
clearTimeout(timeout);
|
846 |
+
p.cycleTimeout = 0;
|
847 |
+
}
|
848 |
+
var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
|
849 |
+
if ($.isFunction(cb))
|
850 |
+
cb(opts.nextSlide, els[opts.nextSlide]);
|
851 |
+
go(els,opts,1,opts.currSlide < i); // trigger the trans
|
852 |
+
// return false; // <== allow bubble
|
853 |
+
}
|
854 |
+
|
855 |
+
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
|
856 |
+
$a.hover(pagerFn, function(){/* no-op */} );
|
857 |
+
}
|
858 |
+
else {
|
859 |
+
$a.bind(opts.pagerEvent, pagerFn);
|
860 |
+
}
|
861 |
+
|
862 |
+
if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
|
863 |
+
$a.bind('click.cycle', function(){return false;}); // suppress click
|
864 |
+
|
865 |
+
var cont = opts.$cont[0];
|
866 |
+
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
867 |
+
if (opts.pauseOnPagerHover) {
|
868 |
+
$a.hover(
|
869 |
+
function() {
|
870 |
+
pauseFlag = true;
|
871 |
+
cont.cyclePause++;
|
872 |
+
triggerPause(cont,true,true);
|
873 |
+
}, function() {
|
874 |
+
pauseFlag && cont.cyclePause--;
|
875 |
+
triggerPause(cont,true,true);
|
876 |
+
}
|
877 |
+
);
|
878 |
+
}
|
879 |
+
};
|
880 |
+
|
881 |
+
// helper fn to calculate the number of slides between the current and the next
|
882 |
+
$.fn.cycle.hopsFromLast = function(opts, fwd) {
|
883 |
+
var hops, l = opts.lastSlide, c = opts.currSlide;
|
884 |
+
if (fwd)
|
885 |
+
hops = c > l ? c - l : opts.slideCount - l;
|
886 |
+
else
|
887 |
+
hops = c < l ? l - c : l + opts.slideCount - c;
|
888 |
+
return hops;
|
889 |
+
};
|
890 |
+
|
891 |
+
// fix clearType problems in ie6 by setting an explicit bg color
|
892 |
+
// (otherwise text slides look horrible during a fade transition)
|
893 |
+
function clearTypeFix($slides) {
|
894 |
+
debug('applying clearType background-color hack');
|
895 |
+
function hex(s) {
|
896 |
+
s = parseInt(s,10).toString(16);
|
897 |
+
return s.length < 2 ? '0'+s : s;
|
898 |
+
};
|
899 |
+
function getBg(e) {
|
900 |
+
for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
|
901 |
+
var v = $.css(e,'background-color');
|
902 |
+
if (v && v.indexOf('rgb') >= 0 ) {
|
903 |
+
var rgb = v.match(/\d+/g);
|
904 |
+
return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
|
905 |
+
}
|
906 |
+
if (v && v != 'transparent')
|
907 |
+
return v;
|
908 |
+
}
|
909 |
+
return '#ffffff';
|
910 |
+
};
|
911 |
+
$slides.each(function() { $(this).css('background-color', getBg(this)); });
|
912 |
+
};
|
913 |
+
|
914 |
+
// reset common props before the next transition
|
915 |
+
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
916 |
+
$(opts.elements).not(curr).hide();
|
917 |
+
if (typeof opts.cssBefore.opacity == 'undefined')
|
918 |
+
opts.cssBefore.opacity = 1;
|
919 |
+
opts.cssBefore.display = 'block';
|
920 |
+
if (opts.slideResize && w !== false && next.cycleW > 0)
|
921 |
+
opts.cssBefore.width = next.cycleW;
|
922 |
+
if (opts.slideResize && h !== false && next.cycleH > 0)
|
923 |
+
opts.cssBefore.height = next.cycleH;
|
924 |
+
opts.cssAfter = opts.cssAfter || {};
|
925 |
+
opts.cssAfter.display = 'none';
|
926 |
+
$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
|
927 |
+
$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
|
928 |
+
};
|
929 |
+
|
930 |
+
// the actual fn for effecting a transition
|
931 |
+
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
932 |
+
var $l = $(curr), $n = $(next);
|
933 |
+
var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
|
934 |
+
$n.css(opts.cssBefore);
|
935 |
+
if (speedOverride) {
|
936 |
+
if (typeof speedOverride == 'number')
|
937 |
+
speedIn = speedOut = speedOverride;
|
938 |
+
else
|
939 |
+
speedIn = speedOut = 1;
|
940 |
+
easeIn = easeOut = null;
|
941 |
+
}
|
942 |
+
var fn = function() {
|
943 |
+
$n.animate(opts.animIn, speedIn, easeIn, function() {
|
944 |
+
cb();
|
945 |
+
});
|
946 |
+
};
|
947 |
+
$l.animate(opts.animOut, speedOut, easeOut, function() {
|
948 |
+
$l.css(opts.cssAfter);
|
949 |
+
if (!opts.sync)
|
950 |
+
fn();
|
951 |
+
});
|
952 |
+
if (opts.sync) fn();
|
953 |
+
};
|
954 |
+
|
955 |
+
// transition definitions - only fade is defined here, transition pack defines the rest
|
956 |
+
$.fn.cycle.transitions = {
|
957 |
+
fade: function($cont, $slides, opts) {
|
958 |
+
$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
|
959 |
+
opts.before.push(function(curr,next,opts) {
|
960 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
961 |
+
opts.cssBefore.opacity = 0;
|
962 |
+
});
|
963 |
+
opts.animIn = { opacity: 1 };
|
964 |
+
opts.animOut = { opacity: 0 };
|
965 |
+
opts.cssBefore = { top: 0, left: 0 };
|
966 |
+
}
|
967 |
+
};
|
968 |
+
|
969 |
+
$.fn.cycle.ver = function() { return ver; };
|
970 |
+
|
971 |
+
// override these globally if you like (they are all optional)
|
972 |
+
$.fn.cycle.defaults = {
|
973 |
+
activePagerClass: 'activeSlide', // class name used for the active pager link
|
974 |
+
after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
975 |
+
allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
|
976 |
+
animIn: null, // properties that define how the slide animates in
|
977 |
+
animOut: null, // properties that define how the slide animates out
|
978 |
+
aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
|
979 |
+
autostop: 0, // true to end slideshow after X transitions (where X == slide count)
|
980 |
+
autostopCount: 0, // number of transitions (optionally used with autostop to define X)
|
981 |
+
backwards: false, // true to start slideshow at last slide and move backwards through the stack
|
982 |
+
before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
983 |
+
center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
|
984 |
+
cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
|
985 |
+
cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
|
986 |
+
containerResize: 1, // resize container to fit largest slide
|
987 |
+
continuous: 0, // true to start next transition immediately after current one completes
|
988 |
+
cssAfter: null, // properties that defined the state of the slide after transitioning out
|
989 |
+
cssBefore: null, // properties that define the initial state of the slide before transitioning in
|
990 |
+
delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
|
991 |
+
easeIn: null, // easing for "in" transition
|
992 |
+
easeOut: null, // easing for "out" transition
|
993 |
+
easing: null, // easing method for both in and out transitions
|
994 |
+
end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
|
995 |
+
fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
|
996 |
+
fit: 0, // force slides to fit container
|
997 |
+
fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
|
998 |
+
fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
|
999 |
+
height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
|
1000 |
+
manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
|
1001 |
+
metaAttr: 'cycle',// data- attribute that holds the option data for the slideshow
|
1002 |
+
next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
|
1003 |
+
nowrap: 0, // true to prevent slideshow from wrapping
|
1004 |
+
onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
|
1005 |
+
onPrevNextEvent: null,// callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
|
1006 |
+
pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
|
1007 |
+
pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
|
1008 |
+
pagerEvent: 'click.cycle', // name of event which drives the pager navigation
|
1009 |
+
pause: 0, // true to enable "pause on hover"
|
1010 |
+
pauseOnPagerHover: 0, // true to pause when hovering over pager link
|
1011 |
+
prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
|
1012 |
+
prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide
|
1013 |
+
random: 0, // true for random, false for sequence (not applicable to shuffle fx)
|
1014 |
+
randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
|
1015 |
+
requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
|
1016 |
+
requeueTimeout: 250, // ms delay for requeue
|
1017 |
+
rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
|
1018 |
+
shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
|
1019 |
+
skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
|
1020 |
+
slideExpr: null, // expression for selecting slides (if something other than all children is required)
|
1021 |
+
slideResize: 1, // force slide width/height to fixed size before every transition
|
1022 |
+
speed: 1000, // speed of the transition (any valid fx speed value)
|
1023 |
+
speedIn: null, // speed of the 'in' transition
|
1024 |
+
speedOut: null, // speed of the 'out' transition
|
1025 |
+
startingSlide: 0, // zero-based index of the first slide to be displayed
|
1026 |
+
sync: 1, // true if in/out transitions should occur simultaneously
|
1027 |
+
timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
|
1028 |
+
timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1029 |
+
updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
|
1030 |
+
width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
|
1031 |
+
};
|
1032 |
+
|
1033 |
+
})(jQuery);
|
1034 |
+
|
1035 |
+
|
1036 |
+
/*!
|
1037 |
+
* jQuery Cycle Plugin Transition Definitions
|
1038 |
+
* This script is a plugin for the jQuery Cycle Plugin
|
1039 |
+
* Examples and documentation at: http://malsup.com/jquery/cycle/
|
1040 |
+
* Copyright (c) 2007-2010 M. Alsup
|
1041 |
+
* Version: 2.73
|
1042 |
+
* Dual licensed under the MIT and GPL licenses:
|
1043 |
+
* http://www.opensource.org/licenses/mit-license.php
|
1044 |
+
* http://www.gnu.org/licenses/gpl.html
|
1045 |
+
*/
|
1046 |
+
(function($) {
|
1047 |
+
|
1048 |
+
//
|
1049 |
+
// These functions define slide initialization and properties for the named
|
1050 |
+
// transitions. To save file size feel free to remove any of these that you
|
1051 |
+
// don't need.
|
1052 |
+
//
|
1053 |
+
$.fn.cycle.transitions.none = function($cont, $slides, opts) {
|
1054 |
+
opts.fxFn = function(curr,next,opts,after){
|
1055 |
+
$(next).show();
|
1056 |
+
$(curr).hide();
|
1057 |
+
after();
|
1058 |
+
};
|
1059 |
+
};
|
1060 |
+
|
1061 |
+
// not a cross-fade, fadeout only fades out the top slide
|
1062 |
+
$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
|
1063 |
+
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
|
1064 |
+
opts.before.push(function(curr,next,opts,w,h,rev) {
|
1065 |
+
$(curr).css('zIndex',opts.slideCount + (!rev === true ? 1 : 0));
|
1066 |
+
$(next).css('zIndex',opts.slideCount + (!rev === true ? 0 : 1));
|
1067 |
+
});
|
1068 |
+
opts.animIn.opacity = 1;
|
1069 |
+
opts.animOut.opacity = 0;
|
1070 |
+
opts.cssBefore.opacity = 1;
|
1071 |
+
opts.cssBefore.display = 'block';
|
1072 |
+
opts.cssAfter.zIndex = 0;
|
1073 |
+
};
|
1074 |
+
|
1075 |
+
// scrollUp/Down/Left/Right
|
1076 |
+
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
|
1077 |
+
$cont.css('overflow','hidden');
|
1078 |
+
opts.before.push($.fn.cycle.commonReset);
|
1079 |
+
var h = $cont.height();
|
1080 |
+
opts.cssBefore.top = h;
|
1081 |
+
opts.cssBefore.left = 0;
|
1082 |
+
opts.cssFirst.top = 0;
|
1083 |
+
opts.animIn.top = 0;
|
1084 |
+
opts.animOut.top = -h;
|
1085 |
+
};
|
1086 |
+
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
|
1087 |
+
$cont.css('overflow','hidden');
|
1088 |
+
opts.before.push($.fn.cycle.commonReset);
|
1089 |
+
var h = $cont.height();
|
1090 |
+
opts.cssFirst.top = 0;
|
1091 |
+
opts.cssBefore.top = -h;
|
1092 |
+
opts.cssBefore.left = 0;
|
1093 |
+
opts.animIn.top = 0;
|
1094 |
+
opts.animOut.top = h;
|
1095 |
+
};
|
1096 |
+
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
|
1097 |
+
$cont.css('overflow','hidden');
|
1098 |
+
opts.before.push($.fn.cycle.commonReset);
|
1099 |
+
var w = $cont.width();
|
1100 |
+
opts.cssFirst.left = 0;
|
1101 |
+
opts.cssBefore.left = w;
|
1102 |
+
opts.cssBefore.top = 0;
|
1103 |
+
opts.animIn.left = 0;
|
1104 |
+
opts.animOut.left = 0-w;
|
1105 |
+
};
|
1106 |
+
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
|
1107 |
+
$cont.css('overflow','hidden');
|
1108 |
+
opts.before.push($.fn.cycle.commonReset);
|
1109 |
+
var w = $cont.width();
|
1110 |
+
opts.cssFirst.left = 0;
|
1111 |
+
opts.cssBefore.left = -w;
|
1112 |
+
opts.cssBefore.top = 0;
|
1113 |
+
opts.animIn.left = 0;
|
1114 |
+
opts.animOut.left = w;
|
1115 |
+
};
|
1116 |
+
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
|
1117 |
+
$cont.css('overflow','hidden').width();
|
1118 |
+
opts.before.push(function(curr, next, opts, fwd) {
|
1119 |
+
if (opts.rev)
|
1120 |
+
fwd = !fwd;
|
1121 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1122 |
+
opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
|
1123 |
+
opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
|
1124 |
+
});
|
1125 |
+
opts.cssFirst.left = 0;
|
1126 |
+
opts.cssBefore.top = 0;
|
1127 |
+
opts.animIn.left = 0;
|
1128 |
+
opts.animOut.top = 0;
|
1129 |
+
};
|
1130 |
+
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
|
1131 |
+
$cont.css('overflow','hidden');
|
1132 |
+
opts.before.push(function(curr, next, opts, fwd) {
|
1133 |
+
if (opts.rev)
|
1134 |
+
fwd = !fwd;
|
1135 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1136 |
+
opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
|
1137 |
+
opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
|
1138 |
+
});
|
1139 |
+
opts.cssFirst.top = 0;
|
1140 |
+
opts.cssBefore.left = 0;
|
1141 |
+
opts.animIn.top = 0;
|
1142 |
+
opts.animOut.left = 0;
|
1143 |
+
};
|
1144 |
+
|
1145 |
+
// slideX/slideY
|
1146 |
+
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
|
1147 |
+
opts.before.push(function(curr, next, opts) {
|
1148 |
+
$(opts.elements).not(curr).hide();
|
1149 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1150 |
+
opts.animIn.width = next.cycleW;
|
1151 |
+
});
|
1152 |
+
opts.cssBefore.left = 0;
|
1153 |
+
opts.cssBefore.top = 0;
|
1154 |
+
opts.cssBefore.width = 0;
|
1155 |
+
opts.animIn.width = 'show';
|
1156 |
+
opts.animOut.width = 0;
|
1157 |
+
};
|
1158 |
+
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
|
1159 |
+
opts.before.push(function(curr, next, opts) {
|
1160 |
+
$(opts.elements).not(curr).hide();
|
1161 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1162 |
+
opts.animIn.height = next.cycleH;
|
1163 |
+
});
|
1164 |
+
opts.cssBefore.left = 0;
|
1165 |
+
opts.cssBefore.top = 0;
|
1166 |
+
opts.cssBefore.height = 0;
|
1167 |
+
opts.animIn.height = 'show';
|
1168 |
+
opts.animOut.height = 0;
|
1169 |
+
};
|
1170 |
+
|
1171 |
+
// shuffle
|
1172 |
+
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
|
1173 |
+
var i, w = $cont.css('overflow', 'visible').width();
|
1174 |
+
$slides.css({left: 0, top: 0});
|
1175 |
+
opts.before.push(function(curr,next,opts) {
|
1176 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1177 |
+
});
|
1178 |
+
// only adjust speed once!
|
1179 |
+
if (!opts.speedAdjusted) {
|
1180 |
+
opts.speed = opts.speed / 2; // shuffle has 2 transitions
|
1181 |
+
opts.speedAdjusted = true;
|
1182 |
+
}
|
1183 |
+
opts.random = 0;
|
1184 |
+
opts.shuffle = opts.shuffle || {left:-w, top:15};
|
1185 |
+
opts.els = [];
|
1186 |
+
for (i=0; i < $slides.length; i++)
|
1187 |
+
opts.els.push($slides[i]);
|
1188 |
+
|
1189 |
+
for (i=0; i < opts.currSlide; i++)
|
1190 |
+
opts.els.push(opts.els.shift());
|
1191 |
+
|
1192 |
+
// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
|
1193 |
+
opts.fxFn = function(curr, next, opts, cb, fwd) {
|
1194 |
+
if (opts.rev)
|
1195 |
+
fwd = !fwd;
|
1196 |
+
var $el = fwd ? $(curr) : $(next);
|
1197 |
+
$(next).css(opts.cssBefore);
|
1198 |
+
var count = opts.slideCount;
|
1199 |
+
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
|
1200 |
+
var hops = $.fn.cycle.hopsFromLast(opts, fwd);
|
1201 |
+
for (var k=0; k < hops; k++)
|
1202 |
+
fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
|
1203 |
+
if (fwd) {
|
1204 |
+
for (var i=0, len=opts.els.length; i < len; i++)
|
1205 |
+
$(opts.els[i]).css('z-index', len-i+count);
|
1206 |
+
}
|
1207 |
+
else {
|
1208 |
+
var z = $(curr).css('z-index');
|
1209 |
+
$el.css('z-index', parseInt(z,10)+1+count);
|
1210 |
+
}
|
1211 |
+
$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
|
1212 |
+
$(fwd ? this : curr).hide();
|
1213 |
+
if (cb) cb();
|
1214 |
+
});
|
1215 |
+
});
|
1216 |
+
};
|
1217 |
+
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1218 |
+
};
|
1219 |
+
|
1220 |
+
// turnUp/Down/Left/Right
|
1221 |
+
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
|
1222 |
+
opts.before.push(function(curr, next, opts) {
|
1223 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1224 |
+
opts.cssBefore.top = next.cycleH;
|
1225 |
+
opts.animIn.height = next.cycleH;
|
1226 |
+
opts.animOut.width = next.cycleW;
|
1227 |
+
});
|
1228 |
+
opts.cssFirst.top = 0;
|
1229 |
+
opts.cssBefore.left = 0;
|
1230 |
+
opts.cssBefore.height = 0;
|
1231 |
+
opts.animIn.top = 0;
|
1232 |
+
opts.animOut.height = 0;
|
1233 |
+
};
|
1234 |
+
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
|
1235 |
+
opts.before.push(function(curr, next, opts) {
|
1236 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1237 |
+
opts.animIn.height = next.cycleH;
|
1238 |
+
opts.animOut.top = curr.cycleH;
|
1239 |
+
});
|
1240 |
+
opts.cssFirst.top = 0;
|
1241 |
+
opts.cssBefore.left = 0;
|
1242 |
+
opts.cssBefore.top = 0;
|
1243 |
+
opts.cssBefore.height = 0;
|
1244 |
+
opts.animOut.height = 0;
|
1245 |
+
};
|
1246 |
+
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
|
1247 |
+
opts.before.push(function(curr, next, opts) {
|
1248 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1249 |
+
opts.cssBefore.left = next.cycleW;
|
1250 |
+
opts.animIn.width = next.cycleW;
|
1251 |
+
});
|
1252 |
+
opts.cssBefore.top = 0;
|
1253 |
+
opts.cssBefore.width = 0;
|
1254 |
+
opts.animIn.left = 0;
|
1255 |
+
opts.animOut.width = 0;
|
1256 |
+
};
|
1257 |
+
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
|
1258 |
+
opts.before.push(function(curr, next, opts) {
|
1259 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1260 |
+
opts.animIn.width = next.cycleW;
|
1261 |
+
opts.animOut.left = curr.cycleW;
|
1262 |
+
});
|
1263 |
+
$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
|
1264 |
+
opts.animIn.left = 0;
|
1265 |
+
opts.animOut.width = 0;
|
1266 |
+
};
|
1267 |
+
|
1268 |
+
// zoom
|
1269 |
+
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
|
1270 |
+
opts.before.push(function(curr, next, opts) {
|
1271 |
+
$.fn.cycle.commonReset(curr,next,opts,false,false,true);
|
1272 |
+
opts.cssBefore.top = next.cycleH/2;
|
1273 |
+
opts.cssBefore.left = next.cycleW/2;
|
1274 |
+
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
|
1275 |
+
$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
|
1276 |
+
});
|
1277 |
+
opts.cssFirst.top = 0;
|
1278 |
+
opts.cssFirst.left = 0;
|
1279 |
+
opts.cssBefore.width = 0;
|
1280 |
+
opts.cssBefore.height = 0;
|
1281 |
+
};
|
1282 |
+
|
1283 |
+
// fadeZoom
|
1284 |
+
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
|
1285 |
+
opts.before.push(function(curr, next, opts) {
|
1286 |
+
$.fn.cycle.commonReset(curr,next,opts,false,false);
|
1287 |
+
opts.cssBefore.left = next.cycleW/2;
|
1288 |
+
opts.cssBefore.top = next.cycleH/2;
|
1289 |
+
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
|
1290 |
+
});
|
1291 |
+
opts.cssBefore.width = 0;
|
1292 |
+
opts.cssBefore.height = 0;
|
1293 |
+
opts.animOut.opacity = 0;
|
1294 |
+
};
|
1295 |
+
|
1296 |
+
// blindX
|
1297 |
+
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
|
1298 |
+
var w = $cont.css('overflow','hidden').width();
|
1299 |
+
opts.before.push(function(curr, next, opts) {
|
1300 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1301 |
+
opts.animIn.width = next.cycleW;
|
1302 |
+
opts.animOut.left = curr.cycleW;
|
1303 |
+
});
|
1304 |
+
opts.cssBefore.left = w;
|
1305 |
+
opts.cssBefore.top = 0;
|
1306 |
+
opts.animIn.left = 0;
|
1307 |
+
opts.animOut.left = w;
|
1308 |
+
};
|
1309 |
+
// blindY
|
1310 |
+
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
|
1311 |
+
var h = $cont.css('overflow','hidden').height();
|
1312 |
+
opts.before.push(function(curr, next, opts) {
|
1313 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1314 |
+
opts.animIn.height = next.cycleH;
|
1315 |
+
opts.animOut.top = curr.cycleH;
|
1316 |
+
});
|
1317 |
+
opts.cssBefore.top = h;
|
1318 |
+
opts.cssBefore.left = 0;
|
1319 |
+
opts.animIn.top = 0;
|
1320 |
+
opts.animOut.top = h;
|
1321 |
+
};
|
1322 |
+
// blindZ
|
1323 |
+
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
|
1324 |
+
var h = $cont.css('overflow','hidden').height();
|
1325 |
+
var w = $cont.width();
|
1326 |
+
opts.before.push(function(curr, next, opts) {
|
1327 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1328 |
+
opts.animIn.height = next.cycleH;
|
1329 |
+
opts.animOut.top = curr.cycleH;
|
1330 |
+
});
|
1331 |
+
opts.cssBefore.top = h;
|
1332 |
+
opts.cssBefore.left = w;
|
1333 |
+
opts.animIn.top = 0;
|
1334 |
+
opts.animIn.left = 0;
|
1335 |
+
opts.animOut.top = h;
|
1336 |
+
opts.animOut.left = w;
|
1337 |
+
};
|
1338 |
+
|
1339 |
+
// growX - grow horizontally from centered 0 width
|
1340 |
+
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
|
1341 |
+
opts.before.push(function(curr, next, opts) {
|
1342 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true);
|
1343 |
+
opts.cssBefore.left = this.cycleW/2;
|
1344 |
+
opts.animIn.left = 0;
|
1345 |
+
opts.animIn.width = this.cycleW;
|
1346 |
+
opts.animOut.left = 0;
|
1347 |
+
});
|
1348 |
+
opts.cssBefore.top = 0;
|
1349 |
+
opts.cssBefore.width = 0;
|
1350 |
+
};
|
1351 |
+
// growY - grow vertically from centered 0 height
|
1352 |
+
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
|
1353 |
+
opts.before.push(function(curr, next, opts) {
|
1354 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false);
|
1355 |
+
opts.cssBefore.top = this.cycleH/2;
|
1356 |
+
opts.animIn.top = 0;
|
1357 |
+
opts.animIn.height = this.cycleH;
|
1358 |
+
opts.animOut.top = 0;
|
1359 |
+
});
|
1360 |
+
opts.cssBefore.height = 0;
|
1361 |
+
opts.cssBefore.left = 0;
|
1362 |
+
};
|
1363 |
+
|
1364 |
+
// curtainX - squeeze in both edges horizontally
|
1365 |
+
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
|
1366 |
+
opts.before.push(function(curr, next, opts) {
|
1367 |
+
$.fn.cycle.commonReset(curr,next,opts,false,true,true);
|
1368 |
+
opts.cssBefore.left = next.cycleW/2;
|
1369 |
+
opts.animIn.left = 0;
|
1370 |
+
opts.animIn.width = this.cycleW;
|
1371 |
+
opts.animOut.left = curr.cycleW/2;
|
1372 |
+
opts.animOut.width = 0;
|
1373 |
+
});
|
1374 |
+
opts.cssBefore.top = 0;
|
1375 |
+
opts.cssBefore.width = 0;
|
1376 |
+
};
|
1377 |
+
// curtainY - squeeze in both edges vertically
|
1378 |
+
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
|
1379 |
+
opts.before.push(function(curr, next, opts) {
|
1380 |
+
$.fn.cycle.commonReset(curr,next,opts,true,false,true);
|
1381 |
+
opts.cssBefore.top = next.cycleH/2;
|
1382 |
+
opts.animIn.top = 0;
|
1383 |
+
opts.animIn.height = next.cycleH;
|
1384 |
+
opts.animOut.top = curr.cycleH/2;
|
1385 |
+
opts.animOut.height = 0;
|
1386 |
+
});
|
1387 |
+
opts.cssBefore.height = 0;
|
1388 |
+
opts.cssBefore.left = 0;
|
1389 |
+
};
|
1390 |
+
|
1391 |
+
// cover - curr slide covered by next slide
|
1392 |
+
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
|
1393 |
+
var d = opts.direction || 'left';
|
1394 |
+
var w = $cont.css('overflow','hidden').width();
|
1395 |
+
var h = $cont.height();
|
1396 |
+
opts.before.push(function(curr, next, opts) {
|
1397 |
+
$.fn.cycle.commonReset(curr,next,opts);
|
1398 |
+
if (d == 'right')
|
1399 |
+
opts.cssBefore.left = -w;
|
1400 |
+
else if (d == 'up')
|
1401 |
+
opts.cssBefore.top = h;
|
1402 |
+
else if (d == 'down')
|
1403 |
+
opts.cssBefore.top = -h;
|
1404 |
+
else
|
1405 |
+
opts.cssBefore.left = w;
|
1406 |
+
});
|
1407 |
+
opts.animIn.left = 0;
|
1408 |
+
opts.animIn.top = 0;
|
1409 |
+
opts.cssBefore.top = 0;
|
1410 |
+
opts.cssBefore.left = 0;
|
1411 |
+
};
|
1412 |
+
|
1413 |
+
// uncover - curr slide moves off next slide
|
1414 |
+
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
|
1415 |
+
var d = opts.direction || 'left';
|
1416 |
+
var w = $cont.css('overflow','hidden').width();
|
1417 |
+
var h = $cont.height();
|
1418 |
+
opts.before.push(function(curr, next, opts) {
|
1419 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1420 |
+
if (d == 'right')
|
1421 |
+
opts.animOut.left = w;
|
1422 |
+
else if (d == 'up')
|
1423 |
+
opts.animOut.top = -h;
|
1424 |
+
else if (d == 'down')
|
1425 |
+
opts.animOut.top = h;
|
1426 |
+
else
|
1427 |
+
opts.animOut.left = -w;
|
1428 |
+
});
|
1429 |
+
opts.animIn.left = 0;
|
1430 |
+
opts.animIn.top = 0;
|
1431 |
+
opts.cssBefore.top = 0;
|
1432 |
+
opts.cssBefore.left = 0;
|
1433 |
+
};
|
1434 |
+
|
1435 |
+
// toss - move top slide and fade away
|
1436 |
+
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
|
1437 |
+
var w = $cont.css('overflow','visible').width();
|
1438 |
+
var h = $cont.height();
|
1439 |
+
opts.before.push(function(curr, next, opts) {
|
1440 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1441 |
+
// provide default toss settings if animOut not provided
|
1442 |
+
if (!opts.animOut.left && !opts.animOut.top)
|
1443 |
+
$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
|
1444 |
+
else
|
1445 |
+
opts.animOut.opacity = 0;
|
1446 |
+
});
|
1447 |
+
opts.cssBefore.left = 0;
|
1448 |
+
opts.cssBefore.top = 0;
|
1449 |
+
opts.animIn.left = 0;
|
1450 |
+
};
|
1451 |
+
|
1452 |
+
// wipe - clip animation
|
1453 |
+
$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
|
1454 |
+
var w = $cont.css('overflow','hidden').width();
|
1455 |
+
var h = $cont.height();
|
1456 |
+
opts.cssBefore = opts.cssBefore || {};
|
1457 |
+
var clip;
|
1458 |
+
if (opts.clip) {
|
1459 |
+
if (/l2r/.test(opts.clip))
|
1460 |
+
clip = 'rect(0px 0px '+h+'px 0px)';
|
1461 |
+
else if (/r2l/.test(opts.clip))
|
1462 |
+
clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
|
1463 |
+
else if (/t2b/.test(opts.clip))
|
1464 |
+
clip = 'rect(0px '+w+'px 0px 0px)';
|
1465 |
+
else if (/b2t/.test(opts.clip))
|
1466 |
+
clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
|
1467 |
+
else if (/zoom/.test(opts.clip)) {
|
1468 |
+
var top = parseInt(h/2,10);
|
1469 |
+
var left = parseInt(w/2,10);
|
1470 |
+
clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
|
1471 |
+
}
|
1472 |
+
}
|
1473 |
+
|
1474 |
+
opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
|
1475 |
+
|
1476 |
+
var d = opts.cssBefore.clip.match(/(\d+)/g);
|
1477 |
+
var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
|
1478 |
+
|
1479 |
+
opts.before.push(function(curr, next, opts) {
|
1480 |
+
if (curr == next) return;
|
1481 |
+
var $curr = $(curr), $next = $(next);
|
1482 |
+
$.fn.cycle.commonReset(curr,next,opts,true,true,false);
|
1483 |
+
opts.cssAfter.display = 'block';
|
1484 |
+
|
1485 |
+
var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
|
1486 |
+
(function f() {
|
1487 |
+
var tt = t ? t - parseInt(step * (t/count),10) : 0;
|
1488 |
+
var ll = l ? l - parseInt(step * (l/count),10) : 0;
|
1489 |
+
var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
|
1490 |
+
var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
|
1491 |
+
$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
|
1492 |
+
(step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
|
1493 |
+
})();
|
1494 |
+
});
|
1495 |
+
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1496 |
+
opts.animIn = { left: 0 };
|
1497 |
+
opts.animOut = { left: 0 };
|
1498 |
+
};
|
1499 |
+
|
1500 |
+
})(jQuery);
|
js/jquery.jcarousel.min.js
DELETED
@@ -1,16 +0,0 @@
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,74 +1,75 @@
|
|
1 |
=== Smooth Slider ===
|
2 |
-
Contributors: internet techies
|
3 |
-
Tags: slideshow,featured,
|
4 |
Donate link: http://www.clickonf5.org/go/smooth-slider/
|
5 |
-
Requires at least:
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
Smooth Slider is a Wordpress Plugin for creating a dynamic slideshow/s for featured posts, pages and media images 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,pages and media images as featured posts and show them into a slideshow on your blog home page (i.e. Index) as well as in sidebar. Also, you can show category posts in reverse chronological order.
|
12 |
|
13 |
-
|
14 |
|
15 |
-
=
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
|
|
26 |
|
27 |
-
|
28 |
-
2. Fully Customizable CSS
|
29 |
-
3. Choose Posts, Pages and images from Media Library (from ver 2.3) as Featured Posts/Pages/Media on Single Click
|
30 |
-
4. Simple but Decent Slideshow
|
31 |
-
5. Customized Slideshow as per your Wordpress Theme
|
32 |
-
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.
|
33 |
-
7. Easy To Install Plugin
|
34 |
-
8. Premium Support Available
|
35 |
-
9. Readable by search engine as you can see the screenshot on Lynx browser available on our blog
|
36 |
-
10. Option for transparent background, so that rounded corners can be supported
|
37 |
-
11. Slider Preview in admin panel
|
38 |
-
12. Can be converted to pure image Slider
|
39 |
-
13. Facility to put Custom Images in place of navigation numbers
|
40 |
-
14. WordPress Internal Image cropping feature used, so no need of any external PHP script to crop the images. You just need to select the width of the thumbnail image.
|
41 |
-
15. Pick image from custom field, from "Featured Post" (Post Thumbnail feature), from post/page attachment, or from content. As well you can set priority in which you wish to search the image for the content.
|
42 |
-
16. The posts/pages/media library images added to the slider can be re-ordered
|
43 |
-
17. You can explicitly specify the link to which any particular slide should be redirected to once clicked. As well, you can specify if you do not want any particular slide to be linked to any webpage.
|
44 |
-
18. A template tag to display Category specific posts in reverse chronological order on Smooth Slider
|
45 |
-
19. A template tag for WPMU, to get slider posts from all over the WPMU site
|
46 |
-
20. Option to change Read More text and also put it in your language
|
47 |
-
21. Permission setting option to restrict the users from adding posts to Smooth Slider
|
48 |
-
22. Remove posts and pages from Smooth Slider selectively or remove all the posts from the slider at one go from the settings page itself
|
49 |
-
23. You can reorder the entries in slider as well as choose to show the slider entries in RANDOM form.
|
50 |
-
23. Option to retain specific html tags in the slider posts
|
51 |
-
24. Option to specify custom text or html in place of navigation numbers or buttons
|
52 |
-
25. Smooth Slider complete uninstall on plugin Delete
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
[Get Support](http://clickonf5.com/)
|
57 |
|
58 |
|
59 |
== Installation ==
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
1.
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
### Usage ###
|
74 |
|
@@ -99,34 +100,49 @@ This plugin is easy to install like other plug-ins of Wordpress as you need to j
|
|
99 |
where 'apple' is the slug (url friendly version of the category name) of the category from which you want to extract the posts to be shown in the slider. Replace it with your own category slug and you are done.
|
100 |
|
101 |
|
102 |
-
|
103 |
|
104 |
-
**Find More Slider Styles at [SliderVilla](http://www.slidervilla.com/)**
|
105 |
|
106 |
== Upgrade Notice ==
|
107 |
|
108 |
-
|
109 |
|
110 |
-
|
|
|
|
|
111 |
|
112 |
-
|
113 |
|
114 |
-
!!IMP!!
|
115 |
|
116 |
-
|
|
|
|
|
|
|
117 |
|
118 |
-
Check the other FAQs on Smooth Slider
|
119 |
-
FAQ section on: http://www.clickonf5.org/smooth-slider
|
120 |
|
121 |
== Screenshots ==
|
122 |
|
123 |
-
1. Demo of
|
124 |
-
2.
|
|
|
125 |
|
126 |
-
Visit the plugin page (http://www.clickonf5.org/smooth-slider) to see more screenshots.
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
Version 2.3.5 (06/13/2011)
|
131 |
|
132 |
1. Fix: An extra div tag at the end of the slider html was causing the slider break on Safari in a particular case. Thanks to Michael Preisner for pointing out the issue.
|
@@ -235,4 +251,4 @@ Version 1.1 (09/14/2009)
|
|
235 |
2. Fixed - Added No Script tag brosers not supporting JavaScript for showing the slideshow
|
236 |
3. Fixed - Issues with WordPress MU Smooth Slider Options update from setting page
|
237 |
|
238 |
-
Visit the plugin page
|
1 |
=== Smooth Slider ===
|
2 |
+
Contributors: internet techies, slidervilla
|
3 |
+
Tags: best slider,responsive slider,responsive,wordpress slider,slideshow,featured,jquery,slider,content,widget,shortcode,carousel,thumbnail,image,post,sidebar,plugin,category,wpmu,site,blogs,style,categories,picture,flash,gallery
|
4 |
Donate link: http://www.clickonf5.org/go/smooth-slider/
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.9.1
|
7 |
+
Stable tag: 2.4
|
8 |
+
License: GPLv2 or later
|
9 |
|
10 |
+
Best Responsive Slider with 100% Customization Option on Settings Panel
|
|
|
|
|
11 |
|
12 |
+
== Description ==
|
13 |
|
14 |
+
In less than 50 seconds, embed a recent posts slider using Smooth Slider. It creates a dynamic slideshow/s for featured Posts, Pages, Media Images and Custom Post Types on a WordPress site. With live preview on admin panel, one can customize the slider before implementation. At <a href="http://slidervilla.com/" rel="friend" title="SliderVilla Premium WordPress Sliders">SliderVilla</a>, we develop only sliders and we know the requirements very well. Smooth Slider is a basic slider WordPress plugin but is capable of adding a nice carousel in no time. With shortcode, widgets and template tag, one can embed Smooth SLider anywhere in the site.
|
15 |
|
16 |
+
= Features =
|
17 |
|
18 |
+
* Supports Responsive Design
|
19 |
+
* Six transition effects ( Fade transition supported )
|
20 |
+
* Custom Slider, Category Slider and Recent Posts Slider supported ( Template tags, Shortcode and Widget available )
|
21 |
+
* Slider Preview in admin panel
|
22 |
+
* Search Engine Optimized Slideshow
|
23 |
+
* Full control over the looks thru the Settings Panel
|
24 |
+
* Permission setting option to restrict the users from adding posts to Smooth Slider
|
25 |
+
* The posts/pages/media library images/custom post types added to the slider can be re-ordered
|
26 |
+
* No Need Of Knowledge of PHP, HTML or CSS. But for those having knowledge of CSS, you can create your own stylesheet.
|
27 |
+
* Slides can be removed from the slider in single click thru 'Sliders' admin panel
|
28 |
|
29 |
+
= <a href="http://slidervilla.com/sliders-list-view/" rel="friend" title="SliderVilla Premium WordPress Sliders">Premium Versions</a> =
|
30 |
|
31 |
+
* Create Unlimited Settings Panels
|
32 |
+
* Created Unlimited Custom Sliders
|
33 |
+
* Multiple Designs to Choose From
|
34 |
+
* Export/Import Settings
|
35 |
+
* Lightbox Effect
|
36 |
+
* Logo Slider with Grayscale Effect (Placid)
|
37 |
+
* Multiple Image Size Slider
|
38 |
+
* Google Web Fonts option on Settings Panel
|
39 |
+
* Very Prompt Support and Lifetime Upgrades
|
40 |
|
41 |
+
<a href="http://slidervilla.com/smooth-slider/" rel="friend" >Plugin Home Page</a> |
|
42 |
+
[Plugin Documentation](http://guides.slidervilla.com/smooth-slider/)
|
43 |
|
44 |
+
**Smooth Slider is now <a href="http://slidervilla.com/add-ons/" rel="friend">Add-ons</a> compatible. **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
1. Taxonomy Add-on
|
47 |
+
2. Gallery Add-on
|
|
|
48 |
|
49 |
|
50 |
== Installation ==
|
51 |
+
There's 3 ways to install this plugin:
|
52 |
+
|
53 |
+
= 1. The super easy way =
|
54 |
+
1. In your Admin, go to menu Plugins > Add
|
55 |
+
1. Search for Smooth Slider
|
56 |
+
1. Click to install
|
57 |
+
1. Activate the plugin
|
58 |
+
1. A new menu `Smooth Slider` will appear in your Admin
|
59 |
+
|
60 |
+
= 2. The easy way =
|
61 |
+
1. Download the plugin (.zip file) on the right column of this page
|
62 |
+
1. In your Admin, go to menu Plugins > Add
|
63 |
+
1. Select the tab "Upload"
|
64 |
+
1. Upload the .zip file you just downloaded
|
65 |
+
1. Activate the plugin
|
66 |
+
1. A new menu will appear in your Admin
|
67 |
+
|
68 |
+
= 3. The old way (FTP) =
|
69 |
+
1. Unzip the downloaded .zip file
|
70 |
+
1. Upload `smooth-slider` folder to the `/wp-content/plugins/` directory
|
71 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
72 |
+
1. A new menu will appear in your Admin
|
73 |
|
74 |
### Usage ###
|
75 |
|
100 |
where 'apple' is the slug (url friendly version of the category name) of the category from which you want to extract the posts to be shown in the slider. Replace it with your own category slug and you are done.
|
101 |
|
102 |
|
103 |
+
For more documentation go to [Smooth Slider Documentation](http://guides.slidervilla.com/smooth-slider/)
|
104 |
|
105 |
+
**Find More Advanced Slider Styles at [SliderVilla](http://www.slidervilla.com/)**
|
106 |
|
107 |
== Upgrade Notice ==
|
108 |
|
109 |
+
= Before Upgrading =
|
110 |
|
111 |
+
* Note the Title and Content fonts on your old Smooth Slider.
|
112 |
+
* Go to 'Settings' panel and 'Save Changes'.
|
113 |
+
* Recheck the Slider Title, Post Title and the Slider Content fonts on the Settings Panel.
|
114 |
|
115 |
+
[Get older versions](http://wordpress.org/extend/plugins/smooth-slider/download/)
|
116 |
|
117 |
+
!!IMP!! If you have highly customized Smooth Slider, Before upgrading to 2.4, save your CSS and Settings. You may lose some CSS formatting as in the new versions the slider javascript is changed and is different from previous versions.
|
118 |
|
119 |
+
== Frequently Asked Questions ==
|
120 |
+
|
121 |
+
1. In case you have upgraded from previous versions (<= 2.3.2) using WordPress automatic upgradation, and the plugin is not working, please deactivate and reactivate the plugin.
|
122 |
+
2. Also, in case you are still getting list of the entries, please go to the Smooth Slider Settings page and just 'Save' the settings. Check if the settings Miscellaneous => Smooth Slider Styles to use on other than Post/Pages is equal to default. Then save the settings.
|
123 |
|
124 |
+
Check the other FAQs on Smooth [Slider Documetation on SliderVilla](http://guides.slidervilla.com/smooth-slider/).
|
|
|
125 |
|
126 |
== Screenshots ==
|
127 |
|
128 |
+
1. Demo of Smooth Slider
|
129 |
+
2. A brief view of Settings panel
|
130 |
+
3. Add post/Page to Smooth slider along with other edit panel options
|
131 |
|
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
Version 2.4 (09/10/2012)
|
136 |
+
|
137 |
+
1. New: Smooth Slider now Supports Responsive Design Layout
|
138 |
+
2. New: Shortcode for Category Slider
|
139 |
+
3. New: Template tag and Shortcode for Recent Posts Smooth Slider
|
140 |
+
4. New: Changes to Support Fade and a couple more transitions
|
141 |
+
5. New: Changes to Settings Panel design
|
142 |
+
6. New: Compatible with SliderVilla add-ons
|
143 |
+
7. Fix: Fixed the bug that Smooth Slider slides got jumbled up and Slider looked empty when the Chrome or Safari browser was zoomed in.
|
144 |
+
8. Fix: Now the slider_style Custom Field or Post Meta will not appear for each Post or Page saved. This field was automatically created and displayed under the Custom Fields metabox on Edit Post/Page panel inprevious version of Smooth Slider.
|
145 |
+
|
146 |
Version 2.3.5 (06/13/2011)
|
147 |
|
148 |
1. Fix: An extra div tag at the end of the slider html was causing the slider break on Safari in a particular case. Thanks to Michael Preisner for pointing out the issue.
|
251 |
2. Fixed - Added No Script tag brosers not supporting JavaScript for showing the slideshow
|
252 |
3. Fixed - Issues with WordPress MU Smooth Slider Options update from setting page
|
253 |
|
254 |
+
Visit the plugin page to see the changelog and release notes.
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
ADDED
Binary file
|
settings/settings.php
CHANGED
@@ -6,8 +6,6 @@ if ( is_admin() ){ // admin actions
|
|
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');
|
@@ -15,25 +13,21 @@ function smooth_slider_settings() {
|
|
15 |
include('sliders.php');
|
16 |
// This function displays the page content for the Smooth Slider Options submenu
|
17 |
function smooth_slider_settings_page() {
|
18 |
-
global $smooth_slider;
|
19 |
-
?>
|
20 |
|
21 |
<div class="wrap" style="clear:both;">
|
22 |
-
|
23 |
-
<h2 style="float:left;"><?php _e('Smooth Slider Settings ','smooth-slider'); ?></
|
24 |
-
<form style="float:left;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
25 |
<input type="hidden" name="cmd" value="_s-xclick">
|
26 |
<input type="hidden" name="hosted_button_id" value="8046056">
|
27 |
<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!">
|
28 |
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
29 |
</form>
|
30 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-admin' ) );?>
|
31 |
-
<button><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></button>
|
32 |
|
33 |
-
|
34 |
-
<form method="post" action="options.php">
|
35 |
<h2 style="clear:left"><?php _e('Preview','smooth-slider'); ?></h2>
|
36 |
-
<?php settings_fields('smooth-slider-group'); ?>
|
37 |
<div>
|
38 |
<?php
|
39 |
get_smooth_slider();
|
@@ -52,14 +46,10 @@ get_smooth_slider();
|
|
52 |
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
53 |
<div class="inside">
|
54 |
<ul>
|
55 |
-
<li><a href="http://
|
56 |
-
" ><?php _e('
|
57 |
-
|
58 |
" ><?php _e('Plugin Parent Site','smooth-slider'); ?></a></li>
|
59 |
-
<li><a href="http://clickonf5.com/" title="<?php _e('Support Forum for Smooth Slider','smooth-slider'); ?>
|
60 |
-
" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
61 |
-
<li><a href="http://www.clickonf5.org/about/tejaswini" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>
|
62 |
-
" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
63 |
<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>
|
64 |
</ul>
|
65 |
</div>
|
@@ -68,20 +58,9 @@ get_smooth_slider();
|
|
68 |
<div class="postbox">
|
69 |
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
70 |
<div class="inside">
|
71 |
-
<
|
72 |
</div>
|
73 |
</div>
|
74 |
-
|
75 |
-
<div class="postbox">
|
76 |
-
<h3 class="hndle"><span></span><?php _e('Recommended WordPress Hosting','smooth-slider'); ?></h3>
|
77 |
-
<div class="inside">
|
78 |
-
<div style="margin:10px 5px">
|
79 |
-
<a href="http://slidervilla.com/go/hostgator/" title="Recommended Web Hosting" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/hostgator.gif');?>" alt="Recommended Web Hosting" /></a>
|
80 |
-
<p><a href="http://slidervilla.com/go/hostgator/" title="Recommended Web Hosting" target="_blank">HostGator</a> is one of the world's top 10 largest web hosting companies with more than 5,000,000 hosted domains. You can host your own WordPress installation with custom themes, plugins, and your own domain name with HostGator from only $3.96 a month.</p>
|
81 |
-
<p><strong>Features: </strong>UNLIMITED Disk Space and Bandwidth, FREE Site Building Tools and Templates, 24/7/365 Award Winning Technical Support</p>
|
82 |
-
<p>For more info visit <a href="http://slidervilla.com/go/hostgator/" title="Recommended Web Hosting" target="_blank">HostGator.com</a></p>
|
83 |
-
</div>
|
84 |
-
</div></div>
|
85 |
|
86 |
<div class="postbox">
|
87 |
<h3 class="hndle"><span></span><?php _e('Recommended Themes','smooth-slider'); ?></h3>
|
@@ -93,60 +72,79 @@ get_smooth_slider();
|
|
93 |
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">For more info visit ElegantThemes</a></p>
|
94 |
</div>
|
95 |
</div></div>
|
96 |
-
|
97 |
-
<div class="postbox">
|
98 |
-
<h3 class="hndle"><span><?php _e('Credits:','smooth-slider'); ?></span></h3>
|
99 |
-
<div class="inside">
|
100 |
-
<ul>
|
101 |
-
<li><a href="http://sorgalla.com/jcarousel/" title="jCarousel jQuey plugin" >Riding carousels with jQuery</a></li>
|
102 |
-
<li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
|
103 |
-
<li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
|
104 |
-
</ul>
|
105 |
-
</div>
|
106 |
-
</div>
|
107 |
-
|
108 |
-
<div class="postbox">
|
109 |
-
<h3 class="hndle"><span><?php _e('Top Supporters','smooth-slider'); ?></span></h3>
|
110 |
-
<div class="inside">
|
111 |
-
<div id="smooth_sldr_donations">
|
112 |
-
<ul>
|
113 |
-
<li><a href="http://www.jacobwiechman.com/wordpress//" title="Visit Jacob Wiechman - $50" >Jacob Wiechman - $50</a></li>
|
114 |
-
<li><a href="http://malamedconsulting.com/" title="Visit Connie Malamed - $25" >Connie Malamed - $25</a></li>
|
115 |
-
<li><a href="http://uwaterloo.ca/" title="Visit Trevor Bain - $25" >Trevor Bain - $25</a></li>
|
116 |
-
<li><a href="http://www.whatsthebigidea.com/" title="Visit WhatsTheBigIdea.com,Inc. - $20" >WhatsTheBigIdea.com,Inc. - $20</a></li>
|
117 |
-
</ul>
|
118 |
-
</div>
|
119 |
-
</div>
|
120 |
-
</div>
|
121 |
|
122 |
</div> <!--end of poststuff -->
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
<
|
127 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
<table class="form-table">
|
129 |
|
130 |
<tr valign="top">
|
131 |
-
<th scope="row"><?php _e('
|
132 |
-
<td
|
|
|
|
|
133 |
</tr>
|
134 |
|
135 |
<tr valign="top">
|
136 |
-
<th scope="row"><?php _e('Slide Transition
|
137 |
-
<td><
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
</tr>
|
139 |
|
140 |
<tr valign="top">
|
141 |
-
<th scope="row"
|
142 |
-
<td><
|
143 |
-
<
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
</tr>
|
146 |
|
147 |
<tr valign="top">
|
148 |
<th scope="row"><?php _e('Number of Posts in the Slideshow','smooth-slider'); ?></th>
|
149 |
-
<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']; ?>"
|
|
|
150 |
</tr>
|
151 |
|
152 |
<tr valign="top">
|
@@ -168,7 +166,14 @@ get_smooth_slider();
|
|
168 |
|
169 |
<tr valign="top">
|
170 |
<th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
|
171 |
-
<td><input type="text" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
</tr>
|
173 |
|
174 |
<tr valign="top">
|
@@ -185,14 +190,137 @@ get_smooth_slider();
|
|
185 |
<label for="smooth_slider_goto_slide"><?php _e('Show go to slide number links or images','smooth-slider'); ?></label><br />
|
186 |
<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 />
|
187 |
<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 />
|
188 |
-
<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'); ?>  
|
189 |
-
<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'); ?>
|
190 |
<input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
|
191 |
</fieldset></td>
|
192 |
</tr>
|
193 |
|
194 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
|
|
|
|
|
|
|
|
|
196 |
<h2><?php _e('Slider Title','smooth-slider'); ?></h2>
|
197 |
<p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
|
198 |
<table class="form-table">
|
@@ -214,19 +342,23 @@ get_smooth_slider();
|
|
214 |
<tr valign="top">
|
215 |
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
216 |
<td><select name="smooth_slider_options[title_font]" id="smooth_slider_title_font" >
|
217 |
-
<option value="Arial" <?php if ($smooth_slider['title_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
218 |
-
<option value="
|
219 |
-
<option value="
|
220 |
-
<option value="
|
221 |
-
<option value="Century
|
222 |
-
<option value="
|
223 |
-
<option value="
|
224 |
-
<option value="
|
225 |
-
<option value="
|
226 |
-
<option value="
|
227 |
-
<option value="
|
228 |
-
<option value="
|
229 |
-
<option value="
|
|
|
|
|
|
|
|
|
230 |
</select>
|
231 |
</td>
|
232 |
</tr>
|
@@ -252,7 +384,12 @@ get_smooth_slider();
|
|
252 |
</td>
|
253 |
</tr>
|
254 |
</table>
|
|
|
|
|
|
|
|
|
255 |
|
|
|
256 |
<h2><?php _e('Post Title','smooth-slider'); ?></h2>
|
257 |
<p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
|
258 |
<table class="form-table">
|
@@ -260,19 +397,23 @@ get_smooth_slider();
|
|
260 |
<tr valign="top">
|
261 |
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
262 |
<td><select name="smooth_slider_options[ptitle_font]" id="smooth_slider_ptitle_font" >
|
263 |
-
<option value="Arial" <?php if ($smooth_slider['ptitle_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
264 |
-
<option value="
|
265 |
-
<option value="
|
266 |
-
<option value="
|
267 |
-
<option value="Century
|
268 |
-
<option value="
|
269 |
-
<option value="
|
270 |
-
<option value="
|
271 |
-
<option value="
|
272 |
-
<option value="
|
273 |
-
<option value="
|
274 |
-
<option value="
|
275 |
-
<option value="
|
|
|
|
|
|
|
|
|
276 |
</select>
|
277 |
</td>
|
278 |
</tr>
|
@@ -298,7 +439,12 @@ get_smooth_slider();
|
|
298 |
</td>
|
299 |
</tr>
|
300 |
</table>
|
|
|
|
|
|
|
|
|
301 |
|
|
|
302 |
<h2><?php _e('Thumbnail Image','smooth-slider'); ?></h2>
|
303 |
<p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
|
304 |
<table class="form-table">
|
@@ -335,7 +481,13 @@ get_smooth_slider();
|
|
335 |
<option value="2" <?php if ($smooth_slider['crop'] == "2"){ echo "selected";}?> ><?php _e('Medium','smooth-slider'); ?></option>
|
336 |
<option value="3" <?php if ($smooth_slider['crop'] == "3"){ echo "selected";}?> ><?php _e('Thumbnail','smooth-slider'); ?></option>
|
337 |
</select>
|
338 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
</td>
|
340 |
</tr>
|
341 |
|
@@ -343,7 +495,14 @@ get_smooth_slider();
|
|
343 |
<tr valign="top">
|
344 |
<th scope="row"><?php _e('Image Size','smooth-slider'); ?></th>
|
345 |
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Image Size','smooth-slider'); ?></span></legend>
|
346 |
-
<input name="smooth_slider_options[img_size]" type="radio" value="0" <?php checked('0', $smooth_slider['img_size']); ?> /> <?php _e('Original Size','smooth-slider'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
<input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> <?php _e('Custom Size:','smooth-slider'); ?>
|
348 |
<label for="smooth_slider_options[img_width]"><?php _e('Width','smooth-slider'); ?></label>
|
349 |
<input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" /> <?php _e('px','smooth-slider'); ?>
|
@@ -352,13 +511,26 @@ get_smooth_slider();
|
|
352 |
|
353 |
<tr valign="top">
|
354 |
<th scope="row"><?php _e('Maximum Height of the Image','smooth-slider'); ?></th>
|
355 |
-
<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'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
</tr>
|
357 |
|
358 |
-
|
359 |
<tr valign="top">
|
360 |
<th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
|
361 |
-
<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']; ?>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
</tr>
|
363 |
|
364 |
<tr valign="top">
|
@@ -368,29 +540,47 @@ get_smooth_slider();
|
|
368 |
|
369 |
<tr valign="top">
|
370 |
<th scope="row"><?php _e('Make pure Image Slider','smooth-slider'); ?></th>
|
371 |
-
<td><input name="smooth_slider_options[image_only]" type="checkbox" value="1" <?php checked('1', $smooth_slider['image_only']); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
</tr>
|
373 |
</table>
|
374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
<h2><?php _e('Slider Content','smooth-slider'); ?></h2>
|
376 |
<p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
|
377 |
<table class="form-table">
|
378 |
<tr valign="top">
|
379 |
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
380 |
<td><select name="smooth_slider_options[content_font]" id="smooth_slider_content_font" >
|
381 |
-
<option value="Arial" <?php if ($smooth_slider['content_font'] == "Arial"){ echo "selected";}?> >Arial</option>
|
382 |
-
<option value="
|
383 |
-
<option value="
|
384 |
-
<option value="
|
385 |
-
<option value="Century
|
386 |
-
<option value="
|
387 |
-
<option value="
|
388 |
-
<option value="
|
389 |
-
<option value="
|
390 |
-
<option value="
|
391 |
-
<option value="
|
392 |
-
<option value="
|
393 |
-
<option value="
|
|
|
|
|
|
|
|
|
394 |
</select>
|
395 |
</td>
|
396 |
</tr>
|
@@ -426,105 +616,63 @@ get_smooth_slider();
|
|
426 |
</td>
|
427 |
</tr>
|
428 |
|
429 |
-
<tr valign="top">
|
430 |
-
<th scope="row"><?php _e('Maximum content size (in characters)','smooth-slider'); ?></th>
|
431 |
-
<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>
|
432 |
-
</tr>
|
433 |
<tr valign="top">
|
434 |
<th scope="row"><?php _e('Maximum content size (in words)','smooth-slider'); ?></th>
|
435 |
-
<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']; ?>"
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
<table class="form-table">
|
443 |
-
|
444 |
-
<tr valign="top" <?php if($smooth_slider['ver']=='step') echo 'style="display:none;"';?>>
|
445 |
-
<th scope="row"><?php _e('Promote Smooth Slider','smooth-slider'); ?></th>
|
446 |
-
<td><select name="smooth_slider_options[support]" >
|
447 |
-
<option value="1" <?php if ($smooth_slider['support'] == "1"){ echo "selected";}?> ><?php _e('Yes','smooth-slider'); ?></option>
|
448 |
-
<option value="0" <?php if ($smooth_slider['support'] == "0"){ echo "selected";}?> ><?php _e('No','smooth-slider'); ?></option>
|
449 |
-
</select>
|
450 |
-
<small><?php _e('Consider donating in case you select "No"','smooth-slider'); ?></small>
|
451 |
</td>
|
452 |
</tr>
|
453 |
|
454 |
<tr valign="top">
|
455 |
-
<th scope="row"><?php _e('
|
456 |
-
<td><input type="text" name="smooth_slider_options[
|
457 |
-
</tr>
|
458 |
-
<tr valign="top">
|
459 |
-
<th scope="row"><?php _e('Continue Reading Text','smooth-slider'); ?></th>
|
460 |
-
<td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
|
461 |
-
</tr>
|
462 |
-
|
463 |
-
<tr valign="top">
|
464 |
-
<th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
|
465 |
-
<td><select name="smooth_slider_options[user_level]" >
|
466 |
-
<option value="manage_options" <?php if ($smooth_slider['user_level'] == "manage_options"){ echo "selected";}?> ><?php _e('Administrator','smooth-slider'); ?></option>
|
467 |
-
<option value="edit_others_posts" <?php if ($smooth_slider['user_level'] == "edit_others_posts"){ echo "selected";}?> ><?php _e('Editor and Admininstrator','smooth-slider'); ?></option>
|
468 |
-
<option value="publish_posts" <?php if ($smooth_slider['user_level'] == "publish_posts"){ echo "selected";}?> ><?php _e('Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
469 |
-
<option value="edit_posts" <?php if ($smooth_slider['user_level'] == "edit_posts"){ echo "selected";}?> ><?php _e('Contributor, Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
470 |
-
</select>
|
471 |
-
</td>
|
472 |
</tr>
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
<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>
|
477 |
-
</tr>
|
478 |
|
479 |
-
|
480 |
-
<th scope="row"><?php _e('Text to display in the JavaScript disabled browser','smooth-slider'); ?></th>
|
481 |
-
<td><input type="text" name="smooth_slider_options[noscript]" class="regular-text code" value="<?php echo $smooth_slider['noscript']; ?>" /></td>
|
482 |
-
</tr>
|
483 |
|
484 |
-
<
|
485 |
-
<
|
486 |
-
<
|
487 |
-
</tr>
|
488 |
-
|
489 |
-
<tr valign="top">
|
490 |
-
<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>
|
491 |
-
<td><select name="smooth_slider_options[stylesheet]" >
|
492 |
-
<?php
|
493 |
-
$directory = SMOOTH_SLIDER_CSS_DIR;
|
494 |
-
if ($handle = opendir($directory)) {
|
495 |
-
while (false !== ($file = readdir($handle))) {
|
496 |
-
if($file != '.' and $file != '..') { ?>
|
497 |
-
<option value="<?php echo $file;?>" <?php if ($smooth_slider['stylesheet'] == $file){ echo "selected";}?> ><?php echo $file;?></option>
|
498 |
-
<?php } }
|
499 |
-
closedir($handle);
|
500 |
-
}
|
501 |
-
?>
|
502 |
-
</select>
|
503 |
-
</td>
|
504 |
-
</tr>
|
505 |
-
|
506 |
-
<tr valign="top">
|
507 |
-
<th scope="row"><?php _e('Multiple Slider Feature','smooth-slider'); ?></th>
|
508 |
-
<td><label for="smooth_slider_multiple">
|
509 |
-
<input name="smooth_slider_options[multiple_sliders]" type="checkbox" id="smooth_slider_multiple" value="1" <?php checked("1", $smooth_slider['multiple_sliders']); ?> />
|
510 |
-
<?php _e('Enable Multiple Slider Function on Edit Post/Page','smooth-slider'); ?></label></td>
|
511 |
-
</tr>
|
512 |
|
|
|
513 |
<tr valign="top">
|
514 |
-
<th scope="row"><?php _e('Enable
|
515 |
-
<td><input name="smooth_slider_options[
|
516 |
-
</tr>
|
517 |
-
|
518 |
-
<!--<tr valign="top">
|
519 |
-
<th scope="row"><?php _e('Version to use','smooth-slider'); ?></th>
|
520 |
-
<td><select name="smooth_slider_options[ver]" >
|
521 |
-
<option value="j" <?php if ($smooth_slider['ver'] == "j"){ echo "selected";}?> ><?php _e('New','smooth-slider'); ?></option>
|
522 |
-
<option value="step" <?php if ($smooth_slider['ver'] == "step"){ echo "selected";}?> ><?php _e('Previous','smooth-slider'); ?></option>
|
523 |
-
</select>
|
524 |
-
</td>
|
525 |
</tr>
|
526 |
-
-->
|
527 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
|
529 |
<p class="submit">
|
530 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
6 |
|
7 |
// function for adding settings page to wp-admin
|
8 |
function smooth_slider_settings() {
|
|
|
|
|
9 |
add_menu_page( 'Smooth Slider', 'Smooth Slider', 'manage_options','smooth-slider-admin', 'smooth_slider_create_multiple_sliders', smooth_slider_plugin_url( 'images/smooth_slider_icon.gif' ) );
|
10 |
add_submenu_page('smooth-slider-admin', 'Smooth Sliders', 'Sliders', 'manage_options', 'smooth-slider-admin', 'smooth_slider_create_multiple_sliders');
|
11 |
add_submenu_page('smooth-slider-admin', 'Smooth Slider Settings', 'Settings', 'manage_options', 'smooth-slider-settings', 'smooth_slider_settings_page');
|
13 |
include('sliders.php');
|
14 |
// This function displays the page content for the Smooth Slider Options submenu
|
15 |
function smooth_slider_settings_page() {
|
16 |
+
global $smooth_slider; ?>
|
|
|
17 |
|
18 |
<div class="wrap" style="clear:both;">
|
19 |
+
<h2> </h2>
|
20 |
+
<h2 style="float:left;"><?php _e('Smooth Slider Settings ','smooth-slider'); ?></h3>
|
21 |
+
<form style="float:left;margin-left:2em;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
22 |
<input type="hidden" name="cmd" value="_s-xclick">
|
23 |
<input type="hidden" name="hosted_button_id" value="8046056">
|
24 |
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
25 |
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
26 |
</form>
|
27 |
<?php $url = sslider_admin_url( array( 'page' => 'smooth-slider-admin' ) );?>
|
28 |
+
<button class="button-primary"><a style="color:#fff;text-decoration:none;" href="<?php echo $url; ?>" title="<?php _e('Go to Sliders page where you can re-order the slide posts, delete the slides from the slider etc.','smooth-slider'); ?>"><?php _e('Go to Sliders Admin','smooth-slider'); ?></a></button>
|
29 |
|
|
|
|
|
30 |
<h2 style="clear:left"><?php _e('Preview','smooth-slider'); ?></h2>
|
|
|
31 |
<div>
|
32 |
<?php
|
33 |
get_smooth_slider();
|
46 |
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
47 |
<div class="inside">
|
48 |
<ul>
|
49 |
+
<li><a href="http://slidervilla.com/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
50 |
+
<li><a href="http://keencodes.com/" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
51 |
+
<li><a href="http://www.clickonf5.org" title="<?php _e('Visit Internet Techies','smooth-slider'); ?>
|
52 |
" ><?php _e('Plugin Parent Site','smooth-slider'); ?></a></li>
|
|
|
|
|
|
|
|
|
53 |
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
54 |
</ul>
|
55 |
</div>
|
58 |
<div class="postbox">
|
59 |
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
60 |
<div class="inside">
|
61 |
+
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fslidervilla&width=270&height=170&colorscheme=light&show_faces=true&border_color&stream=false&header=false&appId=140253496056337" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:270px; height:170px;" allowTransparency="true"></iframe>
|
62 |
</div>
|
63 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
<div class="postbox">
|
66 |
<h3 class="hndle"><span></span><?php _e('Recommended Themes','smooth-slider'); ?></h3>
|
72 |
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">For more info visit ElegantThemes</a></p>
|
73 |
</div>
|
74 |
</div></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
</div> <!--end of poststuff -->
|
77 |
|
78 |
+
<form method="post" action="options.php" id="smooth_slider_form">
|
79 |
+
<?php settings_fields('smooth-slider-group'); ?>
|
80 |
+
<div style="float:left;width:70%;">
|
81 |
+
<div id="slider_tabs">
|
82 |
+
<ul class="ui-tabs">
|
83 |
+
<li style="font-weight:bold;font-size:12px;"><a href="#basic">Basic Settings</a></li>
|
84 |
+
<li style="font-weight:bold;font-size:12px;"><a href="#slides">Slides Panel</a></li>
|
85 |
+
<li style="font-weight:bold;font-size:12px;"><a href="#responsive">Responsiveness</a></li>
|
86 |
+
<li style="font-weight:bold;font-size:12px;"><a href="#cssvalues">Generated CSS</a></li>
|
87 |
+
</ul>
|
88 |
+
|
89 |
+
<div id="basic">
|
90 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
91 |
+
<h2><?php _e('Basic Controls','smooth-slider'); ?></h2>
|
92 |
<table class="form-table">
|
93 |
|
94 |
<tr valign="top">
|
95 |
+
<th scope="row"><label for="smooth_slider_autostep"><?php _e(' Enable autostepping of slides','smooth-slider'); ?></label></th>
|
96 |
+
<td>
|
97 |
+
<input name="smooth_slider_options[autostep]" type="checkbox" id="smooth_slider_autostep" value="1" <?php checked("1", $smooth_slider['autostep']); ?> />
|
98 |
+
</td>
|
99 |
</tr>
|
100 |
|
101 |
<tr valign="top">
|
102 |
+
<th scope="row"><?php _e('Slide Transition Effect','smooth-slider'); ?></th>
|
103 |
+
<td><select name="smooth_slider_options[fx]" >
|
104 |
+
<option value="scrollHorz" <?php if ($smooth_slider['fx'] == "scrollHorz"){ echo "selected";}?> ><?php _e('Scroll Horizontally','smooth-slider'); ?></option>
|
105 |
+
<option value="scrollVert" <?php if ($smooth_slider['fx'] == "scrollVert"){ echo "selected";}?> ><?php _e('Scroll Vertically','smooth-slider'); ?></option>
|
106 |
+
<option value="turnUp" <?php if ($smooth_slider['fx'] == "turnUp"){ echo "selected";}?> ><?php _e('Turn Up','smooth-slider'); ?></option>
|
107 |
+
<option value="turnDown" <?php if ($smooth_slider['fx'] == "turnDown"){ echo "selected";}?> ><?php _e('Turn Down','smooth-slider'); ?></option>
|
108 |
+
<option value="fade" <?php if ($smooth_slider['fx'] == "fade"){ echo "selected";}?> ><?php _e('Fade','smooth-slider'); ?></option>
|
109 |
+
<option value="uncover" <?php if ($smooth_slider['fx'] == "uncover"){ echo "selected";}?> ><?php _e('Uncover Slide','smooth-slider'); ?></option>
|
110 |
+
</select>
|
111 |
+
<span class="moreInfo">
|
112 |
+
<span class="trigger"> ? </span>
|
113 |
+
<div class="tooltip">
|
114 |
+
<?php _e('Select the Transition Effect from six different effects.','smooth-slider'); ?>
|
115 |
+
</div>
|
116 |
+
</span>
|
117 |
+
</td>
|
118 |
</tr>
|
119 |
|
120 |
<tr valign="top">
|
121 |
+
<th scope="row"><?php _e('Slide Pause Interval','smooth-slider'); ?></th>
|
122 |
+
<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'); ?>
|
123 |
+
<span class="moreInfo">
|
124 |
+
<span class="trigger"> ? </span>
|
125 |
+
<div class="tooltip">
|
126 |
+
<?php _e('Enter number of secs you want the slider to stop before sliding to next slide.','smooth-slider'); ?>
|
127 |
+
</div>
|
128 |
+
</span>
|
129 |
+
</td>
|
130 |
+
</tr>
|
131 |
+
|
132 |
+
<tr valign="top">
|
133 |
+
<th scope="row"><?php _e('Slide Animation Length','smooth-slider'); ?></th>
|
134 |
+
<td><input type="text" name="smooth_slider_options[transition]" id="smooth_slider_transition" class="small-text" value="<?php echo $smooth_slider['transition']; ?>" /><small style="color:#FF0000"><?php _e(' (IMP!! Enter numeric value > 0)','smooth-slider'); ?></small>
|
135 |
+
<span class="moreInfo">
|
136 |
+
<span class="trigger"> ? </span>
|
137 |
+
<div class="tooltip">
|
138 |
+
<?php _e('The duration of Slide Animation in milliseconds. Lower value indicates fast animation','smooth-slider'); ?>
|
139 |
+
</div>
|
140 |
+
</span>
|
141 |
+
</td>
|
142 |
</tr>
|
143 |
|
144 |
<tr valign="top">
|
145 |
<th scope="row"><?php _e('Number of Posts in the Slideshow','smooth-slider'); ?></th>
|
146 |
+
<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']; ?>" />
|
147 |
+
</td>
|
148 |
</tr>
|
149 |
|
150 |
<tr valign="top">
|
166 |
|
167 |
<tr valign="top">
|
168 |
<th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
|
169 |
+
<td><input type="text" name="smooth_slider_options[border]" id="smooth_slider_border" class="small-text" value="<?php echo $smooth_slider['border']; ?>" />
|
170 |
+
<span class="moreInfo">
|
171 |
+
<span class="trigger"> ? </span>
|
172 |
+
<div class="tooltip">
|
173 |
+
<?php _e('Enter 0 if no border is required','smooth-slider'); ?>
|
174 |
+
</div>
|
175 |
+
</span>
|
176 |
+
</td>
|
177 |
</tr>
|
178 |
|
179 |
<tr valign="top">
|
190 |
<label for="smooth_slider_goto_slide"><?php _e('Show go to slide number links or images','smooth-slider'); ?></label><br />
|
191 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="0" <?php checked('0', $smooth_slider['goto_slide']); ?> /> <?php _e('None ','smooth-slider'); ?><br />
|
192 |
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="1" <?php checked('1', $smooth_slider['goto_slide']); ?> /> <?php _e('Numbers','smooth-slider'); ?> <br />
|
193 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="2" <?php checked('2', $smooth_slider['goto_slide']); ?> /> <?php _e('Custom Images for Navigation','smooth-slider'); ?> <input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="4" <?php checked('4', $smooth_slider['goto_slide']); ?> /> <?php _e('Fixed Images for Navigation','smooth-slider'); ?> <br /> <?php _e('Image Width: ','smooth-slider'); ?><input type="text" name="smooth_slider_options[navimg_w]" id="smooth_slider_navimg_w" class="small-text" value="<?php echo $smooth_slider['navimg_w']; ?>" /> <?php _e('px','smooth-slider'); ?> <?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 />
|
194 |
+
<input name="smooth_slider_options[goto_slide]" type="radio" id="smooth_slider_goto_slide" value="3" <?php checked('3', $smooth_slider['goto_slide']); ?> /> <?php _e('Enter Custom Text or HTML','smooth-slider'); ?>
|
195 |
<input type="text" name="smooth_slider_options[custom_nav]" class="regular-text code" value="<?php echo htmlentities($smooth_slider['custom_nav'], ENT_QUOTES); ?>" />
|
196 |
</fieldset></td>
|
197 |
</tr>
|
198 |
|
199 |
</table>
|
200 |
+
<p class="submit">
|
201 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
202 |
+
</p>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
206 |
+
<h2><?php _e('Miscellaneous','smooth-slider'); ?></h2>
|
207 |
+
|
208 |
+
<table class="form-table">
|
209 |
+
|
210 |
+
<tr valign="top" <?php if($smooth_slider['ver']=='step') echo 'style="display:none;"';?>>
|
211 |
+
<th scope="row"><?php _e('Help promoting Smooth Slider','smooth-slider'); ?></th>
|
212 |
+
<td><select name="smooth_slider_options[support]" >
|
213 |
+
<option value="1" <?php if ($smooth_slider['support'] == "1"){ echo "selected";}?> ><?php _e('Yes','smooth-slider'); ?></option>
|
214 |
+
<option value="0" <?php if ($smooth_slider['support'] == "0"){ echo "selected";}?> ><?php _e('No','smooth-slider'); ?></option>
|
215 |
+
</select>
|
216 |
+
<small><?php _e('Consider donating in case you select "No"','smooth-slider'); ?></small>
|
217 |
+
</td>
|
218 |
+
</tr>
|
219 |
+
|
220 |
+
<tr valign="top">
|
221 |
+
<th scope="row"><?php _e('Retain these html tags','smooth-slider'); ?></th>
|
222 |
+
<td><input type="text" name="smooth_slider_options[allowable_tags]" class="regular-text code" value="<?php echo $smooth_slider['allowable_tags']; ?>" />
|
223 |
+
<span class="moreInfo">
|
224 |
+
<span class="trigger"> ? </span>
|
225 |
+
<div class="tooltip">
|
226 |
+
<?php _e('(read','smooth-slider'); ?> <a href="http://guides.slidervilla.com/smooth-slider/" title="<?php _e('how to retain html like line breaks and links in the Smooth Slider','smooth-slider'); ?>" target="_blank"><?php _e('Usage section of the plugin page','smooth-slider'); ?></a> <?php _e('to know more','smooth-slider'); ?>)
|
227 |
+
</div>
|
228 |
+
</span>
|
229 |
+
</td>
|
230 |
+
</tr>
|
231 |
+
<tr valign="top">
|
232 |
+
<th scope="row"><?php _e('Continue Reading Text','smooth-slider'); ?></th>
|
233 |
+
<td><input type="text" name="smooth_slider_options[more]" class="regular-text code" value="<?php echo $smooth_slider['more']; ?>" /></td>
|
234 |
+
</tr>
|
235 |
+
|
236 |
+
<tr valign="top">
|
237 |
+
<th scope="row"><?php _e('Minimum User Level to add Post to the Slider','smooth-slider'); ?></th>
|
238 |
+
<td><select name="smooth_slider_options[user_level]" >
|
239 |
+
<option value="manage_options" <?php if ($smooth_slider['user_level'] == "manage_options"){ echo "selected";}?> ><?php _e('Administrator','smooth-slider'); ?></option>
|
240 |
+
<option value="edit_others_posts" <?php if ($smooth_slider['user_level'] == "edit_others_posts"){ echo "selected";}?> ><?php _e('Editor and Admininstrator','smooth-slider'); ?></option>
|
241 |
+
<option value="publish_posts" <?php if ($smooth_slider['user_level'] == "publish_posts"){ echo "selected";}?> ><?php _e('Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
242 |
+
<option value="edit_posts" <?php if ($smooth_slider['user_level'] == "edit_posts"){ echo "selected";}?> ><?php _e('Contributor, Author, Editor and Admininstrator','smooth-slider'); ?></option>
|
243 |
+
</select>
|
244 |
+
</td>
|
245 |
+
</tr>
|
246 |
+
|
247 |
+
<tr valign="top">
|
248 |
+
<th scope="row"><?php _e('Randomize Slides in Slider','smooth-slider'); ?></th>
|
249 |
+
<td><input name="smooth_slider_options[rand]" type="checkbox" value="1" <?php checked('1', $smooth_slider['rand']); ?> />
|
250 |
+
<span class="moreInfo">
|
251 |
+
<span class="trigger"> ? </span>
|
252 |
+
<div class="tooltip">
|
253 |
+
<?php _e('check this if you want the slides added to appear in random order','smooth-slider'); ?>
|
254 |
+
</div>
|
255 |
+
</span>
|
256 |
+
</td>
|
257 |
+
</tr>
|
258 |
+
|
259 |
+
<tr valign="top">
|
260 |
+
<th scope="row"><?php _e('Text to display in the JavaScript disabled browser','smooth-slider'); ?></th>
|
261 |
+
<td><input type="text" name="smooth_slider_options[noscript]" class="regular-text code" value="<?php echo $smooth_slider['noscript']; ?>" /></td>
|
262 |
+
</tr>
|
263 |
+
|
264 |
+
<tr valign="top" style="display:none;">
|
265 |
+
<th scope="row"><?php _e('Add Shortcode Support','smooth-slider'); ?></th>
|
266 |
+
<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>
|
267 |
+
</tr>
|
268 |
+
|
269 |
+
<tr valign="top">
|
270 |
+
<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>
|
271 |
+
<td><select name="smooth_slider_options[stylesheet]" >
|
272 |
+
<?php
|
273 |
+
$directory = SMOOTH_SLIDER_CSS_DIR;
|
274 |
+
if ($handle = opendir($directory)) {
|
275 |
+
while (false !== ($file = readdir($handle))) {
|
276 |
+
if($file != '.' and $file != '..') { ?>
|
277 |
+
<option value="<?php echo $file;?>" <?php if ($smooth_slider['stylesheet'] == $file){ echo "selected";}?> ><?php echo $file;?></option>
|
278 |
+
<?php } }
|
279 |
+
closedir($handle);
|
280 |
+
}
|
281 |
+
?>
|
282 |
+
</select>
|
283 |
+
</td>
|
284 |
+
</tr>
|
285 |
+
|
286 |
+
<tr valign="top">
|
287 |
+
<th scope="row"><?php _e('Multiple Slider Feature','smooth-slider'); ?></th>
|
288 |
+
<td><label for="smooth_slider_multiple">
|
289 |
+
<input name="smooth_slider_options[multiple_sliders]" type="checkbox" id="smooth_slider_multiple" value="1" <?php checked("1", $smooth_slider['multiple_sliders']); ?> />
|
290 |
+
<?php _e('Enable Multiple Slider Function on Edit Post/Page','smooth-slider'); ?></label></td>
|
291 |
+
</tr>
|
292 |
+
|
293 |
+
<tr valign="top">
|
294 |
+
<th scope="row"><?php _e('Enable FOUC','smooth-slider'); ?></th>
|
295 |
+
<td><input name="smooth_slider_options[fouc]" type="checkbox" value="1" <?php checked('1', $smooth_slider['fouc']); ?> />
|
296 |
+
<span class="moreInfo">
|
297 |
+
<span class="trigger"> ? </span>
|
298 |
+
<div class="tooltip">
|
299 |
+
<?php _e('(check this if you would not want to disable Flash of Unstyled Content in the slider when the page is loaded)','smooth-slider'); ?>
|
300 |
+
</div>
|
301 |
+
</span>
|
302 |
+
</td>
|
303 |
+
</tr>
|
304 |
+
|
305 |
+
<tr valign="top">
|
306 |
+
<th scope="row"><?php _e('Custom Styles','smooth-slider'); ?></th>
|
307 |
+
<td><textarea name="smooth_slider_options[css]" rows="5" cols="50" class="regular-text code"><?php echo $smooth_slider['css']; ?></textarea>
|
308 |
+
<span class="moreInfo">
|
309 |
+
<span class="trigger"> ? </span>
|
310 |
+
<div class="tooltip">
|
311 |
+
<?php _e('(custom css styles that you would want to be applied to the slider elements)','roster-slider'); ?>
|
312 |
+
</div>
|
313 |
+
</span>
|
314 |
+
</td>
|
315 |
+
</tr>
|
316 |
+
|
317 |
+
</table>
|
318 |
+
</div>
|
319 |
|
320 |
+
</div><!--#basics-->
|
321 |
+
|
322 |
+
<div id="slides">
|
323 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
324 |
<h2><?php _e('Slider Title','smooth-slider'); ?></h2>
|
325 |
<p><?php _e('Customize the looks of the main title of the Slideshow from here','smooth-slider'); ?></p>
|
326 |
<table class="form-table">
|
342 |
<tr valign="top">
|
343 |
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
344 |
<td><select name="smooth_slider_options[title_font]" id="smooth_slider_title_font" >
|
345 |
+
<option value="Arial,Helvetica,sans-serif" <?php if ($smooth_slider['title_font'] == "Arial,Helvetica,sans-serif"){ echo "selected";}?> >Arial,Helvetica,sans-serif</option>
|
346 |
+
<option value="Verdana,Geneva,sans-serif" <?php if ($smooth_slider['title_font'] == "Verdana,Geneva,sans-serif"){ echo "selected";}?> >Verdana,Geneva,sans-serif</option>
|
347 |
+
<option value="Tahoma,Geneva,sans-serif" <?php if ($smooth_slider['title_font'] == "Tahoma,Geneva,sans-serif"){ echo "selected";}?> >Tahoma,Geneva,sans-serif</option>
|
348 |
+
<option value="Trebuchet MS,sans-serif" <?php if ($smooth_slider['title_font'] == "Trebuchet MS,sans-serif"){ echo "selected";}?> >Trebuchet MS,sans-serif</option>
|
349 |
+
<option value="'Century Gothic','Avant Garde',sans-serif" <?php if ($smooth_slider['title_font'] == "'Century Gothic','Avant Garde',sans-serif"){ echo "selected";}?> >'Century Gothic','Avant Garde',sans-serif</option>
|
350 |
+
<option value="'Arial Narrow',sans-serif" <?php if ($smooth_slider['title_font'] == "'Arial Narrow',sans-serif"){ echo "selected";}?> >'Arial Narrow',sans-serif</option>
|
351 |
+
<option value="'Arial Black',sans-serif" <?php if ($smooth_slider['title_font'] == "'Arial Black',sans-serif"){ echo "selected";}?> >'Arial Black',sans-serif</option>
|
352 |
+
<option value="'Gills Sans MT','Gills Sans',sans-serif" <?php if ($smooth_slider['title_font'] == "'Gills Sans MT','Gills Sans',sans-serif"){ echo "selected";} ?> >'Gills Sans MT','Gills Sans',sans-serif</option>
|
353 |
+
<option value="'Times New Roman',Times,serif" <?php if ($smooth_slider['title_font'] == "'Times New Roman',Times,serif"){ echo "selected";}?> >'Times New Roman',Times,serif</option>
|
354 |
+
<option value="Georgia,serif" <?php if ($smooth_slider['title_font'] == "Georgia,serif"){ echo "selected";}?> >Georgia,serif</option>
|
355 |
+
<option value="Garamond,serif" <?php if ($smooth_slider['title_font'] == "Garamond,serif"){ echo "selected";}?> >Garamond,serif</option>
|
356 |
+
<option value="'Century Schoolbook','New Century Schoolbook',serif" <?php if ($smooth_slider['title_font'] == "'Century Schoolbook','New Century Schoolbook',serif"){ echo "selected";}?> >'Century Schoolbook','New Century Schoolbook',serif</option>
|
357 |
+
<option value="'Bookman Old Style',Bookman,serif" <?php if ($smooth_slider['title_font'] == "'Bookman Old Style',Bookman,serif"){ echo "selected";}?> >'Bookman Old Style',Bookman,serif</option>
|
358 |
+
<option value="'Comic Sans MS',cursive" <?php if ($smooth_slider['title_font'] == "'Comic Sans MS',cursive"){ echo "selected";}?> >'Comic Sans MS',cursive</option>
|
359 |
+
<option value="'Courier New',Courier,monospace" <?php if ($smooth_slider['title_font'] == "'Courier New',Courier,monospace"){ echo "selected";}?> >'Courier New',Courier,monospace</option>
|
360 |
+
<option value="'Copperplate Gothic Bold',Copperplate,fantasy" <?php if ($smooth_slider['title_font'] == "'Copperplate Gothic Bold',Copperplate,fantasy"){ echo "selected";}?> >'Copperplate Gothic Bold',Copperplate,fantasy</option>
|
361 |
+
<option value="Impact,fantasy" <?php if ($smooth_slider['title_font'] == "Impact,fantasy"){ echo "selected";}?> >Impact,fantasy</option>
|
362 |
</select>
|
363 |
</td>
|
364 |
</tr>
|
384 |
</td>
|
385 |
</tr>
|
386 |
</table>
|
387 |
+
<p class="submit">
|
388 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
389 |
+
</p>
|
390 |
+
</div>
|
391 |
|
392 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
393 |
<h2><?php _e('Post Title','smooth-slider'); ?></h2>
|
394 |
<p><?php _e('Customize the looks of the title of each of the sliding post here','smooth-slider'); ?></p>
|
395 |
<table class="form-table">
|
397 |
<tr valign="top">
|
398 |
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
399 |
<td><select name="smooth_slider_options[ptitle_font]" id="smooth_slider_ptitle_font" >
|
400 |
+
<option value="Arial,Helvetica,sans-serif" <?php if ($smooth_slider['ptitle_font'] == "Arial,Helvetica,sans-serif"){ echo "selected";}?> >Arial,Helvetica,sans-serif</option>
|
401 |
+
<option value="Verdana,Geneva,sans-serif" <?php if ($smooth_slider['ptitle_font'] == "Verdana,Geneva,sans-serif"){ echo "selected";}?> >Verdana,Geneva,sans-serif</option>
|
402 |
+
<option value="Tahoma,Geneva,sans-serif" <?php if ($smooth_slider['ptitle_font'] == "Tahoma,Geneva,sans-serif"){ echo "selected";}?> >Tahoma,Geneva,sans-serif</option>
|
403 |
+
<option value="Trebuchet MS,sans-serif" <?php if ($smooth_slider['ptitle_font'] == "Trebuchet MS,sans-serif"){ echo "selected";}?> >Trebuchet MS,sans-serif</option>
|
404 |
+
<option value="'Century Gothic','Avant Garde',sans-serif" <?php if ($smooth_slider['ptitle_font'] == "'Century Gothic','Avant Garde',sans-serif"){ echo "selected";}?> >'Century Gothic','Avant Garde',sans-serif</option>
|
405 |
+
<option value="'Arial Narrow',sans-serif" <?php if ($smooth_slider['ptitle_font'] == "'Arial Narrow',sans-serif"){ echo "selected";}?> >'Arial Narrow',sans-serif</option>
|
406 |
+
<option value="'Arial Black',sans-serif" <?php if ($smooth_slider['ptitle_font'] == "'Arial Black',sans-serif"){ echo "selected";}?> >'Arial Black',sans-serif</option>
|
407 |
+
<option value="'Gills Sans MT','Gills Sans',sans-serif" <?php if ($smooth_slider['ptitle_font'] == "'Gills Sans MT','Gills Sans',sans-serif"){ echo "selected";} ?> >'Gills Sans MT','Gills Sans',sans-serif</option>
|
408 |
+
<option value="'Times New Roman',Times,serif" <?php if ($smooth_slider['ptitle_font'] == "'Times New Roman',Times,serif"){ echo "selected";}?> >'Times New Roman',Times,serif</option>
|
409 |
+
<option value="Georgia,serif" <?php if ($smooth_slider['ptitle_font'] == "Georgia,serif"){ echo "selected";}?> >Georgia,serif</option>
|
410 |
+
<option value="Garamond,serif" <?php if ($smooth_slider['ptitle_font'] == "Garamond,serif"){ echo "selected";}?> >Garamond,serif</option>
|
411 |
+
<option value="'Century Schoolbook','New Century Schoolbook',serif" <?php if ($smooth_slider['ptitle_font'] == "'Century Schoolbook','New Century Schoolbook',serif"){ echo "selected";}?> >'Century Schoolbook','New Century Schoolbook',serif</option>
|
412 |
+
<option value="'Bookman Old Style',Bookman,serif" <?php if ($smooth_slider['ptitle_font'] == "'Bookman Old Style',Bookman,serif"){ echo "selected";}?> >'Bookman Old Style',Bookman,serif</option>
|
413 |
+
<option value="'Comic Sans MS',cursive" <?php if ($smooth_slider['ptitle_font'] == "'Comic Sans MS',cursive"){ echo "selected";}?> >'Comic Sans MS',cursive</option>
|
414 |
+
<option value="'Courier New',Courier,monospace" <?php if ($smooth_slider['ptitle_font'] == "'Courier New',Courier,monospace"){ echo "selected";}?> >'Courier New',Courier,monospace</option>
|
415 |
+
<option value="'Copperplate Gothic Bold',Copperplate,fantasy" <?php if ($smooth_slider['ptitle_font'] == "'Copperplate Gothic Bold',Copperplate,fantasy"){ echo "selected";}?> >'Copperplate Gothic Bold',Copperplate,fantasy</option>
|
416 |
+
<option value="Impact,fantasy" <?php if ($smooth_slider['ptitle_font'] == "Impact,fantasy"){ echo "selected";}?> >Impact,fantasy</option>
|
417 |
</select>
|
418 |
</td>
|
419 |
</tr>
|
439 |
</td>
|
440 |
</tr>
|
441 |
</table>
|
442 |
+
<p class="submit">
|
443 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
444 |
+
</p>
|
445 |
+
</div>
|
446 |
|
447 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
448 |
<h2><?php _e('Thumbnail Image','smooth-slider'); ?></h2>
|
449 |
<p><?php _e('Customize the looks of the thumbnail image for each of the sliding post here','smooth-slider'); ?></p>
|
450 |
<table class="form-table">
|
481 |
<option value="2" <?php if ($smooth_slider['crop'] == "2"){ echo "selected";}?> ><?php _e('Medium','smooth-slider'); ?></option>
|
482 |
<option value="3" <?php if ($smooth_slider['crop'] == "3"){ echo "selected";}?> ><?php _e('Thumbnail','smooth-slider'); ?></option>
|
483 |
</select>
|
484 |
+
<span class="moreInfo">
|
485 |
+
<span class="trigger"> ? </span>
|
486 |
+
<div class="tooltip">
|
487 |
+
<?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'); ?>
|
488 |
+
</div>
|
489 |
+
</span>
|
490 |
+
|
491 |
</td>
|
492 |
</tr>
|
493 |
|
495 |
<tr valign="top">
|
496 |
<th scope="row"><?php _e('Image Size','smooth-slider'); ?></th>
|
497 |
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Image Size','smooth-slider'); ?></span></legend>
|
498 |
+
<input name="smooth_slider_options[img_size]" type="radio" value="0" <?php checked('0', $smooth_slider['img_size']); ?> /> <?php _e('Original Size','smooth-slider'); ?>
|
499 |
+
<span class="moreInfo">
|
500 |
+
<span class="trigger"> ? </span>
|
501 |
+
<div class="tooltip">
|
502 |
+
<?php _e('(In this case, the size would be equal to the extracted image (full/large/medium/thumbnail) from the above settings','smooth-slider'); ?>
|
503 |
+
</div>
|
504 |
+
</span>
|
505 |
+
<br />
|
506 |
<input name="smooth_slider_options[img_size]" type="radio" value="1" <?php checked('1', $smooth_slider['img_size']); ?> /> <?php _e('Custom Size:','smooth-slider'); ?>
|
507 |
<label for="smooth_slider_options[img_width]"><?php _e('Width','smooth-slider'); ?></label>
|
508 |
<input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" /> <?php _e('px','smooth-slider'); ?>
|
511 |
|
512 |
<tr valign="top">
|
513 |
<th scope="row"><?php _e('Maximum Height of the Image','smooth-slider'); ?></th>
|
514 |
+
<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'); ?>
|
515 |
+
<span class="moreInfo">
|
516 |
+
<span class="trigger"> ? </span>
|
517 |
+
<div class="tooltip">
|
518 |
+
<?php _e('(This is necessary in order to keep the maximum image height in control)','smooth-slider'); ?>
|
519 |
+
</div>
|
520 |
+
</span>
|
521 |
+
</td>
|
522 |
</tr>
|
523 |
|
|
|
524 |
<tr valign="top">
|
525 |
<th scope="row"><?php _e('Border Thickness','smooth-slider'); ?></th>
|
526 |
+
<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']; ?>" />
|
527 |
+
<span class="moreInfo">
|
528 |
+
<span class="trigger"> ? </span>
|
529 |
+
<div class="tooltip">
|
530 |
+
<?php _e('px (put 0 if no border is required)','smooth-slider'); ?>
|
531 |
+
</div>
|
532 |
+
</span>
|
533 |
+
</td>
|
534 |
</tr>
|
535 |
|
536 |
<tr valign="top">
|
540 |
|
541 |
<tr valign="top">
|
542 |
<th scope="row"><?php _e('Make pure Image Slider','smooth-slider'); ?></th>
|
543 |
+
<td><input name="smooth_slider_options[image_only]" type="checkbox" value="1" <?php checked('1', $smooth_slider['image_only']); ?> />
|
544 |
+
<span class="moreInfo">
|
545 |
+
<span class="trigger"> ? </span>
|
546 |
+
<div class="tooltip">
|
547 |
+
<?php _e('(check this to convert Smooth Slider to Image Slider with no content)','smooth-slider'); ?>
|
548 |
+
</div>
|
549 |
+
</span>
|
550 |
+
</td>
|
551 |
</tr>
|
552 |
</table>
|
553 |
|
554 |
+
<p class="submit">
|
555 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
556 |
+
</p>
|
557 |
+
|
558 |
+
</div>
|
559 |
+
|
560 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
561 |
<h2><?php _e('Slider Content','smooth-slider'); ?></h2>
|
562 |
<p><?php _e('Customize the looks of the content of each of the sliding post here','smooth-slider'); ?></p>
|
563 |
<table class="form-table">
|
564 |
<tr valign="top">
|
565 |
<th scope="row"><?php _e('Font','smooth-slider'); ?></th>
|
566 |
<td><select name="smooth_slider_options[content_font]" id="smooth_slider_content_font" >
|
567 |
+
<option value="Arial,Helvetica,sans-serif" <?php if ($smooth_slider['content_font'] == "Arial,Helvetica,sans-serif"){ echo "selected";}?> >Arial,Helvetica,sans-serif</option>
|
568 |
+
<option value="Verdana,Geneva,sans-serif" <?php if ($smooth_slider['content_font'] == "Verdana,Geneva,sans-serif"){ echo "selected";}?> >Verdana,Geneva,sans-serif</option>
|
569 |
+
<option value="Tahoma,Geneva,sans-serif" <?php if ($smooth_slider['content_font'] == "Tahoma,Geneva,sans-serif"){ echo "selected";}?> >Tahoma,Geneva,sans-serif</option>
|
570 |
+
<option value="Trebuchet MS,sans-serif" <?php if ($smooth_slider['content_font'] == "Trebuchet MS,sans-serif"){ echo "selected";}?> >Trebuchet MS,sans-serif</option>
|
571 |
+
<option value="'Century Gothic','Avant Garde',sans-serif" <?php if ($smooth_slider['content_font'] == "'Century Gothic','Avant Garde',sans-serif"){ echo "selected";}?> >'Century Gothic','Avant Garde',sans-serif</option>
|
572 |
+
<option value="'Arial Narrow',sans-serif" <?php if ($smooth_slider['content_font'] == "'Arial Narrow',sans-serif"){ echo "selected";}?> >'Arial Narrow',sans-serif</option>
|
573 |
+
<option value="'Arial Black',sans-serif" <?php if ($smooth_slider['content_font'] == "'Arial Black',sans-serif"){ echo "selected";}?> >'Arial Black',sans-serif</option>
|
574 |
+
<option value="'Gills Sans MT','Gills Sans',sans-serif" <?php if ($smooth_slider['content_font'] == "'Gills Sans MT','Gills Sans',sans-serif"){ echo "selected";} ?> >'Gills Sans MT','Gills Sans',sans-serif</option>
|
575 |
+
<option value="'Times New Roman',Times,serif" <?php if ($smooth_slider['content_font'] == "'Times New Roman',Times,serif"){ echo "selected";}?> >'Times New Roman',Times,serif</option>
|
576 |
+
<option value="Georgia,serif" <?php if ($smooth_slider['content_font'] == "Georgia,serif"){ echo "selected";}?> >Georgia,serif</option>
|
577 |
+
<option value="Garamond,serif" <?php if ($smooth_slider['content_font'] == "Garamond,serif"){ echo "selected";}?> >Garamond,serif</option>
|
578 |
+
<option value="'Century Schoolbook','New Century Schoolbook',serif" <?php if ($smooth_slider['content_font'] == "'Century Schoolbook','New Century Schoolbook',serif"){ echo "selected";}?> >'Century Schoolbook','New Century Schoolbook',serif</option>
|
579 |
+
<option value="'Bookman Old Style',Bookman,serif" <?php if ($smooth_slider['content_font'] == "'Bookman Old Style',Bookman,serif"){ echo "selected";}?> >'Bookman Old Style',Bookman,serif</option>
|
580 |
+
<option value="'Comic Sans MS',cursive" <?php if ($smooth_slider['content_font'] == "'Comic Sans MS',cursive"){ echo "selected";}?> >'Comic Sans MS',cursive</option>
|
581 |
+
<option value="'Courier New',Courier,monospace" <?php if ($smooth_slider['content_font'] == "'Courier New',Courier,monospace"){ echo "selected";}?> >'Courier New',Courier,monospace</option>
|
582 |
+
<option value="'Copperplate Gothic Bold',Copperplate,fantasy" <?php if ($smooth_slider['content_font'] == "'Copperplate Gothic Bold',Copperplate,fantasy"){ echo "selected";}?> >'Copperplate Gothic Bold',Copperplate,fantasy</option>
|
583 |
+
<option value="Impact,fantasy" <?php if ($smooth_slider['content_font'] == "Impact,fantasy"){ echo "selected";}?> >Impact,fantasy</option>
|
584 |
</select>
|
585 |
</td>
|
586 |
</tr>
|
616 |
</td>
|
617 |
</tr>
|
618 |
|
|
|
|
|
|
|
|
|
619 |
<tr valign="top">
|
620 |
<th scope="row"><?php _e('Maximum content size (in words)','smooth-slider'); ?></th>
|
621 |
+
<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']; ?>" />
|
622 |
+
<span class="moreInfo">
|
623 |
+
<span class="trigger"> ? </span>
|
624 |
+
<div class="tooltip">
|
625 |
+
<?php _e('If the number of Words are not specified in this field, the below field i.e. the \'Maximum Content Size in Chracters\' will be considered.','smooth-slider'); ?>
|
626 |
+
</div>
|
627 |
+
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
</td>
|
629 |
</tr>
|
630 |
|
631 |
<tr valign="top">
|
632 |
+
<th scope="row"><?php _e('Maximum content size (in characters)','smooth-slider'); ?></th>
|
633 |
+
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
</tr>
|
635 |
|
636 |
+
</table>
|
637 |
+
</div>
|
|
|
|
|
638 |
|
639 |
+
</div><!--#slides-->
|
|
|
|
|
|
|
640 |
|
641 |
+
<div id="responsive">
|
642 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
643 |
+
<h2><?php _e('Responsive Design Settings','smooth-slider'); ?></h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
|
645 |
+
<table class="form-table">
|
646 |
<tr valign="top">
|
647 |
+
<th scope="row"><?php _e('Enable Responsive Design','smooth-slider'); ?></th>
|
648 |
+
<td><input name="smooth_slider_options[responsive]" type="checkbox" value="1" <?php checked('1', $smooth_slider['responsive']); ?> /> <?php _e('check this if you want to enable the responsive layout for Smooth Slider (you should be using Responsive/Fluid WordPress theme for this feature to work!) ','smooth-slider'); ?></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
649 |
</tr>
|
|
|
650 |
</table>
|
651 |
+
</div>
|
652 |
+
|
653 |
+
</div> <!--#responsive-->
|
654 |
+
|
655 |
+
<div id="cssvalues">
|
656 |
+
<div style="border:1px solid #ccc;padding:10px;background:#fff;margin:10px 0">
|
657 |
+
<h2><?php _e('CSS Generated thru these settings','thumbel-slider'); ?></h2>
|
658 |
+
<p><?php _e('Save Changes for the settings first and then view this data. You can use this CSS in your \'custom\' stylesheets if you use other than \'default\' value for the Stylesheet folder.','thumbel-slider'); ?></p>
|
659 |
+
<?php $smooth_slider_css = smooth_get_inline_css($echo='1'); ?>
|
660 |
+
<div style="font-family:monospace;font-size:13px;background:#ddd;">
|
661 |
+
.smooth_slider{<?php echo $smooth_slider_css['smooth_slider'];?>} <br />
|
662 |
+
.smooth_slider .sldr_title{<?php echo $smooth_slider_css['sldr_title'];?>} <br />
|
663 |
+
.smooth_slider .smooth_slideri{<?php echo $smooth_slider_css['smooth_slideri'];?>} <br />
|
664 |
+
.smooth_slider .smooth_slider_thumbnail{<?php echo $smooth_slider_css['smooth_slider_thumbnail'];?>} <br />
|
665 |
+
.smooth_slider .smooth_slideri h2{<?php echo $smooth_slider_css['smooth_slider_h2'];?>} <br />
|
666 |
+
.smooth_slider .smooth_slideri h2 a{<?php echo $smooth_slider_css['smooth_slider_h2_a'];?>} <br />
|
667 |
+
.smooth_slider .smooth_slideri span{<?php echo $smooth_slider_css['smooth_slider_span'];?>} <br />
|
668 |
+
.smooth_slider .smooth_slideri p.more{<?php echo $smooth_slider_css['smooth_slider_p_more'];?>} <br />
|
669 |
+
.smooth_slider .smooth_next{<?php echo $smooth_slider_css['smooth_next'];?>} <br />
|
670 |
+
.smooth_slider .smooth_prev{<?php echo $smooth_slider_css['smooth_prev'];?>}
|
671 |
+
</div>
|
672 |
+
</div>
|
673 |
+
</div> <!--#cssvalues-->
|
674 |
+
|
675 |
+
</div> <!--end of #slider_tabs-->
|
676 |
|
677 |
<p class="submit">
|
678 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
settings/sliders.php
CHANGED
@@ -204,84 +204,43 @@ if ($_POST['reorder_posts_slider']) {
|
|
204 |
</div>
|
205 |
|
206 |
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
207 |
-
|
208 |
<div class="postbox">
|
209 |
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
210 |
<div class="inside">
|
211 |
<ul>
|
212 |
-
<li><a href="http://
|
213 |
-
<li><a href="http://
|
214 |
-
|
215 |
-
<li><a href="http://
|
|
|
|
|
216 |
<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>
|
217 |
</ul>
|
218 |
</div>
|
219 |
</div>
|
220 |
-
|
221 |
|
222 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
223 |
<div class="postbox">
|
224 |
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
225 |
<div class="inside">
|
226 |
-
|
227 |
</div>
|
228 |
</div>
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
</div>
|
243 |
-
|
244 |
-
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
245 |
-
<div class="postbox">
|
246 |
-
<h3 class="hndle"><span><?php _e('Top Supporters','smooth-slider'); ?></span></h3>
|
247 |
-
<div class="inside">
|
248 |
-
<div id="smooth_sldr_donations">
|
249 |
-
<ul>
|
250 |
-
<li><a href="http://www.jacobwiechman.com/wordpress//" title="Visit Jacob Wiechman - $50" >Jacob Wiechman - $50</a></li>
|
251 |
-
<li><a href="http://malamedconsulting.com/" title="Visit Connie Malamed - $25" >Connie Malamed - $25</a></li>
|
252 |
-
<li><a href="http://uwaterloo.ca/" title="Visit Trevor Bain - $25" >Trevor Bain - $25</a></li>
|
253 |
-
<li><a href="http://www.whatsthebigidea.com/" title="Visit WhatsTheBigIdea.com,Inc. - $20" >WhatsTheBigIdea.com,Inc. - $20</a></li>
|
254 |
-
</ul>
|
255 |
-
</div>
|
256 |
-
</div>
|
257 |
-
</div>
|
258 |
-
</div>
|
259 |
-
<div style="clear:left;"></div>
|
260 |
-
|
261 |
-
<div id="side-info-column" style="float:left;width:325px;">
|
262 |
-
<div class="postbox">
|
263 |
-
<h3 class="hndle"><span></span><?php _e('Recommended WordPress Hosting','smooth-slider'); ?></h3>
|
264 |
-
<div class="inside">
|
265 |
-
<div style="margin:10px 5px">
|
266 |
-
<a href="http://slidervilla.com/go/hostgator/" title="Recommended Web Hosting" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/hostgator.gif');?>" alt="Recommended Web Hosting" /></a>
|
267 |
-
<p><a href="http://slidervilla.com/go/hostgator/" title="Recommended Web Hosting" target="_blank">HostGator</a> is one of the world's top 10 largest web hosting companies with more than 5,000,000 hosted domains. You can host your own WordPress installation with custom themes, plugins, and your own domain name with HostGator from only $3.96 a month.</p>
|
268 |
-
<p><strong>Features: </strong>UNLIMITED Disk Space and Bandwidth, FREE Site Building Tools and Templates, 24/7/365 Award Winning Technical Support</p>
|
269 |
-
<p>For more info visit <a href="http://slidervilla.com/go/hostgator/" title="Recommended Web Hosting" target="_blank">HostGator.com</a></p>
|
270 |
-
</div>
|
271 |
-
</div></div></div>
|
272 |
-
|
273 |
-
<div id="side-info-column" style="float:left;margin-left:1em;width:325px;">
|
274 |
-
<div class="postbox">
|
275 |
-
<h3 class="hndle"><span></span><?php _e('Recommended Themes','smooth-slider'); ?></h3>
|
276 |
-
<div class="inside">
|
277 |
-
<div style="margin:10px 5px">
|
278 |
-
<a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/elegantthemes.gif');?>" alt="Recommended WordPress Themes" /></a>
|
279 |
-
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">Elegant Themes</a> are attractive, compatible, affordable, SEO optimized WordPress Themes and have best support in community.</p>
|
280 |
-
<p><strong>Beautiful themes, Great support!</strong></p>
|
281 |
-
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">For more info visit ElegantThemes</a></p>
|
282 |
-
</div>
|
283 |
-
</div></div></div>
|
284 |
-
|
285 |
|
286 |
<div style="clear:left;"></div>
|
287 |
</div> <!--end of poststuff -->
|
204 |
</div>
|
205 |
|
206 |
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
207 |
+
<div id="side-info-column" class="inner-sidebar" style="float:left;">
|
208 |
<div class="postbox">
|
209 |
<h3 class="hndle"><span><?php _e('About this Plugin:','smooth-slider'); ?></span></h3>
|
210 |
<div class="inside">
|
211 |
<ul>
|
212 |
+
<li><a href="http://slidervilla.com/smooth-slider" title="<?php _e('Smooth Slider Homepage','smooth-slider'); ?>" ><?php _e('Plugin Homepage','smooth-slider'); ?></a></li>
|
213 |
+
<li><a href="http://clickonf5.com/" title="<?php _e('Support Forum for Smooth Slider','smooth-slider'); ?>
|
214 |
+
" ><?php _e('Support Forum','smooth-slider'); ?></a></li>
|
215 |
+
<li><a href="http://keencodes.com/" title="<?php _e('Smooth Slider Author Page','smooth-slider'); ?>" ><?php _e('About the Author','smooth-slider'); ?></a></li>
|
216 |
+
<li><a href="http://www.clickonf5.org" title="<?php _e('Visit Internet Techies','smooth-slider'); ?>
|
217 |
+
" ><?php _e('Plugin Parent Site','smooth-slider'); ?></a></li>
|
218 |
<li><a href="http://www.clickonf5.org/go/smooth-slider/" title="<?php _e('Donate if you liked the plugin and support in enhancing Smooth Slider and creating new plugins','smooth-slider'); ?>" ><?php _e('Donate with Paypal','smooth-slider'); ?></a></li>
|
219 |
</ul>
|
220 |
</div>
|
221 |
</div>
|
222 |
+
</div>
|
223 |
|
224 |
<div id="side-info-column" class="inner-sidebar" style="float:left;margin-left:1em">
|
225 |
<div class="postbox">
|
226 |
<h3 class="hndle"><span></span><?php _e('Our Facebook Fan Page','smooth-slider'); ?></h3>
|
227 |
<div class="inside">
|
228 |
+
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fslidervilla&width=270&height=170&colorscheme=light&show_faces=true&border_color&stream=false&header=false&appId=140253496056337" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:270px; height:170px;" allowTransparency="true"></iframe>
|
229 |
</div>
|
230 |
</div>
|
231 |
+
</div>
|
232 |
+
|
233 |
+
<div id="side-info-column" style="float:left;margin-left:1em;width:325px;">
|
234 |
+
<div class="postbox">
|
235 |
+
<h3 class="hndle"><span></span><?php _e('Recommended Themes','smooth-slider'); ?></h3>
|
236 |
+
<div class="inside">
|
237 |
+
<div style="margin:10px 5px">
|
238 |
+
<a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank"><img src="<?php echo smooth_slider_plugin_url('images/elegantthemes.gif');?>" alt="Recommended WordPress Themes" /></a>
|
239 |
+
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">Elegant Themes</a> are attractive, compatible, affordable, SEO optimized WordPress Themes and have best support in community.</p>
|
240 |
+
<p><strong>Beautiful themes, Great support!</strong></p>
|
241 |
+
<p><a href="http://slidervilla.com/go/elegantthemes/" title="Recommended WordPress Themes" target="_blank">For more info visit ElegantThemes</a></p>
|
242 |
+
</div>
|
243 |
+
</div></div></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
<div style="clear:left;"></div>
|
246 |
</div> <!--end of poststuff -->
|
slider_versions/j.php
DELETED
@@ -1,977 +0,0 @@
|
|
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 = strip_shortcodes( $slider_content );
|
86 |
-
|
87 |
-
$slider_content = stripslashes($slider_content);
|
88 |
-
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
89 |
-
|
90 |
-
$slider_content = str_replace("\n","<br />",$slider_content);
|
91 |
-
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
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 |
-
<?php if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){?>
|
207 |
-
jQuery('html').addClass('smooth_slider_fouc');
|
208 |
-
jQuery(document).ready(function() {
|
209 |
-
jQuery(".smooth_slider_fouc .smooth_sliderb").css({'display' : 'block'});
|
210 |
-
});
|
211 |
-
<?php } ?>
|
212 |
-
function smooth_slider_initCallback(carousel) {
|
213 |
-
jQuery('#smooth_slider .jcarousel-control a').bind('click', function() {
|
214 |
-
var navclass = jQuery(this).attr("class");
|
215 |
-
var slide = navclass.replace("sldr", "");
|
216 |
-
carousel.scroll(jQuery.jcarousel.intval(slide));
|
217 |
-
carousel.startAuto(0);
|
218 |
-
return false;
|
219 |
-
});
|
220 |
-
<?php if ($smooth_slider['prev_next'] == 1){ ?>
|
221 |
-
// Disable autoscrolling if the user clicks the prev or next button.
|
222 |
-
carousel.buttonNext.bind('click', function() {
|
223 |
-
carousel.startAuto(0);
|
224 |
-
});
|
225 |
-
|
226 |
-
carousel.buttonPrev.bind('click', function() {
|
227 |
-
carousel.startAuto(0);
|
228 |
-
});
|
229 |
-
<?php } ?>
|
230 |
-
// Pause autoscrolling if the user moves with the cursor over the clip.
|
231 |
-
carousel.clip.hover(function() {
|
232 |
-
carousel.stopAuto();
|
233 |
-
}, function() {
|
234 |
-
carousel.startAuto();
|
235 |
-
});
|
236 |
-
};
|
237 |
-
function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) {
|
238 |
-
jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal");
|
239 |
-
jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
240 |
-
var curr_slide = idx;
|
241 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder");
|
242 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
243 |
-
|
244 |
-
<?php if ($smooth_slider['goto_slide'] == 2) {
|
245 |
-
global $sldr_nav_width;
|
246 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
247 |
-
?>
|
248 |
-
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
249 |
-
jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0");
|
250 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
251 |
-
<?php } ?>
|
252 |
-
};
|
253 |
-
jQuery(document).ready(function() {
|
254 |
-
jQuery("#smooth_slider").jcarousel({
|
255 |
-
size: <?php echo $smooth_sldr_j; ?>,
|
256 |
-
scroll: 1,
|
257 |
-
visible: 1,
|
258 |
-
auto:<?php if ($smooth_slider['autostep'] == '1') echo $smooth_slider['speed']; else echo 0;?>,
|
259 |
-
wrap:"last",
|
260 |
-
animation:<?php echo $smooth_slider['transition']*100; ?>,
|
261 |
-
initCallback: smooth_slider_initCallback,
|
262 |
-
itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }
|
263 |
-
<?php if ($smooth_slider['prev_next'] != 1) {echo ",\n buttonPrevHTML:null,\n ";}
|
264 |
-
if ($smooth_slider['prev_next'] != 1) {echo "buttonNextHTML:null";} ?>
|
265 |
-
});
|
266 |
-
});
|
267 |
-
|
268 |
-
</script>
|
269 |
-
<noscript><p><strong><?php echo $smooth_slider['noscript'];?></strong></p></noscript>
|
270 |
-
<div id="smooth_slider" class="jcarousel-skin-<?php echo $smooth_slider['stylesheet']; ?> smooth_slider">
|
271 |
-
<?php
|
272 |
-
if($smooth_slider['title_from']=='1') $sldr_title = get_smooth_slider_name($slider_id);
|
273 |
-
else $sldr_title = $smooth_slider['title_text'];
|
274 |
-
if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
275 |
-
<ul class="smooth_sliderb">
|
276 |
-
<?php echo $r_array[1];?>
|
277 |
-
</ul>
|
278 |
-
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
279 |
-
<div class="jcarousel-control">
|
280 |
-
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
281 |
-
echo "<a href=\"#\" class=\"sldr".$i." smooth_sliderc_nav\" >".$i."</a>\n";
|
282 |
-
} ?>
|
283 |
-
</div>
|
284 |
-
<?php }
|
285 |
-
if ($smooth_slider['goto_slide'] == 2) { ?>
|
286 |
-
<div class="jcarousel-control">
|
287 |
-
<?php global $smooth_sldr_j; for($i=1; $i<=$smooth_sldr_j; $i++) {
|
288 |
-
|
289 |
-
$width = $smooth_slider['navimg_w'];
|
290 |
-
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";
|
291 |
-
} ?>
|
292 |
-
</div>
|
293 |
-
<?php }
|
294 |
-
if ($smooth_slider['goto_slide'] == 3) { ?>
|
295 |
-
<div class="jcarousel-control"><?php echo $smooth_slider['custom_nav']; ?></div>
|
296 |
-
<?php } ?>
|
297 |
-
<?php if($smooth_slider['support'] == '1'){?>
|
298 |
-
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
299 |
-
<?php } ?>
|
300 |
-
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
301 |
-
</div>
|
302 |
-
<?php
|
303 |
-
} //end of not empty slider_id condition
|
304 |
-
}
|
305 |
-
|
306 |
-
//For displaying category specific posts in chronologically reverse order, Smooth Slider 2.3.3
|
307 |
-
function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offset=0, $out_echo = '1') {
|
308 |
-
global $smooth_slider;
|
309 |
-
global $wpdb, $table_prefix;
|
310 |
-
|
311 |
-
if (!empty($catg_slug)) {
|
312 |
-
$category = get_category_by_slug($catg_slug);
|
313 |
-
$slider_cat = $category->term_id;
|
314 |
-
}
|
315 |
-
else {
|
316 |
-
$category = get_the_category();
|
317 |
-
$slider_cat = $category[0]->cat_ID;
|
318 |
-
}
|
319 |
-
|
320 |
-
$posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.'&category='.$slider_cat);
|
321 |
-
|
322 |
-
$html = '';
|
323 |
-
$smooth_sldr_a = 0;
|
324 |
-
|
325 |
-
foreach($posts as $post) {
|
326 |
-
$id = $post->ID;
|
327 |
-
|
328 |
-
$post_title = stripslashes($post->post_title);
|
329 |
-
$post_title = str_replace('"', '', $post_title);
|
330 |
-
$slider_content = $post->post_content;
|
331 |
-
|
332 |
-
//2.3 changes
|
333 |
-
// $permalink = get_permalink($post->ID);
|
334 |
-
|
335 |
-
$post_id = $post->ID;
|
336 |
-
|
337 |
-
//2.1 changes start
|
338 |
-
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
339 |
-
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
340 |
-
trim($slide_redirect_url);
|
341 |
-
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
342 |
-
$permalink = $slide_redirect_url;
|
343 |
-
}
|
344 |
-
else{
|
345 |
-
$permalink = get_permalink($post_id);
|
346 |
-
}
|
347 |
-
if($sslider_nolink=='1'){
|
348 |
-
$permalink='';
|
349 |
-
}
|
350 |
-
//2.1 changes end
|
351 |
-
$smooth_sldr_a++;
|
352 |
-
$html .= '<li class="smooth_slideri"><div>
|
353 |
-
<!-- smooth_slideri -->';
|
354 |
-
|
355 |
-
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
356 |
-
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
357 |
-
|
358 |
-
if ($smooth_slider['content_from'] == "slider_content") {
|
359 |
-
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
360 |
-
}
|
361 |
-
if ($smooth_slider['content_from'] == "excerpt") {
|
362 |
-
$slider_content = $post->post_excerpt;
|
363 |
-
}
|
364 |
-
|
365 |
-
$slider_content = strip_shortcodes( $slider_content );
|
366 |
-
|
367 |
-
$slider_content = stripslashes($slider_content);
|
368 |
-
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
369 |
-
|
370 |
-
$slider_content = str_replace("\n","<br />",$slider_content);
|
371 |
-
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
372 |
-
|
373 |
-
if($smooth_slider['img_pick'][0] == '1'){
|
374 |
-
$custom_key = array($smooth_slider['img_pick'][1]);
|
375 |
-
}
|
376 |
-
else {
|
377 |
-
$custom_key = '';
|
378 |
-
}
|
379 |
-
|
380 |
-
if($smooth_slider['img_pick'][2] == '1'){
|
381 |
-
$the_post_thumbnail = true;
|
382 |
-
}
|
383 |
-
else {
|
384 |
-
$the_post_thumbnail = false;
|
385 |
-
}
|
386 |
-
|
387 |
-
if($smooth_slider['img_pick'][3] == '1'){
|
388 |
-
$attachment = true;
|
389 |
-
$order_of_image = $smooth_slider['img_pick'][4];
|
390 |
-
}
|
391 |
-
else{
|
392 |
-
$attachment = false;
|
393 |
-
$order_of_image = '1';
|
394 |
-
}
|
395 |
-
|
396 |
-
if($smooth_slider['img_pick'][5] == '1'){
|
397 |
-
$image_scan = true;
|
398 |
-
}
|
399 |
-
else {
|
400 |
-
$image_scan = false;
|
401 |
-
}
|
402 |
-
|
403 |
-
if($smooth_slider['img_size'] == '1'){
|
404 |
-
$gti_width = $smooth_slider['img_width'];
|
405 |
-
}
|
406 |
-
else {
|
407 |
-
$gti_width = false;
|
408 |
-
}
|
409 |
-
|
410 |
-
if($smooth_slider['crop'] == '0'){
|
411 |
-
$extract_size = 'full';
|
412 |
-
}
|
413 |
-
elseif($smooth_slider['crop'] == '1'){
|
414 |
-
$extract_size = 'large';
|
415 |
-
}
|
416 |
-
elseif($smooth_slider['crop'] == '2'){
|
417 |
-
$extract_size = 'medium';
|
418 |
-
}
|
419 |
-
else{
|
420 |
-
$extract_size = 'thumbnail';
|
421 |
-
}
|
422 |
-
|
423 |
-
$img_args = array(
|
424 |
-
'custom_key' => $custom_key,
|
425 |
-
'post_id' => $post_id,
|
426 |
-
'attachment' => $attachment,
|
427 |
-
'size' => $extract_size,
|
428 |
-
'the_post_thumbnail' => $the_post_thumbnail,
|
429 |
-
'default_image' => false,
|
430 |
-
'order_of_image' => $order_of_image,
|
431 |
-
'link_to_post' => false,
|
432 |
-
'image_class' => 'smooth_slider_thumbnail',
|
433 |
-
'image_scan' => $image_scan,
|
434 |
-
'width' => $gti_width,
|
435 |
-
'height' => false,
|
436 |
-
'echo' => false,
|
437 |
-
'permalink' => $permalink
|
438 |
-
);
|
439 |
-
|
440 |
-
$html .= sslider_get_the_image($img_args);
|
441 |
-
|
442 |
-
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
443 |
-
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
444 |
-
else
|
445 |
-
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
446 |
-
|
447 |
-
if ($smooth_slider['image_only'] == '1') {
|
448 |
-
$html .= '<!-- /smooth_slideri -->
|
449 |
-
</div></li>';
|
450 |
-
}
|
451 |
-
else {
|
452 |
-
if($permalink!='') {
|
453 |
-
$html .= '<h2 ><a href="'.$permalink.'">'.$post_title.'</a></h2><span> '.$slider_excerpt.'</span>
|
454 |
-
<p class="more"><a href="'.$permalink.'">'.$smooth_slider['more'].'</a></p>
|
455 |
-
|
456 |
-
<!-- /smooth_slideri -->
|
457 |
-
</div></li>'; }
|
458 |
-
else{
|
459 |
-
$html .= '<h2 >'.$post_title.'</h2><span> '.$slider_excerpt.'</span>
|
460 |
-
<!-- /smooth_slideri -->
|
461 |
-
</div></li>'; }
|
462 |
-
}
|
463 |
-
}
|
464 |
-
if($out_echo == '1') {
|
465 |
-
echo $html;
|
466 |
-
}
|
467 |
-
$r_array = array( $smooth_sldr_a, $html);
|
468 |
-
return $r_array;
|
469 |
-
}
|
470 |
-
|
471 |
-
function get_smooth_slider_category($catg_slug) {
|
472 |
-
global $smooth_slider;
|
473 |
-
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];
|
474 |
-
?>
|
475 |
-
<script type="text/javascript">
|
476 |
-
<?php if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){?>
|
477 |
-
jQuery('html').addClass('smooth_slider_fouc');
|
478 |
-
jQuery(document).ready(function() {
|
479 |
-
jQuery(".smooth_slider_fouc .smooth_sliderb").css({'display' : 'block'});
|
480 |
-
});
|
481 |
-
<?php } ?>
|
482 |
-
function smooth_slider_initCallback(carousel) {
|
483 |
-
jQuery('#smooth_slider .jcarousel-control a').bind('click', function() {
|
484 |
-
var navclass = jQuery(this).attr("class");
|
485 |
-
var slide = navclass.replace("sldr", "");
|
486 |
-
carousel.scroll(jQuery.jcarousel.intval(slide));
|
487 |
-
carousel.startAuto(0);
|
488 |
-
return false;
|
489 |
-
});
|
490 |
-
<?php if ($smooth_slider['prev_next'] == 1){ ?>
|
491 |
-
// Disable autoscrolling if the user clicks the prev or next button.
|
492 |
-
carousel.buttonNext.bind('click', function() {
|
493 |
-
carousel.startAuto(0);
|
494 |
-
});
|
495 |
-
|
496 |
-
carousel.buttonPrev.bind('click', function() {
|
497 |
-
carousel.startAuto(0);
|
498 |
-
});
|
499 |
-
<?php } ?>
|
500 |
-
// Pause autoscrolling if the user moves with the cursor over the clip.
|
501 |
-
carousel.clip.hover(function() {
|
502 |
-
carousel.stopAuto();
|
503 |
-
}, function() {
|
504 |
-
carousel.startAuto();
|
505 |
-
});
|
506 |
-
};
|
507 |
-
function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) {
|
508 |
-
jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal");
|
509 |
-
jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?>px");
|
510 |
-
var curr_slide = idx;
|
511 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder");
|
512 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "<?php echo ($smooth_slider['content_fsize'] + 5); ?>px");
|
513 |
-
|
514 |
-
<?php if ($smooth_slider['goto_slide'] == 2) {
|
515 |
-
global $sldr_nav_width;
|
516 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
517 |
-
?>
|
518 |
-
var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?>;
|
519 |
-
jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0");
|
520 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0");
|
521 |
-
<?php } ?>
|
522 |
-
};
|
523 |
-
jQuery(document).ready(function() {
|
524 |
-
jQuery("#smooth_slider").jcarousel({
|
525 |
-
size: <?php echo $smooth_sldr_a; ?>,
|
526 |
-
scroll: 1,
|
527 |
-
visible: 1,
|
528 |
-
auto:<?php if ($smooth_slider['autostep'] == '1') echo $smooth_slider['speed']; else echo 0;?>,
|
529 |
-
wrap:"last",
|
530 |
-
animation:<?php echo $smooth_slider['transition']*100; ?>,
|
531 |
-
initCallback: smooth_slider_initCallback,
|
532 |
-
itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }<?php if ($smooth_slider['prev_next'] != 1) {echo ",\n buttonPrevHTML:null,\n ";}
|
533 |
-
if ($smooth_slider['prev_next'] != 1) {echo "buttonNextHTML:null";} ?>
|
534 |
-
});
|
535 |
-
});
|
536 |
-
</script>
|
537 |
-
<noscript><p><strong><?php echo $smooth_slider['noscript'];?></strong></p></noscript>
|
538 |
-
<div id="smooth_slider" class="jcarousel-skin-<?php echo $smooth_slider['stylesheet']; ?> smooth_slider">
|
539 |
-
<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { ?><div class="sldr_title"><?php echo $smooth_slider['title_text']; ?></div> <?php } ?>
|
540 |
-
<ul class="smooth_sliderb">
|
541 |
-
<?php echo $r_array[1];?>
|
542 |
-
</ul>
|
543 |
-
<?php if ($smooth_slider['goto_slide'] == 1) { ?>
|
544 |
-
<div class="jcarousel-control">
|
545 |
-
<?php global $smooth_sldr_a; for($i=1; $i<=$smooth_sldr_a; $i++) {
|
546 |
-
echo "<a href=\"#\" class=\"sldr".$i." smooth_sliderc_nav\" >".$i."</a>\n";
|
547 |
-
} ?>
|
548 |
-
</div>
|
549 |
-
<?php }
|
550 |
-
if ($smooth_slider['goto_slide'] == 2) { ?>
|
551 |
-
<div class="jcarousel-control">
|
552 |
-
<?php global $smooth_sldr_a; for($i=1; $i<=$smooth_sldr_a; $i++) {
|
553 |
-
|
554 |
-
$width = $smooth_slider['navimg_w'];
|
555 |
-
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";
|
556 |
-
} ?>
|
557 |
-
</div>
|
558 |
-
<?php }
|
559 |
-
if ($smooth_slider['goto_slide'] == 3) { ?>
|
560 |
-
<div id="smooth_sliderc_nav"><?php echo $smooth_slider['custom_nav']; ?></div>
|
561 |
-
<?php } ?>
|
562 |
-
<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>
|
563 |
-
<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
564 |
-
</div>
|
565 |
-
<?php
|
566 |
-
}
|
567 |
-
|
568 |
-
function return_smooth_slider($slider_id='') {
|
569 |
-
global $smooth_slider;
|
570 |
-
|
571 |
-
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
572 |
-
global $post;
|
573 |
-
$post_id = $post->ID;
|
574 |
-
$slider_id = get_slider_for_the_post($post_id);
|
575 |
-
}
|
576 |
-
if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
|
577 |
-
$slider_id = '1';
|
578 |
-
}
|
579 |
-
$slider_html='';
|
580 |
-
if(!empty($slider_id)){
|
581 |
-
global $smooth_sldr_j;
|
582 |
-
$r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset=0, $slider_id, $echo = '0');
|
583 |
-
$smooth_sldr_j = $r_array[0];
|
584 |
-
|
585 |
-
if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){
|
586 |
-
$fouc='jQuery("html").addClass("smooth_slider_fouc");
|
587 |
-
jQuery(document).ready(function() {
|
588 |
-
jQuery(".smooth_slider_fouc .smooth_sliderb").css({"display" : "block"});
|
589 |
-
}); ';
|
590 |
-
}
|
591 |
-
else{ $fouc='';
|
592 |
-
}
|
593 |
-
|
594 |
-
if ($smooth_slider['autostep'] == '1'){ $autostep = $smooth_slider['speed'];} else {$autostep = "0";}
|
595 |
-
if ($smooth_slider['prev_next'] != 1) {$defaultbuttons = ", buttonPrevHTML:null, buttonNextHTML:null";} else {$defaultbuttons = "";}
|
596 |
-
$prevnext='';
|
597 |
-
if ($smooth_slider['prev_next'] == 1){
|
598 |
-
$prevnext="// Disable autoscrolling if the user clicks the prev or next button.
|
599 |
-
carousel.buttonNext.bind('click', function() {
|
600 |
-
carousel.startAuto(0);
|
601 |
-
});
|
602 |
-
|
603 |
-
carousel.buttonPrev.bind('click', function() {
|
604 |
-
carousel.startAuto(0);
|
605 |
-
}); ";
|
606 |
-
}
|
607 |
-
$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; }
|
608 |
-
$nav_ht = (($smooth_slider['height'] - $extra_height)/2);
|
609 |
-
$fontSize = $smooth_slider['content_fsize'] + 5;
|
610 |
-
$sldrlink='';if($smooth_slider['support'] == '1'){ $sldrlink='<div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div>';}
|
611 |
-
|
612 |
-
$slider_html=$slider_html.'<script type="text/javascript"> '.$fouc.'
|
613 |
-
function smooth_slider_initCallback(carousel) {
|
614 |
-
jQuery("#smooth_slider .jcarousel-control a").bind("click", function() {
|
615 |
-
var navclass = jQuery(this).attr("class");
|
616 |
-
var slide = navclass.replace("sldr", "");
|
617 |
-
carousel.scroll(jQuery.jcarousel.intval(slide));
|
618 |
-
carousel.startAuto(0);
|
619 |
-
return false;
|
620 |
-
});
|
621 |
-
'.$prevnext.'
|
622 |
-
|
623 |
-
// Pause autoscrolling if the user moves with the cursor over the clip.
|
624 |
-
carousel.clip.hover(function() {
|
625 |
-
carousel.stopAuto();
|
626 |
-
}, function() {
|
627 |
-
carousel.startAuto();
|
628 |
-
});
|
629 |
-
};
|
630 |
-
function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) {
|
631 |
-
jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal");
|
632 |
-
jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "'.$smooth_slider['content_fsize'].'px");
|
633 |
-
var curr_slide = idx;
|
634 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder");
|
635 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "'.$fontSize.'px"); ';
|
636 |
-
|
637 |
-
if ($smooth_slider['goto_slide'] == 2) {
|
638 |
-
|
639 |
-
global $sldr_nav_width;
|
640 |
-
$sldr_nav_width = $smooth_slider['navimg_w'];
|
641 |
-
$slider_html = $slider_html.'jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0");
|
642 |
-
jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+'.$sldr_nav_width.'+"px 0");';
|
643 |
-
}
|
644 |
-
$slider_html=$slider_html.' }
|
645 |
-
|
646 |
-
jQuery(document).ready(function() {
|
647 |
-
jQuery("#smooth_slider").jcarousel({
|
648 |
-
size: '.$smooth_sldr_j .',
|
649 |
-
scroll: 1,
|
650 |
-
visible: 1,
|
651 |
-
auto:'.$autostep.',
|
652 |
-
wrap:"last",
|
653 |
-
animation:'.($smooth_slider["transition"]*100).',
|
654 |
-
initCallback: smooth_slider_initCallback,
|
655 |
-
itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }
|
656 |
-
'.$defaultbuttons.'
|
657 |
-
});
|
658 |
-
});
|
659 |
-
</script>
|
660 |
-
<noscript><p><strong>'.$smooth_slider['noscript'].'</strong></p></noscript>
|
661 |
-
<div id="smooth_slider" class="jcarousel-skin-'.$smooth_slider['stylesheet'].' smooth_slider">';
|
662 |
-
|
663 |
-
if($smooth_slider['title_from']=='1') $sldr_title = get_smooth_slider_name($slider_id);
|
664 |
-
else $sldr_title = $smooth_slider['title_text'];
|
665 |
-
if(!empty($sldr_title)) {
|
666 |
-
$slider_html=$slider_html.'<div class="sldr_title">'. $smooth_slider['title_text'].'</div>';
|
667 |
-
}
|
668 |
-
|
669 |
-
$slider_html=$slider_html.'<ul class="smooth_sliderb">
|
670 |
-
'.$r_array[1].'
|
671 |
-
</ul>';
|
672 |
-
if ($smooth_slider['goto_slide'] == 1) {
|
673 |
-
$slider_html=$slider_html.'<div class="jcarousel-control">';
|
674 |
-
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
675 |
-
$slider_html=$slider_html.'<a href="#" class="sldr'.$i.' smooth_sliderc_nav" >'.$i.'</a>';
|
676 |
-
}
|
677 |
-
$slider_html=$slider_html.'</div>';
|
678 |
-
}
|
679 |
-
if ($smooth_slider['goto_slide'] == 2) {
|
680 |
-
$slider_html=$slider_html.'<div class="jcarousel-control">';
|
681 |
-
$width = $smooth_slider['navimg_w'];
|
682 |
-
for($i=1; $i<=$smooth_sldr_j; $i++) {
|
683 |
-
$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>';
|
684 |
-
}
|
685 |
-
$slider_html=$slider_html.'</div>';
|
686 |
-
}
|
687 |
-
if ($smooth_slider['goto_slide'] == 3) {
|
688 |
-
$slider_html=$slider_html.'<div id="jcarousel-control">'.$smooth_slider["custom_nav"].'</div>';
|
689 |
-
}
|
690 |
-
$slider_html=$slider_html.$sldrlink.'<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
691 |
-
</div>';
|
692 |
-
} //end of not empty slider_id condition
|
693 |
-
return $slider_html;
|
694 |
-
}
|
695 |
-
|
696 |
-
function smooth_slider_simple_shortcode($atts) {
|
697 |
-
extract(shortcode_atts(array(
|
698 |
-
'id' => '',
|
699 |
-
), $atts));
|
700 |
-
|
701 |
-
return return_smooth_slider($id);
|
702 |
-
}
|
703 |
-
add_shortcode('smoothslider', 'smooth_slider_simple_shortcode');
|
704 |
-
|
705 |
-
function smooth_slider_enqueue_scripts() {
|
706 |
-
// wp_register_script('jquery', false, false, false, false);
|
707 |
-
wp_enqueue_script( 'jcarousel', smooth_slider_plugin_url( 'js/jquery.jcarousel.min.js' ),
|
708 |
-
array('jquery'), SMOOTH_SLIDER_VER, false);
|
709 |
-
}
|
710 |
-
|
711 |
-
add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
712 |
-
|
713 |
-
function smooth_slider_enqueue_styles() {
|
714 |
-
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
715 |
-
if(is_singular()) {
|
716 |
-
$slider_style = get_post_meta($post->ID,'slider_style',true);
|
717 |
-
if((is_active_widget(false, false, 'sslider_wid', true) or isset($smooth_slider['shortcode']) ) and (!isset($slider_style) or empty($slider_style))){
|
718 |
-
$slider_style='default';
|
719 |
-
}
|
720 |
-
if (!isset($slider_style) or empty($slider_style) ) {
|
721 |
-
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
722 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
723 |
-
}
|
724 |
-
else {
|
725 |
-
$slider_style=str_replace('.css','',$slider_style);
|
726 |
-
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$slider_style.'/style.css' ),
|
727 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
728 |
-
}
|
729 |
-
}
|
730 |
-
else {
|
731 |
-
$slider_style = $smooth_slider['stylesheet'];
|
732 |
-
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$slider_style.'/style.css' ),
|
733 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
734 |
-
}
|
735 |
-
}
|
736 |
-
add_action( 'wp', 'smooth_slider_enqueue_styles' );
|
737 |
-
|
738 |
-
//admin settings
|
739 |
-
function smooth_slider_admin_scripts() {
|
740 |
-
global $smooth_slider;
|
741 |
-
if ( is_admin() ){ // admin actions
|
742 |
-
// Settings page only
|
743 |
-
if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page'] or 'smooth-slider-settings' == $_GET['page'] ) ) {
|
744 |
-
wp_register_script('jquery', false, false, false, false);
|
745 |
-
wp_enqueue_script( 'jquery-ui-tabs' );
|
746 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
747 |
-
wp_enqueue_script( 'jquery-ui-sortable' );
|
748 |
-
wp_enqueue_script( 'jcarousel', smooth_slider_plugin_url( 'js/jquery.jcarousel.min.js' ),
|
749 |
-
array('jquery'), SMOOTH_SLIDER_VER, false);
|
750 |
-
wp_enqueue_style( 'smooth_slider_admin_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
751 |
-
false, SMOOTH_SLIDER_VER, 'all');
|
752 |
-
}
|
753 |
-
}
|
754 |
-
}
|
755 |
-
|
756 |
-
add_action( 'admin_init', 'smooth_slider_admin_scripts' );
|
757 |
-
|
758 |
-
function smooth_slider_admin_head() {
|
759 |
-
global $smooth_slider;
|
760 |
-
if ( is_admin() ){ // admin actions
|
761 |
-
|
762 |
-
// Sliders page only
|
763 |
-
if ( isset($_GET['page']) && 'smooth-slider-admin' == $_GET['page'] ) {
|
764 |
-
$sliders = ss_get_sliders();
|
765 |
-
?>
|
766 |
-
<script type="text/javascript">
|
767 |
-
// <![CDATA[
|
768 |
-
jQuery(document).ready(function() {
|
769 |
-
jQuery(function() {
|
770 |
-
jQuery("#slider_tabs").tabs();
|
771 |
-
<?php foreach($sliders as $slider){?>
|
772 |
-
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
773 |
-
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
774 |
-
<?php } ?>
|
775 |
-
});
|
776 |
-
});
|
777 |
-
function confirmRemove()
|
778 |
-
{
|
779 |
-
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
780 |
-
if (agree)
|
781 |
-
return true ;
|
782 |
-
else
|
783 |
-
return false ;
|
784 |
-
}
|
785 |
-
function confirmRemoveAll()
|
786 |
-
{
|
787 |
-
var agree=confirm("Remove all Posts/Pages from Smooth Slider??");
|
788 |
-
if (agree)
|
789 |
-
return true ;
|
790 |
-
else
|
791 |
-
return false ;
|
792 |
-
}
|
793 |
-
function confirmSliderDelete()
|
794 |
-
{
|
795 |
-
var agree=confirm("Delete this Slider??");
|
796 |
-
if (agree)
|
797 |
-
return true ;
|
798 |
-
else
|
799 |
-
return false ;
|
800 |
-
}
|
801 |
-
function slider_checkform ( form )
|
802 |
-
{
|
803 |
-
if (form.new_slider_name.value == "") {
|
804 |
-
alert( "Please enter the New Slider name." );
|
805 |
-
form.new_slider_name.focus();
|
806 |
-
return false ;
|
807 |
-
}
|
808 |
-
return true ;
|
809 |
-
}
|
810 |
-
</script>
|
811 |
-
<style type="text/css">
|
812 |
-
/************************************************
|
813 |
-
* ui-tabs *
|
814 |
-
************************************************/
|
815 |
-
.ui-tabs { padding: .2em; zoom: 1; }
|
816 |
-
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
817 |
-
.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;}
|
818 |
-
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; color:#FFFFFF;}
|
819 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-bottom-width: 0; background-color:#ABD37E;}
|
820 |
-
.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;}
|
821 |
-
.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... */
|
822 |
-
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
823 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
824 |
-
/*tabs complete*/
|
825 |
-
div#smooth_sldr_donations a{
|
826 |
-
color:#366C94 !important;
|
827 |
-
text-decoration:none;
|
828 |
-
}
|
829 |
-
div#smooth_sldr_donations a:hover{
|
830 |
-
text-decoration:underline;
|
831 |
-
}
|
832 |
-
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
833 |
-
#sldr_close {float:right;}
|
834 |
-
</style>
|
835 |
-
<?php
|
836 |
-
} //Sliders page only
|
837 |
-
|
838 |
-
// Settings page only
|
839 |
-
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) {
|
840 |
-
wp_print_scripts( 'farbtastic' );
|
841 |
-
wp_print_styles( 'farbtastic' );
|
842 |
-
?>
|
843 |
-
<script type="text/javascript">
|
844 |
-
// <![CDATA[
|
845 |
-
jQuery(document).ready(function() {
|
846 |
-
jQuery('#colorbox_1').farbtastic('#color_value_1');
|
847 |
-
jQuery('#color_picker_1').click(function () {
|
848 |
-
if (jQuery('#colorbox_1').css('display') == "block") {
|
849 |
-
jQuery('#colorbox_1').fadeOut("slow"); }
|
850 |
-
else {
|
851 |
-
jQuery('#colorbox_1').fadeIn("slow"); }
|
852 |
-
});
|
853 |
-
var colorpick_1 = false;
|
854 |
-
jQuery(document).mousedown(function(){
|
855 |
-
if (colorpick_1 == true) {
|
856 |
-
return; }
|
857 |
-
jQuery('#colorbox_1').fadeOut("slow");
|
858 |
-
});
|
859 |
-
jQuery(document).mouseup(function(){
|
860 |
-
colorpick_1 = false;
|
861 |
-
});
|
862 |
-
//for second color box
|
863 |
-
jQuery('#colorbox_2').farbtastic('#color_value_2');
|
864 |
-
jQuery('#color_picker_2').click(function () {
|
865 |
-
if (jQuery('#colorbox_2').css('display') == "block") {
|
866 |
-
jQuery('#colorbox_2').fadeOut("slow"); }
|
867 |
-
else {
|
868 |
-
jQuery('#colorbox_2').fadeIn("slow"); }
|
869 |
-
});
|
870 |
-
var colorpick_2 = false;
|
871 |
-
jQuery(document).mousedown(function(){
|
872 |
-
if (colorpick_2 == true) {
|
873 |
-
return; }
|
874 |
-
jQuery('#colorbox_2').fadeOut("slow");
|
875 |
-
});
|
876 |
-
jQuery(document).mouseup(function(){
|
877 |
-
colorpick_2 = false;
|
878 |
-
});
|
879 |
-
//for third color box
|
880 |
-
jQuery('#colorbox_3').farbtastic('#color_value_3');
|
881 |
-
jQuery('#color_picker_3').click(function () {
|
882 |
-
if (jQuery('#colorbox_3').css('display') == "block") {
|
883 |
-
jQuery('#colorbox_3').fadeOut("slow"); }
|
884 |
-
else {
|
885 |
-
jQuery('#colorbox_3').fadeIn("slow"); }
|
886 |
-
});
|
887 |
-
var colorpick_3 = false;
|
888 |
-
jQuery(document).mousedown(function(){
|
889 |
-
if (colorpick_3 == true) {
|
890 |
-
return; }
|
891 |
-
jQuery('#colorbox_3').fadeOut("slow");
|
892 |
-
});
|
893 |
-
jQuery(document).mouseup(function(){
|
894 |
-
colorpick_3 = false;
|
895 |
-
});
|
896 |
-
//for fourth color box
|
897 |
-
jQuery('#colorbox_4').farbtastic('#color_value_4');
|
898 |
-
jQuery('#color_picker_4').click(function () {
|
899 |
-
if (jQuery('#colorbox_4').css('display') == "block") {
|
900 |
-
jQuery('#colorbox_4').fadeOut("slow"); }
|
901 |
-
else {
|
902 |
-
jQuery('#colorbox_4').fadeIn("slow"); }
|
903 |
-
});
|
904 |
-
var colorpick_4 = false;
|
905 |
-
jQuery(document).mousedown(function(){
|
906 |
-
if (colorpick_4 == true) {
|
907 |
-
return; }
|
908 |
-
jQuery('#colorbox_4').fadeOut("slow");
|
909 |
-
});
|
910 |
-
jQuery(document).mouseup(function(){
|
911 |
-
colorpick_4 = false;
|
912 |
-
});
|
913 |
-
//for fifth color box
|
914 |
-
jQuery('#colorbox_5').farbtastic('#color_value_5');
|
915 |
-
jQuery('#color_picker_5').click(function () {
|
916 |
-
if (jQuery('#colorbox_5').css('display') == "block") {
|
917 |
-
jQuery('#colorbox_5').fadeOut("slow"); }
|
918 |
-
else {
|
919 |
-
jQuery('#colorbox_5').fadeIn("slow"); }
|
920 |
-
});
|
921 |
-
var colorpick_5 = false;
|
922 |
-
jQuery(document).mousedown(function(){
|
923 |
-
if (colorpick_5 == true) {
|
924 |
-
return; }
|
925 |
-
jQuery('#colorbox_5').fadeOut("slow");
|
926 |
-
});
|
927 |
-
jQuery(document).mouseup(function(){
|
928 |
-
colorpick_5 = false;
|
929 |
-
});
|
930 |
-
//for sixth color box
|
931 |
-
jQuery('#colorbox_6').farbtastic('#color_value_6');
|
932 |
-
jQuery('#color_picker_6').click(function () {
|
933 |
-
if (jQuery('#colorbox_6').css('display') == "block") {
|
934 |
-
jQuery('#colorbox_6').fadeOut("slow"); }
|
935 |
-
else {
|
936 |
-
jQuery('#colorbox_6').fadeIn("slow"); }
|
937 |
-
});
|
938 |
-
var colorpick_6 = false;
|
939 |
-
jQuery(document).mousedown(function(){
|
940 |
-
if (colorpick_6 == true) {
|
941 |
-
return; }
|
942 |
-
jQuery('#colorbox_6').fadeOut("slow");
|
943 |
-
});
|
944 |
-
jQuery(document).mouseup(function(){
|
945 |
-
colorpick_6 = false;
|
946 |
-
});
|
947 |
-
jQuery('#sldr_close').click(function () {
|
948 |
-
jQuery('#sldr_message').fadeOut("slow");
|
949 |
-
});
|
950 |
-
});
|
951 |
-
</script>
|
952 |
-
<style type="text/css">
|
953 |
-
.color-picker-wrap {
|
954 |
-
position: absolute;
|
955 |
-
display: none;
|
956 |
-
background: #fff;
|
957 |
-
border: 3px solid #ccc;
|
958 |
-
padding: 3px;
|
959 |
-
z-index: 1000;
|
960 |
-
}
|
961 |
-
div#smooth_sldr_donations a{
|
962 |
-
color:#366C94 !important;
|
963 |
-
text-decoration:none;
|
964 |
-
}
|
965 |
-
div#smooth_sldr_donations a:hover{
|
966 |
-
text-decoration:underline;
|
967 |
-
}
|
968 |
-
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
969 |
-
#sldr_close {float:right;}
|
970 |
-
</style>
|
971 |
-
<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>
|
972 |
-
<?php
|
973 |
-
} //for smooth slider option page
|
974 |
-
}//only for admin
|
975 |
-
}
|
976 |
-
add_action('admin_head', 'smooth_slider_admin_head');
|
977 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slider_versions/shortcodes_1.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function return_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='0'){
|
3 |
+
$slider_html='';
|
4 |
+
$slider_html=get_global_smooth_slider($slider_handle,$r_array,$slider_id,$echo);
|
5 |
+
return $slider_html;
|
6 |
+
}
|
7 |
+
//Basic Shortcode
|
8 |
+
function return_smooth_slider($slider_id='',$offset='0') {
|
9 |
+
global $smooth_slider;
|
10 |
+
$slider_html='';
|
11 |
+
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
12 |
+
global $post;
|
13 |
+
$post_id = $post->ID;
|
14 |
+
$slider_id = get_slider_for_the_post($post_id);
|
15 |
+
}
|
16 |
+
if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
|
17 |
+
$slider_id = '1';
|
18 |
+
}
|
19 |
+
if(!empty($slider_id)){
|
20 |
+
$r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset, $slider_id, $echo = '0');
|
21 |
+
$slider_handle='smooth_slider_'.$slider_id;
|
22 |
+
$slider_html=return_global_smooth_slider($slider_handle,$r_array,$slider_id,$echo='0');
|
23 |
+
} //end of not empty slider_id condition
|
24 |
+
return $slider_html;
|
25 |
+
}
|
26 |
+
|
27 |
+
function smooth_slider_simple_shortcode($atts) {
|
28 |
+
extract(shortcode_atts(array(
|
29 |
+
'id' => '',
|
30 |
+
'offset'=> '',
|
31 |
+
), $atts));
|
32 |
+
|
33 |
+
return return_smooth_slider($id);
|
34 |
+
}
|
35 |
+
add_shortcode('smoothslider', 'smooth_slider_simple_shortcode');
|
36 |
+
|
37 |
+
//Category shortcode
|
38 |
+
function return_smooth_slider_category($catg_slug='',$offset=0) {
|
39 |
+
global $smooth_slider;
|
40 |
+
$slider_html='';
|
41 |
+
$r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0');
|
42 |
+
$slider_handle='smooth_slider_'.$catg_slug;
|
43 |
+
$slider_html=return_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='0');
|
44 |
+
return $slider_html;
|
45 |
+
}
|
46 |
+
|
47 |
+
function smooth_slider_category_shortcode($atts) {
|
48 |
+
extract(shortcode_atts(array(
|
49 |
+
'catg_slug' => '',
|
50 |
+
'offset' => '',
|
51 |
+
), $atts));
|
52 |
+
|
53 |
+
return return_smooth_slider_category($catg_slug,$offset);
|
54 |
+
}
|
55 |
+
add_shortcode('smoothcategory', 'smooth_slider_category_shortcode');
|
56 |
+
|
57 |
+
//Recent Posts Shortcode
|
58 |
+
function return_smooth_slider_recent($offset=0) {
|
59 |
+
global $smooth_slider;
|
60 |
+
$slider_html='';
|
61 |
+
$r_array = carousel_posts_on_slider_recent($smooth_slider['no_posts'], $offset, '0');
|
62 |
+
$slider_handle='smooth_slider_recent';
|
63 |
+
$slider_html=return_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='0');
|
64 |
+
return $slider_html;
|
65 |
+
}
|
66 |
+
|
67 |
+
function smooth_slider_recent_shortcode($atts) {
|
68 |
+
extract(shortcode_atts(array(
|
69 |
+
'offset' => '',
|
70 |
+
), $atts));
|
71 |
+
return return_smooth_slider_recent($offset);
|
72 |
+
}
|
73 |
+
add_shortcode('smoothrecent', 'smooth_slider_recent_shortcode');
|
74 |
+
?>
|
slider_versions/smooth_1.php
ADDED
@@ -0,0 +1,680 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function smooth_global_posts_processor( $posts, $smooth_slider,$out_echo ){
|
3 |
+
global $smooth_slider;
|
4 |
+
$smooth_slider_css = smooth_get_inline_css();
|
5 |
+
$html = '';
|
6 |
+
$smooth_sldr_j = 0;
|
7 |
+
|
8 |
+
foreach($posts as $post) {
|
9 |
+
$post_id = $post->ID;
|
10 |
+
$post_title = stripslashes($post->post_title);
|
11 |
+
$post_title = str_replace('"', '', $post_title);
|
12 |
+
//filter hook
|
13 |
+
$post_title=apply_filters('smooth_post_title',$post_title,$post_id,$smooth_slider,$smooth_slider_css);
|
14 |
+
$slider_content = $post->post_content;
|
15 |
+
//2.1 changes start
|
16 |
+
$slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
|
17 |
+
$sslider_nolink = get_post_meta($post_id,'sslider_nolink',true);
|
18 |
+
trim($slide_redirect_url);
|
19 |
+
if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
|
20 |
+
$permalink = $slide_redirect_url;
|
21 |
+
}
|
22 |
+
else{
|
23 |
+
$permalink = get_permalink($post_id);
|
24 |
+
}
|
25 |
+
if($sslider_nolink=='1'){
|
26 |
+
$permalink='';
|
27 |
+
}
|
28 |
+
|
29 |
+
//filter hook
|
30 |
+
$permalink=apply_filters('smooth_permalink',$permalink,$post_id,$smooth_slider,$smooth_slider_css);
|
31 |
+
//2.1 changes end
|
32 |
+
$smooth_sldr_j++;
|
33 |
+
$html .= '<div class="smooth_slideri" '.$smooth_slider_css['smooth_slideri'].'>
|
34 |
+
<!-- smooth_slideri -->';
|
35 |
+
|
36 |
+
$thumbnail = get_post_meta($post_id, $smooth_slider['img_pick'][1], true);
|
37 |
+
//$image_control = get_post_meta($post_id, 'slider_image_control', true);
|
38 |
+
|
39 |
+
if ($smooth_slider['content_from'] == "slider_content") {
|
40 |
+
$slider_content = get_post_meta($post_id, 'slider_content', true);
|
41 |
+
}
|
42 |
+
if ($smooth_slider['content_from'] == "excerpt") {
|
43 |
+
$slider_content = $post->post_excerpt;
|
44 |
+
}
|
45 |
+
|
46 |
+
$slider_content = strip_shortcodes( $slider_content );
|
47 |
+
|
48 |
+
$slider_content = stripslashes($slider_content);
|
49 |
+
$slider_content = str_replace(']]>', ']]>', $slider_content);
|
50 |
+
|
51 |
+
$slider_content = str_replace("\n","<br />",$slider_content);
|
52 |
+
$slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
|
53 |
+
|
54 |
+
//filter hook
|
55 |
+
$slider_content=apply_filters('smooth_slide_excerpt',$slider_content,$post_id,$smooth_slider,$smooth_slider_css);
|
56 |
+
|
57 |
+
if($smooth_slider['img_pick'][0] == '1'){
|
58 |
+
$custom_key = array($smooth_slider['img_pick'][1]);
|
59 |
+
}
|
60 |
+
else {
|
61 |
+
$custom_key = '';
|
62 |
+
}
|
63 |
+
|
64 |
+
if($smooth_slider['img_pick'][2] == '1'){
|
65 |
+
$the_post_thumbnail = true;
|
66 |
+
}
|
67 |
+
else {
|
68 |
+
$the_post_thumbnail = false;
|
69 |
+
}
|
70 |
+
|
71 |
+
if($smooth_slider['img_pick'][3] == '1'){
|
72 |
+
$attachment = true;
|
73 |
+
$order_of_image = $smooth_slider['img_pick'][4];
|
74 |
+
}
|
75 |
+
else{
|
76 |
+
$attachment = false;
|
77 |
+
$order_of_image = '1';
|
78 |
+
}
|
79 |
+
|
80 |
+
if($smooth_slider['img_pick'][5] == '1'){
|
81 |
+
$image_scan = true;
|
82 |
+
}
|
83 |
+
else {
|
84 |
+
$image_scan = false;
|
85 |
+
}
|
86 |
+
|
87 |
+
if($smooth_slider['img_size'] == '1'){
|
88 |
+
$gti_width = $smooth_slider['img_width'];
|
89 |
+
}
|
90 |
+
else {
|
91 |
+
$gti_width = false;
|
92 |
+
}
|
93 |
+
|
94 |
+
if($smooth_slider['crop'] == '0'){
|
95 |
+
$extract_size = 'full';
|
96 |
+
}
|
97 |
+
elseif($smooth_slider['crop'] == '1'){
|
98 |
+
$extract_size = 'large';
|
99 |
+
}
|
100 |
+
elseif($smooth_slider['crop'] == '2'){
|
101 |
+
$extract_size = 'medium';
|
102 |
+
}
|
103 |
+
else{
|
104 |
+
$extract_size = 'thumbnail';
|
105 |
+
}
|
106 |
+
|
107 |
+
$img_args = array(
|
108 |
+
'custom_key' => $custom_key,
|
109 |
+
'post_id' => $post_id,
|
110 |
+
'attachment' => $attachment,
|
111 |
+
'size' => $extract_size,
|
112 |
+
'the_post_thumbnail' => $the_post_thumbnail,
|
113 |
+
'default_image' => false,
|
114 |
+
'order_of_image' => $order_of_image,
|
115 |
+
'link_to_post' => false,
|
116 |
+
'image_class' => 'smooth_slider_thumbnail',
|
117 |
+
'image_scan' => $image_scan,
|
118 |
+
'width' => $gti_width,
|
119 |
+
'height' => false,
|
120 |
+
'echo' => false,
|
121 |
+
'permalink' => $permalink,
|
122 |
+
'style'=> $smooth_slider_css['smooth_slider_thumbnail']
|
123 |
+
);
|
124 |
+
$smooth_slide_image=smooth_sslider_get_the_image($img_args);
|
125 |
+
//filter hook
|
126 |
+
$smooth_slide_image=apply_filters('smooth_slide_image',$smooth_slide_image,$post_id,$smooth_slider,$smooth_slider_css);
|
127 |
+
|
128 |
+
$html .= $smooth_slide_image;
|
129 |
+
|
130 |
+
if(!$smooth_slider['content_limit'] or $smooth_slider['content_limit'] == '' or $smooth_slider['content_limit'] == ' ')
|
131 |
+
$slider_excerpt = substr($slider_content,0,$smooth_slider['content_chars']);
|
132 |
+
else
|
133 |
+
$slider_excerpt = smooth_slider_word_limiter( $slider_content, $limit = $smooth_slider['content_limit'] );
|
134 |
+
|
135 |
+
if ($smooth_slider['image_only'] == '1') {
|
136 |
+
$html .= '<!-- /smooth_slideri -->
|
137 |
+
</div>';
|
138 |
+
}
|
139 |
+
else {
|
140 |
+
if($permalink!='') {
|
141 |
+
$html .= '<h2 '.$smooth_slider_css['smooth_slider_h2'].'><a '.$smooth_slider_css['smooth_slider_h2_a'].' href="'.$permalink.'">'.$post_title.'</a></h2><span '.$smooth_slider_css['smooth_slider_span'].'> '.$slider_excerpt.'</span>
|
142 |
+
<p class="smooth_more"><a href="'.$permalink.'" '.$smooth_slider_css['smooth_slider_p_more'].'>'.$smooth_slider['more'].'</a></p>
|
143 |
+
|
144 |
+
<!-- /smooth_slideri -->
|
145 |
+
</div>'; }
|
146 |
+
else{
|
147 |
+
$html .= '<h2 '.$smooth_slider_css['smooth_slider_h2'].'>'.$post_title.'</h2><span '.$smooth_slider_css['smooth_slider_span'].'> '.$slider_excerpt.'</span>
|
148 |
+
<!-- /smooth_slideri -->
|
149 |
+
</div>'; }
|
150 |
+
}
|
151 |
+
}
|
152 |
+
if($out_echo == '1') {
|
153 |
+
echo $html;
|
154 |
+
}
|
155 |
+
$r_array = array( $smooth_sldr_j, $html);
|
156 |
+
$r_array=apply_filters('smooth_r_array',$r_array,$posts, $smooth_slider);
|
157 |
+
return $r_array;
|
158 |
+
}
|
159 |
+
|
160 |
+
function get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1'){
|
161 |
+
global $smooth_slider;
|
162 |
+
$smooth_sldr_j = $r_array[0];
|
163 |
+
$smooth_slider_css = smooth_get_inline_css();
|
164 |
+
$html='';
|
165 |
+
|
166 |
+
$slider_width=$smooth_slider['width'];
|
167 |
+
$slider_height=$smooth_slider['height'];
|
168 |
+
$slideri_css='margin:0px '. ( ($smooth_slider['prev_next'] == 1) ? "10": "0" ) .'% 0px '. ( ($smooth_slider['prev_next'] == 1) ? "10": "0" ) .'% !important;width:'. ( ($smooth_slider['prev_next'] == 1) ? "80": "100" ) .'% !important;';
|
169 |
+
$smooth_media_queries='';
|
170 |
+
if( $smooth_slider['responsive'] == '1' ) {
|
171 |
+
$smooth_media_queries='@media only screen and (max-width: 479px) {.smooth_slider{width:100% !important;height:'. ( $slider_height + ($slider_height*0.51) ).'px !important;}.smooth_slider .smooth_slideri{'.$slideri_css.'}.smooth_slider .smooth_slider_thumbnail{max-width:100% !important;}}@media only screen and (min-width: 480px) and (max-width: 767px) {.smooth_slider{width:100% !important;height:'. ( $slider_height + ($slider_height*0.36) ).'px !important;}.smooth_slider .smooth_slideri{'.$slideri_css.'}.smooth_slider .smooth_slider_thumbnail{max-width:100% !important;}}@media only screen and (min-width: 768px) and (max-width: 959px) {.smooth_slider{width:100% !important;height:'. ( $slider_height + ($slider_height*0.12) ).'px !important;}.smooth_slider .smooth_slideri{'.$slideri_css.'}.smooth_slider .smooth_slider_thumbnail{max-width:100% !important;} }';
|
172 |
+
//filter hook
|
173 |
+
$smooth_media_queries=apply_filters('smooth_media_queries',$smooth_media_queries,$smooth_slider);
|
174 |
+
}
|
175 |
+
|
176 |
+
if(!isset($smooth_slider['fouc']) or $smooth_slider['fouc']=='0' ){
|
177 |
+
$fouc='jQuery("html").addClass("smooth_slider_fouc");jQuery(document).ready(function() { jQuery(".smooth_slider_fouc #'.$slider_handle.'").css({"display" : "block"}); });';
|
178 |
+
}
|
179 |
+
else{
|
180 |
+
$fouc='';
|
181 |
+
}
|
182 |
+
$html.='<script type="text/javascript">';
|
183 |
+
$html.=$fouc;
|
184 |
+
$html.='jQuery(document).ready(function() {
|
185 |
+
jQuery("#'.$slider_handle.'").cycle({
|
186 |
+
fx: "'.$smooth_slider['fx'].'",
|
187 |
+
speed:"'.$smooth_slider['transition'] * 100 .'",
|
188 |
+
timeout: "'. ( ($smooth_slider['autostep'] == '1') ? ( $smooth_slider['speed'] * 1000 ) : 0 ) .'",';
|
189 |
+
if ($smooth_slider['prev_next'] == 1){
|
190 |
+
$html.='next: "#'.$slider_handle.'_next",
|
191 |
+
prev:"#'.$slider_handle.'_prev",';
|
192 |
+
}
|
193 |
+
|
194 |
+
if ($smooth_slider['goto_slide'] == "1" or $smooth_slider['goto_slide'] == "2" or $smooth_slider['goto_slide'] == "4"){
|
195 |
+
$html.='pager: "#'.$slider_handle.'_nav",';
|
196 |
+
}
|
197 |
+
|
198 |
+
if ($smooth_slider['goto_slide'] == 1) {
|
199 |
+
$html.=' pagerAnchorBuilder: function(idx, slide) {
|
200 |
+
return \'<a class="sldr\'+(idx+1)+\' smooth_slider_nnav" href="#">\'+(idx+1)+\'</a>\';
|
201 |
+
},';
|
202 |
+
}
|
203 |
+
if ($smooth_slider['goto_slide'] == 2) {
|
204 |
+
$html.='pagerAnchorBuilder: function(idx, slide) {
|
205 |
+
return \'<a class="sldr\'+(idx+1)+\' smooth_slider_inav" style="background-image:url('. smooth_slider_plugin_url( 'images/' ).'slide\'+(idx+1)+\'.png);background-position:0 0;width:'. $smooth_slider['navimg_w'].'px;height:'.$smooth_slider['navimg_ht'].'px;" href="#"></a>\';
|
206 |
+
}, ';
|
207 |
+
}
|
208 |
+
if ($smooth_slider['goto_slide'] == 4) {
|
209 |
+
$html.='pagerAnchorBuilder: function(idx, slide) {
|
210 |
+
return \'<a class="sldr\'+(idx+1)+\' smooth_slider_inav smooth_slider_bnav" style="width:'. $smooth_slider['navimg_w'].'px;height:'.$smooth_slider['navimg_ht'].'px;" href="#"></a>\';
|
211 |
+
}, ';
|
212 |
+
}
|
213 |
+
|
214 |
+
$html.='pause: 1
|
215 |
+
,slideExpr: "div.smooth_slideri"
|
216 |
+
});';
|
217 |
+
|
218 |
+
if ($smooth_slider['goto_slide'] == 2 or $smooth_slider['goto_slide'] == 4 ) {
|
219 |
+
$html.='jQuery("head").append("<style type=\"text/css\">#'.$slider_handle.' .smooth_nav a.smooth_slider_inav.activeSlide{background-position:-'.$smooth_slider['navimg_w'].'px 0 !important;}</style>");';
|
220 |
+
}
|
221 |
+
|
222 |
+
if(!empty($smooth_media_queries)){
|
223 |
+
$html.='jQuery("head").append("<style type=\"text/css\">'. $smooth_media_queries .'</style>");';
|
224 |
+
}
|
225 |
+
|
226 |
+
$html.='});';
|
227 |
+
//Action hook
|
228 |
+
do_action('smooth_global_script',$slider_handle,$smooth_slider);
|
229 |
+
$html.='</script><noscript><p><strong>'.$smooth_slider['noscript'].'</strong></p></noscript>';
|
230 |
+
|
231 |
+
$html.='<div id="'.$slider_handle.'" class="smooth_slider" '.$smooth_slider_css['smooth_slider'].'>';
|
232 |
+
if( $smooth_slider['title_from']=='1' and !empty($slider_id) ) $sldr_title = get_smooth_slider_name($slider_id);
|
233 |
+
else $sldr_title = $smooth_slider['title_text'];
|
234 |
+
if(!empty($sldr_title)) {
|
235 |
+
$html.='<div class="sldr_title" '.$smooth_slider_css['sldr_title'].'>'.$sldr_title.'</div> ';
|
236 |
+
}
|
237 |
+
|
238 |
+
$html.='<div class="smooth_sliderb">'.$r_array[1].'</div>';
|
239 |
+
|
240 |
+
if ($smooth_slider['goto_slide'] == 1 or $smooth_slider['goto_slide'] == 2 or $smooth_slider['goto_slide'] == 4 ) {
|
241 |
+
$html.='<div id="'.$slider_handle.'_nav" class="smooth_nav"></div>';
|
242 |
+
}
|
243 |
+
if ($smooth_slider['goto_slide'] == 3) {
|
244 |
+
$html.='<div id="'.$slider_handle.'_nav" class="smooth_nav">'.$smooth_slider['custom_nav'].'</div>';
|
245 |
+
}
|
246 |
+
if ($smooth_slider['prev_next'] == 1){
|
247 |
+
$html.='<div id="'.$slider_handle.'_next" class="smooth_next" '.$smooth_slider_css['smooth_next'].'></div>
|
248 |
+
<div id="'.$slider_handle.'_prev" class="smooth_prev" '.$smooth_slider_css['smooth_prev'].'></div>';
|
249 |
+
}
|
250 |
+
if($smooth_slider['support'] == '1'){
|
251 |
+
$html.='<div class="sldrlink" '.$smooth_slider_css['sldrlink'].'><a href="http://www.clickonf5.org/smooth-slider" target="_blank" '.$smooth_slider_css['sldrlink_a'].'>Smooth Slider</a></div>';
|
252 |
+
}
|
253 |
+
$html.='<div class="sldr_clearlt"></div><div class="sldr_clearrt"></div>
|
254 |
+
</div>';
|
255 |
+
if($echo == '1') {echo $html; }
|
256 |
+
else { return $html; }
|
257 |
+
}
|
258 |
+
|
259 |
+
//Basic Smooth Slider
|
260 |
+
function carousel_posts_on_slider($max_posts, $offset=0, $slider_id = '1',$out_echo = '1') {
|
261 |
+
global $smooth_slider;
|
262 |
+
global $wpdb, $table_prefix;
|
263 |
+
$table_name = $table_prefix.SLIDER_TABLE;
|
264 |
+
$post_table = $table_prefix."posts";
|
265 |
+
$rand = $smooth_slider['rand'];
|
266 |
+
if(isset($rand) and $rand=='1'){
|
267 |
+
$orderby = 'RAND()';
|
268 |
+
}
|
269 |
+
else {
|
270 |
+
$orderby = 'a.slide_order ASC, a.date DESC';
|
271 |
+
}
|
272 |
+
|
273 |
+
$posts = $wpdb->get_results("SELECT b.* FROM
|
274 |
+
$table_name a LEFT OUTER JOIN $post_table b
|
275 |
+
ON a.post_id = b.ID
|
276 |
+
WHERE (b.post_status = 'publish' OR (b.post_type='attachment' AND b.post_status = 'inherit')) AND a.slider_id = '$slider_id'
|
277 |
+
ORDER BY ".$orderby." LIMIT $offset, $max_posts", OBJECT);
|
278 |
+
|
279 |
+
$r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
|
280 |
+
return $r_array;
|
281 |
+
}
|
282 |
+
|
283 |
+
function get_smooth_slider($slider_id='',$offset=0) {
|
284 |
+
global $smooth_slider;
|
285 |
+
|
286 |
+
if($smooth_slider['multiple_sliders'] == '1' and is_singular() and (empty($slider_id) or !isset($slider_id))){
|
287 |
+
global $post;
|
288 |
+
$post_id = $post->ID;
|
289 |
+
$slider_id = get_slider_for_the_post($post_id);
|
290 |
+
}
|
291 |
+
if((!is_singular() or $smooth_slider['multiple_sliders'] != '1') and (empty($slider_id) or !isset($slider_id))){
|
292 |
+
$slider_id = '1';
|
293 |
+
}
|
294 |
+
if(!empty($slider_id)){
|
295 |
+
$r_array = carousel_posts_on_slider($smooth_slider['no_posts'], $offset, $slider_id, '0');
|
296 |
+
$slider_handle='smooth_slider_'.$slider_id;
|
297 |
+
get_global_smooth_slider($slider_handle,$r_array,$slider_id,$echo='1');
|
298 |
+
} //end of not empty slider_id condition
|
299 |
+
}
|
300 |
+
|
301 |
+
//For displaying category specific posts in chronologically reverse order, from Smooth Slider 2.3.3
|
302 |
+
function carousel_posts_on_slider_category($max_posts='5', $catg_slug='', $offset=0, $out_echo = '1') {
|
303 |
+
global $smooth_slider;
|
304 |
+
global $wpdb, $table_prefix;
|
305 |
+
|
306 |
+
if (!empty($catg_slug)) {
|
307 |
+
$category = get_category_by_slug($catg_slug);
|
308 |
+
$slider_cat = $category->term_id;
|
309 |
+
}
|
310 |
+
else {
|
311 |
+
$category = get_the_category();
|
312 |
+
$slider_cat = $category[0]->cat_ID;
|
313 |
+
}
|
314 |
+
|
315 |
+
$rand = $smooth_slider['rand'];
|
316 |
+
if(isset($rand) and $rand=='1'){
|
317 |
+
$orderby = '&orderby=rand';
|
318 |
+
}
|
319 |
+
else {
|
320 |
+
$orderby = '';
|
321 |
+
}
|
322 |
+
//extract posts
|
323 |
+
$posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.'&category='.$slider_cat.$orderby);
|
324 |
+
|
325 |
+
$r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
|
326 |
+
return $r_array;
|
327 |
+
}
|
328 |
+
|
329 |
+
function get_smooth_slider_category($catg_slug,$offset=0) {
|
330 |
+
global $smooth_slider;
|
331 |
+
$r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0');
|
332 |
+
$slider_handle='smooth_slider_'.$catg_slug;
|
333 |
+
get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1');
|
334 |
+
}
|
335 |
+
|
336 |
+
//For displaying recent posts in chronologically reverse order, from Smooth Slider 2.4
|
337 |
+
function carousel_posts_on_slider_recent($max_posts='5', $offset=0, $out_echo = '1') {
|
338 |
+
global $smooth_slider;
|
339 |
+
|
340 |
+
$rand = $smooth_slider['rand'];
|
341 |
+
if(isset($rand) and $rand=='1'){
|
342 |
+
$orderby = '&orderby=rand';
|
343 |
+
}
|
344 |
+
else {
|
345 |
+
$orderby = '';
|
346 |
+
}
|
347 |
+
|
348 |
+
//extract posts data
|
349 |
+
$posts = get_posts('numberposts='.$max_posts.'&offset='.$offset.$orderby);
|
350 |
+
|
351 |
+
$r_array=smooth_global_posts_processor( $posts, $smooth_slider, $out_echo );
|
352 |
+
return $r_array;
|
353 |
+
}
|
354 |
+
|
355 |
+
function get_smooth_slider_recent($offset=0) {
|
356 |
+
global $smooth_slider;
|
357 |
+
$r_array = carousel_posts_on_slider_recent($smooth_slider['no_posts'], $offset, '0');
|
358 |
+
$slider_handle='smooth_slider_recent';
|
359 |
+
get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1');
|
360 |
+
}
|
361 |
+
require_once (dirname (__FILE__) . '/shortcodes_1.php');
|
362 |
+
require_once (dirname (__FILE__) . '/widgets_1.php');
|
363 |
+
|
364 |
+
function smooth_slider_enqueue_scripts() {
|
365 |
+
wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),
|
366 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
367 |
+
}
|
368 |
+
|
369 |
+
add_action( 'init', 'smooth_slider_enqueue_scripts' );
|
370 |
+
|
371 |
+
function smooth_slider_enqueue_styles() {
|
372 |
+
global $post, $smooth_slider, $wp_registered_widgets,$wp_widget_factory;
|
373 |
+
if(is_singular()) {
|
374 |
+
$smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
375 |
+
//for compatibility with lower versions of Smooth Slider
|
376 |
+
if( empty($smooth_slider_style) ) $smooth_slider_style=get_post_meta($post->ID,'slider_style',true);
|
377 |
+
if((is_active_widget(false, false, 'sslider_wid', true) or isset($smooth_slider['shortcode']) ) and (!isset($smooth_slider_style) or empty($smooth_slider_style))){
|
378 |
+
$smooth_slider_style='default';
|
379 |
+
}
|
380 |
+
if (!isset($smooth_slider_style) or empty($smooth_slider_style) ) {
|
381 |
+
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),false, SMOOTH_SLIDER_VER, 'all');
|
382 |
+
}
|
383 |
+
else {
|
384 |
+
$smooth_slider_style=str_replace('.css','',$smooth_slider_style);
|
385 |
+
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider_style.'/style.css' ),
|
386 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
387 |
+
}
|
388 |
+
}
|
389 |
+
else {
|
390 |
+
$smooth_slider_style = $smooth_slider['stylesheet'];
|
391 |
+
wp_enqueue_style( 'smooth_slider_headcss', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider_style.'/style.css' ),
|
392 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
393 |
+
}
|
394 |
+
}
|
395 |
+
add_action( 'wp', 'smooth_slider_enqueue_styles' );
|
396 |
+
|
397 |
+
//admin settings
|
398 |
+
function smooth_slider_admin_scripts() {
|
399 |
+
global $smooth_slider;
|
400 |
+
if ( is_admin() ){ // admin actions
|
401 |
+
// Settings page only
|
402 |
+
if ( isset($_GET['page']) && ('smooth-slider-admin' == $_GET['page'] or 'smooth-slider-settings' == $_GET['page'] ) ) {
|
403 |
+
wp_register_script('jquery', false, false, false, false);
|
404 |
+
wp_enqueue_script( 'jquery-ui-tabs' );
|
405 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
406 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
407 |
+
wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),
|
408 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
409 |
+
wp_enqueue_script( 'smooth_slider_admin_js', smooth_slider_plugin_url( 'js/admin.js' ),
|
410 |
+
array('jquery'), SMOOTH_SLIDER_VER, false);
|
411 |
+
wp_enqueue_style( 'smooth_slider_admin_head_css', smooth_slider_plugin_url( 'css/skins/'.$smooth_slider['stylesheet'].'/style.css' ),
|
412 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
413 |
+
wp_enqueue_style( 'smooth_slider_admin_css', smooth_slider_plugin_url( 'css/admin.css' ),
|
414 |
+
false, SMOOTH_SLIDER_VER, 'all');
|
415 |
+
}
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
add_action( 'admin_init', 'smooth_slider_admin_scripts' );
|
420 |
+
|
421 |
+
function smooth_slider_admin_head() {
|
422 |
+
global $smooth_slider;
|
423 |
+
if ( is_admin() ){ // admin actions
|
424 |
+
|
425 |
+
// Sliders page only
|
426 |
+
if ( isset($_GET['page']) && 'smooth-slider-admin' == $_GET['page'] ) {
|
427 |
+
$sliders = ss_get_sliders();
|
428 |
+
?>
|
429 |
+
<script type="text/javascript">
|
430 |
+
// <![CDATA[
|
431 |
+
jQuery(document).ready(function() {
|
432 |
+
jQuery("#slider_tabs").tabs();
|
433 |
+
<?php foreach($sliders as $slider){?>
|
434 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").sortable();
|
435 |
+
jQuery("#sslider_sortable_<?php echo $slider['slider_id'];?>").disableSelection();
|
436 |
+
<?php } ?>
|
437 |
+
});
|
438 |
+
function confirmRemove()
|
439 |
+
{
|
440 |
+
var agree=confirm("This will remove selected Posts/Pages from Slider.");
|
441 |
+
if (agree)
|
442 |
+
return true ;
|
443 |
+
else
|
444 |
+
return false ;
|
445 |
+
}
|
446 |
+
function confirmRemoveAll()
|
447 |
+
{
|
448 |
+
var agree=confirm("Remove all Posts/Pages from Smooth Slider??");
|
449 |
+
if (agree)
|
450 |
+
return true ;
|
451 |
+
else
|
452 |
+
return false ;
|
453 |
+
}
|
454 |
+
function confirmSliderDelete()
|
455 |
+
{
|
456 |
+
var agree=confirm("Delete this Slider??");
|
457 |
+
if (agree)
|
458 |
+
return true ;
|
459 |
+
else
|
460 |
+
return false ;
|
461 |
+
}
|
462 |
+
function slider_checkform ( form )
|
463 |
+
{
|
464 |
+
if (form.new_slider_name.value == "") {
|
465 |
+
alert( "Please enter the New Slider name." );
|
466 |
+
form.new_slider_name.focus();
|
467 |
+
return false ;
|
468 |
+
}
|
469 |
+
return true ;
|
470 |
+
}
|
471 |
+
</script>
|
472 |
+
<?php
|
473 |
+
} //Sliders page only
|
474 |
+
|
475 |
+
// Settings page only
|
476 |
+
if ( isset($_GET['page']) && 'smooth-slider-settings' == $_GET['page'] ) { ?>
|
477 |
+
<script type="text/javascript">
|
478 |
+
// <![CDATA[
|
479 |
+
jQuery(document).ready(function() {
|
480 |
+
jQuery("#slider_tabs").tabs();
|
481 |
+
});
|
482 |
+
</script>
|
483 |
+
<?php wp_print_scripts( 'farbtastic' );
|
484 |
+
wp_print_styles( 'farbtastic' );
|
485 |
+
?>
|
486 |
+
<script type="text/javascript">
|
487 |
+
// <![CDATA[
|
488 |
+
jQuery(document).ready(function() {
|
489 |
+
jQuery('#colorbox_1').farbtastic('#color_value_1');
|
490 |
+
jQuery('#color_picker_1').click(function () {
|
491 |
+
if (jQuery('#colorbox_1').css('display') == "block") {
|
492 |
+
jQuery('#colorbox_1').fadeOut("slow"); }
|
493 |
+
else {
|
494 |
+
jQuery('#colorbox_1').fadeIn("slow"); }
|
495 |
+
});
|
496 |
+
var colorpick_1 = false;
|
497 |
+
jQuery(document).mousedown(function(){
|
498 |
+
if (colorpick_1 == true) {
|
499 |
+
return; }
|
500 |
+
jQuery('#colorbox_1').fadeOut("slow");
|
501 |
+
});
|
502 |
+
jQuery(document).mouseup(function(){
|
503 |
+
colorpick_1 = false;
|
504 |
+
});
|
505 |
+
//for second color box
|
506 |
+
jQuery('#colorbox_2').farbtastic('#color_value_2');
|
507 |
+
jQuery('#color_picker_2').click(function () {
|
508 |
+
if (jQuery('#colorbox_2').css('display') == "block") {
|
509 |
+
jQuery('#colorbox_2').fadeOut("slow"); }
|
510 |
+
else {
|
511 |
+
jQuery('#colorbox_2').fadeIn("slow"); }
|
512 |
+
});
|
513 |
+
var colorpick_2 = false;
|
514 |
+
jQuery(document).mousedown(function(){
|
515 |
+
if (colorpick_2 == true) {
|
516 |
+
return; }
|
517 |
+
jQuery('#colorbox_2').fadeOut("slow");
|
518 |
+
});
|
519 |
+
jQuery(document).mouseup(function(){
|
520 |
+
colorpick_2 = false;
|
521 |
+
});
|
522 |
+
//for third color box
|
523 |
+
jQuery('#colorbox_3').farbtastic('#color_value_3');
|
524 |
+
jQuery('#color_picker_3').click(function () {
|
525 |
+
if (jQuery('#colorbox_3').css('display') == "block") {
|
526 |
+
jQuery('#colorbox_3').fadeOut("slow"); }
|
527 |
+
else {
|
528 |
+
jQuery('#colorbox_3').fadeIn("slow"); }
|
529 |
+
});
|
530 |
+
var colorpick_3 = false;
|
531 |
+
jQuery(document).mousedown(function(){
|
532 |
+
if (colorpick_3 == true) {
|
533 |
+
return; }
|
534 |
+
jQuery('#colorbox_3').fadeOut("slow");
|
535 |
+
});
|
536 |
+
jQuery(document).mouseup(function(){
|
537 |
+
colorpick_3 = false;
|
538 |
+
});
|
539 |
+
//for fourth color box
|
540 |
+
jQuery('#colorbox_4').farbtastic('#color_value_4');
|
541 |
+
jQuery('#color_picker_4').click(function () {
|
542 |
+
if (jQuery('#colorbox_4').css('display') == "block") {
|
543 |
+
jQuery('#colorbox_4').fadeOut("slow"); }
|
544 |
+
else {
|
545 |
+
jQuery('#colorbox_4').fadeIn("slow"); }
|
546 |
+
});
|
547 |
+
var colorpick_4 = false;
|
548 |
+
jQuery(document).mousedown(function(){
|
549 |
+
if (colorpick_4 == true) {
|
550 |
+
return; }
|
551 |
+
jQuery('#colorbox_4').fadeOut("slow");
|
552 |
+
});
|
553 |
+
jQuery(document).mouseup(function(){
|
554 |
+
colorpick_4 = false;
|
555 |
+
});
|
556 |
+
//for fifth color box
|
557 |
+
jQuery('#colorbox_5').farbtastic('#color_value_5');
|
558 |
+
jQuery('#color_picker_5').click(function () {
|
559 |
+
if (jQuery('#colorbox_5').css('display') == "block") {
|
560 |
+
jQuery('#colorbox_5').fadeOut("slow"); }
|
561 |
+
else {
|
562 |
+
jQuery('#colorbox_5').fadeIn("slow"); }
|
563 |
+
});
|
564 |
+
var colorpick_5 = false;
|
565 |
+
jQuery(document).mousedown(function(){
|
566 |
+
if (colorpick_5 == true) {
|
567 |
+
return; }
|
568 |
+
jQuery('#colorbox_5').fadeOut("slow");
|
569 |
+
});
|
570 |
+
jQuery(document).mouseup(function(){
|
571 |
+
colorpick_5 = false;
|
572 |
+
});
|
573 |
+
//for sixth color box
|
574 |
+
jQuery('#colorbox_6').farbtastic('#color_value_6');
|
575 |
+
jQuery('#color_picker_6').click(function () {
|
576 |
+
if (jQuery('#colorbox_6').css('display') == "block") {
|
577 |
+
jQuery('#colorbox_6').fadeOut("slow"); }
|
578 |
+
else {
|
579 |
+
jQuery('#colorbox_6').fadeIn("slow"); }
|
580 |
+
});
|
581 |
+
var colorpick_6 = false;
|
582 |
+
jQuery(document).mousedown(function(){
|
583 |
+
if (colorpick_6 == true) {
|
584 |
+
return; }
|
585 |
+
jQuery('#colorbox_6').fadeOut("slow");
|
586 |
+
});
|
587 |
+
jQuery(document).mouseup(function(){
|
588 |
+
colorpick_6 = false;
|
589 |
+
});
|
590 |
+
jQuery('#sldr_close').click(function () {
|
591 |
+
jQuery('#sldr_message').fadeOut("slow");
|
592 |
+
});
|
593 |
+
});
|
594 |
+
</script>
|
595 |
+
<style type="text/css">
|
596 |
+
.color-picker-wrap {
|
597 |
+
position: absolute;
|
598 |
+
display: none;
|
599 |
+
background: #fff;
|
600 |
+
border: 3px solid #ccc;
|
601 |
+
padding: 3px;
|
602 |
+
z-index: 1000;
|
603 |
+
}
|
604 |
+
#sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
|
605 |
+
#sldr_close {float:right;}
|
606 |
+
</style>
|
607 |
+
<?php
|
608 |
+
} //for smooth slider option page
|
609 |
+
}//only for admin
|
610 |
+
}
|
611 |
+
add_action('admin_head', 'smooth_slider_admin_head');
|
612 |
+
|
613 |
+
//get inline css with style attribute attached
|
614 |
+
function smooth_get_inline_css($echo='0'){
|
615 |
+
global $smooth_slider;
|
616 |
+
|
617 |
+
global $post;
|
618 |
+
if(is_singular()) {
|
619 |
+
$smooth_slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
620 |
+
//for compatibility with lower versions of Smooth Slider
|
621 |
+
if( empty($smooth_slider_style) ) $smooth_slider_style=get_post_meta($post->ID,'slider_style',true);
|
622 |
+
}
|
623 |
+
if((is_singular() and ($smooth_slider_style == 'default' or empty($smooth_slider_style) or !$smooth_slider_style)) or (!is_singular() and $smooth_slider['stylesheet'] == 'default') ) { $default=true; }
|
624 |
+
else{ $default=false;}
|
625 |
+
|
626 |
+
$smooth_slider_css=array();
|
627 |
+
if($default){
|
628 |
+
$style_start= ($echo=='0') ? 'style="':'';
|
629 |
+
$style_end= ($echo=='0') ? '"':'';
|
630 |
+
//smooth_slider
|
631 |
+
$smooth_slider_css['smooth_slider']=$style_start.'width:'.$smooth_slider['width'].'px;height:'.$smooth_slider['height'].'px;background-color:'. ( ($smooth_slider['bg'] == '1') ? "transparent" : $smooth_slider['bg_color'] ) .';border:'. $smooth_slider['border'].'px solid '.$smooth_slider['brcolor'].';'.$style_end;
|
632 |
+
|
633 |
+
if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){$slider_title_font = "bold";} else { $slider_title_font = "normal"; }
|
634 |
+
if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){$slider_title_style = "italic";} else {$slider_title_style = "normal";}
|
635 |
+
//sldr_title
|
636 |
+
$smooth_slider_css['sldr_title']=$style_start.'font-family:'.$smooth_slider['title_font'].', Arial, Helvetica, sans-serif;font-size:'. $smooth_slider['title_fsize'].'px;font-weight:'.$slider_title_font.';font-style:'.$slider_title_style.';color:'.$smooth_slider['title_fcolor'].';'.$style_end;
|
637 |
+
|
638 |
+
if ($smooth_slider['bg'] == '1') { $smooth_slideri_bg = "transparent";} else { $smooth_slideri_bg = $smooth_slider['bg_color']; }
|
639 |
+
//smooth_slideri
|
640 |
+
$smooth_slider_css['smooth_slideri']=$style_start.'width:'. ( ($smooth_slider['prev_next'] == 1) ? ( $smooth_slider['width'] - 48 ): $smooth_slider['width'] ) .'px;margin:0px '. ( ($smooth_slider['prev_next'] == 1) ? "24": "0" ) .'px 0px '. ( ($smooth_slider['prev_next'] == 1) ? "24": "0" ) .'px;'.$style_end;
|
641 |
+
|
642 |
+
if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){$ptitle_fweight = "bold";} else {$ptitle_fweight = "normal";}
|
643 |
+
if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){$ptitle_fstyle = "italic";} else {$ptitle_fstyle = "normal";}
|
644 |
+
//smooth_slider_h2
|
645 |
+
$smooth_slider_css['smooth_slider_h2']=$style_start.'clear:none;line-height:'. ($smooth_slider['ptitle_fsize'] + 3) .'px;font-family:'. $smooth_slider['ptitle_font'].';font-size:'.$smooth_slider['ptitle_fsize'].'px;font-weight:'.$ptitle_fweight.';font-style:'.$ptitle_fstyle.';color:'.$smooth_slider['ptitle_fcolor'].';margin:0 0 5px 0;'.$style_end;
|
646 |
+
|
647 |
+
//smooth_slider_h2 a
|
648 |
+
$smooth_slider_css['smooth_slider_h2_a']=$style_start.'color:'.$smooth_slider['ptitle_fcolor'].';font-size:'.$smooth_slider['ptitle_fsize'].'px;font-weight:'.$ptitle_fweight.';font-style:'.$ptitle_fstyle.';'.$style_end;
|
649 |
+
|
650 |
+
if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){$content_fweight= "bold";} else {$content_fweight= "normal";}
|
651 |
+
if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){$content_fstyle= "italic";} else {$content_fstyle= "normal";}
|
652 |
+
//smooth_slider_span
|
653 |
+
$smooth_slider_css['smooth_slider_span']=$style_start.'font-family:'.$smooth_slider['content_font'].';font-size:'.$smooth_slider['content_fsize'].'px;font-weight:'.$content_fweight.';font-style:'.$content_fstyle.';color:'. $smooth_slider['content_fcolor'].';'.$style_end;
|
654 |
+
|
655 |
+
//
|
656 |
+
if($smooth_slider['img_align'] == "left") {$thumb_margin_right= "10";} else {$thumb_margin_right= "0";}
|
657 |
+
if($smooth_slider['img_align'] == "right") {$thumb_margin_left = "10";} else {$thumb_margin_left = "0";}
|
658 |
+
if($smooth_slider['img_size'] == '1'){ $thumb_width= 'width:'. $smooth_slider['img_width'].'px;';} else{$thumb_width='';}
|
659 |
+
//smooth_slider_thumbnail
|
660 |
+
$smooth_slider_css['smooth_slider_thumbnail']=$style_start.'float:'.$smooth_slider['img_align'].';margin:0 '.$thumb_margin_right.'px 0 '.$thumb_margin_left.'px;max-height:'.$smooth_slider['img_height'].'px;border:'.$smooth_slider['img_border'].'px solid '.$smooth_slider['img_brcolor'].';'.$thumb_width.$style_end;
|
661 |
+
|
662 |
+
//smooth_slider_p_more
|
663 |
+
$smooth_slider_css['smooth_slider_p_more']=$style_start.'color:'.$smooth_slider['ptitle_fcolor'].';font-family:'.$smooth_slider['content_font'].';font-size:'.$smooth_slider['content_fsize'].'px;'.$style_end;
|
664 |
+
|
665 |
+
$smooth_slider_css['sldrlink']=$style_start.'padding-right:'. ( ($smooth_slider['prev_next'] == 1) ? "10" : "0" ) .'px;"';
|
666 |
+
$smooth_slider_css['sldrlink_a']='style="color:'.$smooth_slider['content_fcolor'].' !important;'.$style_end;
|
667 |
+
|
668 |
+
}
|
669 |
+
return $smooth_slider_css;
|
670 |
+
}
|
671 |
+
function smooth_slider_css() {
|
672 |
+
global $smooth_slider;
|
673 |
+
$css=$smooth_slider['css'];
|
674 |
+
if($css and !empty($css)){?>
|
675 |
+
<style type="text/css"><?php echo $css;?></style>
|
676 |
+
<?php }
|
677 |
+
}
|
678 |
+
add_action('wp_head', 'smooth_slider_css');
|
679 |
+
add_action('admin_head', 'smooth_slider_css');
|
680 |
+
?>
|
slider_versions/widgets_1.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Smooth_Slider_Simple_Widget extends WP_Widget {
|
3 |
+
function Smooth_Slider_Simple_Widget() {
|
4 |
+
$widget_options = array('classname' => 'sslider_wclass', 'description' => 'Insert Smooth Slider' );
|
5 |
+
$this->WP_Widget('sslider_wid', 'Smooth Slider - Simple', $widget_options);
|
6 |
+
}
|
7 |
+
|
8 |
+
function widget($args, $instance) {
|
9 |
+
extract($args, EXTR_SKIP);
|
10 |
+
global $smooth_slider;
|
11 |
+
|
12 |
+
echo $before_widget;
|
13 |
+
if($smooth_slider['multiple_sliders'] == '1') {
|
14 |
+
$slider_id = empty($instance['slider_id']) ? '1' : apply_filters('widget_slider_id', $instance['slider_id']);
|
15 |
+
}
|
16 |
+
else{
|
17 |
+
$slider_id = '1';
|
18 |
+
}
|
19 |
+
|
20 |
+
echo $before_title . $after_title;
|
21 |
+
get_smooth_slider($slider_id);
|
22 |
+
echo $after_widget;
|
23 |
+
}
|
24 |
+
|
25 |
+
function update($new_instance, $old_instance) {
|
26 |
+
global $smooth_slider;
|
27 |
+
$instance = $old_instance;
|
28 |
+
if($smooth_slider['multiple_sliders'] == '1') {
|
29 |
+
$instance['slider_id'] = strip_tags($new_instance['slider_id']);
|
30 |
+
}
|
31 |
+
|
32 |
+
return $instance;
|
33 |
+
}
|
34 |
+
|
35 |
+
function form($instance) {
|
36 |
+
global $smooth_slider;
|
37 |
+
if($smooth_slider['multiple_sliders'] == '1') {
|
38 |
+
$instance = wp_parse_args( (array) $instance, array( 'slider_id' => '' ) );
|
39 |
+
$slider_id = strip_tags($instance['slider_id']);
|
40 |
+
$sliders = ss_get_sliders();
|
41 |
+
$sname_html='<option value="0" selected >Select the Slider</option>';
|
42 |
+
|
43 |
+
foreach ($sliders as $slider) {
|
44 |
+
if($slider['slider_id']==$slider_id){$selected = 'selected';} else{$selected='';}
|
45 |
+
$sname_html =$sname_html.'<option value="'.$slider['slider_id'].'" '.$selected.'>'.$slider['slider_name'].'</option>';
|
46 |
+
}
|
47 |
+
?>
|
48 |
+
<p><label for="<?php echo $this->get_field_id('slider_id'); ?>">Select Slider Name: <select class="widefat" id="<?php echo $this->get_field_id('slider_id'); ?>" name="<?php echo $this->get_field_name('slider_id'); ?>"><?php echo $sname_html;?></select></label></p>
|
49 |
+
<?php }
|
50 |
+
}
|
51 |
+
}
|
52 |
+
add_action( 'widgets_init', create_function('', 'return register_widget("Smooth_Slider_Simple_Widget");') );
|
53 |
+
?>
|
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.
|
7 |
Author: Internet Techies
|
8 |
Author URI: http://www.clickonf5.org/
|
9 |
Wordpress version supported: 2.9 and above
|
@@ -34,7 +34,7 @@ define('SLIDER_TABLE','smooth_slider'); //Slider TABLE NAME
|
|
34 |
define('PREV_SLIDER_TABLE','slider'); //Slider TABLE NAME
|
35 |
define('SLIDER_META','smooth_slider_meta'); //Meta TABLE NAME
|
36 |
define('SLIDER_POST_META','smooth_slider_postmeta'); //Meta TABLE NAME
|
37 |
-
define("SMOOTH_SLIDER_VER","2.
|
38 |
if ( ! defined( 'SMOOTH_SLIDER_PLUGIN_BASENAME' ) )
|
39 |
define( 'SMOOTH_SLIDER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
40 |
if ( ! defined( 'SMOOTH_SLIDER_CSS_DIR' ) ){
|
@@ -100,7 +100,7 @@ function install_smooth_slider() {
|
|
100 |
$default_slider = array('speed'=>'7',
|
101 |
'no_posts'=>'5',
|
102 |
'bg_color'=>'#ffffff',
|
103 |
-
'height'=>'
|
104 |
'width'=>'450',
|
105 |
'border'=>'1',
|
106 |
'brcolor'=>'#999999',
|
@@ -141,13 +141,16 @@ function install_smooth_slider() {
|
|
141 |
'multiple_sliders'=>'0',
|
142 |
'navimg_w'=>'32',
|
143 |
'navimg_ht'=>'32',
|
144 |
-
'content_limit'=>'
|
145 |
'stylesheet'=>'default',
|
146 |
'shortcode'=>'1',
|
147 |
'rand'=>'0',
|
148 |
'ver'=>'j',
|
149 |
'support'=>'1',
|
150 |
'fouc'=>'0',
|
|
|
|
|
|
|
151 |
'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.'
|
152 |
);
|
153 |
|
@@ -278,10 +281,10 @@ global $smooth_slider;
|
|
278 |
$wpdb->query($sql);
|
279 |
}
|
280 |
}
|
281 |
-
$slider_style = get_post_meta($post_id,'
|
282 |
-
$post_slider_style=$_POST['
|
283 |
if($slider_style != $post_slider_style and isset($post_slider_style) and !empty($post_slider_style)) {
|
284 |
-
update_post_meta($post_id, '
|
285 |
}
|
286 |
|
287 |
$thumbnail_key = $smooth_slider['img_pick'][1];
|
@@ -440,9 +443,9 @@ function add_to_slider_checkbox() {
|
|
440 |
<br />
|
441 |
<div>
|
442 |
<?php
|
443 |
-
$slider_style = get_post_meta($post->ID,'
|
444 |
?>
|
445 |
-
<select name="
|
446 |
<?php
|
447 |
$directory = SMOOTH_SLIDER_CSS_DIR;
|
448 |
if ($handle = opendir($directory)) {
|
@@ -453,7 +456,7 @@ function add_to_slider_checkbox() {
|
|
453 |
closedir($handle);
|
454 |
}
|
455 |
?>
|
456 |
-
</select> <label for="
|
457 |
|
458 |
<?php $thumbnail_key = $smooth_slider['img_pick'][1];
|
459 |
$sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
|
@@ -538,59 +541,8 @@ function sslider_plugin_action_links( $links, $file ) {
|
|
538 |
|
539 |
return $links;
|
540 |
}
|
541 |
-
class Smooth_Slider_Simple_Widget extends WP_Widget {
|
542 |
-
function Smooth_Slider_Simple_Widget() {
|
543 |
-
$widget_options = array('classname' => 'sslider_wclass', 'description' => 'Insert Smooth Slider' );
|
544 |
-
$this->WP_Widget('sslider_wid', 'Smooth Slider - Simple', $widget_options);
|
545 |
-
}
|
546 |
-
|
547 |
-
function widget($args, $instance) {
|
548 |
-
extract($args, EXTR_SKIP);
|
549 |
-
global $smooth_slider;
|
550 |
-
|
551 |
-
echo $before_widget;
|
552 |
-
if($smooth_slider['multiple_sliders'] == '1') {
|
553 |
-
$slider_id = empty($instance['slider_id']) ? '1' : apply_filters('widget_slider_id', $instance['slider_id']);
|
554 |
-
}
|
555 |
-
else{
|
556 |
-
$slider_id = '1';
|
557 |
-
}
|
558 |
-
|
559 |
-
echo $before_title . $after_title;
|
560 |
-
get_smooth_slider($slider_id);
|
561 |
-
echo $after_widget;
|
562 |
-
}
|
563 |
-
|
564 |
-
function update($new_instance, $old_instance) {
|
565 |
-
global $smooth_slider;
|
566 |
-
$instance = $old_instance;
|
567 |
-
if($smooth_slider['multiple_sliders'] == '1') {
|
568 |
-
$instance['slider_id'] = strip_tags($new_instance['slider_id']);
|
569 |
-
}
|
570 |
-
|
571 |
-
return $instance;
|
572 |
-
}
|
573 |
-
|
574 |
-
function form($instance) {
|
575 |
-
global $smooth_slider;
|
576 |
-
if($smooth_slider['multiple_sliders'] == '1') {
|
577 |
-
$instance = wp_parse_args( (array) $instance, array( 'slider_id' => '' ) );
|
578 |
-
$slider_id = strip_tags($instance['slider_id']);
|
579 |
-
$sliders = ss_get_sliders();
|
580 |
-
$sname_html='<option value="0" selected >Select the Slider</option>';
|
581 |
-
|
582 |
-
foreach ($sliders as $slider) {
|
583 |
-
if($slider['slider_id']==$slider_id){$selected = 'selected';} else{$selected='';}
|
584 |
-
$sname_html =$sname_html.'<option value="'.$slider['slider_id'].'" '.$selected.'>'.$slider['slider_name'].'</option>';
|
585 |
-
}
|
586 |
-
?>
|
587 |
-
<p><label for="<?php echo $this->get_field_id('slider_id'); ?>">Select Slider Name: <select class="widefat" id="<?php echo $this->get_field_id('slider_id'); ?>" name="<?php echo $this->get_field_name('slider_id'); ?>"><?php echo $sname_html;?></select></label></p>
|
588 |
-
<?php }
|
589 |
-
}
|
590 |
-
}
|
591 |
-
add_action( 'widgets_init', create_function('', 'return register_widget("Smooth_Slider_Simple_Widget");') );
|
592 |
|
593 |
-
require_once (dirname (__FILE__) . '/slider_versions/
|
594 |
require_once (dirname (__FILE__) . '/settings/settings.php');
|
595 |
require_once (dirname (__FILE__) . '/includes/media-images.php');
|
596 |
?>
|
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.4
|
7 |
Author: Internet Techies
|
8 |
Author URI: http://www.clickonf5.org/
|
9 |
Wordpress version supported: 2.9 and above
|
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.4",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' ) ){
|
100 |
$default_slider = array('speed'=>'7',
|
101 |
'no_posts'=>'5',
|
102 |
'bg_color'=>'#ffffff',
|
103 |
+
'height'=>'250',
|
104 |
'width'=>'450',
|
105 |
'border'=>'1',
|
106 |
'brcolor'=>'#999999',
|
141 |
'multiple_sliders'=>'0',
|
142 |
'navimg_w'=>'32',
|
143 |
'navimg_ht'=>'32',
|
144 |
+
'content_limit'=>'20',
|
145 |
'stylesheet'=>'default',
|
146 |
'shortcode'=>'1',
|
147 |
'rand'=>'0',
|
148 |
'ver'=>'j',
|
149 |
'support'=>'1',
|
150 |
'fouc'=>'0',
|
151 |
+
'fx'=>'scrollHorz',
|
152 |
+
'responsive'=>'0',
|
153 |
+
'css'=>'',
|
154 |
'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.'
|
155 |
);
|
156 |
|
281 |
$wpdb->query($sql);
|
282 |
}
|
283 |
}
|
284 |
+
$slider_style = get_post_meta($post_id,'_smooth_slider_style',true);
|
285 |
+
$post_slider_style=$_POST['_smooth_slider_style'];
|
286 |
if($slider_style != $post_slider_style and isset($post_slider_style) and !empty($post_slider_style)) {
|
287 |
+
update_post_meta($post_id, '_smooth_slider_style', $_POST['_smooth_slider_style']);
|
288 |
}
|
289 |
|
290 |
$thumbnail_key = $smooth_slider['img_pick'][1];
|
443 |
<br />
|
444 |
<div>
|
445 |
<?php
|
446 |
+
$slider_style = get_post_meta($post->ID,'_smooth_slider_style',true);
|
447 |
?>
|
448 |
+
<select name="_smooth_slider_style" >
|
449 |
<?php
|
450 |
$directory = SMOOTH_SLIDER_CSS_DIR;
|
451 |
if ($handle = opendir($directory)) {
|
456 |
closedir($handle);
|
457 |
}
|
458 |
?>
|
459 |
+
</select> <label for="_smooth_slider_style"><?php _e('Stylesheet to use if slider is displayed on this Post/Page','smooth-slider'); ?> </label><br /> <br />
|
460 |
|
461 |
<?php $thumbnail_key = $smooth_slider['img_pick'][1];
|
462 |
$sslider_thumbnail= get_post_meta($post_id, $thumbnail_key, true);
|
541 |
|
542 |
return $links;
|
543 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
|
545 |
+
require_once (dirname (__FILE__) . '/slider_versions/smooth_1.php');
|
546 |
require_once (dirname (__FILE__) . '/settings/settings.php');
|
547 |
require_once (dirname (__FILE__) . '/includes/media-images.php');
|
548 |
?>
|