Version Description
- Core code is completely rewritten.
- Flash RSS Reader is removed and instead jQuery is used.
- Administration panel used in the previous version is removed and settings are configured in the widget itself.
Download this release
Release Info
Developer | vaakash |
Plugin | Super RSS Reader |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 0.8 to 2.0
- admin.css +104 -0
- images/Thumbs.db +0 -0
- images/aakashweb-logo.png +0 -0
- images/like-button.png +0 -0
- jscolor/Thumbs.db +0 -0
- jscolor/arrow.gif +0 -0
- jscolor/cross.gif +0 -0
- jscolor/hs.png +0 -0
- jscolor/hv.png +0 -0
- jscolor/jscolor.js +0 -787
- loadXML.php +0 -11
- public/srr-css.css +94 -0
- public/srr-js.dev.js +213 -0
- public/srr-js.js +7 -0
- readme.txt +66 -42
- rss-css.css +0 -26
- rssreader.swf +0 -0
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- setup-3.png +0 -0
- shine-types.php +0 -66
- super-rss-reader.php +371 -541
admin.css
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Shortcoder Admin theme
|
3 |
+
By : Aakash Chakravarthy (www.aakashweb.com)
|
4 |
+
Version : 1.6
|
5 |
+
*/
|
6 |
+
|
7 |
+
.boxes {
|
8 |
+
padding: 5px;
|
9 |
+
-moz-border-radius-bottomleft: 5px;
|
10 |
+
-moz-border-radius-bottomright: 5px;
|
11 |
+
-khtml-border-radius: 5px;
|
12 |
+
-webkit-border-top-left-radius: 5px;
|
13 |
+
-webkit-border-top-right-radius: 5px;
|
14 |
+
-webkit-border-bottom-left-radius: 5px;
|
15 |
+
-webkit-border-bottom-right-radius: 5px;
|
16 |
+
border-top: 1px solid #D4D4D4;
|
17 |
+
border-bottom: 3px solid #666666;
|
18 |
+
background: #FFFFFF;
|
19 |
+
margin-bottom: 10px;
|
20 |
+
margin-top: 5px;
|
21 |
+
border-right: 1px solid #EBEBEB;
|
22 |
+
border-left: 1px solid #EBEBEB;
|
23 |
+
}
|
24 |
+
.boxes:hover{
|
25 |
+
border-bottom-color: #FF0033;
|
26 |
+
}
|
27 |
+
#sc_content{
|
28 |
+
width: 100%;
|
29 |
+
}
|
30 |
+
.setting-description{
|
31 |
+
font-size: 10px;
|
32 |
+
color: #666666;
|
33 |
+
}
|
34 |
+
.wrap{
|
35 |
+
width: 75%;
|
36 |
+
float: left;
|
37 |
+
margin: 0px;
|
38 |
+
}
|
39 |
+
.wrap h3 {
|
40 |
+
font: italic 21px "Times New Roman", Times, serif;
|
41 |
+
color: #333333;
|
42 |
+
}
|
43 |
+
.wrap #sc_content {
|
44 |
+
background: #FFFFFF;
|
45 |
+
}
|
46 |
+
.wrap #preview_box {
|
47 |
+
background: #FFFFFF;
|
48 |
+
border: 1px solid #E8E8E8;
|
49 |
+
padding: 10px;
|
50 |
+
margin-top: -10px;
|
51 |
+
-moz-border-radius-bottomleft: 10px;
|
52 |
+
-moz-border-radius-bottomright: 10px;
|
53 |
+
-khtml-border-radius: 10px;
|
54 |
+
-webkit-border-top-left-radius: 10px;
|
55 |
+
-webkit-border-top-right-radius: 10px;
|
56 |
+
-webkit-border-bottom-left-radius: 10px;
|
57 |
+
-webkit-border-bottom-right-radius: 10px;
|
58 |
+
}
|
59 |
+
#sidebar{
|
60 |
+
float: right;
|
61 |
+
height: 80%;
|
62 |
+
width: 24%;
|
63 |
+
margin-top: 45px;
|
64 |
+
margin-left: 0px;
|
65 |
+
}
|
66 |
+
#sidebar ul{
|
67 |
+
height: 80%;
|
68 |
+
width: 90%;
|
69 |
+
border: 1px solid #E9E9E9;
|
70 |
+
margin-right: 15px;
|
71 |
+
-moz-border-radius-bottomleft: 10px;
|
72 |
+
-moz-border-radius-bottomright: 10px;
|
73 |
+
-khtml-border-radius-bottomright: 10px;
|
74 |
+
-khtml-border-radius-bottomleft: 10px;
|
75 |
+
-webkit-border-bottom-left-radius: 10px;
|
76 |
+
-webkit-border-bottom-right-radius: 10px;
|
77 |
+
background: #FFFFFF;
|
78 |
+
padding: 5px;
|
79 |
+
margin-top: 0px;
|
80 |
+
margin-bottom: 5px;
|
81 |
+
}
|
82 |
+
#sidebar li{
|
83 |
+
display: block;
|
84 |
+
padding: 3px;
|
85 |
+
border-bottom: 1px solid #E2E2E2;
|
86 |
+
}
|
87 |
+
#sidebar li a{
|
88 |
+
text-decoration: none;
|
89 |
+
}
|
90 |
+
#sidebar h4{
|
91 |
+
color: #333333;
|
92 |
+
margin-top: 2px;
|
93 |
+
margin-bottom: 5px;
|
94 |
+
font: bold 14px Arial, Helvetica, sans-serif;
|
95 |
+
margin-left: 5px;
|
96 |
+
}
|
97 |
+
|
98 |
+
#donators li{
|
99 |
+
display: inline-table;
|
100 |
+
font-size: 9px;
|
101 |
+
line-height: 1px;
|
102 |
+
text-decoration: none;
|
103 |
+
border-bottom-style: none;
|
104 |
+
}
|
images/Thumbs.db
CHANGED
Binary file
|
images/aakashweb-logo.png
DELETED
Binary file
|
images/like-button.png
ADDED
Binary file
|
jscolor/Thumbs.db
DELETED
Binary file
|
jscolor/arrow.gif
DELETED
Binary file
|
jscolor/cross.gif
DELETED
Binary file
|
jscolor/hs.png
DELETED
Binary file
|
jscolor/hv.png
DELETED
Binary file
|
jscolor/jscolor.js
DELETED
@@ -1,787 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* jscolor, JavaScript Color Picker
|
3 |
-
*
|
4 |
-
* @version 1.1.2
|
5 |
-
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
6 |
-
* @author Honza Odvarko <honza@odvarko.cz>
|
7 |
-
* @created 2008-06-15
|
8 |
-
* @updated 2008-11-28
|
9 |
-
* @link http://jscolor.com
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
var jscolor = {
|
14 |
-
|
15 |
-
|
16 |
-
bindAuto : true, // automatic binding via <input class="...">
|
17 |
-
bindClass : 'color', // class name
|
18 |
-
dir : '', // location of jscolor directory (leave empty to autodetect)
|
19 |
-
|
20 |
-
|
21 |
-
install : function() {
|
22 |
-
jscolor.addEvent(window, 'load', jscolor.init)
|
23 |
-
},
|
24 |
-
|
25 |
-
|
26 |
-
init : function() {
|
27 |
-
if(jscolor.bindAuto) {
|
28 |
-
jscolor.bind()
|
29 |
-
}
|
30 |
-
},
|
31 |
-
|
32 |
-
|
33 |
-
getDir : function() {
|
34 |
-
if(!jscolor.dir) {
|
35 |
-
var detected = jscolor.detectDir()
|
36 |
-
jscolor.dir = detected!=false ? detected : 'jscolor/'
|
37 |
-
}
|
38 |
-
return jscolor.dir
|
39 |
-
},
|
40 |
-
|
41 |
-
|
42 |
-
detectDir : function() {
|
43 |
-
var base = location.href
|
44 |
-
|
45 |
-
var e = document.getElementsByTagName('base')
|
46 |
-
for(var i=0; i<e.length; i++) {
|
47 |
-
if(e[i].href) base = e[i].href
|
48 |
-
}
|
49 |
-
|
50 |
-
var e = document.getElementsByTagName('script')
|
51 |
-
for(var i=0; i<e.length; i++) {
|
52 |
-
if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
|
53 |
-
var src = new jscolor.URI(e[i].src)
|
54 |
-
var srcAbs = src.toAbsolute(base)
|
55 |
-
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, '') // remove filename
|
56 |
-
delete srcAbs.query
|
57 |
-
delete srcAbs.fragment
|
58 |
-
return srcAbs.toString()
|
59 |
-
}
|
60 |
-
}
|
61 |
-
return false
|
62 |
-
},
|
63 |
-
|
64 |
-
|
65 |
-
bind : function() {
|
66 |
-
var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i')
|
67 |
-
var e = document.getElementsByTagName('input')
|
68 |
-
for(var i=0; i<e.length; i++) {
|
69 |
-
var m
|
70 |
-
if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
|
71 |
-
var prop = {}
|
72 |
-
if(m[3]) {
|
73 |
-
try {
|
74 |
-
eval('prop='+m[3])
|
75 |
-
} catch(eInvalidProp) {}
|
76 |
-
}
|
77 |
-
e[i].color = new jscolor.color(e[i], prop)
|
78 |
-
}
|
79 |
-
}
|
80 |
-
},
|
81 |
-
|
82 |
-
|
83 |
-
fetchElement : function(mixed) {
|
84 |
-
return typeof(mixed) == 'string' ? document.getElementById(mixed) : mixed
|
85 |
-
},
|
86 |
-
|
87 |
-
|
88 |
-
addEvent : function(el, evnt, func) {
|
89 |
-
if(el.addEventListener) {
|
90 |
-
return el.addEventListener(evnt, func, false)
|
91 |
-
} else if(el.attachEvent) {
|
92 |
-
return el.attachEvent('on'+evnt, func)
|
93 |
-
} else {
|
94 |
-
return false
|
95 |
-
}
|
96 |
-
},
|
97 |
-
|
98 |
-
|
99 |
-
fireEvent : function(el, evnt) {
|
100 |
-
if(!el) {
|
101 |
-
return false
|
102 |
-
} else if(document.createEventObject) {
|
103 |
-
var ev = document.createEventObject()
|
104 |
-
return el.fireEvent('on'+evnt, ev)
|
105 |
-
} else if(document.createEvent) {
|
106 |
-
var ev = document.createEvent('HTMLEvents')
|
107 |
-
ev.initEvent(evnt, true, true)
|
108 |
-
return el.dispatchEvent(ev)
|
109 |
-
} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
|
110 |
-
return el['on'+evnt]()
|
111 |
-
} else {
|
112 |
-
return false
|
113 |
-
}
|
114 |
-
},
|
115 |
-
|
116 |
-
|
117 |
-
getElementPos : function(e) {
|
118 |
-
var e1=e, e2=e
|
119 |
-
var x=0, y=0
|
120 |
-
if(e1.offsetParent) {
|
121 |
-
do {
|
122 |
-
x += e1.offsetLeft
|
123 |
-
y += e1.offsetTop
|
124 |
-
} while(e1 = e1.offsetParent)
|
125 |
-
}
|
126 |
-
while((e2 = e2.parentNode) && e2.nodeName != 'BODY') {
|
127 |
-
x -= e2.scrollLeft
|
128 |
-
y -= e2.scrollTop
|
129 |
-
}
|
130 |
-
return [x, y]
|
131 |
-
},
|
132 |
-
|
133 |
-
|
134 |
-
getElementSize : function(e) {
|
135 |
-
return [e.offsetWidth, e.offsetHeight]
|
136 |
-
},
|
137 |
-
|
138 |
-
|
139 |
-
getMousePos : function(e) {
|
140 |
-
if(!e) var e = window.event
|
141 |
-
if(typeof e.pageX == 'number') {
|
142 |
-
return [ e.pageX, e.pageY ]
|
143 |
-
} else if(typeof e.clientX == 'number') {
|
144 |
-
return [
|
145 |
-
e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
|
146 |
-
e.clientY + document.body.scrollTop + document.documentElement.scrollTop
|
147 |
-
]
|
148 |
-
}
|
149 |
-
},
|
150 |
-
|
151 |
-
|
152 |
-
getViewPos : function() {
|
153 |
-
if(typeof window.pageYOffset == 'number') {
|
154 |
-
return [ window.pageXOffset, window.pageYOffset ]
|
155 |
-
} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
|
156 |
-
return [ document.body.scrollLeft, document.body.scrollTop ]
|
157 |
-
} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
|
158 |
-
return [ document.documentElement.scrollLeft, document.documentElement.scrollTop ]
|
159 |
-
} else {
|
160 |
-
return [0, 0]
|
161 |
-
}
|
162 |
-
},
|
163 |
-
|
164 |
-
|
165 |
-
getViewSize : function() {
|
166 |
-
if(typeof window.innerWidth == 'number') {
|
167 |
-
return [ window.innerWidth, window.innerHeight ]
|
168 |
-
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
169 |
-
return [ document.body.clientWidth, document.body.clientHeight ]
|
170 |
-
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
171 |
-
return [ document.documentElement.clientWidth, document.documentElement.clientHeight ]
|
172 |
-
} else {
|
173 |
-
return [0, 0]
|
174 |
-
}
|
175 |
-
},
|
176 |
-
|
177 |
-
|
178 |
-
URI : function(uri) { // See RFC3986
|
179 |
-
|
180 |
-
this.scheme = null
|
181 |
-
this.authority = null
|
182 |
-
this.path = ''
|
183 |
-
this.query = null
|
184 |
-
this.fragment = null
|
185 |
-
|
186 |
-
this.parse = function(uri) {
|
187 |
-
var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/)
|
188 |
-
this.scheme = m[3] ? m[2] : null
|
189 |
-
this.authority = m[5] ? m[6] : null
|
190 |
-
this.path = m[7]
|
191 |
-
this.query = m[9] ? m[10] : null
|
192 |
-
this.fragment = m[12] ? m[13] : null
|
193 |
-
return this
|
194 |
-
}
|
195 |
-
|
196 |
-
this.toString = function() {
|
197 |
-
var result = ''
|
198 |
-
if(this.scheme != null) result = result + this.scheme + ':'
|
199 |
-
if(this.authority != null) result = result + '//' + this.authority
|
200 |
-
if(this.path != null) result = result + this.path
|
201 |
-
if(this.query != null) result = result + '?' + this.query
|
202 |
-
if(this.fragment != null) result = result + '#' + this.fragment
|
203 |
-
return result
|
204 |
-
}
|
205 |
-
|
206 |
-
this.toAbsolute = function(base) {
|
207 |
-
var base = new jscolor.URI(base)
|
208 |
-
var r = this
|
209 |
-
var t = new jscolor.URI
|
210 |
-
|
211 |
-
if(base.scheme == null) return false
|
212 |
-
|
213 |
-
if(r.scheme != null && r.scheme.toLowerCase() == base.scheme.toLowerCase()) {
|
214 |
-
r.scheme = null
|
215 |
-
}
|
216 |
-
|
217 |
-
if(r.scheme != null) {
|
218 |
-
t.scheme = r.scheme
|
219 |
-
t.authority = r.authority
|
220 |
-
t.path = removeDotSegments(r.path)
|
221 |
-
t.query = r.query
|
222 |
-
} else {
|
223 |
-
if(r.authority != null) {
|
224 |
-
t.authority = r.authority
|
225 |
-
t.path = removeDotSegments(r.path)
|
226 |
-
t.query = r.query
|
227 |
-
} else {
|
228 |
-
if(r.path == '') {
|
229 |
-
t.path = base.path
|
230 |
-
if(r.query != null) {
|
231 |
-
t.query = r.query
|
232 |
-
} else {
|
233 |
-
t.query = base.query
|
234 |
-
}
|
235 |
-
} else {
|
236 |
-
if(r.path.substr(0,1) == '/') {
|
237 |
-
t.path = removeDotSegments(r.path)
|
238 |
-
} else {
|
239 |
-
if(base.authority != null && base.path == '') {
|
240 |
-
t.path = '/'+r.path
|
241 |
-
} else {
|
242 |
-
t.path = base.path.replace(/[^\/]+$/,'')+r.path
|
243 |
-
}
|
244 |
-
t.path = removeDotSegments(t.path)
|
245 |
-
}
|
246 |
-
t.query = r.query
|
247 |
-
}
|
248 |
-
t.authority = base.authority
|
249 |
-
}
|
250 |
-
t.scheme = base.scheme
|
251 |
-
}
|
252 |
-
t.fragment = r.fragment
|
253 |
-
|
254 |
-
return t
|
255 |
-
}
|
256 |
-
|
257 |
-
function removeDotSegments(path) {
|
258 |
-
var out = ''
|
259 |
-
while(path) {
|
260 |
-
if(path.substr(0,3)=='../' || path.substr(0,2)=='./') {
|
261 |
-
path = path.replace(/^\.+/,'').substr(1)
|
262 |
-
} else if(path.substr(0,3)=='/./' || path=='/.') {
|
263 |
-
path = '/'+path.substr(3)
|
264 |
-
} else if(path.substr(0,4)=='/../' || path=='/..') {
|
265 |
-
path = '/'+path.substr(4)
|
266 |
-
out = out.replace(/\/?[^\/]*$/, '')
|
267 |
-
} else if(path=='.' || path=='..') {
|
268 |
-
path = ''
|
269 |
-
} else {
|
270 |
-
var rm = path.match(/^\/?[^\/]*/)[0]
|
271 |
-
path = path.substr(rm.length)
|
272 |
-
out = out + rm
|
273 |
-
}
|
274 |
-
}
|
275 |
-
return out
|
276 |
-
}
|
277 |
-
|
278 |
-
if(uri) {
|
279 |
-
this.parse(uri)
|
280 |
-
}
|
281 |
-
|
282 |
-
},
|
283 |
-
|
284 |
-
|
285 |
-
/*
|
286 |
-
* Usage example:
|
287 |
-
* var myColor = new jscolor.color(myInputElement, {hash:false})
|
288 |
-
*/
|
289 |
-
|
290 |
-
color : function(target, prop) {
|
291 |
-
|
292 |
-
|
293 |
-
this.required = true // refuse empty values?
|
294 |
-
this.adjust = true // adjust value to uniform notation?
|
295 |
-
this.hash = true // prefix color with #
|
296 |
-
this.caps = true // uppercase?
|
297 |
-
this.valueElement = target // value holder
|
298 |
-
this.styleElement = target // where to reflect current color
|
299 |
-
this.hsv = [0, 1, 0] // read-only 0-6, 0-1, 0-1
|
300 |
-
this.rgb = [0, 0, 0] // read-only 0-1, 0-1, 0-1
|
301 |
-
|
302 |
-
this.picker = true // display picker?
|
303 |
-
this.pickerMode = 'HSV' // HSV | HVS
|
304 |
-
this.pickerPosition = 'bottom' // left | right | top | bottom
|
305 |
-
this.pickerFace = 10 // px
|
306 |
-
this.pickerFaceColor = 'ThreeDFace' // CSS color
|
307 |
-
this.pickerBorder = 1 // px
|
308 |
-
this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight' // CSS color
|
309 |
-
this.pickerInset = 1 // px
|
310 |
-
this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow' // CSS color
|
311 |
-
this.pickerZIndex = 10000
|
312 |
-
|
313 |
-
|
314 |
-
for(var p in prop) this[p] = prop[p]
|
315 |
-
|
316 |
-
|
317 |
-
this.hidePicker = function() {
|
318 |
-
if(isPickerOwner()) {
|
319 |
-
removePicker()
|
320 |
-
}
|
321 |
-
}
|
322 |
-
|
323 |
-
|
324 |
-
this.showPicker = function() {
|
325 |
-
if(!isPickerOwner()) {
|
326 |
-
var tp = jscolor.getElementPos(target) // target pos
|
327 |
-
var ts = jscolor.getElementSize(target) // target size
|
328 |
-
var vp = jscolor.getViewPos() // view pos
|
329 |
-
var vs = jscolor.getViewSize() // view size
|
330 |
-
var ps = [ // picker size
|
331 |
-
2*this.pickerBorder + 4*this.pickerInset + 2*this.pickerFace + widthPad + 2*widthArrow + widthSld,
|
332 |
-
2*this.pickerBorder + 2*this.pickerInset + 2*this.pickerFace + height
|
333 |
-
]
|
334 |
-
var a, b, c
|
335 |
-
switch(this.pickerPosition.toLowerCase()) {
|
336 |
-
case 'left': a=1; b=0; c=-1; break
|
337 |
-
case 'right':a=1; b=0; c=1; break
|
338 |
-
case 'top': a=0; b=1; c=-1; break
|
339 |
-
default: a=0; b=1; c=1; break
|
340 |
-
}
|
341 |
-
var l = (ts[b]+ps[b])/2
|
342 |
-
var pp = [ // picker pos
|
343 |
-
-vp[a]+tp[a]+ps[a] > vs[a] ?
|
344 |
-
(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) : tp[a],
|
345 |
-
-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
|
346 |
-
(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
|
347 |
-
(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
|
348 |
-
]
|
349 |
-
drawPicker(pp[a], pp[b])
|
350 |
-
}
|
351 |
-
}
|
352 |
-
|
353 |
-
|
354 |
-
this.importColor = function() {
|
355 |
-
if(!valueElement) {
|
356 |
-
this.exportColor()
|
357 |
-
} else {
|
358 |
-
if(!this.adjust) {
|
359 |
-
if(!this.fromString(valueElement.value, leaveValue)) {
|
360 |
-
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor
|
361 |
-
styleElement.style.color = styleElement.jscStyle.color
|
362 |
-
this.exportColor(leaveValue | leaveStyle)
|
363 |
-
}
|
364 |
-
} else if(!this.required && /^\s*$/.test(valueElement.value)) {
|
365 |
-
valueElement.value = ''
|
366 |
-
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor
|
367 |
-
styleElement.style.color = styleElement.jscStyle.color
|
368 |
-
this.exportColor(leaveValue | leaveStyle)
|
369 |
-
|
370 |
-
} else if(this.fromString(valueElement.value)) {
|
371 |
-
// OK
|
372 |
-
} else {
|
373 |
-
this.exportColor()
|
374 |
-
}
|
375 |
-
}
|
376 |
-
}
|
377 |
-
|
378 |
-
|
379 |
-
this.exportColor = function(flags) {
|
380 |
-
if(!(flags & leaveValue) && valueElement) {
|
381 |
-
var value = this.toString()
|
382 |
-
if(this.caps) value = value.toUpperCase()
|
383 |
-
if(this.hash) value = '#'+value
|
384 |
-
valueElement.value = value
|
385 |
-
}
|
386 |
-
if(!(flags & leaveStyle) && styleElement) {
|
387 |
-
styleElement.style.backgroundColor = '#'+this.toString()
|
388 |
-
styleElement.style.color =
|
389 |
-
0.213 * this.rgb[0] +
|
390 |
-
0.715 * this.rgb[1] +
|
391 |
-
0.072 * this.rgb[2]
|
392 |
-
< 0.5 ? '#FFF' : '#000'
|
393 |
-
}
|
394 |
-
if(!(flags & leavePad) && isPickerOwner()) {
|
395 |
-
redrawPad()
|
396 |
-
}
|
397 |
-
if(!(flags & leaveSld) && isPickerOwner()) {
|
398 |
-
redrawSld()
|
399 |
-
}
|
400 |
-
}
|
401 |
-
|
402 |
-
|
403 |
-
this.fromHSV = function(h, s, v, flags) { // null = don't change
|
404 |
-
h<0 && (h=0) || h>6 && (h=6)
|
405 |
-
s<0 && (s=0) || s>1 && (s=1)
|
406 |
-
v<0 && (v=0) || v>1 && (v=1)
|
407 |
-
this.rgb = HSV_RGB(
|
408 |
-
h==null ? this.hsv[0] : (this.hsv[0]=h),
|
409 |
-
s==null ? this.hsv[1] : (this.hsv[1]=s),
|
410 |
-
v==null ? this.hsv[2] : (this.hsv[2]=v)
|
411 |
-
)
|
412 |
-
this.exportColor(flags)
|
413 |
-
}
|
414 |
-
|
415 |
-
|
416 |
-
this.fromRGB = function(r, g, b, flags) { // null = don't change
|
417 |
-
r<0 && (r=0) || r>1 && (r=1)
|
418 |
-
g<0 && (g=0) || g>1 && (g=1)
|
419 |
-
b<0 && (b=0) || b>1 && (b=1)
|
420 |
-
var hsv = RGB_HSV(
|
421 |
-
r==null ? this.rgb[0] : (this.rgb[0]=r),
|
422 |
-
g==null ? this.rgb[1] : (this.rgb[1]=g),
|
423 |
-
b==null ? this.rgb[2] : (this.rgb[2]=b)
|
424 |
-
)
|
425 |
-
if(hsv[0] != null) {
|
426 |
-
this.hsv[0] = hsv[0]
|
427 |
-
}
|
428 |
-
if(hsv[2] != 0) {
|
429 |
-
this.hsv[1] = hsv[1]
|
430 |
-
}
|
431 |
-
this.hsv[2] = hsv[2]
|
432 |
-
this.exportColor(flags)
|
433 |
-
}
|
434 |
-
|
435 |
-
|
436 |
-
this.fromString = function(hex, flags) {
|
437 |
-
var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i)
|
438 |
-
if(!m) {
|
439 |
-
return false
|
440 |
-
} else {
|
441 |
-
if(m[1].length == 6) { // 6-char notation
|
442 |
-
this.fromRGB(
|
443 |
-
parseInt(m[1].substr(0,2),16) / 255,
|
444 |
-
parseInt(m[1].substr(2,2),16) / 255,
|
445 |
-
parseInt(m[1].substr(4,2),16) / 255,
|
446 |
-
flags
|
447 |
-
)
|
448 |
-
} else { // 3-char notation
|
449 |
-
this.fromRGB(
|
450 |
-
parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
|
451 |
-
parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
|
452 |
-
parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
|
453 |
-
flags
|
454 |
-
)
|
455 |
-
}
|
456 |
-
return true
|
457 |
-
}
|
458 |
-
}
|
459 |
-
|
460 |
-
|
461 |
-
this.toString = function() {
|
462 |
-
return (
|
463 |
-
(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
|
464 |
-
(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
|
465 |
-
(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
|
466 |
-
)
|
467 |
-
}
|
468 |
-
|
469 |
-
|
470 |
-
function RGB_HSV(r, g, b) {
|
471 |
-
var n = Math.min(Math.min(r,g),b)
|
472 |
-
var v = Math.max(Math.max(r,g),b)
|
473 |
-
var m = v - n
|
474 |
-
if(m == 0) return [ null, 0, v ]
|
475 |
-
var h = r==n ? 3+(b-g)/m : (g==n ? 5+(r-b)/m : 1+(g-r)/m)
|
476 |
-
return [ h==6?0:h, m/v, v ]
|
477 |
-
}
|
478 |
-
|
479 |
-
|
480 |
-
function HSV_RGB(h, s, v) {
|
481 |
-
if(h == null) return [ v, v, v ]
|
482 |
-
var i = Math.floor(h)
|
483 |
-
var f = i%2 ? h-i : 1-(h-i)
|
484 |
-
var m = v * (1 - s)
|
485 |
-
var n = v * (1 - s*f)
|
486 |
-
switch(i) {
|
487 |
-
case 6:
|
488 |
-
case 0: return [v,n,m]
|
489 |
-
case 1: return [n,v,m]
|
490 |
-
case 2: return [m,v,n]
|
491 |
-
case 3: return [m,n,v]
|
492 |
-
case 4: return [n,m,v]
|
493 |
-
case 5: return [v,m,n]
|
494 |
-
}
|
495 |
-
}
|
496 |
-
|
497 |
-
|
498 |
-
function removePicker() {
|
499 |
-
delete jscolor.picker.owner
|
500 |
-
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB)
|
501 |
-
}
|
502 |
-
|
503 |
-
|
504 |
-
function drawPicker(x, y) {
|
505 |
-
if(!jscolor.picker) {
|
506 |
-
jscolor.picker = {
|
507 |
-
box : document.createElement('div'), // picker
|
508 |
-
boxB : document.createElement('div'), // picker border
|
509 |
-
pad : document.createElement('div'), // pad image
|
510 |
-
padB : document.createElement('div'), // pad border
|
511 |
-
padM : document.createElement('div'), // pad mouse area
|
512 |
-
sld : document.createElement('div'), // slider image
|
513 |
-
sldB : document.createElement('div'), // slider border
|
514 |
-
sldM : document.createElement('div') // slider mouse area
|
515 |
-
}
|
516 |
-
for(var i=0,segSize=4; i<height; i+=segSize) {
|
517 |
-
var seg = document.createElement('div')
|
518 |
-
seg.style.height = segSize+'px'
|
519 |
-
seg.style.fontSize = '1px'
|
520 |
-
seg.style.lineHeight = '0'
|
521 |
-
jscolor.picker.sld.appendChild(seg)
|
522 |
-
}
|
523 |
-
jscolor.picker.sldB.appendChild(jscolor.picker.sld)
|
524 |
-
jscolor.picker.box.appendChild(jscolor.picker.sldB)
|
525 |
-
jscolor.picker.box.appendChild(jscolor.picker.sldM)
|
526 |
-
jscolor.picker.padB.appendChild(jscolor.picker.pad)
|
527 |
-
jscolor.picker.box.appendChild(jscolor.picker.padB)
|
528 |
-
jscolor.picker.box.appendChild(jscolor.picker.padM)
|
529 |
-
jscolor.picker.boxB.appendChild(jscolor.picker.box)
|
530 |
-
}
|
531 |
-
|
532 |
-
var p = jscolor.picker
|
533 |
-
|
534 |
-
// recompute controls positions
|
535 |
-
posPad = [
|
536 |
-
x+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset,
|
537 |
-
y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ]
|
538 |
-
posSld = [
|
539 |
-
null,
|
540 |
-
y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ]
|
541 |
-
|
542 |
-
// controls interaction
|
543 |
-
p.box.onmouseup =
|
544 |
-
p.box.onmouseout = function() { target.focus() }
|
545 |
-
p.box.onmousedown = function() { abortBlur=true }
|
546 |
-
p.box.onmousemove = function(e) { holdPad && setPad(e); holdSld && setSld(e) }
|
547 |
-
p.padM.onmouseup =
|
548 |
-
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change') } }
|
549 |
-
p.padM.onmousedown = function(e) { holdPad=true; setPad(e) }
|
550 |
-
p.sldM.onmouseup =
|
551 |
-
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change') } }
|
552 |
-
p.sldM.onmousedown = function(e) { holdSld=true; setSld(e) }
|
553 |
-
|
554 |
-
// picker
|
555 |
-
p.box.style.width = 4*THIS.pickerInset + 2*THIS.pickerFace + widthPad + 2*widthArrow + widthSld + 'px'
|
556 |
-
p.box.style.height = 2*THIS.pickerInset + 2*THIS.pickerFace + height + 'px'
|
557 |
-
|
558 |
-
// picker border
|
559 |
-
p.boxB.style.position = 'absolute'
|
560 |
-
p.boxB.style.clear = 'both'
|
561 |
-
p.boxB.style.left = x+'px'
|
562 |
-
p.boxB.style.top = y+'px'
|
563 |
-
p.boxB.style.zIndex = THIS.pickerZIndex
|
564 |
-
p.boxB.style.border = THIS.pickerBorder+'px solid'
|
565 |
-
p.boxB.style.borderColor = THIS.pickerBorderColor
|
566 |
-
p.boxB.style.background = THIS.pickerFaceColor
|
567 |
-
|
568 |
-
// pad image
|
569 |
-
switch(modeID) {
|
570 |
-
case 0: var img = 'hs.png'; break
|
571 |
-
case 1: var img = 'hv.png'; break
|
572 |
-
}
|
573 |
-
p.pad.style.width = widthPad+'px'
|
574 |
-
p.pad.style.height = height+'px'
|
575 |
-
p.pad.style.background = "url('"+jscolor.getDir()+img+"') 0 0 no-repeat"
|
576 |
-
|
577 |
-
// pad border
|
578 |
-
p.padB.style.position = 'absolute'
|
579 |
-
p.padB.style.left = THIS.pickerFace+'px'
|
580 |
-
p.padB.style.top = THIS.pickerFace+'px'
|
581 |
-
p.padB.style.border = THIS.pickerInset+'px solid'
|
582 |
-
p.padB.style.borderColor = THIS.pickerInsetColor
|
583 |
-
|
584 |
-
// pad mouse area
|
585 |
-
p.padM.style.position = 'absolute'
|
586 |
-
p.padM.style.left = '0'
|
587 |
-
p.padM.style.top = '0'
|
588 |
-
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + widthPad + widthArrow + 'px'
|
589 |
-
p.padM.style.height = p.box.style.height
|
590 |
-
p.padM.style.cursor = 'crosshair'
|
591 |
-
p.padM.style.background = "url('"+jscolor.getDir()+"cross.gif') no-repeat"
|
592 |
-
|
593 |
-
// slider image
|
594 |
-
p.sld.style.overflow = 'hidden'
|
595 |
-
p.sld.style.width = widthSld+'px'
|
596 |
-
p.sld.style.height = height+'px'
|
597 |
-
|
598 |
-
// slider border
|
599 |
-
p.sldB.style.position = 'absolute'
|
600 |
-
p.sldB.style.right = THIS.pickerFace+'px'
|
601 |
-
p.sldB.style.top = THIS.pickerFace+'px'
|
602 |
-
p.sldB.style.border = THIS.pickerInset+'px solid'
|
603 |
-
p.sldB.style.borderColor = THIS.pickerInsetColor
|
604 |
-
|
605 |
-
// slider mouse area
|
606 |
-
p.sldM.style.position = 'absolute'
|
607 |
-
p.sldM.style.right = '0'
|
608 |
-
p.sldM.style.top = '0'
|
609 |
-
p.sldM.style.width = widthSld + widthArrow + THIS.pickerFace + 2*THIS.pickerInset + 'px'
|
610 |
-
p.sldM.style.height = p.box.style.height
|
611 |
-
p.sldM.style.background = "url('"+jscolor.getDir()+"arrow.gif') no-repeat"
|
612 |
-
try {
|
613 |
-
p.sldM.style.cursor = 'pointer'
|
614 |
-
} catch(eOldIE) {
|
615 |
-
p.sldM.style.cursor = 'hand'
|
616 |
-
}
|
617 |
-
|
618 |
-
redrawPad()
|
619 |
-
redrawSld()
|
620 |
-
|
621 |
-
jscolor.picker.owner = THIS
|
622 |
-
document.getElementsByTagName('body')[0].appendChild(p.boxB)
|
623 |
-
}
|
624 |
-
|
625 |
-
|
626 |
-
function redrawPad() {
|
627 |
-
// redraw the pad pointer
|
628 |
-
switch(modeID) {
|
629 |
-
case 0: var yComponent = 1; break
|
630 |
-
case 1: var yComponent = 2; break
|
631 |
-
}
|
632 |
-
var x = Math.round((THIS.hsv[0]/6) * (widthPad-1))
|
633 |
-
var y = Math.round((1-THIS.hsv[yComponent]) * (height-1))
|
634 |
-
jscolor.picker.padM.style.backgroundPosition =
|
635 |
-
(THIS.pickerFace+THIS.pickerInset+x - 7) + 'px ' +
|
636 |
-
(THIS.pickerFace+THIS.pickerInset+y - 7) + 'px'
|
637 |
-
|
638 |
-
// redraw the slider image
|
639 |
-
var seg = jscolor.picker.sld.childNodes
|
640 |
-
|
641 |
-
switch(modeID) {
|
642 |
-
case 0:
|
643 |
-
var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1)
|
644 |
-
for(var i=0; i<seg.length; i++) {
|
645 |
-
seg[i].style.backgroundColor = 'rgb('+
|
646 |
-
(rgb[0]*(1-i/seg.length)*100)+'%,'+
|
647 |
-
(rgb[1]*(1-i/seg.length)*100)+'%,'+
|
648 |
-
(rgb[2]*(1-i/seg.length)*100)+'%)'
|
649 |
-
}
|
650 |
-
break
|
651 |
-
case 1:
|
652 |
-
var rgb, s, c = [ THIS.hsv[2], 0, 0 ]
|
653 |
-
var i = Math.floor(THIS.hsv[0])
|
654 |
-
var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i)
|
655 |
-
switch(i) {
|
656 |
-
case 6:
|
657 |
-
case 0: rgb=[0,1,2]; break
|
658 |
-
case 1: rgb=[1,0,2]; break
|
659 |
-
case 2: rgb=[2,0,1]; break
|
660 |
-
case 3: rgb=[2,1,0]; break
|
661 |
-
case 4: rgb=[1,2,0]; break
|
662 |
-
case 5: rgb=[0,2,1]; break
|
663 |
-
}
|
664 |
-
for(var i=0; i<seg.length; i++) {
|
665 |
-
s = 1 - 1/(seg.length-1)*i
|
666 |
-
c[1] = c[0] * (1 - s*f)
|
667 |
-
c[2] = c[0] * (1 - s)
|
668 |
-
seg[i].style.backgroundColor = 'rgb('+
|
669 |
-
(c[rgb[0]]*100)+'%,'+
|
670 |
-
(c[rgb[1]]*100)+'%,'+
|
671 |
-
(c[rgb[2]]*100)+'%)'
|
672 |
-
}
|
673 |
-
break
|
674 |
-
}
|
675 |
-
}
|
676 |
-
|
677 |
-
|
678 |
-
function redrawSld() {
|
679 |
-
// redraw the slider pointer
|
680 |
-
switch(modeID) {
|
681 |
-
case 0: var yComponent = 2; break
|
682 |
-
case 1: var yComponent = 1; break
|
683 |
-
}
|
684 |
-
var y = Math.round((1-THIS.hsv[yComponent]) * (height-1))
|
685 |
-
jscolor.picker.sldM.style.backgroundPosition =
|
686 |
-
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - 5) + 'px'
|
687 |
-
}
|
688 |
-
|
689 |
-
|
690 |
-
function isPickerOwner() {
|
691 |
-
return jscolor.picker && jscolor.picker.owner == THIS
|
692 |
-
}
|
693 |
-
|
694 |
-
|
695 |
-
function blurTarget() {
|
696 |
-
if(valueElement == target) THIS.importColor()
|
697 |
-
if(THIS.picker) THIS.hidePicker()
|
698 |
-
}
|
699 |
-
|
700 |
-
|
701 |
-
function blurValue() {
|
702 |
-
if(valueElement != target) THIS.importColor()
|
703 |
-
}
|
704 |
-
|
705 |
-
|
706 |
-
function setPad(e) {
|
707 |
-
var posM = jscolor.getMousePos(e)
|
708 |
-
var x = posM[0]-posPad[0]
|
709 |
-
var y = posM[1]-posPad[1]
|
710 |
-
switch(modeID) {
|
711 |
-
case 0: THIS.fromHSV(x*(6/(widthPad-1)), 1 - y/(height-1), null, leaveSld); break
|
712 |
-
case 1: THIS.fromHSV(x*(6/(widthPad-1)), null, 1 - y/(height-1), leaveSld); break
|
713 |
-
}
|
714 |
-
}
|
715 |
-
|
716 |
-
|
717 |
-
function setSld(e) {
|
718 |
-
var posM = jscolor.getMousePos(e)
|
719 |
-
var y = posM[1]-posPad[1]
|
720 |
-
switch(modeID) {
|
721 |
-
case 0: THIS.fromHSV(null, null, 1 - y/(height-1), leavePad); break
|
722 |
-
case 1: THIS.fromHSV(null, 1 - y/(height-1), null, leavePad); break
|
723 |
-
}
|
724 |
-
}
|
725 |
-
|
726 |
-
|
727 |
-
var THIS = this
|
728 |
-
var modeID = this.pickerMode.toLowerCase()=='hvs' ? 1 : 0
|
729 |
-
var abortBlur = false
|
730 |
-
var
|
731 |
-
valueElement = jscolor.fetchElement(this.valueElement),
|
732 |
-
styleElement = jscolor.fetchElement(this.styleElement)
|
733 |
-
var
|
734 |
-
holdPad = false,
|
735 |
-
holdSld = false
|
736 |
-
var
|
737 |
-
posPad,
|
738 |
-
posSld
|
739 |
-
var
|
740 |
-
widthSld = 16,
|
741 |
-
widthArrow = 7,
|
742 |
-
widthPad = 181,
|
743 |
-
height = 101
|
744 |
-
var
|
745 |
-
leaveValue = 1<<0,
|
746 |
-
leaveStyle = 1<<1,
|
747 |
-
leavePad = 1<<2,
|
748 |
-
leaveSld = 1<<3
|
749 |
-
|
750 |
-
// target
|
751 |
-
jscolor.addEvent(target, 'focus', function() {
|
752 |
-
if(THIS.picker) THIS.showPicker()
|
753 |
-
})
|
754 |
-
jscolor.addEvent(target, 'blur', function() {
|
755 |
-
if(!abortBlur) {
|
756 |
-
setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false }, 0)
|
757 |
-
} else {
|
758 |
-
abortBlur = false
|
759 |
-
}
|
760 |
-
})
|
761 |
-
|
762 |
-
// valueElement
|
763 |
-
if(valueElement) {
|
764 |
-
var updateField = function() {
|
765 |
-
THIS.fromString(valueElement.value, leaveValue)
|
766 |
-
}
|
767 |
-
jscolor.addEvent(valueElement, 'keyup', updateField)
|
768 |
-
jscolor.addEvent(valueElement, 'input', updateField)
|
769 |
-
jscolor.addEvent(valueElement, 'blur', blurValue)
|
770 |
-
valueElement.setAttribute('autocomplete', 'off')
|
771 |
-
}
|
772 |
-
|
773 |
-
// styleElement
|
774 |
-
if(styleElement) {
|
775 |
-
styleElement.jscStyle = {
|
776 |
-
backgroundColor : styleElement.style.backgroundColor,
|
777 |
-
color : styleElement.style.color
|
778 |
-
}
|
779 |
-
}
|
780 |
-
|
781 |
-
this.importColor()
|
782 |
-
}
|
783 |
-
|
784 |
-
}
|
785 |
-
|
786 |
-
|
787 |
-
jscolor.install()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadXML.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$rss = $_GET['rss'];
|
3 |
-
// make sure that some page is really being called
|
4 |
-
if ($rss && $rss != ""){
|
5 |
-
// make sure that an http call is being made - otherwise there's access to any file on machine...
|
6 |
-
if ((strpos($rss, "http://") === 0) || (strpos($rss, "https://") === 0)){
|
7 |
-
readfile($rss);
|
8 |
-
}
|
9 |
-
}
|
10 |
-
|
11 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/srr-css.css
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** Tab settings **/
|
2 |
+
.srr-tab-wrap{
|
3 |
+
margin: 5px 0px 10px!important;
|
4 |
+
background: none !important;
|
5 |
+
border: none !important;
|
6 |
+
padding: 0px !important;
|
7 |
+
}
|
8 |
+
.srr-tab-wrap li{
|
9 |
+
list-style: none !important;
|
10 |
+
float: left;
|
11 |
+
background-image: none !important;
|
12 |
+
background-color: #F9F9F9;
|
13 |
+
margin: 5px 5px 0px 0px !important;
|
14 |
+
padding: 3px!important;
|
15 |
+
border: 1px solid #CCCCCC;
|
16 |
+
cursor: pointer;
|
17 |
+
}
|
18 |
+
.srr-active-tab{
|
19 |
+
background: #ccc !important;
|
20 |
+
}
|
21 |
+
|
22 |
+
/** General styling **/
|
23 |
+
.srr-wrap{
|
24 |
+
padding: 0px !important;
|
25 |
+
}
|
26 |
+
.srr-wrap div{
|
27 |
+
left: 0px;
|
28 |
+
right: 0px;
|
29 |
+
}
|
30 |
+
.srr-wrap .srr-item{
|
31 |
+
border-top: 0px;
|
32 |
+
padding: 10px;
|
33 |
+
}
|
34 |
+
.srr-wrap .srr-item:last-child{
|
35 |
+
margin: 0px;
|
36 |
+
}
|
37 |
+
|
38 |
+
/** Styles **/
|
39 |
+
|
40 |
+
/** Grey **/
|
41 |
+
.srr-style-grey{
|
42 |
+
border: 1px solid #dfdfdf;
|
43 |
+
}
|
44 |
+
.srr-style-grey .srr-item{
|
45 |
+
border-bottom: 1px solid #dfdfdf;
|
46 |
+
}
|
47 |
+
.srr-style-grey .even{
|
48 |
+
background-color: #F8F8F8;
|
49 |
+
}
|
50 |
+
|
51 |
+
/** Dark **/
|
52 |
+
.srr-style-dark{
|
53 |
+
background: #000;
|
54 |
+
border: 1px solid #ccc;
|
55 |
+
color: #DDDDDD!important;
|
56 |
+
}
|
57 |
+
.srr-style-dark a{
|
58 |
+
color: #FFFFFF !important;
|
59 |
+
}
|
60 |
+
.srr-style-dark .srr-item{
|
61 |
+
border-color: #333
|
62 |
+
}
|
63 |
+
.srr-style-dark .even{
|
64 |
+
background: #333333;
|
65 |
+
}
|
66 |
+
.srr-tab-style-dark li{
|
67 |
+
border-color: #666666;
|
68 |
+
background: #333;
|
69 |
+
color: #FFFFFF !important;
|
70 |
+
}
|
71 |
+
.srr-tab-style-dark .srr-active-tab{
|
72 |
+
background: #666666!important;
|
73 |
+
}
|
74 |
+
|
75 |
+
/** Clearfix hack **/
|
76 |
+
* html .srr-clearfix{
|
77 |
+
height: 1%;
|
78 |
+
overflow: visible;
|
79 |
+
}
|
80 |
+
|
81 |
+
/* float clearing for IE7 */
|
82 |
+
*+html .srr-clearfix{
|
83 |
+
min-height: 1%;
|
84 |
+
}
|
85 |
+
|
86 |
+
/* float clearing for everyone else */
|
87 |
+
.srr-clearfix:after{
|
88 |
+
clear: both;
|
89 |
+
content: ".";
|
90 |
+
display: block;
|
91 |
+
height: 0;
|
92 |
+
visibility: hidden;
|
93 |
+
font-size: 0;
|
94 |
+
}
|
public/srr-js.dev.js
ADDED
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Super RSS Reader - jQuery feed reader - v1.0
|
3 |
+
* Included with "Super RSS Reader" Wordpress plugin @since v2.0
|
4 |
+
* Author: Aakash Chakravarthy, www.aakashweb.com
|
5 |
+
*/
|
6 |
+
|
7 |
+
jQuery(document).ready(function(){
|
8 |
+
|
9 |
+
var widget = jQuery('.super-rss-reader-widget')
|
10 |
+
widget.find('.srr-wrap').hide();
|
11 |
+
widget.find('.srr-wrap:first').show();
|
12 |
+
widget.find('.srr-tab-wrap li:first').addClass('srr-active-tab');
|
13 |
+
|
14 |
+
jQuery('.srr-tab-wrap li').click(function(){
|
15 |
+
var id = jQuery(this).attr('data-tab');
|
16 |
+
var parent = jQuery(this).parent().parent();
|
17 |
+
|
18 |
+
jQuery(this).parent().children('li').removeClass('srr-active-tab');
|
19 |
+
jQuery(this).addClass('srr-active-tab');
|
20 |
+
|
21 |
+
parent.find('.srr-wrap').hide();
|
22 |
+
parent.find('.srr-wrap[data-id=' + id + ']').show();
|
23 |
+
});
|
24 |
+
|
25 |
+
// Add the ticker to the required elements
|
26 |
+
jQuery('.srr-vticker').each(function(){
|
27 |
+
var visible = jQuery(this).attr('data-visible');
|
28 |
+
var obj = jQuery(this);
|
29 |
+
obj.easyTicker({
|
30 |
+
'visible': visible,
|
31 |
+
});
|
32 |
+
});
|
33 |
+
});
|
34 |
+
|
35 |
+
/*
|
36 |
+
* jQuery - Easy Ticker plugin - v1.0
|
37 |
+
* http://www.aakashweb.com/
|
38 |
+
* Copyright 2012, Aakash Chakravarthy
|
39 |
+
* Released under the MIT License.
|
40 |
+
*/
|
41 |
+
|
42 |
+
(function($){
|
43 |
+
$.fn.easyTicker = function(options) {
|
44 |
+
|
45 |
+
var defaults = {
|
46 |
+
direction: 'up',
|
47 |
+
easing: 'swing',
|
48 |
+
speed: 'slow',
|
49 |
+
interval: 2000,
|
50 |
+
height: 'auto',
|
51 |
+
visible: 0,
|
52 |
+
mousePause: 1,
|
53 |
+
controls:{
|
54 |
+
up: '',
|
55 |
+
down: '',
|
56 |
+
toggle: ''
|
57 |
+
}
|
58 |
+
};
|
59 |
+
|
60 |
+
// Initialize the variables
|
61 |
+
var options = $.extend(defaults, options),
|
62 |
+
timer = 0,
|
63 |
+
tClass = 'et-run',
|
64 |
+
winFocus = 0,
|
65 |
+
vBody = $('body'),
|
66 |
+
cUp = $(options.controls.up),
|
67 |
+
cDown = $(options.controls.down),
|
68 |
+
cToggle = $(options.controls.toggle);
|
69 |
+
|
70 |
+
// The initializing function
|
71 |
+
var init = function(obj, target){
|
72 |
+
|
73 |
+
target.children().css('margin', 0).children().css('margin', 0);
|
74 |
+
|
75 |
+
obj.css({
|
76 |
+
position : 'relative',
|
77 |
+
height : (options.height == 'auto') ? objHeight(obj, target) : options.height,
|
78 |
+
overflow : 'hidden'
|
79 |
+
});
|
80 |
+
|
81 |
+
target.css({
|
82 |
+
'position' : 'absolute',
|
83 |
+
'margin' : 0
|
84 |
+
}).children().css('margin', 0);
|
85 |
+
|
86 |
+
if(options.visible != 0 && options.height == 'auto'){
|
87 |
+
adjHeight(obj, target);
|
88 |
+
}
|
89 |
+
|
90 |
+
// Set the class to the "toggle" control and set the timer.
|
91 |
+
cToggle.addClass(tClass);
|
92 |
+
setTimer(obj, target);
|
93 |
+
}
|
94 |
+
|
95 |
+
// Core function to move the element up and down.
|
96 |
+
var move = function(obj, target, type){
|
97 |
+
|
98 |
+
if(!obj.is(':visible')) return;
|
99 |
+
|
100 |
+
if(type == 'up'){
|
101 |
+
var sel = ':first-child',
|
102 |
+
eq = '-=',
|
103 |
+
appType = 'appendTo';
|
104 |
+
}else{
|
105 |
+
var sel = ':last-child',
|
106 |
+
eq = '+=',
|
107 |
+
appType = 'prependTo';
|
108 |
+
}
|
109 |
+
|
110 |
+
var selChild = $(target).children(sel);
|
111 |
+
var height = selChild.outerHeight();
|
112 |
+
|
113 |
+
$(target).stop(true, true).animate({
|
114 |
+
'top': eq + height + "px"
|
115 |
+
}, options.speed, options.easing, function(){
|
116 |
+
selChild.hide()[appType](target).fadeIn();
|
117 |
+
$(target).css('top', 0);
|
118 |
+
if(options.visible != 0 && options.height == 'auto'){
|
119 |
+
adjHeight(obj, target);
|
120 |
+
}
|
121 |
+
});
|
122 |
+
}
|
123 |
+
|
124 |
+
// Activates the timer.
|
125 |
+
var setTimer = function(obj, target){
|
126 |
+
if(cToggle.length == 0 || cToggle.hasClass(tClass)){
|
127 |
+
timer = setInterval(function(){
|
128 |
+
if (vBody.attr('data-focus') != 1){ return; }
|
129 |
+
move(obj, target, options.direction);
|
130 |
+
}, options.interval);
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
// Stops the timer
|
135 |
+
var stopTimer = function(obj){
|
136 |
+
clearInterval(timer);
|
137 |
+
}
|
138 |
+
|
139 |
+
// Adjust the wrapper height and show the visible elements only.
|
140 |
+
var adjHeight = function(obj, target){
|
141 |
+
var wrapHeight = 0;
|
142 |
+
$(target).children(':lt(' + options.visible + ')').each(function(){
|
143 |
+
wrapHeight += $(this).outerHeight();
|
144 |
+
});
|
145 |
+
|
146 |
+
obj.stop(true, true).animate({height: wrapHeight}, options.speed);
|
147 |
+
}
|
148 |
+
|
149 |
+
// Get the maximum height of the children.
|
150 |
+
var objHeight = function(obj, target){
|
151 |
+
var height = 0;
|
152 |
+
|
153 |
+
var tempDisp = obj.css('display');
|
154 |
+
obj.css('display', 'block');
|
155 |
+
|
156 |
+
$(target).children().each(function(){
|
157 |
+
height += $(this).outerHeight();
|
158 |
+
});
|
159 |
+
|
160 |
+
obj.css('display', tempDisp);
|
161 |
+
return height;
|
162 |
+
}
|
163 |
+
|
164 |
+
// Hack to check window status
|
165 |
+
function onBlur(){ vBody.attr('data-focus', 0); };
|
166 |
+
function onFocus(){ vBody.attr('data-focus', 1); };
|
167 |
+
|
168 |
+
if (/*@cc_on!@*/false) { // check for Internet Explorer
|
169 |
+
document.onfocusin = onFocus;
|
170 |
+
document.onfocusout = onBlur;
|
171 |
+
}else{
|
172 |
+
$(window).bind('focus mouseover', onFocus);
|
173 |
+
$(window).bind('blur', onBlur);
|
174 |
+
}
|
175 |
+
|
176 |
+
return this.each(function(){
|
177 |
+
var obj = $(this);
|
178 |
+
var tar = obj.children(':first-child');
|
179 |
+
|
180 |
+
// Initialize the content
|
181 |
+
init(obj, tar);
|
182 |
+
|
183 |
+
// Bind the mousePause action
|
184 |
+
if(options.mousePause == 1){
|
185 |
+
obj.mouseover(function(){
|
186 |
+
stopTimer(obj);
|
187 |
+
}).mouseleave(function(){
|
188 |
+
setTimer(obj, tar);
|
189 |
+
});
|
190 |
+
}
|
191 |
+
|
192 |
+
// Controls action
|
193 |
+
cToggle.live('click', function(){
|
194 |
+
if($(this).hasClass(tClass)){
|
195 |
+
stopTimer(obj);
|
196 |
+
$(this).removeClass(tClass);
|
197 |
+
}else{
|
198 |
+
$(this).addClass(tClass);
|
199 |
+
setTimer(obj, tar);
|
200 |
+
}
|
201 |
+
});
|
202 |
+
|
203 |
+
cUp.live('click', function(){
|
204 |
+
move(obj, tar, 'up');
|
205 |
+
});
|
206 |
+
|
207 |
+
cDown.live('click', function(){
|
208 |
+
move(obj, tar, 'down');
|
209 |
+
});
|
210 |
+
|
211 |
+
});
|
212 |
+
};
|
213 |
+
})(jQuery);
|
public/srr-js.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Super RSS Reader - jQuery based feed displayer - v1.0
|
3 |
+
* Included with "Super RSS Reader" Wordpress plugin @since v2.0
|
4 |
+
* Author: Aakash Chakravarthy, www.aakashweb.com
|
5 |
+
* Uses the jQuery Easy ticker plugin v1.0
|
6 |
+
*/
|
7 |
+
jQuery(document).ready(function(){var a=jQuery(".super-rss-reader-widget");a.find(".srr-wrap").hide();a.find(".srr-wrap:first").show();a.find(".srr-tab-wrap li:first").addClass("srr-active-tab");jQuery(".srr-tab-wrap li").click(function(){var a=jQuery(this).attr("data-tab");var b=jQuery(this).parent().parent();jQuery(this).parent().children("li").removeClass("srr-active-tab");jQuery(this).addClass("srr-active-tab");b.find(".srr-wrap").hide();b.find(".srr-wrap[data-id="+a+"]").show()});jQuery(".srr-vticker").each(function(){var a=jQuery(this).attr("data-visible");var b=jQuery(this);b.easyTicker({visible:a})})});(function(a){a.fn.easyTicker=function(b){function r(){g.attr("data-focus",1)}function q(){g.attr("data-focus",0)}var c={direction:"up",easing:"swing",speed:"slow",interval:2e3,height:"auto",visible:0,mousePause:1,controls:{up:"",down:"",toggle:""}};var b=a.extend(c,b),d=0,e="et-run",f=0,g=a("body"),h=a(b.controls.up),i=a(b.controls.down),j=a(b.controls.toggle);var k=function(a,c){c.children().css("margin",0).children().css("margin",0);a.css({position:"relative",height:b.height=="auto"?p(a,c):b.height,overflow:"hidden"});c.css({position:"absolute",margin:0}).children().css("margin",0);if(b.visible!=0&&b.height=="auto"){o(a,c)}j.addClass(e);m(a,c)};var l=function(c,d,e){if(!c.is(":visible"))return;if(e=="up"){var f=":first-child",g="-=",h="appendTo"}else{var f=":last-child",g="+=",h="prependTo"}var i=a(d).children(f);var j=i.outerHeight();a(d).stop(true,true).animate({top:g+j+"px"},b.speed,b.easing,function(){i.hide()[h](d).fadeIn();a(d).css("top",0);if(b.visible!=0&&b.height=="auto"){o(c,d)}})};var m=function(a,c){if(j.length==0||j.hasClass(e)){d=setInterval(function(){if(g.attr("data-focus")!=1){return}l(a,c,b.direction)},b.interval)}};var n=function(a){clearInterval(d)};var o=function(c,d){var e=0;a(d).children(":lt("+b.visible+")").each(function(){e+=a(this).outerHeight()});c.stop(true,true).animate({height:e},b.speed)};var p=function(b,c){var d=0;var e=b.css("display");b.css("display","block");a(c).children().each(function(){d+=a(this).outerHeight()});b.css("display",e);return d};if(false){document.onfocusin=r;document.onfocusout=q}else{a(window).bind("focus mouseover",r);a(window).bind("blur",q)}return this.each(function(){var c=a(this);var d=c.children(":first-child");k(c,d);if(b.mousePause==1){c.mouseover(function(){n(c)}).mouseleave(function(){m(c,d)})}j.live("click",function(){if(a(this).hasClass(e)){n(c);a(this).removeClass(e)}else{a(this).addClass(e);m(c,d)}});h.live("click",function(){l(c,d,"up")});i.live("click",function(){l(c,d,"down")})})}})(jQuery)
|
readme.txt
CHANGED
@@ -1,80 +1,104 @@
|
|
1 |
=== Super RSS Reader ===
|
2 |
Contributors: Aakash Chakravarthy
|
3 |
-
Donate link:
|
4 |
-
Tags: rss, feeds,
|
5 |
Author URI: http://www.aakashweb.com
|
6 |
-
Plugin URI: http://aakashweb.com/wordpress-plugins/super-rss-reader/
|
7 |
-
Requires at least: 2.
|
8 |
-
Tested up to:
|
9 |
-
Stable tag:
|
10 |
|
11 |
-
Super RSS Reader is
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Super RSS Reader is
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
26 |
|
27 |
-
|
|
|
28 |
|
29 |
-
=
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
33 |
|
34 |
== Installation ==
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
1.
|
39 |
-
1.
|
40 |
-
1.
|
41 |
-
1.
|
42 |
1. Done !
|
43 |
|
44 |
== Frequently Asked Questions ==
|
45 |
|
46 |
-
=
|
47 |
|
48 |
-
You can
|
49 |
|
50 |
-
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
|
58 |
-
|
59 |
|
60 |
-
|
61 |
-
* Or just email me to aakash.19493@gmail.com.
|
62 |
|
63 |
== Screenshots ==
|
64 |
|
65 |
-
1.
|
66 |
-
1.
|
67 |
-
1.
|
68 |
-
|
69 |
-
|
70 |
-
1. Super RSS Reader in sidebar.
|
71 |
|
72 |
[More screenshots in Aakash Web](http://www.aakashweb.com/wordpress-plugins/super-rss-reader/)
|
73 |
|
74 |
-
==
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
-
|
|
|
77 |
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
|
|
|
1 |
=== Super RSS Reader ===
|
2 |
Contributors: Aakash Chakravarthy
|
3 |
+
Donate link: http://bit.ly/srrdonate
|
4 |
+
Tags: rss, feeds, widget, links, twitter, admin, plugin, feed, posts, page
|
5 |
Author URI: http://www.aakashweb.com
|
6 |
+
Plugin URI: http://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
7 |
+
Requires at least: 2.8
|
8 |
+
Tested up to: 3.3.x
|
9 |
+
Stable tag: 2.0
|
10 |
|
11 |
+
Super RSS Reader is an awesome RSS widget plugin, which has features like news ticker effect, tabbed RSS feeds, customizable color modes and more.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Super RSS Reader is jQuery based RSS reader widget, which displays the RSS feeds in the widget in an attractive way. It uses the jQuery easy ticker plugin to add a news ticker like effect to the RSS feeds. Multiple RSS feeds can be added for a single widget and they get seperated in tabs.
|
16 |
|
17 |
+
The plugin is fully customizable with external styles and with some inbuilt color styles. It acts as a perfect replacement for the default RSS widget in WordPress.
|
18 |
|
19 |
+
[youtube=http://www.youtube.com/watch?v=02aOG_-98Tg]
|
20 |
|
21 |
+
= Features =
|
22 |
|
23 |
+
* jQuery [news ticker like effect](http://www.aakashweb.com/jquery-plugins/easy-ticker/) to the RSS feeds (can turn off or on)
|
24 |
+
* Tabs support, if multiple RSS feeds are added in a single widget.
|
25 |
+
* Customizable with Inbuilt color styles and with external CSS styles.
|
26 |
+
* Add multiple RSS feeds in a page with a ticker effect.
|
27 |
+
* Supports RSS or atom feed.
|
28 |
+
* Can tweak the widget to change the no of visible feed itemas and more...
|
29 |
|
30 |
+
Check out the [live working demo](http://www.aakashweb.com/resources/pages/demos/super-rss-reader/) in this page.
|
31 |
|
32 |
+
* If you like this plugin, then [just make a small donation](http://bit.ly/srrdonate) and it will be helpful for the plugin development.
|
33 |
+
* The jQuery ticker effect is by the [jQuery easy ticker plugin](http://www.aakashweb.com/jquery-plugins/easy-ticker/)
|
34 |
|
35 |
+
= Resources =
|
36 |
|
37 |
+
* [Documentation](http://www.aakashweb.com/wordpress-plugins/super-rss-reader/)
|
38 |
+
* [FAQs](http://www.aakashweb.com/faqs/wordpress-plugins/super-rss-reader/)
|
39 |
+
* [Support](http://www.aakashweb.com/forum/)
|
40 |
+
* [Report Bugs](http://www.aakashweb.com/forum/)
|
41 |
|
42 |
== Installation ==
|
43 |
|
44 |
+
Download and upload the latest version of Super RSS Reader,
|
45 |
+
|
46 |
+
1. Unzip & upload it to your WordPress site.
|
47 |
+
1. Activate the plugin.
|
48 |
+
1. Drag and drop the "Super RSS Reader" widget in the "Widgets" page.
|
49 |
+
1. Input a RSS feed URL to the widget, tweak some settings and you are,
|
50 |
1. Done !
|
51 |
|
52 |
== Frequently Asked Questions ==
|
53 |
|
54 |
+
= How can I customize the RSS widget externally ? =
|
55 |
|
56 |
+
You can use the `super-rss-reader-widget` class in your stylesheet to control the widget styling. Other classes are,
|
57 |
|
58 |
+
1. `srr-tab-wrap` - the tab's class.
|
59 |
+
1. `srr-wrap` - the wrapper of the widget.
|
60 |
+
1. `srr-item.odd` - to control the odd feed items.
|
61 |
+
1. `srr-item.even` - to control the even feed items.
|
62 |
|
63 |
+
= Will the additional ticker effect slows the site ? =
|
64 |
|
65 |
+
No. the additional effect needs only 3.4 Kb of additional file. I think thats not too heavy to slow down the site.
|
66 |
|
67 |
+
= How to create a tabbed mode ? =
|
68 |
|
69 |
+
Just enter the RSS feed URLs seperated by comma in the widget, the plugin automatically renders the tab.
|
70 |
|
71 |
+
For more FAQs just check out the [official page](http://www.aakashweb.com/wordpress-plugins/super-rss-reader/).
|
|
|
72 |
|
73 |
== Screenshots ==
|
74 |
|
75 |
+
1. Example Super RSS Reader widgets shown in the sidebar, having a ticker effect and a tabbed mode.
|
76 |
+
1. Picture showing some possible ways of Customizing the widget.
|
77 |
+
1. The Super RSS Reader widget in the administration page.
|
78 |
+
|
79 |
+
[Live Working demo](http://www.aakashweb.com/resources/pages/demos/super-rss-reader/)
|
|
|
80 |
|
81 |
[More screenshots in Aakash Web](http://www.aakashweb.com/wordpress-plugins/super-rss-reader/)
|
82 |
|
83 |
+
== Changelog ==
|
84 |
+
|
85 |
+
= 2.0 =
|
86 |
+
* Core code is completely rewritten.
|
87 |
+
* Flash RSS Reader is removed and instead jQuery is used.
|
88 |
+
* Administration panel used in the previous version is removed and settings are configured in the widget itself.
|
89 |
|
90 |
+
= 0.8 =
|
91 |
+
* Second version with included CSS and Proxy file (loadXML.php).
|
92 |
|
93 |
+
= 0.5 =
|
94 |
+
* Initial version with a flash RSS Reader
|
95 |
+
|
96 |
+
== Upgrade Notice ==
|
97 |
+
|
98 |
+
Version 2.0 is a major and recommended upgrade for previous version users.
|
99 |
+
|
100 |
+
== Credits ==
|
101 |
|
102 |
+
* RSS feed reading engine is the inbuilt WordPress's engine
|
103 |
+
* The news ticker effect is powered by the [jQuery Easy ticker plugin](http://www.aakashweb.com/jquery-plugins/easy-ticker/)
|
104 |
+
* Default color styles are by Aakash Chakravarthy.
|
rss-css.css
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
.title {
|
2 |
-
font-family: Arial, Helvetica, sans-serif;
|
3 |
-
font-size: 13px;
|
4 |
-
font-weight: bold;
|
5 |
-
color: #222222;
|
6 |
-
text-decoration: underline;
|
7 |
-
}
|
8 |
-
|
9 |
-
a:hover {
|
10 |
-
color: #25D300;
|
11 |
-
}
|
12 |
-
|
13 |
-
.description {
|
14 |
-
font-family: Arial, Helvetica, sans-serif;
|
15 |
-
font-size: 12px;
|
16 |
-
font-weight: normal;
|
17 |
-
color: #444444;
|
18 |
-
text-decoration: none;
|
19 |
-
}
|
20 |
-
.date {
|
21 |
-
font-family: Arial, Helvetica, sans-serif;
|
22 |
-
font-size: 10px;
|
23 |
-
font-weight: bold;
|
24 |
-
color: #666666;
|
25 |
-
text-decoration: none;
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rssreader.swf
DELETED
Binary file
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
DELETED
Binary file
|
screenshot-5.png
DELETED
Binary file
|
screenshot-6.png
DELETED
Binary file
|
setup-3.png
DELETED
Binary file
|
shine-types.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5 |
-
<title>Super RSS Reader | Shine Types | www.aakashweb.com</title>
|
6 |
-
<style type="text/css">
|
7 |
-
<!--
|
8 |
-
p a {
|
9 |
-
font-family: Arial, Helvetica, sans-serif;
|
10 |
-
font-size: 13px;
|
11 |
-
background-color: #F9F9F9;
|
12 |
-
border: 1px solid #999999;
|
13 |
-
padding-top: 5px;
|
14 |
-
padding-right: 10px;
|
15 |
-
padding-bottom: 5px;
|
16 |
-
padding-left: 10px;
|
17 |
-
margin-left: 10px;
|
18 |
-
text-decoration: none;
|
19 |
-
color: #006699;
|
20 |
-
font-weight: bold;
|
21 |
-
-moz-border-radius: 5px;
|
22 |
-
-khtml-border-radius: 5px;
|
23 |
-
-webkit-border-radius: 5px;
|
24 |
-
}
|
25 |
-
p {
|
26 |
-
font-family: Arial, Helvetica, sans-serif;
|
27 |
-
font-size: 13px;
|
28 |
-
font-weight: bold;
|
29 |
-
color: #333333;
|
30 |
-
}
|
31 |
-
p a:hover {
|
32 |
-
background-color: #FFFFFF;
|
33 |
-
color: #FF0033;
|
34 |
-
}
|
35 |
-
.font13 {
|
36 |
-
font-family: Arial, Helvetica, sans-serif;
|
37 |
-
font-size: 13px;
|
38 |
-
font-weight: bold;
|
39 |
-
color: #000000;
|
40 |
-
}
|
41 |
-
-->
|
42 |
-
</style>
|
43 |
-
</head>
|
44 |
-
<body>
|
45 |
-
<div>
|
46 |
-
<p align="center">
|
47 |
-
<?php
|
48 |
-
$shineType = $_GET['shineType'];
|
49 |
-
?>
|
50 |
-
|
51 |
-
|
52 |
-
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="400" height="300" align="middle">
|
53 |
-
<param name="movie" value="rssreader.swf" />
|
54 |
-
<param name="quality" value="high" />
|
55 |
-
<param name="flashvars" value="shineType=<?php echo $shineType ?>" />
|
56 |
-
<embed src="rssreader.swf" width="400" height="300" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="shineType=<?php echo $shineType ?>"></embed>
|
57 |
-
</object>
|
58 |
-
</p>
|
59 |
-
</div>
|
60 |
-
<p>Click the numbers below to view the relevant shine </p>
|
61 |
-
<div>
|
62 |
-
<p>Shine Type:<a href="shine-types.php?shineType=1">1</a><a href="shine-types.php?shineType=2">2</a><a href="shine-types.php?shineType=3">3</a><a href="shine-types.php?shineType=4">4</a><a href="shine-types.php?shineType=5">5</a><a href="shine-types.php?shineType=6">6</a><a href="shine-types.php?shineType=7">7</a> </p>
|
63 |
-
</div><hr noshade="noshade" size="1px" />
|
64 |
-
<span class="font13"> <a href="http://www.aakashweb.com/super-rss-reader/" target="_blank">Super RSS Reader</a> | <a href="http://www.aakashweb.com/" target="_blank">www.aakashweb.com</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Aakash Web and Support it's Useful Products &amount=&currency_code=USD" target="_blank">Donate</a></span>
|
65 |
-
</body>
|
66 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super-rss-reader.php
CHANGED
@@ -1,575 +1,405 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Super RSS Reader
|
4 |
-
Plugin URI: http://www.aakashweb.com
|
5 |
-
Description: A Flash RSS Reader for advanced and stylish publishing of RSS feeds fastly and easily with easy Setup. <a href="options-general.php?page=super-rss-reader/super-rss-reader.php">Click here</a> to go the setup page .
|
6 |
-
Author: Aakash Chakravarthy
|
7 |
-
Version: 0.8
|
8 |
Author URI: http://www.aakashweb.com/
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
This program is free software; you can redistribute it and/or modify
|
13 |
-
it under the terms of the GNU General Public License as published by
|
14 |
-
the Free Software Foundation; either version 2 of the License, or
|
15 |
-
(at your option) any later version.
|
16 |
-
|
17 |
-
This program is distributed in the hope that it will be useful,
|
18 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
-
GNU General Public License for more details.
|
21 |
-
|
22 |
-
You should have received a copy of the GNU General Public License
|
23 |
-
along with this program; if not, write to the Free Software
|
24 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
|
|
|
|
|
|
|
|
|
|
27 |
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
|
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
$
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
-
|
75 |
-
$
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
$options['srrScrollbarBarColor'] = $_POST['srr_scrollbarBarColor'];
|
86 |
|
87 |
-
// And we also update the options in the Wordpress Database
|
88 |
-
update_option("super_rss_reader", $options);
|
89 |
}
|
90 |
-
|
91 |
-
$options = get_option('super_rss_reader');
|
92 |
-
|
93 |
-
?>
|
94 |
-
|
95 |
-
<div style="float:right; margin-top:20px; border-left:#666666; border-left-style:solid; border-left-width:1px; padding:10px; border-bottom-color:#666666; border-bottom-style:solid; border-bottom-width:1px; margin-right:-60px">
|
96 |
-
<h3>Widget Support</h3>
|
97 |
-
<ul>
|
98 |
-
<li><a href="http://forums.aakashweb.com/forum/super-rss-reader" target="_blank">Widget Support Forum</a></li>
|
99 |
-
<li><a href="http://www.aakashweb.com/" target="_blank">Author Website</a></li>
|
100 |
-
<li><a href="http://www.aakashweb.com/wordpress-plugins/super-rss-reader/index.php" target="_blank">Plugin home page</a></li>
|
101 |
-
<li><a href="http://wordpress.org/extend/plugins/html-javascript-adder/" target="_blank">See Updates</a></li>
|
102 |
-
<li><a href="http://forums.aakashweb.com/forum/html-javascript-adder" target="_blank">Report Bugs</a></li>
|
103 |
-
<li><a href="mailto:aakash.19493@gmail.com" target="_blank">Email the Author </a></li>
|
104 |
-
</ul>
|
105 |
-
<h3>Donate</h3>
|
106 |
-
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Super RSS Reader an Flash based Wordpress Plugin to develop more advanced versions&amount=&currency_code=USD" target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG_global.gif" alt="Donate Super RSS Reader to develop more advanced versions and serve you" border="0" align="absmiddle"></a>
|
107 |
-
<br />
|
108 |
-
<br />
|
109 |
-
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Super RSS Reader Wordpress Plugin to develop more advanced versions&amount=&currency_code=USD" title="Donate Super RSS Reader Wordpress Plugin to develop more advanced versions" target="_blank">Support this Plugin !</a>
|
110 |
-
<h3>Aakash Web</h3>
|
111 |
-
<ul>
|
112 |
-
<li><a href="http://www.aakashweb.com/tools/" target="_blank">Free Flash Gadgets</a></li>
|
113 |
-
<li><a href="http://www.aakashweb.com/flash-generators/" target="_blank">Flash Generators</a></li>
|
114 |
-
<li><a href="http://www.aakashweb.com/wordpress-plugins/" target="_blank">Wordpress Plugins</a></li>
|
115 |
-
<li><a href="http://www.aakashweb.com/super-rss-reader/" target="_blank">Flash RSS Reader</a></li>
|
116 |
-
<li><a href="http://www.aakashweb.com/flv-player/" target="_blank">FLV Player</a></li>
|
117 |
-
<li><a href="http://www.aakashweb.com/xml-slideshow/" target="_blank">XML Image Slideshow </a></li>
|
118 |
-
<li><a href="http://blog.aakashweb.com/" target="_blank">Blog</a></li>
|
119 |
-
<li><a href="http://forums.aakashweb.com/" target="_blank">Support Forum</a></li>
|
120 |
-
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Aakash Web and Support it's Useful Products &amount=¤cy_code=USD" target="_blank">Support Aakash Web</a></li>
|
121 |
-
</ul>
|
122 |
-
</div>
|
123 |
-
|
124 |
-
<div class="wrap">
|
125 |
-
<form method="POST">
|
126 |
-
<div class="icon32" id="icon-options-general"><br/></div>
|
127 |
-
<h2><?php _e('Super RSS Reader'); ?></h2>
|
128 |
-
<div style="padding:5px">
|
129 |
-
<p>
|
130 |
-
Welcome to Super RSS Reader Setup Page. Just change the settings of the RSS Reader and click "Save Settings". Your options will be saved. After changing go to the Widget settings page and add the Super RSS Reader to the sidebar. That's all. Don't leave any field blank here except the tabs settings field. For any support <a href="http://forums.aakashweb.com/" target="_blank">click here</a> or use the links in sidebar . </p>
|
131 |
-
<p>Change the rss-css.css stylesheet file present in the super-rss-reader plugins directory to change the font, font size etc. </p>
|
132 |
-
</div>
|
133 |
-
<table width="590" height="121" border="0" cellpadding="0" cellspacing="0">
|
134 |
-
<tr>
|
135 |
-
<td width="224" height="33"><span style="line-height: 30px;"><strong>Basic Settings </strong></span></td>
|
136 |
-
<td width="326" height="40"> </td>
|
137 |
-
</tr>
|
138 |
-
<tr>
|
139 |
-
<td height="22"><label for="srr_bgcolor">BG Color</label></td>
|
140 |
-
<td height="40"><input name="srr_bgcolor" style="width:200px" class="color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000'} widefat" id="srr_bgcolor" value="<?php echo $options['srrBgcolor']; ?>" /></td>
|
141 |
-
</tr>
|
142 |
-
<tr>
|
143 |
-
<td height="22"><label for="srr_width">Width</label></td>
|
144 |
-
<td height="40"><input name="srr_width" type="text" style="width:200px;" class="widefat" id="srr_width" value="<?php echo $options['srrWidth']; ?>">
|
145 |
-
px<small>
|
146 |
-
eg : 500 </small></td>
|
147 |
-
</tr>
|
148 |
-
<tr>
|
149 |
-
<td height="22"><label for="srr_height">Height</label></td>
|
150 |
-
<td height="40"><input name="srr_height" type="text" style="width:200px;" class="widefat" id="srr_height" value="<?php echo $options['srrHeight']; ?>">
|
151 |
-
px
|
152 |
-
<small>eg : 400 </small> </td>
|
153 |
-
</tr>
|
154 |
-
<tr>
|
155 |
-
<td height="22"><label for="srr_wmode">Window Mode</label></td>
|
156 |
-
<td height="40"><select class="widefat" name="srr_wmode" id="srr_wmode" style="width:200px;">
|
157 |
-
<option <?php if ($options['srrWmode'] == "transparent"){ echo 'selected="selected"' ;} ?> value="transparent">transparent</option>
|
158 |
-
<option <?php if ($options['srrWmode'] == "opaque"){ echo 'selected="selected"' ;} ?> value="opaque">opaque</option>
|
159 |
-
</select> </td>
|
160 |
-
</tr>
|
161 |
-
</table>
|
162 |
-
<br><hr noshade="noshade" size="1px" />
|
163 |
-
<table width="590" height="71" border="0" cellpadding="0" cellspacing="0">
|
164 |
-
<tr>
|
165 |
-
<td width="245" height="33"><span style="line-height: 30px;"><strong>Feed URL Settings </strong></span></td>
|
166 |
-
<td width="345" height="40"> </td>
|
167 |
-
</tr>
|
168 |
-
|
169 |
-
<tr>
|
170 |
-
<td><label for="srr_rssUrl">RSS Feed URL* </label></td>
|
171 |
-
<td height="40"><input name="srr_rssUrl" type="text" style="width: 300px;" class="widefat" id="srr_rssUrl" value="<?php echo $options['srrRssUrl']; ?>"><br><small>Enter the URL of the RSS Feed here</small>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
</table><br><hr noshade="noshade" size="1px" />
|
175 |
-
<table width="564" height="402" border="0" cellpadding="0" cellspacing="0">
|
176 |
-
<tr>
|
177 |
-
<td width="225"><strong>Title and Description Bar Settings </strong></td>
|
178 |
-
<td width="299" height="40"> </td>
|
179 |
-
</tr>
|
180 |
-
<tr>
|
181 |
-
<td height="28">Show Title and Description Bar </td>
|
182 |
-
<td height="40"><select class="widefat" name="srr_showTitleAndDescription" id="srr_showTitleAndDescription" style="width: 200px;"><option <?php if ($options['srrShowTitleAndDescription'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option>
|
183 |
-
<option <?php if ($options['srrShowTitleAndDescription'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option>
|
184 |
-
</select></td>
|
185 |
-
</tr>
|
186 |
-
<tr>
|
187 |
-
<td height="28">Title Bar BG Color</td>
|
188 |
-
<td height="40"><input name="srr_titleBgColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_titleBgColor" value="<?php echo $options['srrTitleBgColor']; ?>" /></td>
|
189 |
-
</tr>
|
190 |
-
<tr>
|
191 |
-
<td height="28">Description Bar BG Color</td>
|
192 |
-
<td height="40"><input name="srr_descriptionBgColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_descriptionBgColor" value="<?php echo $options['srrDescriptionBgColor']; ?>" /></td>
|
193 |
-
</tr>
|
194 |
-
<tr>
|
195 |
-
<td height="28">Footer Bar BG Color</td>
|
196 |
-
<td height="40"><input name="srr_footerBgColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_footerBgColor" value="<?php echo $options['srrFooterBgColor']; ?>" /></td>
|
197 |
-
</tr>
|
198 |
-
<tr>
|
199 |
-
<td height="28">Title Text Color</td>
|
200 |
-
<td height="40"><input name="srr_titleColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_titleColor" value="<?php echo $options['srrTitleColor']; ?>" /></td>
|
201 |
-
</tr>
|
202 |
-
<tr>
|
203 |
-
<td height="28">Description Text Color</td>
|
204 |
-
<td height="40"><input name="srr_descColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_descColor" value="<?php echo $options['srrDescColor']; ?>" /></td>
|
205 |
-
</tr>
|
206 |
-
<tr>
|
207 |
-
<td height="44">Title, Description and Footer Bar Transparency </td>
|
208 |
-
<td height="40"><input name="srr_titleBarAlpha" type="text" style="width:200px;" class="widefat" id="srr_titleBarAlpha" value="<?php echo $options['srrTitleBarAlpha']; ?>" />
|
209 |
-
<small> Default : 100 </small></td>
|
210 |
-
</tr>
|
211 |
-
<tr>
|
212 |
-
<td height="44">Title and Description Bar Background Image </td>
|
213 |
-
<td height="40"><input name="srr_titleAndDescriptionBg" type="text" style="width:200px;" class="widefat" id="srr_titleAndDescriptionBg" value="<?php echo $options['srrTitleAndDescriptionBg']; ?>">
|
214 |
-
<small> Default : None </small></td>
|
215 |
-
</tr>
|
216 |
-
<tr>
|
217 |
-
<td height="44">Strech Title and Description Bar BG Image </td>
|
218 |
-
<td height="40"><select class="widefat" name="srr_strechTitleImage" id="srr_strechTitleImage" style="width:200px;">
|
219 |
-
<option <?php if ($options['srrStrechTitleImage'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option>
|
220 |
-
<option <?php if ($options['srrStrechTitleImage'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option>
|
221 |
-
</select>
|
222 |
-
<small> Default : Yes </small></td>
|
223 |
-
</tr>
|
224 |
-
<tr>
|
225 |
-
<td>Title and Footer Bar Border Type </td>
|
226 |
-
<td height="40"><select class="widefat" name="srr_borderType" id="srr_borderType" style="width:200px;">
|
227 |
-
<option <?php if ($options['srrBorderType'] == "round"){ echo 'selected="selected"' ;} ?> value="round">round</option>
|
228 |
-
<option <?php if ($options['srrBorderType'] == "square"){ echo 'selected="selected"' ;} ?> value="square">square</option>
|
229 |
-
</select>
|
230 |
-
<small> Default : Round </small></td>
|
231 |
-
</tr>
|
232 |
-
<tr>
|
233 |
-
<td>Title and Description Bar Shine type </td>
|
234 |
-
<td height="40"><select class="widefat" name="srr_shineType" id="srr_shineType" style="width:200px;">
|
235 |
-
<option <?php if ($options['srrShineType'] == "1"){ echo 'selected="selected"' ;} ?> value="1">1</option>
|
236 |
-
<option <?php if ($options['srrShineType'] == "2"){ echo 'selected="selected"' ;} ?> value="2">2</option>
|
237 |
-
<option <?php if ($options['srrShineType'] == "3"){ echo 'selected="selected"' ;} ?> value="3">3</option>
|
238 |
-
<option <?php if ($options['srrShineType'] == "4"){ echo 'selected="selected"' ;} ?> value="4">4</option>
|
239 |
-
<option <?php if ($options['srrShineType'] == "5"){ echo 'selected="selected"' ;} ?> value="5">5</option>
|
240 |
-
<option <?php if ($options['srrShineType'] == "6"){ echo 'selected="selected"' ;} ?> value="6">6</option>
|
241 |
-
<option <?php if ($options['srrShineType'] == "7"){ echo 'selected="selected"' ;} ?> value="7">7</option>
|
242 |
-
</select><br />
|
243 |
-
<small> No Shine : 7 | Other Shines <a onclick="window.open('<?php echo getPluginPath_srr().'/shine-types.php?shineType=1'; ?>', 'popupwindow', 'scrollbars=yes,width=420,height=450');return true" style="color:#006699; cursor:pointer; text-decoration:underline">See here</a> </small></td>
|
244 |
-
</tr>
|
245 |
-
</table>
|
246 |
-
<br><hr noshade="noshade" size="1px" />
|
247 |
-
<table width="590" height="148" border="0" cellpadding="0" cellspacing="0">
|
248 |
-
<tr>
|
249 |
-
<td width="226" height="30"><strong>Feed Display Settings </strong></td>
|
250 |
-
<td width="324" height="40"> </td>
|
251 |
-
</tr>
|
252 |
-
<tr>
|
253 |
-
<td height="22">Feed Displayer Background Image </td>
|
254 |
-
<td height="40"><input name="srr_backgroundImage" type="text" style="width: 200px;" class="widefat" id="srr_backgroundImage" value="<?php echo $options['srrBackgroundImage']; ?>"><small> Default : None </small></td>
|
255 |
-
</tr>
|
256 |
-
<tr>
|
257 |
-
<td height="24">Strech Background Image </td>
|
258 |
-
<td height="40"><select class="widefat" name="srr_strechBackgroundImage" id="srr_strechBackgroundImage" style="width:200px">
|
259 |
-
<option <?php if ($options['srrStrechBackgroundImage'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option>
|
260 |
-
<option <?php if ($options['srrStrechBackgroundImage'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option>
|
261 |
-
</select>
|
262 |
-
|
263 |
-
<small> Default : Yes </small></td>
|
264 |
-
</tr>
|
265 |
-
<tr>
|
266 |
-
<td height="24">Display Date </td>
|
267 |
-
<td height="40"><select class="widefat" name="srr_displayDate" id="srr_displayDate" style="width:200px">
|
268 |
-
<option value="yes" <?php if ($options['srrDisplayDate'] == "yes"){ echo 'selected="selected"' ;} ?>>yes</option>
|
269 |
-
<option <?php if ($options['srrDisplayDate'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option>
|
270 |
-
</select>
|
271 |
-
|
272 |
-
<small> Default : Yes </small></td>
|
273 |
-
</tr>
|
274 |
-
<tr>
|
275 |
-
<td height="24">Display Description </td>
|
276 |
-
<td height="40"><select class="widefat" name="srr_displayDescription" id="srr_displayDescription" style="width: 200px;">
|
277 |
-
<option <?php if ($options['srrDisplayDescription'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option>
|
278 |
-
<option <?php if ($options['srrDisplayDescription'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option>
|
279 |
-
</select>
|
280 |
-
|
281 |
-
<small> Default : Yes </small></td>
|
282 |
-
</tr>
|
283 |
-
<tr>
|
284 |
-
<td>Show Logo in Background </td>
|
285 |
-
<td height="40"><select class="widefat" name="srr_showLogo" id="srr_showLogo" style="width: 200px;">
|
286 |
-
<option <?php if ($options['srrShowLogo'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option>
|
287 |
-
<option <?php if ($options['srrShowLogo'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option>
|
288 |
-
</select>
|
289 |
-
|
290 |
-
<small> Default : Yes </small></td>
|
291 |
-
</tr>
|
292 |
-
</table><br><hr noshade="noshade" size="1px" />
|
293 |
-
<table width="590" height="144" border="0" cellpadding="0" cellspacing="0">
|
294 |
-
<tr>
|
295 |
-
<td width="245"><strong>Tab Settings </strong></td>
|
296 |
-
<td width="345" height="40"><small>Note : Don't enter anything if you don't want tabs </small></td>
|
297 |
-
</tr>
|
298 |
-
<tr>
|
299 |
-
<td height="22">Tab 1 Name </td>
|
300 |
-
<td height="40"><input name="srr_tab1Name" type="text" style="width: 200px;" class="widefat" id="srr_tab1Name" value="<?php echo $options['srrTab1Name']; ?>"></td>
|
301 |
-
</tr>
|
302 |
-
<tr>
|
303 |
-
<td height="22">Tab 2 Name </td>
|
304 |
-
<td height="40"><input name="srr_tab2Name" type="text" style="width: 200px;" class="widefat" id="srr_tab2Name" value="<?php echo $options['srrTab2Name']; ?>"></td>
|
305 |
-
</tr>
|
306 |
-
<tr>
|
307 |
-
<td height="22">Tab 3 Name </td>
|
308 |
-
<td height="40"><input name="srr_tab3Name" type="text" style="width: 200px;" class="widefat" id="srr_tab3Name" value="<?php echo $options['srrTab3Name']; ?>"></td>
|
309 |
-
</tr>
|
310 |
-
<tr>
|
311 |
-
<td height="22">Tab 4 Name </td>
|
312 |
-
<td height="40"><input name="srr_tab4Name" type="text" style="width: 200px;" class="widefat" id="srr_tab4Name" value="<?php echo $options['srrTab4Name']; ?>"></td>
|
313 |
-
</tr>
|
314 |
-
<tr>
|
315 |
-
<td height="22">Tab 5 Name </td>
|
316 |
-
<td height="40"><input name="srr_tab5Name" type="text" style="width: 200px;" class="widefat" id="srr_tab5Name" value="<?php echo $options['srrTab5Name']; ?>"></td>
|
317 |
-
</tr>
|
318 |
-
</table><br><hr noshade="noshade" size="1px" />
|
319 |
-
<table width="590" height="145" border="0" cellpadding="0" cellspacing="0">
|
320 |
-
<tr>
|
321 |
-
<td width="247"><strong>Tab Feed URL's </strong></td>
|
322 |
-
<td width="343" height="40"> </td>
|
323 |
-
</tr>
|
324 |
-
<tr>
|
325 |
-
<td height="22">Tab 1 Feed URL </td>
|
326 |
-
<td height="40"><input name="srr_tab1Url" type="text" style="width: 200px;" class="widefat" id="srr_tab1Url" value="<?php echo $options['srrTab1Url']; ?>"></td>
|
327 |
-
</tr>
|
328 |
-
<tr>
|
329 |
-
<td height="22">Tab 2 Feed URL </td>
|
330 |
-
<td height="40"><input name="srr_tab2Url" type="text" style="width: 200px;" class="widefat" id="srr_tab2Url" value="<?php echo $options['srrTab2Url']; ?>"></td>
|
331 |
-
</tr>
|
332 |
-
<tr>
|
333 |
-
<td height="22">Tab 3 Feed URL </td>
|
334 |
-
<td height="40"><input name="srr_tab3Url" type="text" style="width: 200px;" class="widefat" id="srr_tab3Url" value="<?php echo $options['srrTab3Url']; ?>"></td>
|
335 |
-
</tr>
|
336 |
-
<tr>
|
337 |
-
<td height="22">Tab 4 Feed URL </td>
|
338 |
-
<td height="40"><input name="srr_tab4Url" type="text" style="width: 200px;" class="widefat" id="srr_tab4Url" value="<?php echo $options['srrTab4Url']; ?>"></td>
|
339 |
-
</tr>
|
340 |
-
<tr>
|
341 |
-
<td height="22">Tab 5 Feed URL </td>
|
342 |
-
<td height="40"><input name="srr_tab5Url" type="text" style="width: 200px;" class="widefat" id="srr_tab5Url" value="<?php echo $options['srrTab5Url']; ?>"></td>
|
343 |
-
</tr>
|
344 |
-
</table><br>
|
345 |
-
<table width="590" height="24" border="0" cellpadding="0" cellspacing="0">
|
346 |
-
<tr>
|
347 |
-
<td width="245" height="24">Tabs Scroll Type </td>
|
348 |
-
<td width="345" height="40"><select class="widefat" name="srr_tabScroll" id="srr_tabScroll" style="width: 200px;">
|
349 |
-
<option <?php if ($options['srrTabScroll'] == "mouse"){ echo 'selected="selected"' ;} ?> value="mouse">mouse</option>
|
350 |
-
<option <?php if ($options['srrTabScroll'] == "button"){ echo 'selected="selected"' ;} ?> value="button">button</option>
|
351 |
-
</select>
|
352 |
-
<small> Default : Mouse </small></td>
|
353 |
-
</tr>
|
354 |
-
</table><br><hr noshade="noshade" size="1px" />
|
355 |
-
<table width="677" height="111" border="0" cellpadding="0" cellspacing="0">
|
356 |
-
<tr>
|
357 |
-
<td width="224"><strong>Misc Settings </strong></td>
|
358 |
-
<td width="413" height="40"> </td>
|
359 |
-
</tr>
|
360 |
-
<tr>
|
361 |
-
<td height="24">Show URL Box </td>
|
362 |
-
<td height="40"><select class="widefat" name="srr_showUrlBox" id="srr_showUrlBox" style="width:200px">
|
363 |
-
<option value="yes" <?php if ($options['srrShowUrlBox'] == "yes"){ echo 'selected="selected"' ;} ?>>yes</option>
|
364 |
-
<option value="no" <?php if ($options['srrShowUrlBox'] == "no"){ echo 'selected="selected"' ;} ?> >no</option>
|
365 |
-
</select>
|
366 |
-
<small> Default : Yes </small></td>
|
367 |
-
</tr>
|
368 |
-
<tr>
|
369 |
-
<td height="24">Show Subscribe Menu </td>
|
370 |
-
<td height="40"><select class="widefat" name="srr_showSubscribeMenu" id="srr_showSubscribeMenu" style="width:200px">
|
371 |
-
<option value="yes" <?php if ($options['srrShowSubscribeMenu'] == "yes"){ echo 'selected="selected"' ;} ?> >yes</option>
|
372 |
-
<option <?php if ($options['srrShowSubscribeMenu'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> </select><small> Default : Yes </small></td>
|
373 |
-
</tr>
|
374 |
-
<tr>
|
375 |
-
<td height="22">Scroll Bar Dragger Color </td>
|
376 |
-
<td height="40"><input name="srr_scrollbarDraggerColor" style="width:200px" class="color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false} widefat" id="srr_scrollbarDraggerColor" value="<?php echo $options['srrScrollbarDraggerColor']; ?>" />
|
377 |
-
<small> Default : Black </small></td>
|
378 |
-
</tr>
|
379 |
-
<tr>
|
380 |
-
<td>Scroll Bar Bar Color </td>
|
381 |
-
<td height="40"><input name="srr_scrollbarBarColor" style="width:200px" class="color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false} widefat" id="srr_scrollbarBarColor" value="<?php echo $options['srrScrollbarBarColor']; ?>" />
|
382 |
-
<small> Default : White</small></td>
|
383 |
-
</tr>
|
384 |
-
</table>
|
385 |
-
|
386 |
-
<p style="line-height: 30px;">
|
387 |
-
<label for="Submit"></label><span class="submit">
|
388 |
-
<input type="submit" name="super_rss_reader_submit" value="Save Settings" id="super_rss_reader_submit"></span>
|
389 |
-
<label for="Submit"></label>
|
390 |
-
</p>
|
391 |
-
</form>
|
392 |
-
|
393 |
-
<h2>Next ...</h2>
|
394 |
-
<p>Go to the Widgets page and add the Super RSS Reader to the sidebar. <a href="widgets.php">Click here</a> to go the widgets page. After adding the widget, expand the widget and give some title to the RSS Reader.</p>
|
395 |
-
<h2>Or ...</h2>
|
396 |
-
Add the following PHP Code anywhere in the theme file .
|
397 |
-
<p class="code"><?php superRSSReader (); ?> </p>
|
398 |
-
<p class="code"> </p>
|
399 |
-
</div>
|
400 |
-
<?php $jscolorUrl= getPluginPath_srr().'/jscolor/jscolor.js' ?>
|
401 |
-
<script type="text/javascript" src="<?php echo $jscolorUrl ?>"></script>
|
402 |
-
<hr size="1" noshade="NOSHADE"/>
|
403 |
-
|
404 |
-
<div><a href="http://www.aakashweb.com/" target="_blank"><img src="<?php echo getPluginPath_srr().'/images/aakashweb-logo.png'; ?>" alt="Aakash Web "width="97" height="37" border="0" align="right" title="Visit Aakash Web" /></a><a href="http://forums.aakashweb.com/forum/super-rss-reader/">Report Bugs</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Aakash Web and Support it's Useful Products &amount=&currency_code=USD" target="_blank">Quick Donate</a> | <a href="http://www.aakashweb.com/">www.aakashweb.com</a> </div>
|
405 |
-
<br />
|
406 |
-
<br />
|
407 |
-
<?php
|
408 |
}
|
409 |
|
410 |
-
|
411 |
-
|
412 |
-
function
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
// any preset options
|
421 |
-
$options = get_option("super_rss_reader");
|
422 |
-
|
423 |
-
// Display the widget!
|
424 |
-
echo $before_widget;
|
425 |
-
echo $before_title;
|
426 |
-
echo $options['srrTitle'];
|
427 |
-
echo $after_title;
|
428 |
-
|
429 |
-
if ($options['bfContent'] !=""){
|
430 |
-
echo $options['bfContent'];
|
431 |
}
|
432 |
-
//Our Widget Content
|
433 |
|
434 |
-
|
435 |
-
$
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
|
|
|
|
|
|
451 |
}
|
452 |
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
if ($options['afContent'] !=""){
|
472 |
-
echo $options['afContent'];
|
473 |
}
|
474 |
-
echo '<!-- Super RSS Reader Powered by Aakash Web | Aakash Chakravarthy ( www.aakashweb.com ) -->';
|
475 |
-
echo $after_widget;
|
476 |
-
}
|
477 |
-
|
478 |
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
479 |
-
function super_rss_reader_control() {
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
$
|
496 |
-
$
|
497 |
-
|
498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
}
|
500 |
-
|
501 |
-
?>
|
502 |
-
|
503 |
-
<p>
|
504 |
-
<label for="srr_title"> Title:</label>
|
505 |
-
<input name="srr_title" class="widefat" type="text" id="srr_title" value="<?php echo $options['srrTitle'] ;?>" style="width:250px"/><br />
|
506 |
-
<label for="srr_bfContent">Some Text Before the Reader:</label>
|
507 |
-
<input name="srr_bfContent" class="widefat" type="text" id="srr_bfContent" value="<?php echo $options['bfContent'] ;?>" style="width:250px"/><br />
|
508 |
-
<div class="widefat" style="background-color:#FFFFF4; width:240px; height:150px;">RSS Reader</div><br />
|
509 |
-
<label for="srr_afContent">Some Text After the Reader:</label>
|
510 |
-
<input name="srr_afContent" class="widefat" type="text" id="srr_afContent" value="<?php echo $options['afContent'] ;?>" style="width:250px"/>
|
511 |
-
|
512 |
-
<input type="hidden" id="srr_submit" name="srr_submit" value="1" />
|
513 |
-
</p>
|
514 |
-
<?php
|
515 |
}
|
516 |
|
517 |
-
|
518 |
-
|
519 |
-
function super_rss_reader_init() {
|
520 |
-
// These are the Wordpress functions which will register
|
521 |
-
// the widget, and also the widget control - or
|
522 |
-
// 'options', to you and me.
|
523 |
-
register_sidebar_widget('Super RSS Reader', 'super_rss_reader');
|
524 |
-
register_widget_control('Super RSS Reader', 'super_rss_reader_control');
|
525 |
}
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
|
534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
|
536 |
-
|
537 |
-
$srrCssUrl=getPluginPath_srr().'/rss-css.css';
|
538 |
-
|
539 |
-
if ($options['srrTab1Name']!=""){
|
540 |
-
$srrTab1 = '&tab1Name='.$options['srrTab1Name'];
|
541 |
-
}
|
542 |
-
if ($options['srrTab2Name']!=""){
|
543 |
-
$srrTab2 = '&tab2Name='.$options['srrTab2Name'];
|
544 |
-
}
|
545 |
-
if ($options['srrTab3Name']!=""){
|
546 |
-
$srrTab3 = '&tab3Name='.$options['srrTab3Name'];
|
547 |
-
}
|
548 |
-
if ($options['srrTab4Name']!=""){
|
549 |
-
$srrTab4 = '&tab4Name='.$options['srrTab4Name'];
|
550 |
}
|
551 |
-
if ($options['srrTab5Name']!=""){
|
552 |
-
$srrTab5 = '&tab5Name='.$options['srrTab5Name'];
|
553 |
-
}
|
554 |
-
|
555 |
-
$srrFlashVars= 'phpURL='. $srrPhpUrl . '&cssUrl='.$srrCssUrl.'&rssUrl='. $options['srrRssUrl'].'&titleBgColor='. $options['srrTitleBgColor'].'&descriptionBgColor='. $options['srrDescriptionBgColor'] . '&footerBgColor='.$options['srrFooterBgColor'].'&titleColor='.$options['srrTitleColor'].'&descColor='.$options['srrDescColor'].'&showTitleAndDescription='.$options['srrShowTitleAndDescription'].'&titleBarAlpha='.$options['srrTitleBarAlpha']. '&titleAndDescriptionBg='. $options['srrTitleAndDescriptionBg'].'&strechTitleImage='.$options['srrStrechTitleImage'].'&borderType='. $options['srrBorderType'].'&shineType='.$options['srrShineType'].'&backgroundImage='.$options['srrBackgroundImage'].'&strechBackgroundImage='.$options['srrStrechBackgroundImage'].'&displayDate='.$options['srrDisplayDate'].'&displayDescription='.$options['srrDisplayDescription'].'&showLogo='.$options['srrShowLogo'].'&tabScroll='.$options['srrTabScroll'].'&showUrlBox='.$options['srrShowUrlBox'].'&showSubscribeMenu='.$options['srrShowSubscribeMenu'].'&scrollbarDraggerColor='.$options['srrScrollbarDraggerColor'].'&scrollbarBarColor='.$options['srrScrollbarBarColor'] . '&tab1Url=' .$options['srrTab1Url']. '&tab2Url=' .$options['srrTab2Url']. '&tab3Url=' .$options['srrTab3Url']. '&tab4Url=' .$options['srrTab4Url']. '&tab5Url=' .$options['srrTab5Url'].$srrTab1.$srrTab2.$srrTab3.$srrTab4.$srrTab5 ;
|
556 |
-
|
557 |
-
echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="';
|
558 |
-
echo $options['srrWidth'];
|
559 |
-
echo '" height="';
|
560 |
-
echo $options['srrHeight'];
|
561 |
-
echo '" wmode="';
|
562 |
-
echo $options['srrWmode'];
|
563 |
-
echo '" ><param name="movie" value="';
|
564 |
-
echo getPluginPath_srr().'/rssreader.swf"/>';
|
565 |
-
echo '<param name="quality" value="High"/><param name="wmode" value="';
|
566 |
-
echo $options['srrWmode'].'"/>';
|
567 |
-
echo '<param name="bgcolor" value="';
|
568 |
-
echo $options['srrBgcolor'];
|
569 |
-
echo '"/><param name="flashvars" value="';
|
570 |
-
echo $srrFlashVars . '"';
|
571 |
-
echo '<embed src="'. getPluginPath_srr().'/rssreader.swf" '.'wmode="'.$options['srrWmode'].'" width="'.$options['srrWidth'].'" height="'.$options['srrHeight'].'" quality="high" allowscriptaccess="always" bgcolor="'. $options['srrBgcolor'] .'" flashvars="'. $srrFlashVars.'" ></embed></object>';
|
572 |
-
echo '<!--Super RSS Reader Powered by Aakash Web | Aakash Chakravarthy ( www.aakashweb.com ) -->';
|
573 |
-
|
574 |
}
|
|
|
|
|
575 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Super RSS Reader
|
4 |
+
Plugin URI: http://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
|
|
|
|
|
|
5 |
Author URI: http://www.aakashweb.com/
|
6 |
+
Description: Super RSS Reader is jQuery based RSS reader widget, which displays the RSS feeds in the widget in an attractive way. It uses the jQuery easy ticker plugin to add a news ticker like effect to the RSS feeds. Multiple RSS feeds can be added for a single widget and they get seperated in tabs. <a href="http://www.youtube.com/watch?v=02aOG_-98Tg" target="_blank" title="Super RSS Reader demo video">Check out the demo video</a>.
|
7 |
+
Author: Aakash Chakravarthy
|
8 |
+
Version: 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
*/
|
10 |
|
11 |
+
if(!defined('WP_CONTENT_URL')) {
|
12 |
+
$srr_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__)).'/';
|
13 |
+
}else{
|
14 |
+
$srr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
|
15 |
+
}
|
16 |
|
17 |
+
define('SRR_VERSION', '2.0');
|
18 |
+
define('SRR_AUTHOR', 'Aakash Chakravarthy');
|
19 |
+
define('SRR_URL', $srr_url);
|
20 |
|
21 |
+
## Include the required scripts and styles
|
22 |
+
if( !is_admin()){
|
23 |
+
// jQuery
|
24 |
+
wp_deregister_script('jquery');
|
25 |
+
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '1.3.2');
|
26 |
+
wp_enqueue_script('jquery');
|
27 |
+
|
28 |
+
// Super RSS Reader JS and CSS
|
29 |
+
wp_register_script('super-rss-reader-js', SRR_URL . 'public/srr-js.js');
|
30 |
+
wp_enqueue_script(array('jquery', 'super-rss-reader-js'));
|
31 |
+
wp_register_style('super-rss-reader-css', SRR_URL . 'public/srr-css.css');
|
32 |
+
wp_enqueue_style('super-rss-reader-css');
|
33 |
+
}
|
34 |
|
35 |
+
## Default color styles
|
36 |
+
$srr_color_styles = array(
|
37 |
+
'No style' => 'none',
|
38 |
+
'Grey' => 'grey',
|
39 |
+
'Dark' => 'dark'
|
40 |
+
);
|
41 |
|
42 |
+
## The main RSS Parser
|
43 |
+
function srr_rss_parser($instance){
|
44 |
|
45 |
+
$urls = stripslashes($instance['urls']);
|
46 |
+
$count = intval($instance['count']);
|
47 |
+
$show_date = intval($instance['show_date']);
|
48 |
+
$show_desc = intval($instance['show_desc']);
|
49 |
+
$show_author = intval($instance['show_author']);
|
50 |
+
$strip_desc = intval($instance['strip_desc']);
|
51 |
+
$color_style = stripslashes($instance['color_style']);
|
52 |
+
$enable_ticker = intval($instance['enable_ticker']);
|
53 |
+
$visible_items = intval($instance['visible_items']);
|
54 |
|
55 |
+
if(empty($urls)){
|
56 |
+
return '';
|
57 |
+
}
|
58 |
+
|
59 |
+
$rand = array();
|
60 |
+
$url = explode(',', $urls);
|
61 |
+
|
62 |
+
// Generate the Tabs
|
63 |
+
if(count($url) > 1){
|
64 |
+
echo '<ul class="srr-tab-wrap srr-tab-style-' . $color_style . ' srr-clearfix">';
|
65 |
+
for($i=0; $i<count($url); $i++){
|
66 |
+
// Get the Feed URL
|
67 |
+
$feedUrl = trim($url[$i]);
|
68 |
+
$rss = fetch_feed($feedUrl);
|
69 |
+
if (is_wp_error($rss)){
|
70 |
+
if (is_admin() || current_user_can('manage_options')){
|
71 |
+
echo '<p><strong>RSS Error</strong>:' . $rss->get_error_message() . '</p>';
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
$rss_title = esc_attr(strip_tags($rss->get_title()));
|
76 |
+
$rand[$i] = rand(0, 999);
|
77 |
+
echo '<li data-tab="srr-tab-' . $rand[$i] . '">' . $rss_title . '</li>';
|
78 |
+
}
|
79 |
+
echo '</ul>';
|
80 |
+
}
|
81 |
+
|
82 |
+
for($i=0; $i<count($url); $i++){
|
83 |
+
// Get the Feed URL
|
84 |
+
$feedUrl = trim($url[$i]);
|
85 |
+
if(isset($url[$i])){
|
86 |
+
$rss = fetch_feed($feedUrl);
|
87 |
+
}else{
|
88 |
+
return '';
|
89 |
+
}
|
90 |
|
91 |
+
// Check for feed errors
|
92 |
+
if (!is_wp_error( $rss ) ){
|
93 |
+
$maxitems = $rss->get_item_quantity($count);
|
94 |
+
$rss_items = $rss->get_items(0, $maxitems);
|
95 |
+
$rss_title = esc_attr(strip_tags($rss->get_title()));
|
96 |
+
$rss_desc = esc_attr(strip_tags($rss->get_description()));
|
97 |
+
}
|
98 |
+
|
99 |
+
// Outer Wrap start
|
100 |
+
echo '<div class="srr-wrap ' . (($enable_ticker == 1 ) ? 'srr-vticker' : '' ) . ' srr-style-' . $color_style . '" data-visible="' . $visible_items . '" data-id="srr-tab-' . $rand[$i] . '"><div>';
|
101 |
|
102 |
+
// Check feed items
|
103 |
+
if ($maxitems == 0){
|
104 |
+
echo '<div>No items.</div>';
|
105 |
+
}else{
|
106 |
+
$j=1;
|
107 |
+
// Loop through each feed item
|
108 |
+
foreach ($rss_items as $item){
|
109 |
+
// Get the link
|
110 |
+
$link = $item->get_link();
|
111 |
+
while ( stristr($link, 'http') != $link ){ $link = substr($link, 1); }
|
112 |
+
$link = esc_url(strip_tags($link));
|
113 |
+
|
114 |
+
// Get the item title
|
115 |
+
$title = esc_attr(strip_tags($item->get_title()));
|
116 |
+
if ( empty($title) )
|
117 |
+
$title = __('Untitled');
|
118 |
+
|
119 |
+
// Get the date
|
120 |
+
$date = $item->get_date('j F Y');
|
121 |
+
|
122 |
+
// Get the description
|
123 |
+
$desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );
|
124 |
+
|
125 |
+
if($strip_desc != 0){
|
126 |
+
$desc = wp_html_excerpt( $desc, $strip_desc );
|
127 |
+
if ( '[...]' == substr( $desc, -5 ) )
|
128 |
+
$desc = substr( $desc, 0, -5 ) . '[…]';
|
129 |
+
elseif ( '[…]' != substr( $desc, -10 ) )
|
130 |
+
$desc .= ' […]';
|
131 |
+
}
|
132 |
+
$desc = esc_html( $desc );
|
133 |
+
|
134 |
+
// Get the author
|
135 |
+
$author = $item->get_author();
|
136 |
+
if ( is_object($author) ) {
|
137 |
+
$author = $author->get_name();
|
138 |
+
$author = esc_html(strip_tags($author));
|
139 |
+
}
|
140 |
+
|
141 |
+
echo "\n\n\t";
|
142 |
+
|
143 |
+
// Display the feed items
|
144 |
+
echo '<div class="srr-item ' . (($j%2 == 0) ? 'even' : 'odd') . '">';
|
145 |
+
echo '<a href="' . $link . '" title="Posted on ' . $date . '">' .$title . '</a>';
|
146 |
+
if($show_date) echo '<br/><em class="srr-date">' . $date . '</em>';
|
147 |
+
if($show_author) echo ' - <cite class="srr-author">' . $author . '</cite>';
|
148 |
+
if($show_desc) echo '<p class="srr-summary">' . $desc . '</p>';
|
149 |
+
echo '</div>';
|
150 |
+
// End display
|
151 |
+
|
152 |
+
$j++;
|
153 |
+
}
|
154 |
+
}
|
155 |
|
156 |
+
// Outer wrap end
|
157 |
+
echo "\n\n</div>
|
158 |
+
</div> \n\n" ;
|
|
|
159 |
|
|
|
|
|
160 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
}
|
162 |
|
163 |
+
class super_rss_reader_widget extends WP_Widget{
|
164 |
+
## Initialize
|
165 |
+
function super_rss_reader_widget(){
|
166 |
+
$widget_ops = array(
|
167 |
+
'classname' => 'widget_super_rss_reader',
|
168 |
+
'description' => "Enhanced RSS feed reader widget with advanced features."
|
169 |
+
);
|
170 |
+
|
171 |
+
$control_ops = array('width' => 430, 'height' => 500);
|
172 |
+
parent::WP_Widget('super_rss_reader', 'Super RSS Reader', $widget_ops, $control_ops);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
|
|
174 |
|
175 |
+
## Display the Widget
|
176 |
+
function widget($args, $instance){
|
177 |
+
extract($args);
|
178 |
+
if(empty($instance['title'])){
|
179 |
+
$title = '';
|
180 |
+
}else{
|
181 |
+
$title = $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
|
182 |
+
}
|
183 |
+
|
184 |
+
echo $before_widget . $title;
|
185 |
+
echo "\n" . '
|
186 |
+
<!-- Start - Super RSS Reader -->
|
187 |
+
<div class="super-rss-reader-widget">' . "\n";
|
188 |
+
|
189 |
+
srr_rss_parser($instance, $instance['urls']);
|
190 |
+
|
191 |
+
echo "\n" . '</div>
|
192 |
+
<!-- End - Super RSS Reader -->
|
193 |
+
' . "\n";
|
194 |
+
echo $after_widget;
|
195 |
}
|
196 |
|
197 |
+
## Save settings
|
198 |
+
function update($new_instance, $old_instance){
|
199 |
+
$instance = $old_instance;
|
200 |
+
$instance['title'] = stripslashes($new_instance['title']);
|
201 |
+
$instance['urls'] = stripslashes($new_instance['urls']);
|
202 |
+
|
203 |
+
$instance['count'] = intval($new_instance['count']);
|
204 |
+
$instance['show_date'] = intval($new_instance['show_date']);
|
205 |
+
$instance['show_desc'] = intval($new_instance['show_desc']);
|
206 |
+
$instance['show_author'] = intval($new_instance['show_author']);
|
207 |
+
$instance['strip_desc'] = intval($new_instance['strip_desc']);
|
208 |
+
|
209 |
+
$instance['color_style'] = stripslashes($new_instance['color_style']);
|
210 |
+
$instance['enable_ticker'] = intval($new_instance['enable_ticker']);
|
211 |
+
$instance['visible_items'] = intval($new_instance['visible_items']);
|
212 |
+
|
213 |
+
return $instance;
|
|
|
|
|
|
|
214 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
+
## HJA Widget form
|
217 |
+
function form($instance){
|
218 |
+
global $srr_color_styles;
|
219 |
+
|
220 |
+
$instance = wp_parse_args( (array) $instance, array(
|
221 |
+
'title' => '', 'urls' => '', 'count' => 5,
|
222 |
+
'show_date' => 0, 'show_desc' => 1, 'show_author' => 0,
|
223 |
+
'strip_desc' => 100, 'color_style' => 'none', 'enable_ticker' => 1,
|
224 |
+
'visible_items' => 5
|
225 |
+
));
|
226 |
+
|
227 |
+
$title = htmlspecialchars($instance['title']);
|
228 |
+
$urls = htmlspecialchars($instance['urls']);
|
229 |
+
|
230 |
+
$count = intval($instance['count']);
|
231 |
+
$show_date = intval($instance['show_date']);
|
232 |
+
$show_desc = intval($instance['show_desc']);
|
233 |
+
$show_author = intval($instance['show_author']);
|
234 |
+
$strip_desc = intval($instance['strip_desc']);
|
235 |
+
|
236 |
+
$color_style = stripslashes($instance['color_style']);
|
237 |
+
$enable_ticker = intval($instance['enable_ticker']);
|
238 |
+
$visible_items = intval($instance['visible_items']);
|
239 |
+
|
240 |
+
?>
|
241 |
+
<div class="srr_settings">
|
242 |
+
<table width="100%" height="72" border="0">
|
243 |
+
<tr>
|
244 |
+
<td width="13%" height="33"><label for="<?php echo $this->get_field_id('title'); ?>">Title: </label></td>
|
245 |
+
<td width="87%"><input id="<?php echo $this->get_field_id('title');?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat"/></td>
|
246 |
+
</tr>
|
247 |
+
<tr>
|
248 |
+
<td><label for="<?php echo $this->get_field_id('urls'); ?>">URLs: </label></td>
|
249 |
+
<td><input id="<?php echo $this->get_field_id('urls');?>" name="<?php echo $this->get_field_name('urls'); ?>" type="text" value="<?php echo $urls; ?>" class="widefat"/>
|
250 |
+
<small class="srr_smalltext">Can enter multiple RSS/atom feed URLs seperated by a comma.</small>
|
251 |
+
</td>
|
252 |
+
</tr>
|
253 |
+
</table>
|
254 |
+
</div>
|
255 |
+
|
256 |
+
<div class="srr_settings">
|
257 |
+
<h4>Settings</h4>
|
258 |
+
<table width="100%" border="0">
|
259 |
+
<tr>
|
260 |
+
<td width="7%" height="28"><input id="<?php echo $this->get_field_id('show_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_desc'); ?>" value="1" <?php echo $show_desc == "1" ? 'checked="checked"' : ""; ?> /></td>
|
261 |
+
<td width="40%"><label for="<?php echo $this->get_field_id('show_desc'); ?>">Show Description</label></td>
|
262 |
+
<td width="28%"><label for="<?php echo $this->get_field_id('count');?>">Count</label></td>
|
263 |
+
<td width="25%"><input id="<?php echo $this->get_field_id('count');?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo $count; ?>" class="widefat" title="No of feed items to parse"/></td>
|
264 |
+
</tr>
|
265 |
+
<tr>
|
266 |
+
<td height="32"><input id="<?php echo $this->get_field_id('show_date'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_date'); ?>" value="1" <?php echo $show_date == "1" ? 'checked="checked"' : ""; ?> /></td>
|
267 |
+
<td><label for="<?php echo $this->get_field_id('show_date'); ?>">Show Date</label></td>
|
268 |
+
<td><label for="<?php echo $this->get_field_id('strip_desc');?>">Strip description</label></td>
|
269 |
+
<td><input id="<?php echo $this->get_field_id('strip_desc');?>" name="<?php echo $this->get_field_name('strip_desc'); ?>" type="text" value="<?php echo $strip_desc; ?>" class="widefat" title="Use 0 to avoid striping the description of the feed"/>
|
270 |
+
</td>
|
271 |
+
</tr>
|
272 |
+
<tr>
|
273 |
+
<td height="29"><input id="<?php echo $this->get_field_id('show_author'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_author'); ?>" value="1" <?php echo $show_author == "1" ? 'checked="checked"' : ""; ?> /></td>
|
274 |
+
<td><label for="<?php echo $this->get_field_id('show_author'); ?>">Show Author</label></td>
|
275 |
+
<td> </td>
|
276 |
+
<td> </td>
|
277 |
+
</tr>
|
278 |
+
</table>
|
279 |
+
</div>
|
280 |
+
|
281 |
+
<div class="srr_settings">
|
282 |
+
<h4>Other settings</h4>
|
283 |
+
<table width="100%" height="109" border="0">
|
284 |
+
<tr>
|
285 |
+
<td height="32"><label>Color style: </label></td>
|
286 |
+
<td>
|
287 |
+
<?php
|
288 |
+
echo '<select name="' . $this->get_field_name('color_style') . '" id="' . $this->get_field_id('color_style') . '">';
|
289 |
+
foreach($srr_color_styles as $k => $v){
|
290 |
+
echo '<option value="' . $v . '" ' . ($color_style == $v ? 'selected="selected"' : "") . '>' . $k . '</option>';
|
291 |
+
}
|
292 |
+
echo '</select>';
|
293 |
+
?>
|
294 |
+
</td>
|
295 |
+
</tr>
|
296 |
+
<tr>
|
297 |
+
<td height="33"><label for="<?php echo $this->get_field_id('enable_ticker'); ?>">Ticker animation:</label> </td>
|
298 |
+
<td><input id="<?php echo $this->get_field_id('enable_ticker'); ?>" type="checkbox" name="<?php echo $this->get_field_name('enable_ticker'); ?>" value="1" <?php echo $enable_ticker == "1" ? 'checked="checked"' : ""; ?> /></td>
|
299 |
+
</tr>
|
300 |
+
<tr>
|
301 |
+
<td height="36"><label for="<?php echo $this->get_field_id('visible_items');?>">Visible items: </label></td>
|
302 |
+
<td><input id="<?php echo $this->get_field_id('visible_items');?>" name="<?php echo $this->get_field_name('visible_items'); ?>" type="text" value="<?php echo $visible_items; ?>" class="widefat" title="The no of feed items to be visible."/>
|
303 |
+
</td>
|
304 |
+
</tr>
|
305 |
+
</table>
|
306 |
+
</div>
|
307 |
+
|
308 |
+
<div class="srr_support"> <a href="http://facebook.com/aakashweb" class="srr_fblike" target="_blank">Like</a> | <a href="http://bit.ly/srrdonate" target="_blank" style="color: #FF6600" title="If you like this plugin, then just make a small donation and it will be helpful for the plugin's development.">Donate</a> | <a href="http://www.aakashweb.com/wordpress-plugins/super-rss-reader/" target="_blank">Support</a></div>
|
309 |
+
|
310 |
+
<?php
|
311 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
313 |
|
314 |
+
function super_rss_reader_init(){
|
315 |
+
register_widget('super_rss_reader_widget');
|
|
|
|
|
|
|
|
|
|
|
|
|
316 |
}
|
317 |
+
add_action('widgets_init', 'super_rss_reader_init');
|
318 |
+
|
319 |
+
function srr_widget_scripts(){
|
320 |
+
if(in_array($GLOBALS['pagenow'], array('widgets.php'))){
|
321 |
+
?>
|
322 |
+
<style type="text/css">
|
323 |
+
.srr_settings h4{
|
324 |
+
border-bottom: 1px solid #DFDFDF;
|
325 |
+
margin: 20px -11px 10px -11px;
|
326 |
+
padding: 5px 11px 5px 11px;
|
327 |
+
border-top: 1px solid #DFDFDF;
|
328 |
+
background-color: #fff;
|
329 |
+
background-image: -ms-linear-gradient(top,#fff,#f9f9f9);
|
330 |
+
background-image: -moz-linear-gradient(top,#fff,#f9f9f9);
|
331 |
+
background-image: -o-linear-gradient(top,#fff,#f9f9f9);
|
332 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#f9f9f9));
|
333 |
+
background-image: -webkit-linear-gradient(top,#fff,#f9f9f9);
|
334 |
+
background-image: linear-gradient(top,#fff,#f9f9f9);
|
335 |
+
}
|
336 |
+
.srr_support{
|
337 |
+
border: 1px solid #DFDFDF;
|
338 |
+
padding: 5px 13px;
|
339 |
+
background: #F9F9F9;
|
340 |
+
text-decoration:none;
|
341 |
+
margin: 10px -13px;
|
342 |
+
}
|
343 |
+
.srr_support a{
|
344 |
+
text-decoration: none;
|
345 |
+
}
|
346 |
+
.srr_support a:hover{
|
347 |
+
text-decoration: underline;
|
348 |
+
}
|
349 |
+
.srr_smalltext{
|
350 |
+
font-size: 11px;
|
351 |
+
color: #666666;
|
352 |
+
}
|
353 |
+
.srr_support{
|
354 |
+
border: 1px solid #DFDFDF;
|
355 |
+
padding: 5px 13px;
|
356 |
+
background: #F9F9F9;
|
357 |
+
text-decoration:none;
|
358 |
+
margin: 10px -13px;
|
359 |
+
}
|
360 |
+
.srr_support a{
|
361 |
+
text-decoration: none;
|
362 |
+
}
|
363 |
+
.srr_support a:hover{
|
364 |
+
text-decoration: underline;
|
365 |
+
}
|
366 |
+
.srr_fblike{
|
367 |
+
background: url('<?php echo SRR_URL; ?>images/like-button.png') no-repeat;
|
368 |
+
padding-left: 19px;
|
369 |
+
}
|
370 |
+
.srr_fblike span{
|
371 |
+
display: none;
|
372 |
+
}
|
373 |
+
.srr_fblike:hover span{
|
374 |
+
display: inline;
|
375 |
+
padding:10px;
|
376 |
+
margin: -15px 0px 0px -50px;
|
377 |
+
position:absolute;
|
378 |
+
background:#ffffff;
|
379 |
+
border:1px solid #cccccc;
|
380 |
+
-webkit-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
|
381 |
+
-moz-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
|
382 |
+
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
|
383 |
+
-moz-border-radius: 5px;
|
384 |
+
border-radius: 5px;
|
385 |
+
}
|
386 |
+
</style>
|
387 |
|
388 |
+
<script type="text/javascript">
|
389 |
+
jQuery(document).ready(function(){
|
390 |
+
var social = '<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Faakashweb&send=false&layout=button_count&width=75&show_faces=true&action=like&colorscheme=light&font&height=21&appId=106994469342299" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:75px; height:21px;" allowTransparency="true"></iframe>';
|
391 |
+
|
392 |
+
jQuery('.srr_fblike').live('mouseenter', function(){
|
393 |
+
if(jQuery('.srr_fblike span').length == 0)
|
394 |
+
jQuery(this).prepend('<span>' + social + '</span>');
|
395 |
+
});
|
396 |
+
|
397 |
+
});
|
398 |
+
</script>
|
399 |
|
400 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
}
|
403 |
+
add_action('admin_footer', 'srr_widget_scripts');
|
404 |
+
|
405 |
?>
|