Smooth Slider - Version 2.1.1

Version Description

Download this release

Release Info

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

Code changes from version 2.0 to 2.1.1

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
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/Thumbs.db DELETED
Binary file
images/button_next.png DELETED
Binary file
images/button_prev.png DELETED
Binary file
images/close.jpg DELETED
Binary file
images/color_picker.png DELETED
Binary file
images/slide1.png DELETED
Binary file
images/slide2.png DELETED
Binary file
images/slide3.png DELETED
Binary file
images/slide4.png DELETED
Binary file
images/slide5.png DELETED
Binary file
js/stepcarousel.js DELETED
@@ -1,269 +0,0 @@
1
- //Step Carousel Viewer: By Dynamic Drive, at http://www.dynamicdrive.com
2
- //** Created: March 19th, 08'
3
- //** Aug 16th, 08'- Updated to v 1.4:
4
- //1) Adds ability to set speed/duration of panel animation (in milliseconds)
5
- //2) Adds persistence support, so the last viewed panel is recalled when viewer returns within same browser session
6
- //3) Adds ability to specify whether panels should stop at the very last and first panel, or wrap around and start all over again
7
- //4) Adds option to specify two navigational image links positioned to the left and right of the Carousel Viewer to move the panels back and forth
8
-
9
- //** Aug 27th, 08'- Nav buttons (if enabled) also repositions themselves now if window is resized
10
-
11
- //** Sept 23rd, 08'- Updated to v 1.6:
12
- //1) Carousel now stops at the very last visible panel, instead of the last panel itself. In other words, no more white space at the end.
13
- //2) Adds ability for Carousel to auto rotate dictated by the new parameter: autostep: {enable:true, moveby:1, pause:3000}
14
- //2i) During Auto Rotate, Carousel pauses onMouseover, resumes onMouseout. Clicking Carousel halts auto rotate.
15
-
16
- //** Oct 22nd, 08'- Updated to v 1.6.1, which fixes functions stepBy() and stepTo() not stopping auto stepping of Carousel when called.
17
-
18
- var stepcarousel={
19
- ajaxloadingmsg: '<div style="margin: 1em; font-weight: bold"><img src="ajaxloadr.gif" style="vertical-align: middle" /> Fetching Content. Please wait...</div>', //customize HTML to show while fetching Ajax content
20
- defaultbuttonsfade: 0.4, //Fade degree for disabled nav buttons (0=completely transparent, 1=completely opaque)
21
- configholder: {},
22
-
23
- getCSSValue:function(val){ //Returns either 0 (if val contains 'auto') or val as an integer
24
- return (val=="auto")? 0 : parseInt(val)
25
- },
26
-
27
- getremotepanels:function(jQuery, config){ //function to fetch external page containing the panel DIVs
28
- config.$belt.html(this.ajaxloadingmsg)
29
- jQuery.ajax({
30
- url: config.contenttype[1], //path to external content
31
- async: true,
32
- error:function(ajaxrequest){
33
- config.$belt.html('Error fetching content.<br />Server Response: '+ajaxrequest.responseText)
34
- },
35
- success:function(content){
36
- config.$belt.html(content)
37
- config.$panels=config.$gallery.find('.'+config.panelclass)
38
- stepcarousel.alignpanels(jQuery, config)
39
- }
40
- })
41
- },
42
-
43
- getoffset:function(what, offsettype){
44
- return (what.offsetParent)? what[offsettype]+this.getoffset(what.offsetParent, offsettype) : what[offsettype]
45
- },
46
-
47
- getCookie:function(Name){
48
- var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
49
- if (document.cookie.match(re)) //if cookie found
50
- return document.cookie.match(re)[0].split("=")[1] //return its value
51
- return null
52
- },
53
-
54
- setCookie:function(name, value){
55
- document.cookie = name+"="+value
56
- },
57
-
58
- fadebuttons:function(config, currentpanel){
59
- config.$leftnavbutton.fadeTo('fast', currentpanel==0? this.defaultbuttonsfade : 1)
60
- config.$rightnavbutton.fadeTo('fast', currentpanel==config.lastvisiblepanel? this.defaultbuttonsfade : 1)
61
- },
62
-
63
- addnavbuttons:function(config, currentpanel){
64
- config.$leftnavbutton=jQuery('<img src="'+config.defaultbuttons.leftnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('body')
65
- config.$rightnavbutton=jQuery('<img src="'+config.defaultbuttons.rightnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('body')
66
- config.$leftnavbutton.bind('click', function(){ //assign nav button event handlers
67
- stepcarousel.stepBy(config.galleryid, -config.defaultbuttons.moveby)
68
- })
69
- config.$rightnavbutton.bind('click', function(){ //assign nav button event handlers
70
- stepcarousel.stepBy(config.galleryid, config.defaultbuttons.moveby)
71
- })
72
- if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
73
- this.fadebuttons(config, currentpanel)
74
- }
75
- return config.$leftnavbutton.add(config.$rightnavbutton)
76
- },
77
-
78
- stopautostep:function(config){
79
- clearTimeout(config.steptimer)
80
- clearTimeout(config.resumeautostep)
81
- },
82
-
83
- alignpanels:function(jQuery, config){
84
- var paneloffset=0
85
- config.paneloffsets=[paneloffset] //array to store upper left offset of each panel (1st element=0)
86
- config.panelwidths=[] //array to store widths of each panel
87
- config.$panels.each(function(index){ //loop through panels
88
- var $currentpanel=jQuery(this)
89
- $currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel
90
- $currentpanel.bind('click', function(e){return config.onpanelclick(e.target)}) //bind onpanelclick() to onclick event
91
- paneloffset+=stepcarousel.getCSSValue($currentpanel.css('marginRight')) + parseInt($currentpanel.get(0).offsetWidth || $currentpanel.css('width')) //calculate next panel offset
92
- config.paneloffsets.push(paneloffset) //remember this offset
93
- config.panelwidths.push(paneloffset-config.paneloffsets[config.paneloffsets.length-2]) //remember panel width
94
- })
95
- config.paneloffsets.pop() //delete last offset (redundant)
96
- var addpanelwidths=0
97
- var lastpanelindex=config.$panels.length-1
98
- config.lastvisiblepanel=lastpanelindex
99
- for (var i=config.$panels.length-1; i>=0; i--){
100
- addpanelwidths+=(i==lastpanelindex? config.panelwidths[lastpanelindex] : config.paneloffsets[i+1]-config.paneloffsets[i])
101
- if (config.gallerywidth>addpanelwidths){
102
- config.lastvisiblepanel=i //calculate index of panel that when in 1st position reveals the very last panel all at once based on gallery width
103
- }
104
- }
105
- config.$belt.css({width: paneloffset+'px'}) //Set Belt DIV to total panels' widths
106
- config.currentpanel=(config.panelbehavior.persist)? parseInt(this.getCookie(window[config.galleryid+"persist"])) : 0 //determine 1st panel to show by default
107
- config.currentpanel=(typeof config.currentpanel=="number" && config.currentpanel<config.$panels.length)? config.currentpanel : 0
108
- if (config.currentpanel!=0){
109
- var endpoint=config.paneloffsets[config.currentpanel]+(config.currentpanel==0? 0 : config.beltoffset)
110
- config.$belt.css({left: -endpoint+'px'})
111
- }
112
- if (config.defaultbuttons.enable==true){ //if enable default back/forth nav buttons
113
- var $navbuttons=this.addnavbuttons(config, config.currentpanel)
114
- jQuery(window).bind("load resize", function(){ //refresh position of nav buttons when page loads/resizes, in case offsets weren't available document.oncontentload
115
- config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")}
116
- config.$leftnavbutton.css({left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px'})
117
- config.$rightnavbutton.css({left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px'})
118
- })
119
- }
120
- if (config.autostep && config.autostep.enable){ //enable auto stepping of Carousel?
121
- var $carouselparts=config.$gallery.add(typeof $navbuttons!="undefined"? $navbuttons : null)
122
- $carouselparts.bind('click', function(){
123
- stepcarousel.stopautostep(config)
124
- config.autostep.status="stopped"
125
- })
126
- $carouselparts.hover(function(){ //onMouseover
127
- stepcarousel.stopautostep(config)
128
- config.autostep.hoverstate="over"
129
- }, function(){ //onMouseout
130
- if (config.steptimer && config.autostep.hoverstate=="over" && config.autostep.status!="stopped"){
131
- config.resumeautostep=setTimeout(function(){
132
- stepcarousel.autorotate(config.galleryid)
133
- config.autostep.hoverstate="out"
134
- }, 500)
135
- }
136
- })
137
- config.steptimer=setTimeout(function(){stepcarousel.autorotate(config.galleryid)}, config.autostep.pause) //automatically rotate Carousel Viewer
138
- } //end enable auto stepping check
139
- this.statusreport(config.galleryid)
140
- config.oninit()
141
- config.onslideaction(this)
142
- },
143
-
144
- stepTo:function(galleryid, pindex){ /*User entered pindex starts at 1 for intuitiveness. Internally pindex still starts at 0 */
145
- var config=stepcarousel.configholder[galleryid]
146
- if (typeof config=="undefined"){
147
- alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
148
- return
149
- }
150
- stepcarousel.stopautostep(config)
151
- var pindex=Math.min(pindex-1, config.paneloffsets.length-1)
152
- var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset)
153
- if (config.panelbehavior.wraparound==false && config.defaultbuttons.enable==true){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
154
- this.fadebuttons(config, pindex)
155
- }
156
- config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
157
- config.currentpanel=pindex
158
- this.statusreport(galleryid)
159
-
160
- this.setlinkclass(pindex)
161
- },
162
-
163
- stepBy:function(galleryid, steps){ //isauto if defined indicates stepBy() is being called automatically
164
- var config=stepcarousel.configholder[galleryid]
165
- if (typeof config=="undefined"){
166
- alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
167
- return
168
- }
169
- stepcarousel.stopautostep(config)
170
- var direction=(steps>0)? 'forward' : 'back' //If "steps" is negative, that means backwards
171
- var pindex=config.currentpanel+steps //index of panel to stop at
172
- if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth)
173
- pindex=(direction=="back" && pindex<=0)? 0 : (direction=="forward")? Math.min(pindex, config.lastvisiblepanel) : pindex
174
- if (config.defaultbuttons.enable==true){ //if default nav buttons are enabled, fade them in and out depending on if at start or end of carousel
175
- stepcarousel.fadebuttons(config, pindex)
176
- }
177
- }
178
- else{ //else, for normal stepBy behavior
179
- if (pindex>config.lastvisiblepanel && direction=="forward"){
180
- //if destination pindex is greater than last visible panel, yet we're currently not at the end of the carousel yet
181
- pindex=(config.currentpanel<config.lastvisiblepanel)? config.lastvisiblepanel : 0
182
- }
183
- else if (pindex<0 && direction=="back"){
184
- //if destination pindex is less than 0, yet we're currently not at the beginning of the carousel yet
185
- pindex=(config.currentpanel>0)? 0 : config.lastvisiblepanel /*wrap around left*/
186
- }
187
- }
188
- var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to
189
- if (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back' && config.panelbehavior.wraparound==true){ //decide whether to apply "push pull" effect
190
- config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){
191
- config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
192
- })
193
- }
194
- else
195
- config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)})
196
- config.currentpanel=pindex
197
- this.statusreport(galleryid)
198
-
199
- this.setlinkclass(pindex)
200
- },
201
-
202
- /* CALSS FOR NAVIGATION BAR */
203
- setlinkclass:function(pindex){
204
- jQuery("#board_carusel_nav a").removeClass("selected");
205
- jQuery("#board_carusel_nav #board_carusel_nav_"+(pindex+1)+" a").addClass("selected");
206
- },
207
-
208
- autorotate:function(galleryid){
209
- var config=stepcarousel.configholder[galleryid]
210
- if (config.$gallery.attr('_ismouseover')!="yes"){
211
- this.stepBy(galleryid, config.autostep.moveby)
212
- }
213
- config.steptimer=setTimeout(function(){stepcarousel.autorotate(galleryid)}, config.autostep.pause)
214
- },
215
-
216
- statusreport:function(galleryid){
217
- var config=stepcarousel.configholder[galleryid]
218
- var startpoint=config.currentpanel //index of first visible panel
219
- var visiblewidth=0
220
- for (var endpoint=startpoint; endpoint<config.paneloffsets.length; endpoint++){ //index (endpoint) of last visible panel
221
- visiblewidth+=config.panelwidths[endpoint]
222
- if (visiblewidth>config.gallerywidth){
223
- break
224
- }
225
- }
226
- startpoint+=1 //format startpoint for user friendiness
227
- endpoint=(endpoint+1==startpoint)? startpoint : endpoint //If only one image visible on the screen and partially hidden, set endpoint to startpoint
228
- var valuearray=[startpoint, endpoint, config.panelwidths.length]
229
- for (var i=0; i<config.statusvars.length; i++){
230
- window[config.statusvars[i]]=valuearray[i] //Define variable (with user specified name) and set to one of the status values
231
- config.$statusobjs[i].text(valuearray[i]+" ") //Populate element on page with ID="user specified name" with one of the status values
232
- }
233
- },
234
-
235
- setup:function(config){
236
- //Disable Step Gallery scrollbars ASAP dynamically (enabled for sake of users with JS disabled)
237
- document.write('<style type="text/css">\n#'+config.galleryid+'{overflow: hidden;}\n</style>')
238
- jQuery(document).ready(function(jQuery){
239
- config.$gallery=jQuery('#'+config.galleryid)
240
- config.gallerywidth=config.$gallery.width()
241
- config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")}
242
- config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels
243
- config.$panels=config.$gallery.find('.'+config.panelclass) //Find Panel DIVs that each contain a slide
244
- config.panelbehavior.wraparound=(config.autostep && config.autostep.enable)? true : config.panelbehavior.wraparound //if auto step enabled, set "wraparound" to true
245
- config.onpanelclick=(typeof config.onpanelclick=="undefined")? function(target){} : config.onpanelclick //attach custom "onpanelclick" event handler
246
- config.onslideaction=(typeof config.onslide=="undefined")? function(){} : function(beltobj){jQuery(beltobj).stop(); config.onslide()} //attach custom "onslide" event handler
247
- config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler
248
- config.beltoffset=stepcarousel.getCSSValue(config.$belt.css('marginLeft')) //Find length of Belt DIV's left margin
249
- config.statusvars=config.statusvars || [] //get variable names that will hold "start", "end", and "total" slides info
250
- config.$statusobjs=[jQuery('#'+config.statusvars[0]), jQuery('#'+config.statusvars[1]), jQuery('#'+config.statusvars[2])]
251
- config.currentpanel=0
252
- stepcarousel.configholder[config.galleryid]=config //store config parameter as a variable
253
- if (config.contenttype[0]=="ajax" && typeof config.contenttype[1]!="undefined") //fetch ajax content?
254
- stepcarousel.getremotepanels(jQuery, config)
255
- else
256
- stepcarousel.alignpanels(jQuery, config) //align panels and initialize gallery
257
- }) //end document.ready
258
- jQuery(window).bind('unload', function(){ //clean up
259
- if (config.panelbehavior.persist){
260
- stepcarousel.setCookie(window[config.galleryid+"persist"], config.currentpanel)
261
- }
262
- jQuery.each(config, function(ai, oi){
263
- oi=null
264
- })
265
- config=null
266
- })
267
- }
268
- }
269
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Smooth Slider ===
2
  Contributors: Tejaswini Deshpande, Sanjeev Mishra
3
  Tags: slideshow,featured,posts,jquery,slider,content,css,simple,thumbnail,image,post,sidebar,plugin,page,category,wpmu,site,blogs,style,home,categories,picture,flash,gallery
4
- Donate link: http://clickonf5.org/go/paypal/smooth-slider/
5
  Requires at least: 2.7
6
- Tested up to: 2.8.4
7
- Stable tag: 2.0
8
 
9
  == Description ==
10
 
@@ -25,7 +25,7 @@ Features:
25
  11. Slider Preview in admin panel
26
  12. Can convert to pure image Slider
27
  13. Facility to put Custom Images in place of navigation numbers
28
- 14. Images Original Size as well as custom size Option
29
  15. Pick image from content or the custom field
30
  16. New custom field implementation, to allow not to display images on selective posts
31
  17. A new template tag to display Category specific posts on Smooth Slider
@@ -35,9 +35,8 @@ Features:
35
  21. Remove posts and pages from Smooth Slider selectively or remove all the posts from the slider at one go from the settings page itself
36
  22. Option to retain specific html tags in the slider posts
37
  23. Option to specify custom text or html in place of navigation numbers or buttons
38
- 24. Fixed issue of Smooth Slider settings page with Internet Explorer
39
- 25. Optimized Smooth Slider code internally
40
- 26. Smooth Slider complete uninstall on plugin Delete
41
 
42
  [Demo](http://www.clickonf5.org/) |
43
  [Plugin Information](http://www.clickonf5.org/smooth-slider) |
@@ -90,6 +89,16 @@ Forum link: http://www.clickonf5.org/phpbb/smooth-slider-f12/
90
  Visit the plugin page (http://www.clickonf5.org/smooth-slider) and screenshot-post (http://www.clickonf5.org/wordpress/smooth-slider-featured-posts-slideshow-plugin/4333) to see more about it.
91
 
92
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
93
  Version 2.0 (10/08/2009)
94
 
95
  1. New - Now you can add pages to Smooth Slider along with posts
1
  === Smooth Slider ===
2
  Contributors: Tejaswini Deshpande, Sanjeev Mishra
3
  Tags: slideshow,featured,posts,jquery,slider,content,css,simple,thumbnail,image,post,sidebar,plugin,page,category,wpmu,site,blogs,style,home,categories,picture,flash,gallery
4
+ Donate link: http://www.clickonf5.org/go/smooth-slider/
5
  Requires at least: 2.7
6
+ Tested up to: 2.8.6
7
+ Stable tag: 2.1.1
8
 
9
  == Description ==
10
 
25
  11. Slider Preview in admin panel
26
  12. Can convert to pure image Slider
27
  13. Facility to put Custom Images in place of navigation numbers
28
+ 14. Images Original Size as well as custom size Option, also an option to crop the images so that they appear in proportion when custom sizes are selected
29
  15. Pick image from content or the custom field
30
  16. New custom field implementation, to allow not to display images on selective posts
31
  17. A new template tag to display Category specific posts on Smooth Slider
35
  21. Remove posts and pages from Smooth Slider selectively or remove all the posts from the slider at one go from the settings page itself
36
  22. Option to retain specific html tags in the slider posts
37
  23. Option to specify custom text or html in place of navigation numbers or buttons
38
+ 24. Smooth Slider complete uninstall on plugin Delete
39
+ 25. A new custom field slide_redirect_url can be added to featured post/page to redirect the slide to anothr url
 
40
 
41
  [Demo](http://www.clickonf5.org/) |
42
  [Plugin Information](http://www.clickonf5.org/smooth-slider) |
89
  Visit the plugin page (http://www.clickonf5.org/smooth-slider) and screenshot-post (http://www.clickonf5.org/wordpress/smooth-slider-featured-posts-slideshow-plugin/4333) to see more about it.
90
 
91
  == Changelog ==
92
+ Version 2.1.1 (11/19/2009)
93
+
94
+ 1. New - Added an option whether to crop images or not. This was essential after version 2.1 because, some of us use the images from other location than the wordpress installation. In that case timthumb does not operate
95
+
96
+ Version 2.1 (11/18/2009)
97
+
98
+ 1. New - Now the images will not be sqashed to fit the size, rather they would be cropped properly. Used timthumb.Caution: Please use the images stored on the same domain on the slider.
99
+ 2. New - A new custom field slide_redirect_url can now be specified to redirect the slide to anothr URL than the permalink
100
+ 3. Fixed - Admin menu dropdown were getting stuck only on Smooth Slider settings page, fixed that issue
101
+
102
  Version 2.0 (10/08/2009)
103
 
104
  1. New - Now you can add pages to Smooth Slider along with posts
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.0
7
  Author: Tejaswini Deshpande, Sanjeev Mishra
8
  Author URI: http://www.clickonf5.org
9
  Wordpress version supported: 2.7 and above
@@ -39,8 +39,7 @@ function install_smooth_slider() {
39
  $rs = $wpdb->query($sql);
40
  }
41
  // Need to delete the previously created options in old versions and create only one option field for Smooth Slider
42
- if (!get_option('smooth_slider_speed')) {
43
- $smooth_slider = array('speed'=>'7',
44
  'no_posts'=>'5',
45
  'bg_color'=>'#ffffff',
46
  'height'=>'200',
@@ -76,48 +75,22 @@ function install_smooth_slider() {
76
  'img_size'=>'1',
77
  'img_pick'=>'0',
78
  'user_level'=>'5',
79
- 'custom_nav'=>''
 
80
  );
81
- }
 
 
82
  else {
83
- $smooth_slider = array('speed'=>get_option('smooth_slider_speed'),
84
- 'no_posts'=>get_option('smooth_slider_no_posts'),
85
- 'bg_color'=>get_option('smooth_slider_bg_color'),
86
- 'height'=>get_option('smooth_slider_height'),
87
- 'width'=>get_option('smooth_slider_width'),
88
- 'border'=>get_option('smooth_slider_border'),
89
- 'brcolor'=>get_option('smooth_slider_brcolor'),
90
- 'prev_next'=>get_option('smooth_slider_prev_next'),
91
- 'goto_slide'=>get_option('smooth_slider_goto_slide'),
92
- 'title_text'=>get_option('smooth_slider_title_text'),
93
- 'title_font'=>get_option('smooth_slider_title_font'),
94
- 'title_fsize'=>get_option('smooth_slider_title_fsize'),
95
- 'title_fstyle'=>get_option('smooth_slider_title_fstyle'),
96
- 'title_fcolor'=>get_option('smooth_slider_title_fcolor'),
97
- 'ptitle_font'=>get_option('smooth_slider_ptitle_font'),
98
- 'ptitle_fsize'=>get_option('smooth_slider_ptitle_fsize'),
99
- 'ptitle_fstyle'=>get_option('smooth_slider_ptitle_fstyle'),
100
- 'ptitle_fcolor'=>get_option('smooth_slider_ptitle_fcolor'),
101
- 'img_align'=>get_option('smooth_slider_img_align'),
102
- 'img_height'=>get_option('smooth_slider_img_height'),
103
- 'img_width'=>get_option('smooth_slider_img_width'),
104
- 'img_border'=>get_option('smooth_slider_img_border'),
105
- 'img_brcolor'=>get_option('smooth_slider_img_brcolor'),
106
- 'content_font'=>get_option('smooth_slider_content_font'),
107
- 'content_fsize'=>get_option('smooth_slider_content_fsize'),
108
- 'content_fstyle'=>get_option('smooth_slider_content_fstyle'),
109
- 'content_fcolor'=>get_option('smooth_slider_content_fcolor'),
110
- 'content_from'=>get_option('smooth_slider_content_from'),
111
- 'content_chars'=>get_option('smooth_slider_content_chars'),
112
- 'bg'=>get_option('smooth_slider_bg'),
113
- 'image_only'=>get_option('smooth_slider_image_only'),
114
- 'allowable_tags'=>'',
115
- 'more'=>'Read More',
116
- 'img_size'=>'1',
117
- 'img_pick'=>'0',
118
- 'user_level'=>'5',
119
- 'custom_nav'=>''
120
- );
121
  delete_option('smooth_slider_speed');
122
  delete_option('smooth_slider_no_posts');
123
  delete_option('smooth_slider_bg_color');
@@ -150,14 +123,12 @@ function install_smooth_slider() {
150
  delete_option('smooth_slider_bg');
151
  delete_option('smooth_slider_clear');
152
  delete_option('smooth_slider_image_only');
153
- }
154
- add_option('smooth_slider_options',$smooth_slider);
155
  }
156
  register_activation_hook( __FILE__, 'install_smooth_slider' );
157
  //defined global variables and constants here
158
  global $smooth_slider;
159
  $smooth_slider = get_option('smooth_slider_options');
160
- define("SMOOTH_SLIDER_VER","2.0",false);
161
 
162
  //This adds the post to the slider
163
  function add_to_slider($post_id) {
@@ -299,6 +270,14 @@ function carousel_posts_on_slider($max_posts, $offset=0) {
299
  $permalink = get_permalink($data->ID);
300
 
301
  $post_id = $data->ID;
 
 
 
 
 
 
 
 
302
  $html .= '<div class="smooth_slideri">
303
  <!-- smooth_slideri -->';
304
 
@@ -318,21 +297,39 @@ function carousel_posts_on_slider($max_posts, $offset=0) {
318
  $slider_content = str_replace("\n","<br />",$slider_content);
319
  $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
320
 
 
 
321
  if ( !isset($image_control) or empty($image_control) or $image_control != "x"){
322
  if ($smooth_slider['img_pick'] == '1') {
323
  $first_image = smooth_slider_get_first_image($data);
324
  if(!empty($first_image)){
 
 
 
 
 
325
  $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
 
326
  }
327
  else {
328
  if( isset($thumbnail) && !empty($thumbnail) ):
329
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
 
 
 
 
 
330
  endif;
331
  }
332
  }
333
  else {
334
  if( isset($thumbnail) && !empty($thumbnail) ):
335
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
 
 
 
 
 
336
  endif;
337
  }
338
  }
@@ -392,10 +389,18 @@ function carousel_posts_on_slider_cat($max_posts, $catg_slug, $offset=0) {
392
  $permalink = get_permalink($post->ID);
393
 
394
  $post_id = $post->ID;
 
 
 
 
 
 
 
395
  $html .= '<div class="smooth_slideri">
396
  <!-- smooth_slideri -->';
397
 
398
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
 
399
 
400
  if ($smooth_slider['content_from'] == "slider_content") {
401
  $slider_content = get_post_meta($post_id, 'slider_content', true);
@@ -410,17 +415,44 @@ function carousel_posts_on_slider_cat($max_posts, $catg_slug, $offset=0) {
410
  $slider_content = str_replace("\n","<br />",$slider_content);
411
  $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
412
 
 
 
 
 
413
  if ($smooth_slider['img_pick'] == '1') {
414
  $first_image = smooth_slider_get_first_image($post);
 
415
  if(!empty($first_image)){
416
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  }
418
  }
419
  else {
420
  if( isset($thumbnail) && !empty($thumbnail) ):
421
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
 
 
 
 
 
422
  endif;
423
  }
 
424
 
425
  if ($smooth_slider['image_only'] == '1') {
426
  $html .= '<!-- /smooth_slideri -->
@@ -465,13 +497,21 @@ function smooth_slider_wpmu_carousel_posts($max_posts, $offset=0) {
465
  $post_title = str_replace('"', '', $post_title);
466
  $slider_content = $post->post_content;
467
 
468
- $permalink = get_permalink($post->ID);
469
 
470
  $post_id = $post->ID;
 
 
 
 
 
 
 
471
  $html .= '<div class="smooth_slideri">
472
  <!-- smooth_slideri -->';
473
 
474
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
 
475
 
476
  if ($smooth_slider['content_from'] == "slider_content") {
477
  $slider_content = get_post_meta($post_id, 'slider_content', true);
@@ -486,17 +526,43 @@ function smooth_slider_wpmu_carousel_posts($max_posts, $offset=0) {
486
  $slider_content = str_replace("\n","<br />",$slider_content);
487
  $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
488
 
489
- if ($smooth_slider['img_pick'] == '1') {
490
- $first_image = smooth_slider_get_first_image($post);
 
 
 
 
491
  if(!empty($first_image)){
492
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
493
  }
494
  }
495
  else {
496
  if( isset($thumbnail) && !empty($thumbnail) ):
497
- $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
 
 
 
 
 
498
  endif;
499
  }
 
500
 
501
  if ($smooth_slider['image_only'] == '1') {
502
  $html .= '<!-- /smooth_slideri -->
@@ -523,7 +589,7 @@ function smooth_slider_wpmu_carousel_posts($max_posts, $offset=0) {
523
  function smooth_slider_css() {
524
  global $smooth_slider;
525
  ?>
526
- <style type="text/css" media="screen">#smooth_sldr{width:<?php echo $smooth_slider['width']; ?>px;height:<?php echo $smooth_slider['height']; ?>px;background-color:<?php if ($smooth_slider['bg'] == '1') { echo "transparent";} else { echo $smooth_slider['bg_color']; } ?>;border:<?php echo $smooth_slider['border']; ?>px solid <?php echo $smooth_slider['brcolor']; ?>;}#smooth_sldr_items{padding:10px <?php if ($smooth_slider['prev_next'] == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sliderc{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 44);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.smooth_slideri{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 54);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.sldr_title{font-family:<?php echo $smooth_slider['title_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['title_fsize']; ?>px;font-weight:<?php if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['title_fcolor']; ?>;}#smooth_sldr_body h2{line-height:<?php echo ($smooth_slider['ptitle_fsize'] + 3); ?>px;font-family:<?php echo $smooth_slider['ptitle_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['ptitle_fsize']; ?>px;font-weight:<?php if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;}#smooth_sldr_body h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}#smooth_sldr_body span{font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-weight:<?php if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['content_fcolor']; ?>;}.smooth_slider_thumbnail{float:<?php echo $smooth_slider['img_align']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if($smooth_slider['img_align'] == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if($smooth_slider['img_align'] == "right") {echo "5";} else {echo "0";} ?>px;<?php if ($smooth_slider['img_size'] == 1) { ?>width:<?php echo $smooth_slider['img_width']; ?>px;height:<?php echo $smooth_slider['img_height']; ?>px;<?php } ?> border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}#smooth_sldr_body p.more a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;}#smooth_sliderc_nav li{border:1px solid <?php echo $smooth_slider['content_fcolor']; ?>;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "25";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?>;}</style>
527
  <?php
528
  }
529
 
@@ -948,7 +1014,7 @@ function confirmRemoveAll()
948
  #sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
949
  #sldr_close {float:right;}
950
  </style>
951
- <style type="text/css" media="screen">#smooth_sldr{width:<?php echo $smooth_slider['width']; ?>px;height:<?php echo $smooth_slider['height']; ?>px;background-color:<?php if ($smooth_slider['bg'] == '1') { echo "transparent";} else { echo $smooth_slider['bg_color']; } ?>;border:<?php echo $smooth_slider['border']; ?>px solid <?php echo $smooth_slider['brcolor']; ?>;}#smooth_sldr_items{padding:10px <?php if ($smooth_slider['prev_next'] == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sliderc{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 44);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.smooth_slideri{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 54);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.sldr_title{font-family:<?php echo $smooth_slider['title_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['title_fsize']; ?>px;font-weight:<?php if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['title_fcolor']; ?>;}#smooth_sldr_body h2{line-height:<?php echo ($smooth_slider['ptitle_fsize'] + 3); ?>px;font-family:<?php echo $smooth_slider['ptitle_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['ptitle_fsize']; ?>px;font-weight:<?php if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;}#smooth_sldr_body h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}#smooth_sldr_body span{font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-weight:<?php if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['content_fcolor']; ?>;}.smooth_slider_thumbnail{float:<?php echo $smooth_slider['img_align']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if($smooth_slider['img_align'] == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if($smooth_slider['img_align'] == "right") {echo "5";} else {echo "0";} ?>px;<?php if ($smooth_slider['img_size'] == 1) { ?>width:<?php echo $smooth_slider['img_width']; ?>px;height:<?php echo $smooth_slider['img_height']; ?>px;<?php } ?> border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}#smooth_sldr_body p.more a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;}#smooth_sliderc_nav li{border:1px solid <?php echo $smooth_slider['content_fcolor']; ?>;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "25";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?>;}</style>
952
  <?php
953
  } //for smooth slider option page
954
  }//only for admin
@@ -1013,6 +1079,7 @@ if (SMOOTH_SLIDER_VER != $plug_api->version) {
1013
  <li><a href="http://www.dynamicdrive.com" title="Step Carousel jQuery plugin by Dynamic Drive" >Step Carousel Viewer</a></li>
1014
  <li><a href="http://www.bioxd.com/featureme" title="FeatureMe Wordpress Plugin by Oscar Alcal�" >FeatureMe Wordpress Plugin</a></li>
1015
  <li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
 
1016
  <li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
1017
  </ul>
1018
  </div>
@@ -1244,7 +1311,8 @@ get_smooth_slider();
1244
  <label for="smooth_slider_options[img_height]">Height</label>
1245
  <input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" />&nbsp;px &nbsp;&nbsp;
1246
  <label for="smooth_slider_options[img_width]">Width</label>
1247
- <input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" />&nbsp;px &nbsp;&nbsp;
 
1248
  </fieldset></td>
1249
  </tr>
1250
 
@@ -1402,7 +1470,7 @@ if ($_POST['remove_posts_slider']) {
1402
  ?>
1403
  </tbody></table>
1404
  </form>
1405
- <?php check_admin_referer('smooth-slider-group-options');?>
1406
  </div> <!--end of float wrap -->
1407
  <?php
1408
  }
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.1.1
7
  Author: Tejaswini Deshpande, Sanjeev Mishra
8
  Author URI: http://www.clickonf5.org
9
  Wordpress version supported: 2.7 and above
39
  $rs = $wpdb->query($sql);
40
  }
41
  // Need to delete the previously created options in old versions and create only one option field for Smooth Slider
42
+ $defualt_slider = array('speed'=>'7',
 
43
  'no_posts'=>'5',
44
  'bg_color'=>'#ffffff',
45
  'height'=>'200',
75
  'img_size'=>'1',
76
  'img_pick'=>'0',
77
  'user_level'=>'5',
78
+ 'custom_nav'=>'',
79
+ 'crop'=>'0'
80
  );
81
+ if (!get_option('smooth_slider_options')) {
82
+ add_option('smooth_slider_options',$default_slider);
83
+ }
84
  else {
85
+ $smooth_slider = get_option('smooth_slider_options');
86
+ foreach($default_slider as $key=>$value) {
87
+ if(!$smooth_slider[$key]) {
88
+ $smooth_slider[$key] = $value;
89
+ }
90
+ }
91
+ update_option('smooth_slider_options',$smooth_slider);
92
+ }
93
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  delete_option('smooth_slider_speed');
95
  delete_option('smooth_slider_no_posts');
96
  delete_option('smooth_slider_bg_color');
123
  delete_option('smooth_slider_bg');
124
  delete_option('smooth_slider_clear');
125
  delete_option('smooth_slider_image_only');
 
 
126
  }
127
  register_activation_hook( __FILE__, 'install_smooth_slider' );
128
  //defined global variables and constants here
129
  global $smooth_slider;
130
  $smooth_slider = get_option('smooth_slider_options');
131
+ define("SMOOTH_SLIDER_VER","2.1.1",false);
132
 
133
  //This adds the post to the slider
134
  function add_to_slider($post_id) {
270
  $permalink = get_permalink($data->ID);
271
 
272
  $post_id = $data->ID;
273
+
274
+ //2.1 changes start
275
+ $slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
276
+ if(!empty($slide_redirect_url) and isset($slide_redirect_url)) {
277
+ $permalink = $slide_redirect_url;
278
+ }
279
+ //2.1 changes end
280
+
281
  $html .= '<div class="smooth_slideri">
282
  <!-- smooth_slideri -->';
283
 
297
  $slider_content = str_replace("\n","<br />",$slider_content);
298
  $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
299
 
300
+ $timthumb_src = smooth_slider_plugin_url('/scripts/timthumb.php');
301
+
302
  if ( !isset($image_control) or empty($image_control) or $image_control != "x"){
303
  if ($smooth_slider['img_pick'] == '1') {
304
  $first_image = smooth_slider_get_first_image($data);
305
  if(!empty($first_image)){
306
+
307
+ if($smooth_slider['crop'] == '1'){
308
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$first_image.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
309
+ }
310
+ else {
311
  $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
312
+ }
313
  }
314
  else {
315
  if( isset($thumbnail) && !empty($thumbnail) ):
316
+ if($smooth_slider['crop'] == '1'){
317
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$thumbnail.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
318
+ }
319
+ else {
320
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
321
+ }
322
  endif;
323
  }
324
  }
325
  else {
326
  if( isset($thumbnail) && !empty($thumbnail) ):
327
+ if($smooth_slider['crop'] == '1'){
328
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$thumbnail.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
329
+ }
330
+ else {
331
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
332
+ }
333
  endif;
334
  }
335
  }
389
  $permalink = get_permalink($post->ID);
390
 
391
  $post_id = $post->ID;
392
+ //2.1 changes start
393
+ $slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
394
+ if(!empty($slide_redirect_url) or isset($slide_redirect_url)) {
395
+ $permalink = $slide_redirect_url;
396
+ }
397
+ //2.1 changes end
398
+
399
  $html .= '<div class="smooth_slideri">
400
  <!-- smooth_slideri -->';
401
 
402
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
403
+ $image_control = get_post_meta($post_id, 'slider_image_control', true);
404
 
405
  if ($smooth_slider['content_from'] == "slider_content") {
406
  $slider_content = get_post_meta($post_id, 'slider_content', true);
415
  $slider_content = str_replace("\n","<br />",$slider_content);
416
  $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
417
 
418
+
419
+ $timthumb_src = smooth_slider_plugin_url('/scripts/timthumb.php');
420
+
421
+ if ( !isset($image_control) or empty($image_control) or $image_control != "x"){
422
  if ($smooth_slider['img_pick'] == '1') {
423
  $first_image = smooth_slider_get_first_image($post);
424
+
425
  if(!empty($first_image)){
426
+
427
+ if($smooth_slider['crop'] == '1'){
428
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$first_image.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
429
+ }
430
+ else {
431
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
432
+ }
433
+ }
434
+ else {
435
+ if( isset($thumbnail) && !empty($thumbnail) ):
436
+ if($smooth_slider['crop'] == '1'){
437
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$thumbnail.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
438
+ }
439
+ else {
440
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
441
+ }
442
+ endif;
443
  }
444
  }
445
  else {
446
  if( isset($thumbnail) && !empty($thumbnail) ):
447
+ if($smooth_slider['crop'] == '1'){
448
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$thumbnail.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
449
+ }
450
+ else {
451
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
452
+ }
453
  endif;
454
  }
455
+ }
456
 
457
  if ($smooth_slider['image_only'] == '1') {
458
  $html .= '<!-- /smooth_slideri -->
497
  $post_title = str_replace('"', '', $post_title);
498
  $slider_content = $post->post_content;
499
 
500
+ $permalink = get_permalink($post->ID);
501
 
502
  $post_id = $post->ID;
503
+
504
+ //2.1 changes start
505
+ $slide_redirect_url = get_post_meta($post_id, 'slide_redirect_url', true);
506
+ if(!empty($slide_redirect_url) or isset($slide_redirect_url)) {
507
+ $permalink = $slide_redirect_url;
508
+ }
509
+ //2.1 changes end
510
  $html .= '<div class="smooth_slideri">
511
  <!-- smooth_slideri -->';
512
 
513
  $thumbnail = get_post_meta($post_id, 'slider_thumbnail', true);
514
+ $image_control = get_post_meta($post_id, 'slider_image_control', true);
515
 
516
  if ($smooth_slider['content_from'] == "slider_content") {
517
  $slider_content = get_post_meta($post_id, 'slider_content', true);
526
  $slider_content = str_replace("\n","<br />",$slider_content);
527
  $slider_content = strip_tags($slider_content, $smooth_slider['allowable_tags']);
528
 
529
+ $timthumb_src = smooth_slider_plugin_url('/scripts/timthumb.php');
530
+
531
+ if ( !isset($image_control) or empty($image_control) or $image_control != "x"){
532
+ if ($smooth_slider['img_pick'] == '1') {
533
+ $first_image = smooth_slider_get_first_image($post);
534
+
535
  if(!empty($first_image)){
536
+
537
+ if($smooth_slider['crop'] == '1'){
538
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$first_image.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
539
+ }
540
+ else {
541
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$first_image.'" alt="'.$post_title.'" /></a>';
542
+ }
543
+ }
544
+ else {
545
+ if( isset($thumbnail) && !empty($thumbnail) ):
546
+ if($smooth_slider['crop'] == '1'){
547
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$thumbnail.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
548
+ }
549
+ else {
550
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
551
+ }
552
+ endif;
553
  }
554
  }
555
  else {
556
  if( isset($thumbnail) && !empty($thumbnail) ):
557
+ if($smooth_slider['crop'] == '1'){
558
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$timthumb_src.'?src='.$thumbnail.'&amp;h='.$smooth_slider['img_height'].'&amp;w='.$smooth_slider['img_width'].'&amp;zc=1)" alt="'.$post_title.'" /></a>';
559
+ }
560
+ else {
561
+ $html .= '<a href="'.$permalink.'"><img class="smooth_slider_thumbnail" src="'.$thumbnail.'" alt="'.$post_title.'" /></a>';
562
+ }
563
  endif;
564
  }
565
+ }
566
 
567
  if ($smooth_slider['image_only'] == '1') {
568
  $html .= '<!-- /smooth_slideri -->
589
  function smooth_slider_css() {
590
  global $smooth_slider;
591
  ?>
592
+ <style type="text/css" media="screen">#smooth_sldr{width:<?php echo $smooth_slider['width']; ?>px;height:<?php echo $smooth_slider['height']; ?>px;background-color:<?php if ($smooth_slider['bg'] == '1') { echo "transparent";} else { echo $smooth_slider['bg_color']; } ?>;border:<?php echo $smooth_slider['border']; ?>px solid <?php echo $smooth_slider['brcolor']; ?>;}#smooth_sldr_items{padding:10px <?php if ($smooth_slider['prev_next'] == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sliderc{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 44);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.smooth_slideri{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 54);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.sldr_title{font-family:<?php echo $smooth_slider['title_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['title_fsize']; ?>px;font-weight:<?php if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['title_fcolor']; ?>;}#smooth_sldr_body h2{line-height:<?php echo ($smooth_slider['ptitle_fsize'] + 3); ?>px;font-family:<?php echo $smooth_slider['ptitle_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['ptitle_fsize']; ?>px;font-weight:<?php if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;}#smooth_sldr_body h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}#smooth_sldr_body span{font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-weight:<?php if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['content_fcolor']; ?>;}.smooth_slider_thumbnail{float:<?php echo $smooth_slider['img_align']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if($smooth_slider['img_align'] == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if($smooth_slider['img_align'] == "right") {echo "5";} else {echo "0";} ?>px;<?php if ($smooth_slider['img_size'] == 1 and $smooth_slider['crop'] != '1') { ?>width:<?php echo $smooth_slider['img_width']; ?>px;height:<?php echo $smooth_slider['img_height']; ?>px;<?php } ?>border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}#smooth_sldr_body p.more a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;}#smooth_sliderc_nav li{border:1px solid <?php echo $smooth_slider['content_fcolor']; ?>;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "25";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?>;}</style>
593
  <?php
594
  }
595
 
1014
  #sldr_message {background-color:#FEF7DA;clear:both;width:72%;}
1015
  #sldr_close {float:right;}
1016
  </style>
1017
+ <style type="text/css" media="screen">#smooth_sldr{width:<?php echo $smooth_slider['width']; ?>px;height:<?php echo $smooth_slider['height']; ?>px;background-color:<?php if ($smooth_slider['bg'] == '1') { echo "transparent";} else { echo $smooth_slider['bg_color']; } ?>;border:<?php echo $smooth_slider['border']; ?>px solid <?php echo $smooth_slider['brcolor']; ?>;}#smooth_sldr_items{padding:10px <?php if ($smooth_slider['prev_next'] == 1) {echo "18";} else {echo "12";} ?>px 0px <?php if ($smooth_slider['prev_next'] == 1) {echo "26";} else {echo "12";} ?>px;}#smooth_sliderc{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 44);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.smooth_slideri{width:<?php if ($smooth_slider['prev_next'] == 1) {echo ($smooth_slider['width'] - 54);} else {echo ($smooth_slider['width'] - 24);} ?>px;height:<?php if ($smooth_slider['goto_slide'] == "1"){$nav_size = $smooth_slider['content_fsize'];} elseif ($smooth_slider['goto_slide'] == "2"){list($width, $height, $type, $attr) = getimagesize("".smooth_slider_plugin_url( 'images/' )."slide1.png");$nav_size = $height;} else {$nav_size = 10;} $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { $extra_height = $smooth_slider['title_fsize'] + $nav_size + 5 + 18; } else { $extra_height = $nav_size + 5 + 5 + 18; } echo ($smooth_slider['height'] - $extra_height); ?>px;}.sldr_title{font-family:<?php echo $smooth_slider['title_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['title_fsize']; ?>px;font-weight:<?php if ($smooth_slider['title_fstyle'] == "bold" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "bold";} else { echo "normal"; } ?>;font-style:<?php if ($smooth_slider['title_fstyle'] == "italic" or $smooth_slider['title_fstyle'] == "bold italic" ){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['title_fcolor']; ?>;}#smooth_sldr_body h2{line-height:<?php echo ($smooth_slider['ptitle_fsize'] + 3); ?>px;font-family:<?php echo $smooth_slider['ptitle_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['ptitle_fsize']; ?>px;font-weight:<?php if ($smooth_slider['ptitle_fstyle'] == "bold" or $smooth_slider['ptitle_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['ptitle_fstyle'] == "italic" or $smooth_slider['ptitle_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px 0 5px 0;}#smooth_sldr_body h2 a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}#smooth_sldr_body span{font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-weight:<?php if ($smooth_slider['content_fstyle'] == "bold" or $smooth_slider['content_fstyle'] == "bold italic" ){echo "bold";} else {echo "normal";} ?>;font-style:<?php if ($smooth_slider['content_fstyle']=="italic" or $smooth_slider['content_fstyle'] == "bold italic"){echo "italic";} else {echo "normal";} ?>;color:<?php echo $smooth_slider['content_fcolor']; ?>;}.smooth_slider_thumbnail{float:<?php echo $smooth_slider['img_align']; ?>;margin:<?php $sldr_title = $smooth_slider['title_text']; if(!empty($sldr_title)) { echo "10"; } else {echo "0";} ?>px <?php if($smooth_slider['img_align'] == "left") {echo "5";} else {echo "0";} ?>px 0 <?php if($smooth_slider['img_align'] == "right") {echo "5";} else {echo "0";} ?>px;<?php if ($smooth_slider['img_size'] == 1 and $smooth_slider['crop'] != '1') { ?>width:<?php echo $smooth_slider['img_width']; ?>px;height:<?php echo $smooth_slider['img_height']; ?>px;<?php } ?>border:<?php echo $smooth_slider['img_border']; ?>px solid <?php echo $smooth_slider['img_brcolor']; ?>;}#smooth_sldr_body p.more a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;}#smooth_sliderc_nav li{border:1px solid <?php echo $smooth_slider['content_fcolor']; ?>;font-size:<?php echo $smooth_slider['content_fsize']; ?>px;font-family:<?php echo $smooth_slider['content_font']; ?>, Arial, Helvetica, sans-serif;}#smooth_sliderc_nav li a{color:<?php echo $smooth_slider['ptitle_fcolor']; ?>;}.sldrlink{padding-right:<?php if ($smooth_slider['prev_next'] == 1) {echo "40";} else {echo "25";} ?>px;}.sldrlink a{color:<?php echo $smooth_slider['content_fcolor']; ?>;}</style>
1018
  <?php
1019
  } //for smooth slider option page
1020
  }//only for admin
1079
  <li><a href="http://www.dynamicdrive.com" title="Step Carousel jQuery plugin by Dynamic Drive" >Step Carousel Viewer</a></li>
1080
  <li><a href="http://www.bioxd.com/featureme" title="FeatureMe Wordpress Plugin by Oscar Alcal�" >FeatureMe Wordpress Plugin</a></li>
1081
  <li><a href="http://acko.net/dev/farbtastic" title="Farbtastic Color Picker by Steven Wittens" >Farbtastic Color Picker</a></li>
1082
+ <li><a href="http://code.google.com/p/timthumb/" title="TimThumb script by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks" >TimThumb script</a></li>
1083
  <li><a href="http://jquery.com/" title="jQuery JavaScript Library - John Resig" >jQuery JavaScript Library</a></li>
1084
  </ul>
1085
  </div>
1311
  <label for="smooth_slider_options[img_height]">Height</label>
1312
  <input type="text" name="smooth_slider_options[img_height]" class="small-text" value="<?php echo $smooth_slider['img_height']; ?>" />&nbsp;px &nbsp;&nbsp;
1313
  <label for="smooth_slider_options[img_width]">Width</label>
1314
+ <input type="text" name="smooth_slider_options[img_width]" class="small-text" value="<?php echo $smooth_slider['img_width']; ?>" />&nbsp;px &nbsp;&nbsp; <br />
1315
+ <input name="smooth_slider_options[crop]" type="checkbox" value="1" <?php checked('1', $smooth_slider['crop']); ?> /> Crop Images if Custom size is selected <small>(this uses timthumb and requires that the images should be in the same folder as of wordpress installation)</small>&nbsp;
1316
  </fieldset></td>
1317
  </tr>
1318
 
1470
  ?>
1471
  </tbody></table>
1472
  </form>
1473
+ <?php // check_admin_referer('smooth-slider-group-options');?>
1474
  </div> <!--end of float wrap -->
1475
  <?php
1476
  }