Version Description
- NEW: Ability to set fixed height for the RSS widget.
- NEW: Using minified JavaScript on frontend.
- FIX: Cleaned widget UI, reordered options.
- FIX: Code refactoring.
Download this release
Release Info
Developer | vaakash |
Plugin | Super RSS Reader |
Version | 2.6 |
Comparing to | |
See all releases |
Code changes from version 2.5 to 2.6
- Thumbs.db +0 -0
- admin/css/style.css +55 -0
- admin/images/coffee.svg +99 -0
- admin/images/super-rss-reader-sm.png +0 -0
- admin/js/script.js +9 -0
- images/Thumbs.db +0 -0
- images/donate.png +0 -0
- images/index.html +0 -0
- images/like-button.png +0 -0
- public/{srr-css.css → css/style.css} +0 -0
- public/css/style.min.css +7 -0
- public/index.html +0 -0
- public/js/script.js +39 -0
- public/js/script.min.js +9 -0
- public/srr-js.js +0 -243
- readme.txt +31 -39
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- super-rss-reader.php +457 -503
Thumbs.db
ADDED
Binary file
|
admin/css/style.css
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.srr_settings h4{
|
2 |
+
border-bottom: 1px solid #DFDFDF;
|
3 |
+
margin: 15px 0;
|
4 |
+
padding: 0 0 10px 0;
|
5 |
+
}
|
6 |
+
.srr_settings label{
|
7 |
+
font-size: 12px;
|
8 |
+
}
|
9 |
+
.srr_settings td {
|
10 |
+
padding: 5px 0;
|
11 |
+
}
|
12 |
+
.srr_smalltext{
|
13 |
+
font-size: 11px;
|
14 |
+
color: #666666;
|
15 |
+
}
|
16 |
+
.srr_coffee {
|
17 |
+
border: 1px solid #4CAF50;
|
18 |
+
border-radius: 3px;
|
19 |
+
padding: 10px 200px 10px 60px;
|
20 |
+
background: url(../images/coffee.svg) 12px 10px no-repeat;
|
21 |
+
background-size: 7%;
|
22 |
+
position: relative;
|
23 |
+
margin: 20px 0px;
|
24 |
+
}
|
25 |
+
.srr_coffee p{
|
26 |
+
margin: 0;
|
27 |
+
font-size: 11px;
|
28 |
+
}
|
29 |
+
.srr_coffee_wrap{
|
30 |
+
position: absolute;
|
31 |
+
top: 12px;
|
32 |
+
right: 5px;
|
33 |
+
width: 200px;
|
34 |
+
}
|
35 |
+
.srr_coffee_wrap p{
|
36 |
+
display: inline-block;
|
37 |
+
}
|
38 |
+
.srr_coffee_btn{
|
39 |
+
height: 24px !important;
|
40 |
+
font-size: 12px !important;
|
41 |
+
vertical-align: middle !important;
|
42 |
+
}
|
43 |
+
.srr_note{
|
44 |
+
border: 1px solid #FFD893;
|
45 |
+
padding: 10px;
|
46 |
+
background: #FFFEDA;
|
47 |
+
margin: 10px 0 0;
|
48 |
+
display: block;
|
49 |
+
border-radius: 3px;
|
50 |
+
}
|
51 |
+
#available-widgets [id*="super_rss_reader"] .widget-title h3 {
|
52 |
+
background-image: url(../images/super-rss-reader-sm.png);
|
53 |
+
background-position: 94%;
|
54 |
+
background-repeat: no-repeat;
|
55 |
+
}
|
admin/images/coffee.svg
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<svg
|
3 |
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
4 |
+
xmlns:cc="http://creativecommons.org/ns#"
|
5 |
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
6 |
+
xmlns:svg="http://www.w3.org/2000/svg"
|
7 |
+
xmlns="http://www.w3.org/2000/svg"
|
8 |
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
9 |
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
10 |
+
height="128"
|
11 |
+
version="1.1"
|
12 |
+
viewBox="0 0 128 128"
|
13 |
+
width="128"
|
14 |
+
id="svg4495"
|
15 |
+
sodipodi:docname="1494109658_food-drink-cup-coffee-tea-drink-outline-stroke.svg"
|
16 |
+
inkscape:version="0.92.0 r15299">
|
17 |
+
<metadata
|
18 |
+
id="metadata4499">
|
19 |
+
<rdf:RDF>
|
20 |
+
<cc:Work
|
21 |
+
rdf:about="">
|
22 |
+
<dc:format>image/svg+xml</dc:format>
|
23 |
+
<dc:type
|
24 |
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
25 |
+
<dc:title></dc:title>
|
26 |
+
</cc:Work>
|
27 |
+
</rdf:RDF>
|
28 |
+
</metadata>
|
29 |
+
<sodipodi:namedview
|
30 |
+
pagecolor="#ffffff"
|
31 |
+
bordercolor="#666666"
|
32 |
+
borderopacity="1"
|
33 |
+
objecttolerance="10"
|
34 |
+
gridtolerance="10"
|
35 |
+
guidetolerance="10"
|
36 |
+
inkscape:pageopacity="0"
|
37 |
+
inkscape:pageshadow="2"
|
38 |
+
inkscape:window-width="1920"
|
39 |
+
inkscape:window-height="1013"
|
40 |
+
id="namedview4497"
|
41 |
+
showgrid="false"
|
42 |
+
inkscape:zoom="2.2265625"
|
43 |
+
inkscape:cx="60.701019"
|
44 |
+
inkscape:cy="100.20618"
|
45 |
+
inkscape:window-x="-9"
|
46 |
+
inkscape:window-y="-9"
|
47 |
+
inkscape:window-maximized="1"
|
48 |
+
inkscape:current-layer="Layer_2" />
|
49 |
+
<desc
|
50 |
+
id="desc4487" />
|
51 |
+
<defs
|
52 |
+
id="defs4489" />
|
53 |
+
<g
|
54 |
+
id="miu"
|
55 |
+
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
|
56 |
+
transform="matrix(5.5327011,0,0,5.5327011,-1.3569238,10.877533)">
|
57 |
+
<g
|
58 |
+
id="Artboard-1"
|
59 |
+
transform="translate(-503,-515)">
|
60 |
+
<g
|
61 |
+
id="slice"
|
62 |
+
transform="translate(215,119)" />
|
63 |
+
<path
|
64 |
+
d="m 521.02703,523.35506 c 0.009,-0.39125 0.004,-0.77169 -0.0131,-1.1361 C 521.00824,522.09555 521,521.50003 521,521.5 v 0 c 0,-1.28644 -2.85422,-2 -6.5,-2 -3.64578,0 -6.5,0.71356 -6.5,2 0,10e-6 -0.008,0.59555 -0.014,0.71896 -0.0659,1.41455 0.0458,3.07056 0.4816,4.66302 0.86614,3.1649 2.79873,5.11802 6.03238,5.11802 2.27915,0 3.91196,-0.97026 4.98059,-2.65121 2.90061,-0.0524 6.22639,-2.61697 5.22565,-4.88902 -0.40287,-0.91465 -1.1392,-1.36254 -2.05478,-1.39971 -0.50445,-0.0205 -1.02662,0.0826 -1.542,0.26513 -0.0281,0.01 -0.0556,0.0199 -0.0824,0.0299 z m -0.0645,1.11607 c -0.0739,0.79385 -0.21104,1.61037 -0.4301,2.41085 -0.138,0.50424 -0.30306,0.97772 -0.49615,1.41744 2.14097,-0.32376 4.32372,-2.145 3.75485,-3.43656 -0.24026,-0.54547 -0.62779,-0.7812 -1.18019,-0.80363 -0.35902,-0.0146 -0.76224,0.065 -1.16757,0.20859 -0.21942,0.0777 -0.38848,0.1545 -0.48084,0.20331 z m -0.9347,-1.83112 c 0.0265,1.23414 -0.094,2.64091 -0.45994,3.97801 C 518.80907,529.39062 517.21661,531 514.5,531 c -2.71661,0 -4.30907,-1.60938 -5.06784,-4.38198 -0.36593,-1.3371 -0.48646,-2.74387 -0.45994,-3.97801 1.13669,0.56058 3.16617,0.85999 5.52778,0.85999 2.36161,0 4.39109,-0.29941 5.52778,-0.85999 v 0 z M 509,521.5 c 0,-0.37041 2.51836,-1 5.5,-1 2.98164,0 5.5,0.62959 5.5,1 0,0.37041 -2.51836,1 -5.5,1 -2.98164,0 -5.5,-0.62959 -5.5,-1 z m -4.5,11.5 c 0,0 -0.5,0 -0.5,0.5 0,0.5 0.5,0.5 0.5,0.5 h 21 c 0,0 0.5,0 0.5,-0.5 0,-0.5 -0.5,-0.5 -0.5,-0.5 z"
|
65 |
+
id="food-drink-cup-coffee-tea-drink-outline-stroke"
|
66 |
+
inkscape:connector-curvature="0"
|
67 |
+
style="fill:#000000" />
|
68 |
+
</g>
|
69 |
+
</g>
|
70 |
+
<g
|
71 |
+
id="g4561"
|
72 |
+
transform="translate(180.23158,1.9807019)">
|
73 |
+
<g
|
74 |
+
id="Layer_2"
|
75 |
+
transform="translate(10.329825,-94.315789)">
|
76 |
+
<g
|
77 |
+
id="g4534"
|
78 |
+
transform="matrix(2.4713604,0,0,2.4713604,-210.98683,57.600819)">
|
79 |
+
<path
|
80 |
+
id="path4532"
|
81 |
+
d="m 33.114,51.204 v -1.315 c -0.927,-0.041 -1.827,-0.29 -2.353,-0.595 l 0.415,-1.619 c 0.582,0.318 1.398,0.608 2.297,0.608 0.789,0 1.329,-0.304 1.329,-0.857 0,-0.525 -0.443,-0.857 -1.467,-1.204 -1.481,-0.498 -2.491,-1.19 -2.491,-2.532 0,-1.219 0.858,-2.174 2.339,-2.464 V 39.91 h 1.356 v 1.219 c 0.927,0.041 1.55,0.235 2.007,0.457 l -0.401,1.563 c -0.36,-0.152 -0.997,-0.471 -1.993,-0.471 -0.899,0 -1.19,0.388 -1.19,0.774 0,0.457 0.484,0.748 1.661,1.191 1.647,0.58 2.311,1.342 2.311,2.588 0,1.231 -0.872,2.283 -2.463,2.561 v 1.411 h -1.357 z"
|
82 |
+
inkscape:connector-curvature="0"
|
83 |
+
style="fill:#92278f" />
|
84 |
+
</g>
|
85 |
+
<path
|
86 |
+
id="path4528-3"
|
87 |
+
d="m -133.27695,122.08016 c 4.05154,0 8.24277,-3.06272 8.24277,-8.18852 0,-2.81586 -1.89351,-4.22515 -3.41673,-5.35909 -1.48389,-1.10275 -2.32214,-1.7945 -2.32214,-3.18209 0,-1.45269 0.95218,-2.16073 2.50389,-3.19294 1.44184,-0.96032 3.23498,-2.15259 3.23498,-4.492359 0,-0.750083 -0.60765,-1.356389 -1.35638,-1.356389 -0.74873,0 -1.35639,0.606306 -1.35639,1.356389 0,0.802982 -0.61716,1.296708 -2.02508,2.232616 -1.56664,1.044423 -3.7138,2.471343 -3.7138,5.452683 0,2.81586 1.89351,4.22515 3.41674,5.35909 1.48389,1.10275 2.32214,1.79451 2.32214,3.18209 0,3.55645 -2.84841,5.47574 -5.53,5.47574 -0.74872,0 -1.35638,0.60631 -1.35638,1.35639 0,0.75009 0.60766,1.35639 1.35638,1.35639 z"
|
88 |
+
inkscape:connector-curvature="0"
|
89 |
+
style="fill:#ffcf06;fill-opacity:1;stroke-width:1.35638893" />
|
90 |
+
<path
|
91 |
+
id="path4530-4"
|
92 |
+
d="m -125.24305,122.08016 c 4.05153,0 8.24277,-3.06272 8.24277,-8.18852 0,-2.81586 -1.89352,-4.22515 -3.41675,-5.35909 -1.48389,-1.10275 -2.32214,-1.7945 -2.32214,-3.18209 0,-1.45269 0.95219,-2.16073 2.5039,-3.19294 1.44184,-0.96032 3.23499,-2.15259 3.23499,-4.492359 0,-0.750083 -0.60766,-1.356389 -1.35638,-1.356389 -0.74873,0 -1.3564,0.606306 -1.3564,1.356389 0,0.802982 -0.61716,1.296708 -2.02509,2.232616 -1.56662,1.044423 -3.71379,2.471343 -3.71379,5.452683 0,2.81586 1.89352,4.22515 3.41674,5.35909 1.48254,1.1041 2.32214,1.79451 2.32214,3.18209 0,3.55645 -2.84977,5.47574 -5.52999,5.47574 -0.74873,0 -1.3564,0.60631 -1.3564,1.35639 0,0.75009 0.60767,1.35639 1.3564,1.35639 z"
|
93 |
+
inkscape:connector-curvature="0"
|
94 |
+
style="fill:#ffcf06;fill-opacity:1;stroke-width:1.35638893" />
|
95 |
+
</g>
|
96 |
+
<g
|
97 |
+
id="Layer_3" />
|
98 |
+
</g>
|
99 |
+
</svg>
|
admin/images/super-rss-reader-sm.png
ADDED
Binary file
|
admin/js/script.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
$(document).ready(function(){
|
3 |
+
$(document).on('change', '.srr_coffee_amt', function(){
|
4 |
+
var $parent = $(this).closest('.srr_coffee_wrap');
|
5 |
+
var $btn = $parent.find('.srr_coffee_btn');
|
6 |
+
$btn.attr('href', $btn.data('link') + $(this).val());
|
7 |
+
});
|
8 |
+
});
|
9 |
+
}(jQuery))
|
images/Thumbs.db
DELETED
Binary file
|
images/donate.png
DELETED
Binary file
|
images/index.html
DELETED
File without changes
|
images/like-button.png
DELETED
Binary file
|
public/{srr-css.css → css/style.css}
RENAMED
File without changes
|
public/css/style.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Super RSS Reader - Styles file
|
3 |
+
* Author: Aakash Chakravarthy
|
4 |
+
* Version: 1.5
|
5 |
+
*
|
6 |
+
**/
|
7 |
+
.srr-tab-wrap{margin:5px 0 10px!important;background:none!important;border:none!important;padding:0!important}.srr-tab-wrap li{list-style:none!important;float:left;background-image:none!important;background-color:#fff;margin:5px 5px 0 0!important;padding:3px 10px!important;border-radius:3px;border:1px solid #ccc;cursor:pointer}.srr-active-tab{background:#333!important;color:white!important}.srr-wrap{padding:0!important;max-width:100%;min-width:100%!important}.srr-wrap div{left:0;right:0}.srr-wrap .srr-item{border-top:0;padding:10px}.srr-wrap .srr-item:last-child{margin:0}.srr-wrap .srr-item > *{margin-bottom:10px!important}.srr-wrap .srr-title,.srr-wrap .srr-meta{line-height:150%}.srr-wrap .srr-thumb{width:64px!important;margin:5px 10px 0 0!important;float:left!important}.srr-style-none .srr-item{padding:0 0 20px 0!important}.srr-style-grey{border:1px solid #dfdfdf}.srr-style-grey .srr-item{border-bottom:1px solid #dfdfdf}.srr-style-grey .even{background-color:#F8F8F8}.srr-style-dark{background:#000;border:1px solid #ccc;color:#DDD!important}.srr-style-dark a{color:#FFF!important}.srr-style-dark .srr-item{border-color:#333}.srr-style-dark .even{background:#333}.srr-tab-style-dark li{border-color:#666;background:#333;color:#FFF!important}.srr-tab-style-dark .srr-active-tab{background:#666!important}.srr-style-orange{border:2px solid #F90;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:inset 0 2px 6px 0 rgba(0,0,0,0.3);box-shadow:inset 0 2px 6px 0 rgba(0,0,0,0.3)}.srr-style-orange .srr-item{border-bottom:1px solid #F90}.srr-tab-style-orange li{border-color:#F90;background:#FFF8EC;color:#333!important}.srr-tab-style-orange .srr-active-tab{background:#F90!important;color:#FFF!important}.srr-style-smodern{border:0}.srr-style-smodern .srr-item{border-radius:10px;border:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s}.srr-style-smodern:hover .srr-item{opacity:0.3}.srr-style-smodern .srr-item:hover{opacity:1}.srr-tab-style-smodern .srr-active-tab{color:#000!important;background:#fff!important;box-shadow:inset 0 0 5px #747474}.srr-style-smodern .even{background:#f8f8f8}* html .srr-clearfix{height:1%;overflow:visible}*+html .srr-clearfix{min-height:1%}.srr-clearfix:after{clear:both;content:".";display:block;height:0;visibility:hidden;font-size:0}
|
public/index.html
DELETED
File without changes
|
public/js/script.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Super RSS Reader - v1.2
|
3 |
+
* Included with "Super RSS Reader" Wordpress plugin @since v2.0
|
4 |
+
* Author: Aakash Chakravarthy, www.aakashweb.com
|
5 |
+
*/
|
6 |
+
|
7 |
+
(function($){
|
8 |
+
$(document).ready(function(){
|
9 |
+
|
10 |
+
var widget = $('.super-rss-reader-widget');
|
11 |
+
widget.find('.srr-wrap').hide();
|
12 |
+
widget.find('.srr-wrap:first').show();
|
13 |
+
widget.find('.srr-tab-wrap li:first').addClass('srr-active-tab');
|
14 |
+
|
15 |
+
$('.srr-tab-wrap li').click(function(){
|
16 |
+
var id = $(this).attr('data-tab');
|
17 |
+
var parent = $(this).parent().parent();
|
18 |
+
|
19 |
+
$(this).parent().children('li').removeClass('srr-active-tab');
|
20 |
+
$(this).addClass('srr-active-tab');
|
21 |
+
|
22 |
+
parent.find('.srr-wrap').hide();
|
23 |
+
parent.find('.srr-wrap[data-id=' + id + ']').show();
|
24 |
+
});
|
25 |
+
|
26 |
+
// Add the ticker to the required elements
|
27 |
+
$('.srr-vticker').each(function(){
|
28 |
+
var visible = $(this).attr('data-visible');
|
29 |
+
var interval = $(this).attr('data-speed');
|
30 |
+
var height = (parseInt(visible) <= 20 ? 'auto' : visible );
|
31 |
+
var ticker = $(this).easyTicker({
|
32 |
+
'visible': visible,
|
33 |
+
'height': height,
|
34 |
+
'interval': interval
|
35 |
+
});
|
36 |
+
});
|
37 |
+
|
38 |
+
});
|
39 |
+
}(jQuery));
|
public/js/script.min.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Super RSS Reader - v1.2
|
3 |
+
* Included with "Super RSS Reader" Wordpress plugin @since v2.0
|
4 |
+
* Author: Aakash Chakravarthy, www.aakashweb.com
|
5 |
+
*/
|
6 |
+
!function(r){r(document).ready(function(){var a=r(".super-rss-reader-widget")
|
7 |
+
a.find(".srr-wrap").hide(),a.find(".srr-wrap:first").show(),a.find(".srr-tab-wrap li:first").addClass("srr-active-tab"),r(".srr-tab-wrap li").click(function(){var a=r(this).attr("data-tab"),t=r(this).parent().parent()
|
8 |
+
r(this).parent().children("li").removeClass("srr-active-tab"),r(this).addClass("srr-active-tab"),t.find(".srr-wrap").hide(),t.find(".srr-wrap[data-id="+a+"]").show()}),r(".srr-vticker").each(function(){var a=r(this).attr("data-visible"),t=r(this).attr("data-speed"),i=parseInt(a)<=20?"auto":a
|
9 |
+
r(this).easyTicker({visible:a,height:i,interval:t})})})}(jQuery)
|
public/srr-js.js
DELETED
@@ -1,243 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Super RSS Reader - v1.2
|
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 interval = jQuery(this).attr('data-speed');
|
29 |
-
var ticker = jQuery(this).easyTicker({
|
30 |
-
'visible': visible,
|
31 |
-
'interval': interval
|
32 |
-
});
|
33 |
-
});
|
34 |
-
});
|
35 |
-
|
36 |
-
/*
|
37 |
-
* jQuery - Easy Ticker plugin - v2.0
|
38 |
-
* http://www.aakashweb.com/
|
39 |
-
* Copyright 2014, Aakash Chakravarthy
|
40 |
-
* Released under the MIT License.
|
41 |
-
*/
|
42 |
-
|
43 |
-
;(function ( $, window, document, undefined ) {
|
44 |
-
|
45 |
-
var name = "easyTicker",
|
46 |
-
defaults = {
|
47 |
-
direction: 'up',
|
48 |
-
easing: 'swing',
|
49 |
-
speed: 'slow',
|
50 |
-
interval: 2000,
|
51 |
-
height: 'auto',
|
52 |
-
visible: 0,
|
53 |
-
mousePause: 1,
|
54 |
-
controls: {
|
55 |
-
up: '',
|
56 |
-
down: '',
|
57 |
-
toggle: '',
|
58 |
-
playText: 'Play',
|
59 |
-
stopText: 'Stop'
|
60 |
-
}
|
61 |
-
};
|
62 |
-
|
63 |
-
// Constructor
|
64 |
-
function EasyTicker( el, options ) {
|
65 |
-
|
66 |
-
var s = this;
|
67 |
-
|
68 |
-
s.opts = $.extend( {}, defaults, options );
|
69 |
-
s.elem = $(el);
|
70 |
-
s.targ = $(el).children(':first-child');
|
71 |
-
s.timer = 0;
|
72 |
-
s.mHover = 0;
|
73 |
-
s.winFocus = 1;
|
74 |
-
|
75 |
-
init();
|
76 |
-
start();
|
77 |
-
|
78 |
-
$([window, document]).off('focus.jqet').on('focus.jqet', function(){
|
79 |
-
s.winFocus = 1;
|
80 |
-
}).off('blur.jqet').on('blur.jqet', function(){
|
81 |
-
s.winFocus = 0;
|
82 |
-
});
|
83 |
-
|
84 |
-
if( s.opts.mousePause == 1 ){
|
85 |
-
s.elem.mouseenter(function(){
|
86 |
-
s.timerTemp = s.timer;
|
87 |
-
stop();
|
88 |
-
}).mouseleave(function(){
|
89 |
-
if( s.timerTemp !== 0 )
|
90 |
-
start();
|
91 |
-
});
|
92 |
-
}
|
93 |
-
|
94 |
-
$(s.opts.controls.up).on('click', function(e){
|
95 |
-
e.preventDefault();
|
96 |
-
moveDir('up');
|
97 |
-
});
|
98 |
-
|
99 |
-
$(s.opts.controls.down).on('click', function(e){
|
100 |
-
e.preventDefault();
|
101 |
-
moveDir('down');
|
102 |
-
});
|
103 |
-
|
104 |
-
$(s.opts.controls.toggle).on('click', function(e){
|
105 |
-
e.preventDefault();
|
106 |
-
if( s.timer == 0 ) start();
|
107 |
-
else stop();
|
108 |
-
});
|
109 |
-
|
110 |
-
function init(){
|
111 |
-
|
112 |
-
s.elem.children().css('margin', 0).children().css('margin', 0);
|
113 |
-
|
114 |
-
s.elem.css({
|
115 |
-
position : 'relative',
|
116 |
-
height: s.opts.height,
|
117 |
-
overflow : 'hidden'
|
118 |
-
});
|
119 |
-
|
120 |
-
s.targ.css({
|
121 |
-
'position' : 'absolute',
|
122 |
-
'margin' : 0
|
123 |
-
});
|
124 |
-
|
125 |
-
setInterval( function(){
|
126 |
-
adjHeight();
|
127 |
-
}, 100);
|
128 |
-
|
129 |
-
} // Init Method
|
130 |
-
|
131 |
-
function start(){
|
132 |
-
s.timer = setInterval(function(){
|
133 |
-
if( s.winFocus == 1 ){
|
134 |
-
move( s.opts.direction );
|
135 |
-
}
|
136 |
-
}, s.opts.interval);
|
137 |
-
|
138 |
-
$(s.opts.controls.toggle).addClass('et-run').html(s.opts.controls.stopText);
|
139 |
-
|
140 |
-
} // Start method
|
141 |
-
|
142 |
-
|
143 |
-
function stop(){
|
144 |
-
clearInterval( s.timer );
|
145 |
-
s.timer = 0;
|
146 |
-
$(s.opts.controls.toggle).removeClass('et-run').html(s.opts.controls.playText);
|
147 |
-
}// Stop
|
148 |
-
|
149 |
-
|
150 |
-
function move( dir ){
|
151 |
-
var sel, eq, appType;
|
152 |
-
|
153 |
-
if( !s.elem.is(':visible') ) return;
|
154 |
-
|
155 |
-
if( dir == 'up' ){
|
156 |
-
sel = ':first-child';
|
157 |
-
eq = '-=';
|
158 |
-
appType = 'appendTo';
|
159 |
-
}else{
|
160 |
-
sel = ':last-child';
|
161 |
-
eq = '+=';
|
162 |
-
appType = 'prependTo';
|
163 |
-
}
|
164 |
-
|
165 |
-
var selChild = s.targ.children(sel);
|
166 |
-
var height = selChild.outerHeight();
|
167 |
-
|
168 |
-
s.targ.stop(true, true).animate({
|
169 |
-
'top': eq + height + "px"
|
170 |
-
}, s.opts.speed, s.opts.easing, function(){
|
171 |
-
|
172 |
-
selChild.hide()[appType]( s.targ ).fadeIn();
|
173 |
-
s.targ.css('top', 0);
|
174 |
-
|
175 |
-
adjHeight();
|
176 |
-
|
177 |
-
});
|
178 |
-
}// Move
|
179 |
-
|
180 |
-
function moveDir( dir ){
|
181 |
-
stop();
|
182 |
-
if( dir == 'up' ) move('up'); else move('down');
|
183 |
-
// start();
|
184 |
-
}
|
185 |
-
|
186 |
-
function fullHeight(){
|
187 |
-
var height = 0;
|
188 |
-
var tempDisp = s.elem.css('display'); // Get the current el display value
|
189 |
-
|
190 |
-
s.elem.css('display', 'block');
|
191 |
-
|
192 |
-
s.targ.children().each(function(){
|
193 |
-
height += $(this).outerHeight();
|
194 |
-
});
|
195 |
-
|
196 |
-
s.elem.css({
|
197 |
-
'display' : tempDisp,
|
198 |
-
'height' : height
|
199 |
-
});
|
200 |
-
}
|
201 |
-
|
202 |
-
function visHeight( anim ){
|
203 |
-
var wrapHeight = 0;
|
204 |
-
s.targ.children(':lt(' + s.opts.visible + ')').each(function(){
|
205 |
-
wrapHeight += $(this).outerHeight();
|
206 |
-
});
|
207 |
-
|
208 |
-
if( anim == 1 ){
|
209 |
-
s.elem.stop(true, true).animate({height: wrapHeight}, s.opts.speed);
|
210 |
-
}else{
|
211 |
-
s.elem.css( 'height', wrapHeight);
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
function adjHeight(){
|
216 |
-
if( s.opts.height == 'auto' && s.opts.visible != 0 ){
|
217 |
-
anim = arguments.callee.caller.name == 'init' ? 0 : 1;
|
218 |
-
visHeight( anim );
|
219 |
-
}else if( s.opts.height == 'auto' ){
|
220 |
-
fullHeight();
|
221 |
-
}
|
222 |
-
}
|
223 |
-
|
224 |
-
return {
|
225 |
-
up: function(){ moveDir('up'); },
|
226 |
-
down: function(){ moveDir('down'); },
|
227 |
-
start: start,
|
228 |
-
stop: stop,
|
229 |
-
options: s.opts
|
230 |
-
};
|
231 |
-
|
232 |
-
}
|
233 |
-
|
234 |
-
// Attach the object to the DOM
|
235 |
-
$.fn[name] = function ( options ) {
|
236 |
-
return this.each(function () {
|
237 |
-
if (!$.data(this, name)) {
|
238 |
-
$.data(this, name, new EasyTicker( this, options ));
|
239 |
-
}
|
240 |
-
});
|
241 |
-
};
|
242 |
-
|
243 |
-
})( jQuery, window, document );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
=== Super RSS Reader ===
|
2 |
-
Contributors:
|
3 |
-
Author URI:
|
4 |
-
Plugin URI:
|
5 |
-
Tags: rss, feeds, widget,
|
6 |
License: GPLv2 or later
|
7 |
-
Donate Link:
|
8 |
Requires at least: 2.8
|
9 |
-
Tested up to:
|
10 |
-
Stable tag: 2.
|
11 |
|
12 |
-
An
|
13 |
|
14 |
== Description ==
|
15 |
|
@@ -17,38 +17,26 @@ Super RSS Reader is jQuery based RSS reader widget, which displays the RSS feeds
|
|
17 |
|
18 |
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.
|
19 |
|
20 |
-
[Check out the **LIVE DEMO** of the plugin](
|
21 |
-
|
22 |
-
= New features in v2.5 =
|
23 |
-
|
24 |
-
* Added option to change the title for individual tabs.
|
25 |
-
* Support for full or rich description.
|
26 |
-
* Revised feed ordering.
|
27 |
|
28 |
= Features =
|
29 |
|
30 |
-
* jQuery [news ticker like effect](
|
31 |
-
*
|
32 |
-
* **
|
33 |
-
*
|
34 |
-
*
|
35 |
-
* Add multiple RSS feeds in a page with a ticker effect.
|
36 |
* Supports RSS or atom feed.
|
37 |
* Can strip title and description text of the feed item.
|
38 |
-
* Can tweak the widget to change the no of visible feed itemas and more...
|
39 |
-
|
40 |
-
[youtube=http://www.youtube.com/watch?v=02aOG_-98Tg]
|
41 |
|
42 |
-
|
43 |
-
* The jQuery ticker effect is by the [jQuery easy ticker plugin](http://www.aakashweb.com/jquery-plugins/easy-ticker/)
|
44 |
|
45 |
= Resources =
|
46 |
|
47 |
-
* [
|
48 |
-
* [
|
49 |
-
* [
|
50 |
-
* [
|
51 |
-
* [Report Bugs](http://www.aakashweb.com/forum/)
|
52 |
|
53 |
== Installation ==
|
54 |
|
@@ -62,7 +50,7 @@ Download and upload the latest version of Super RSS Reader,
|
|
62 |
|
63 |
== Frequently Asked Questions ==
|
64 |
|
65 |
-
= How can I customize the RSS widget
|
66 |
|
67 |
You can use the `super-rss-reader-widget` class in your stylesheet to control the widget styling. Other classes are,
|
68 |
|
@@ -71,15 +59,15 @@ You can use the `super-rss-reader-widget` class in your stylesheet to control th
|
|
71 |
1. `srr-item.odd` - to control the odd feed items.
|
72 |
1. `srr-item.even` - to control the even feed items.
|
73 |
|
74 |
-
=
|
75 |
|
76 |
-
|
77 |
|
78 |
= How to create a tabbed mode or multiple feeds ? =
|
79 |
|
80 |
Just enter the RSS feed URLs seperated by comma in the widget, the plugin automatically renders the tab.
|
81 |
|
82 |
-
For more FAQs just check out the [official page](
|
83 |
|
84 |
== Screenshots ==
|
85 |
|
@@ -88,12 +76,16 @@ For more FAQs just check out the [official page](http://www.aakashweb.com/wordpr
|
|
88 |
1. Picture showing some possible ways of Customizing the widget.
|
89 |
1. The Super RSS Reader widget in the administration page.
|
90 |
|
91 |
-
[Live Working demo](
|
92 |
-
|
93 |
-
[More screenshots in Aakash Web](http://www.aakashweb.com/wordpress-plugins/super-rss-reader/)
|
94 |
|
95 |
== Changelog ==
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
= 2.5 =
|
98 |
* Added feature to change individual tab titles/names.
|
99 |
* Added feature to enable rich or full description.
|
@@ -139,5 +131,5 @@ Version 2.0 is a major and recommended upgrade for previous version users.
|
|
139 |
== Credits ==
|
140 |
|
141 |
* RSS feed reading engine is the inbuilt WordPress's engine
|
142 |
-
* The news ticker effect is powered by the [jQuery Easy ticker plugin](
|
143 |
* Default color styles are by Aakash Chakravarthy.
|
1 |
=== Super RSS Reader ===
|
2 |
+
Contributors: vaakash
|
3 |
+
Author URI: https://www.aakashweb.com/
|
4 |
+
Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
5 |
+
Tags: rss, feeds, widget, ticker, feed, twitter, admin, plugin, posts, page, thumbnail, atom, jquery
|
6 |
License: GPLv2 or later
|
7 |
+
Donate Link: https://www.paypal.me/vaakash
|
8 |
Requires at least: 2.8
|
9 |
+
Tested up to: 4.9
|
10 |
+
Stable tag: 2.6
|
11 |
|
12 |
+
An RSS widget plugin to display feeds with news ticker effect in multiple tabbed feeds, thumbnails, customizable color themes and more
|
13 |
|
14 |
== Description ==
|
15 |
|
17 |
|
18 |
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.
|
19 |
|
20 |
+
[Check out the **LIVE DEMO** of the plugin](https://www.aakashweb.com/demos/super-rss-reader/)
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
= Features =
|
23 |
|
24 |
+
* jQuery [news ticker like effect](https://www.aakashweb.com/jquery-plugins/easy-ticker/) to the RSS feeds (can turn off or on)
|
25 |
+
* Display feeds in **multiple tabs**
|
26 |
+
* Display **thumbnail** to the feed items if available.
|
27 |
+
* Select **color themes** for widget. Customizable via CSS.
|
28 |
+
* Customizable ticker speed.
|
|
|
29 |
* Supports RSS or atom feed.
|
30 |
* Can strip title and description text of the feed item.
|
|
|
|
|
|
|
31 |
|
32 |
+
[youtube=https://www.youtube.com/watch?v=02aOG_-98Tg]
|
|
|
33 |
|
34 |
= Resources =
|
35 |
|
36 |
+
* [Documentation](https://www.aakashweb.com/wordpress-plugins/super-rss-reader/)
|
37 |
+
* [FAQs](https://www.aakashweb.com/faqs/wordpress-plugins/super-rss-reader/)
|
38 |
+
* [Support](https://www.aakashweb.com/forum/)
|
39 |
+
* [Report Bugs](https://www.aakashweb.com/forum/)
|
|
|
40 |
|
41 |
== Installation ==
|
42 |
|
50 |
|
51 |
== Frequently Asked Questions ==
|
52 |
|
53 |
+
= How can I customize the RSS widget via CSS styles ? =
|
54 |
|
55 |
You can use the `super-rss-reader-widget` class in your stylesheet to control the widget styling. Other classes are,
|
56 |
|
59 |
1. `srr-item.odd` - to control the odd feed items.
|
60 |
1. `srr-item.even` - to control the even feed items.
|
61 |
|
62 |
+
= How big is the ticker library ? =
|
63 |
|
64 |
+
The size of the ticker library is only 2.74 KB.
|
65 |
|
66 |
= How to create a tabbed mode or multiple feeds ? =
|
67 |
|
68 |
Just enter the RSS feed URLs seperated by comma in the widget, the plugin automatically renders the tab.
|
69 |
|
70 |
+
For more FAQs just check out the [official page](https://www.aakashweb.com/wordpress-plugins/super-rss-reader/).
|
71 |
|
72 |
== Screenshots ==
|
73 |
|
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](https://www.aakashweb.com/demos/super-rss-reader/)
|
|
|
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 2.6 =
|
84 |
+
* NEW: Ability to set fixed height for the RSS widget.
|
85 |
+
* NEW: Using minified JavaScript on frontend.
|
86 |
+
* FIX: Cleaned widget UI, reordered options.
|
87 |
+
* FIX: Code refactoring.
|
88 |
+
|
89 |
= 2.5 =
|
90 |
* Added feature to change individual tab titles/names.
|
91 |
* Added feature to enable rich or full description.
|
131 |
== Credits ==
|
132 |
|
133 |
* RSS feed reading engine is the inbuilt WordPress's engine
|
134 |
+
* The news ticker effect is powered by the [jQuery Easy ticker plugin](https://www.aakashweb.com/jquery-plugins/easy-ticker/)
|
135 |
* Default color styles are by Aakash Chakravarthy.
|
screenshot-1.png
DELETED
Binary file
|
screenshot-2.png
DELETED
Binary file
|
screenshot-3.png
DELETED
Binary file
|
screenshot-4.png
DELETED
Binary file
|
super-rss-reader.php
CHANGED
@@ -1,528 +1,482 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Super RSS Reader
|
4 |
-
Plugin URI:
|
5 |
-
Author URI:
|
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 separated in tabs. <a href="
|
7 |
-
Author: Aakash Chakravarthy
|
8 |
-
Version: 2.
|
9 |
-
*/
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
}else{
|
14 |
-
$srr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
|
15 |
-
}
|
16 |
-
|
17 |
-
define('SRR_VERSION', '2.5');
|
18 |
-
define('SRR_AUTHOR', 'Aakash Chakravarthy');
|
19 |
-
define('SRR_URL', $srr_url);
|
20 |
|
21 |
-
|
22 |
function srr_public_scripts(){
|
23 |
-
|
24 |
-
wp_enqueue_script('jquery');
|
25 |
-
|
26 |
-
// Super RSS Reader JS and CSS
|
27 |
-
wp_register_script('super-rss-reader-js', SRR_URL . 'public/srr-js.js');
|
28 |
-
wp_enqueue_script(array('jquery', 'super-rss-reader-js'));
|
29 |
}
|
30 |
add_action('wp_enqueue_scripts', 'srr_public_scripts');
|
31 |
|
32 |
-
|
33 |
-
function
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
-
add_action('wp_enqueue_scripts', 'srr_public_styles');
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
function srr_rss_parser($instance){
|
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 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
|
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
236 |
}
|
237 |
|
238 |
class super_rss_reader_widget extends WP_Widget{
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
}
|
441 |
|
442 |
function super_rss_reader_init(){
|
443 |
-
|
444 |
}
|
445 |
add_action('widgets_init', 'super_rss_reader_init');
|
446 |
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
margin: 20px -11px 10px -11px;
|
454 |
-
padding: 5px 11px 5px 11px;
|
455 |
-
border-top: 1px solid #DFDFDF;
|
456 |
-
background-color: #fff;
|
457 |
-
background-image: -ms-linear-gradient(top,#fff,#f9f9f9);
|
458 |
-
background-image: -moz-linear-gradient(top,#fff,#f9f9f9);
|
459 |
-
background-image: -webkit-linear-gradient(top,#fff,#f9f9f9);
|
460 |
-
background-image: linear-gradient(top,#fff,#f9f9f9);
|
461 |
-
}
|
462 |
-
.srr_smalltext{
|
463 |
-
font-size: 11px;
|
464 |
-
color: #666666;
|
465 |
-
}
|
466 |
-
.srr_support{
|
467 |
-
border: 1px solid #DFDFDF;
|
468 |
-
padding: 10px 13px;
|
469 |
-
background: #F9F9F9;
|
470 |
-
text-decoration: none;
|
471 |
-
margin: 10px -13px;
|
472 |
-
}
|
473 |
-
.srr_support a{
|
474 |
-
text-decoration: none;
|
475 |
-
margin: 0 5px;
|
476 |
-
}
|
477 |
-
.srr_support a:hover{
|
478 |
-
text-decoration: underline;
|
479 |
-
}
|
480 |
-
.srr_donatebtn{
|
481 |
-
background: url('<?php echo SRR_URL; ?>images/donate.png') left center no-repeat;
|
482 |
-
color: #f60;
|
483 |
-
padding-left: 20px;
|
484 |
-
}
|
485 |
-
.srr_fblike{
|
486 |
-
background: url('<?php echo SRR_URL; ?>images/like-button.png') left center no-repeat;
|
487 |
-
padding-left: 19px;
|
488 |
-
}
|
489 |
-
.srr_fblike span{
|
490 |
-
display: none;
|
491 |
-
}
|
492 |
-
.srr_fblike:hover span{
|
493 |
-
display: inline;
|
494 |
-
padding:10px;
|
495 |
-
margin: -15px 0px 0px -50px;
|
496 |
-
position:absolute;
|
497 |
-
background:#ffffff;
|
498 |
-
border:1px solid #cccccc;
|
499 |
-
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
|
500 |
-
border-radius: 5px;
|
501 |
-
}
|
502 |
-
.srr_note{
|
503 |
-
border: 1px solid #FFD893;
|
504 |
-
padding: 5px;
|
505 |
-
background: #FFFEDA;
|
506 |
-
margin: 10px 0 0;
|
507 |
-
display: block;
|
508 |
-
}
|
509 |
-
</style>
|
510 |
-
|
511 |
-
<script type="text/javascript">
|
512 |
-
jQuery(document).ready(function(){
|
513 |
-
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:90px; height:21px;" allowTransparency="true"></iframe>';
|
514 |
-
|
515 |
-
jQuery('.srr_fblike').live('mouseenter', function(){
|
516 |
-
if(jQuery('.srr_fblike span').length == 0)
|
517 |
-
jQuery(this).prepend('<span>' + social + '</span>');
|
518 |
-
});
|
519 |
-
|
520 |
-
});
|
521 |
-
</script>
|
522 |
-
|
523 |
-
<?php
|
524 |
-
}
|
525 |
}
|
526 |
-
add_action('
|
527 |
|
528 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Plugin Name: Super RSS Reader
|
4 |
+
* Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
5 |
+
* Author URI: https://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 separated in tabs. <a href="https://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.6
|
9 |
+
*/
|
10 |
|
11 |
+
define('SRR_VERSION', '2.6');
|
12 |
+
define('SRR_URL', plugin_dir_url( __FILE__ ));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
+
// Include the required scripts & styles
|
15 |
function srr_public_scripts(){
|
16 |
+
wp_enqueue_script('jquery-easy-ticker-js', 'https://cdn.rawgit.com/vaakash/jquery-easy-ticker/92e6e76c/jquery.easy-ticker.min.js', array( 'jquery', 'super-rss-reader-js' ));
|
17 |
+
wp_enqueue_script('super-rss-reader-js', SRR_URL . 'public/js/script.min.js', array( 'jquery' ));
|
18 |
+
wp_enqueue_style('super-rss-reader-css', SRR_URL . 'public/css/style.min.css');
|
|
|
|
|
|
|
19 |
}
|
20 |
add_action('wp_enqueue_scripts', 'srr_public_scripts');
|
21 |
|
22 |
+
// Default color styles
|
23 |
+
function srr_color_styles(){
|
24 |
+
return array(
|
25 |
+
'No style' => 'none',
|
26 |
+
'Grey' => 'grey',
|
27 |
+
'Dark' => 'dark',
|
28 |
+
'Orange' => 'orange',
|
29 |
+
'Simple modern' => 'smodern'
|
30 |
+
);
|
31 |
}
|
|
|
32 |
|
33 |
+
function srr_defaults(){
|
34 |
+
return array(
|
35 |
+
'title' => '',
|
36 |
+
'urls' => '',
|
37 |
+
'tab_titles' => '',
|
38 |
+
'count' => 5,
|
39 |
+
'show_date' => 0,
|
40 |
+
'show_desc' => 1,
|
41 |
+
'show_author' => 0,
|
42 |
+
'show_thumb' => 1,
|
43 |
+
'open_newtab' => 1,
|
44 |
+
'strip_desc' => 100,
|
45 |
+
'read_more' => '[...]',
|
46 |
+
'rich_desc' => 0 ,
|
47 |
+
'color_style' => 'none',
|
48 |
+
'enable_ticker' => 1,
|
49 |
+
'visible_items' => 5,
|
50 |
+
'strip_title' => 0,
|
51 |
+
'ticker_speed' => 4,
|
52 |
+
);
|
53 |
+
}
|
54 |
|
55 |
+
// The main RSS Parser
|
56 |
function srr_rss_parser($instance){
|
57 |
+
|
58 |
+
$instance = wp_parse_args($instance, srr_defaults());
|
59 |
+
|
60 |
+
$urls = stripslashes($instance['urls']);
|
61 |
+
$tab_titles = stripslashes($instance['tab_titles']);
|
62 |
+
$count = intval($instance['count']);
|
63 |
+
|
64 |
+
$show_date = intval($instance['show_date']);
|
65 |
+
$show_desc = intval($instance['show_desc']);
|
66 |
+
$show_author = intval($instance['show_author']);
|
67 |
+
$show_thumb = stripslashes($instance['show_thumb']);
|
68 |
+
$open_newtab = intval($instance['open_newtab']);
|
69 |
+
$strip_desc = intval($instance['strip_desc']);
|
70 |
+
$strip_title = intval($instance['strip_title']);
|
71 |
+
$read_more = htmlspecialchars($instance['read_more']);
|
72 |
+
$rich_desc = intval($instance['rich_desc']);
|
73 |
+
|
74 |
+
$color_style = stripslashes($instance['color_style']);
|
75 |
+
$enable_ticker = intval($instance['enable_ticker']);
|
76 |
+
$visible_items = intval($instance['visible_items']);
|
77 |
+
$ticker_speed = intval($instance['ticker_speed']) * 1000;
|
78 |
+
|
79 |
+
if(empty($urls)){
|
80 |
+
return '';
|
81 |
+
}
|
82 |
+
|
83 |
+
$rand = array();
|
84 |
+
$url = explode(',', $urls);
|
85 |
+
$tab_title = explode(',', $tab_titles);
|
86 |
+
$ucount = count($url);
|
87 |
+
|
88 |
+
// Generate the Tabs
|
89 |
+
if($ucount > 1){
|
90 |
+
echo '<ul class="srr-tab-wrap srr-tab-style-' . $color_style . ' srr-clearfix">';
|
91 |
+
for( $i=0; $i < $ucount; $i++ ){
|
92 |
+
// Get the Feed URL
|
93 |
+
$feedUrl = trim( $url[$i] );
|
94 |
+
$rss = fetch_feed( $feedUrl );
|
95 |
+
$rand[$i] = rand(0, 999);
|
96 |
+
|
97 |
+
if (!is_wp_error($rss)){
|
98 |
+
|
99 |
+
if( isset( $tab_title[$i] ) && !empty( $tab_title[$i]) ){
|
100 |
+
$rss_title = $tab_title[$i];
|
101 |
+
}else{
|
102 |
+
$rss_title = esc_attr(strip_tags($rss->get_title()));
|
103 |
+
}
|
104 |
+
|
105 |
+
echo '<li data-tab="srr-tab-' . $rand[$i] . '">' . $rss_title . '</li>';
|
106 |
+
}else{
|
107 |
+
echo '<li data-tab="srr-tab-' . $rand[$i] . '">Error</li>';
|
108 |
+
}
|
109 |
+
|
110 |
+
}
|
111 |
+
echo '</ul>';
|
112 |
+
}
|
113 |
+
|
114 |
+
for($i=0; $i<$ucount; $i++){
|
115 |
+
// Get the Feed URL
|
116 |
+
$feedUrl = trim($url[$i]);
|
117 |
+
if(isset($url[$i])){
|
118 |
+
$rss = fetch_feed($feedUrl);
|
119 |
+
}else{
|
120 |
+
return '';
|
121 |
+
}
|
122 |
+
|
123 |
+
if( method_exists( $rss, 'enable_order_by_date' ) ){
|
124 |
+
$rss->enable_order_by_date(false);
|
125 |
+
}
|
126 |
+
|
127 |
+
// Check for feed errors
|
128 |
+
if (!is_wp_error( $rss ) ){
|
129 |
+
$maxitems = $rss->get_item_quantity($count);
|
130 |
+
$rss_items = $rss->get_items(0, $maxitems);
|
131 |
+
$rss_title = esc_attr(strip_tags($rss->get_title()));
|
132 |
+
$rss_desc = esc_attr(strip_tags($rss->get_description()));
|
133 |
+
}else{
|
134 |
+
echo '<div class="srr-wrap srr-style-' . $color_style .'" data-id="srr-tab-' . $rand[$i] . '"><p>RSS Error: ' . $rss->get_error_message() . '</p></div>';
|
135 |
+
continue;
|
136 |
+
}
|
137 |
+
|
138 |
+
$randAttr = isset($rand[$i]) ? ' data-id="srr-tab-' . $rand[$i] . '" ' : '';
|
139 |
+
|
140 |
+
// Outer Wrap start
|
141 |
+
echo '<div class="srr-wrap ' . (($enable_ticker == 1 ) ? 'srr-vticker' : '' ) . ' srr-style-' . $color_style . '" data-visible="' . $visible_items . '" data-speed="' . $ticker_speed . '"' . $randAttr . '><div>';
|
142 |
+
|
143 |
+
// Check feed items
|
144 |
+
if ($maxitems == 0){
|
145 |
+
echo '<div>No items.</div>';
|
146 |
+
}else{
|
147 |
+
$j=1;
|
148 |
+
// Loop through each feed item
|
149 |
+
foreach ($rss_items as $item){
|
150 |
+
// Get the link
|
151 |
+
$link = $item->get_link();
|
152 |
+
while ( stristr($link, 'http') != $link ){ $link = substr($link, 1); }
|
153 |
+
$link = esc_url(strip_tags($link));
|
154 |
+
|
155 |
+
// Get the item title
|
156 |
+
$title = esc_attr(strip_tags($item->get_title()));
|
157 |
+
if ( empty($title) )
|
158 |
+
$title = __('No Title');
|
159 |
+
|
160 |
+
if( $strip_title != 0 ){
|
161 |
+
$titleLen = strlen($title);
|
162 |
+
$title = wp_html_excerpt( $title, $strip_title );
|
163 |
+
$title = ($titleLen > $strip_title) ? $title . ' ...' : $title;
|
164 |
+
}
|
165 |
+
|
166 |
+
// Open links in new tab
|
167 |
+
$newtab = ($open_newtab) ? ' target="_blank"' : '';
|
168 |
+
|
169 |
+
// Get the date
|
170 |
+
$date = $item->get_date('j F Y');
|
171 |
+
|
172 |
+
// Get thumbnail if present @since v2.2
|
173 |
+
$thumb = '';
|
174 |
+
if ($show_thumb == 1 && $enclosure = $item->get_enclosure()){
|
175 |
+
$thumburl = $enclosure->get_thumbnail();
|
176 |
+
if(!empty($thumburl))
|
177 |
+
$thumb = '<img src="' . $thumburl . '" alt="' . $title . '" class="srr-thumb" align="left"/>';
|
178 |
+
}
|
179 |
+
|
180 |
+
// Get the description
|
181 |
+
$desc = '';
|
182 |
+
if( $rich_desc == 1 ){
|
183 |
+
|
184 |
+
$desc = strip_tags( str_replace( 'eval', '', $item->get_description() ) , '<p><a><img><em><strong><font><strike><s><u><i>');
|
185 |
|
186 |
+
}else{
|
187 |
+
$rmore = '';
|
188 |
+
$desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );
|
189 |
+
if($strip_desc != 0){
|
190 |
+
$desc = wp_html_excerpt( $desc, $strip_desc );
|
191 |
+
$rmore = (!empty($read_more)) ? '<a href="' . $link . '" title="Read more"' . $newtab . '>' . $read_more . '</a>' : '';
|
192 |
+
|
193 |
+
if ( '[...]' == substr( $desc, -5 ) )
|
194 |
+
$desc = substr( $desc, 0, -5 );
|
195 |
+
elseif ( '[…]' != substr( $desc, -10 ) )
|
196 |
+
$desc .= '';
|
197 |
+
|
198 |
+
$desc = esc_html( $desc );
|
199 |
+
}
|
200 |
+
|
201 |
+
$desc = $thumb . $desc . ' ' . $rmore;
|
202 |
+
|
203 |
+
}
|
204 |
+
|
205 |
+
// Get the author
|
206 |
+
$author = $item->get_author();
|
207 |
+
if ( is_object($author) ) {
|
208 |
+
$author = $author->get_name();
|
209 |
+
$author = esc_html(strip_tags($author));
|
210 |
+
}
|
211 |
+
|
212 |
+
echo "\n\n\t";
|
213 |
+
|
214 |
+
// Display the feed items
|
215 |
+
echo '<div class="srr-item ' . (($j%2 == 0) ? 'even' : 'odd') . '">';
|
216 |
+
echo '<div class="srr-title"><a href="' . $link . '"' . $newtab . ' title="Posted on ' . $date . '">' . $title . '</a></div>';
|
217 |
+
echo '<div class="srr-meta">';
|
218 |
+
|
219 |
+
if($show_date && !empty($date))
|
220 |
+
echo '<time class="srr-date">' . $date . '</time>';
|
221 |
+
|
222 |
+
if($show_author && !empty($author))
|
223 |
+
echo ' - <cite class="srr-author">' . $author . '</cite>';
|
224 |
+
|
225 |
+
echo '</div>';
|
226 |
+
|
227 |
+
if($show_desc)
|
228 |
+
echo '<p class="srr-summary srr-clearfix">' . $desc . '</p>';
|
229 |
+
|
230 |
+
echo '</div>';
|
231 |
+
// End display
|
232 |
+
|
233 |
+
$j++;
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
// Outer wrap end
|
238 |
+
echo "\n\n</div>
|
239 |
+
</div> \n\n" ;
|
240 |
+
|
241 |
+
if ( ! is_wp_error($rss) )
|
242 |
+
$rss->__destruct();
|
243 |
+
|
244 |
+
unset($rss);
|
245 |
+
|
246 |
+
}
|
247 |
}
|
248 |
|
249 |
class super_rss_reader_widget extends WP_Widget{
|
250 |
+
// Initialize
|
251 |
+
public function __construct(){
|
252 |
+
$widget_ops = array(
|
253 |
+
'classname' => 'widget_super_rss_reader',
|
254 |
+
'description' => 'Enhanced RSS feed reader widget with advanced features.'
|
255 |
+
);
|
256 |
+
|
257 |
+
$control_ops = array('width' => 500, 'height' => 500);
|
258 |
+
parent::__construct('super_rss_reader', 'Super RSS Reader', $widget_ops, $control_ops);
|
259 |
+
}
|
260 |
+
|
261 |
+
// Display the Widget
|
262 |
+
public function widget($args, $instance){
|
263 |
+
extract($args);
|
264 |
+
if(empty($instance['title'])){
|
265 |
+
$title = '';
|
266 |
+
}else{
|
267 |
+
$title = $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
|
268 |
+
}
|
269 |
+
|
270 |
+
echo $before_widget . $title;
|
271 |
+
echo "\n" . '
|
272 |
+
<!-- Start - Super RSS Reader v' . SRR_VERSION . '-->
|
273 |
+
<div class="super-rss-reader-widget">' . "\n";
|
274 |
+
|
275 |
+
srr_rss_parser($instance);
|
276 |
+
|
277 |
+
echo "\n" . '</div>
|
278 |
+
<!-- End - Super RSS Reader -->
|
279 |
+
' . "\n";
|
280 |
+
echo $after_widget;
|
281 |
+
}
|
282 |
+
|
283 |
+
// Save settings
|
284 |
+
public function update($new_instance, $old_instance){
|
285 |
+
$instance = $old_instance;
|
286 |
+
$instance['title'] = stripslashes($new_instance['title']);
|
287 |
+
$instance['urls'] = stripslashes($new_instance['urls']);
|
288 |
+
$instance['tab_titles'] = stripslashes($new_instance['tab_titles']);
|
289 |
+
|
290 |
+
$instance['count'] = intval($new_instance['count']);
|
291 |
+
$instance['show_date'] = intval($new_instance['show_date']);
|
292 |
+
$instance['show_desc'] = intval($new_instance['show_desc']);
|
293 |
+
$instance['show_author'] = intval($new_instance['show_author']);
|
294 |
+
$instance['show_thumb'] = stripslashes($new_instance['show_thumb']);
|
295 |
+
$instance['open_newtab'] = intval($new_instance['open_newtab']);
|
296 |
+
$instance['strip_desc'] = intval($new_instance['strip_desc']);
|
297 |
+
$instance['strip_title'] = intval($new_instance['strip_title']);
|
298 |
+
$instance['read_more'] = stripslashes($new_instance['read_more']);
|
299 |
+
$instance['rich_desc'] = stripslashes($new_instance['rich_desc']);
|
300 |
+
|
301 |
+
$instance['color_style'] = stripslashes($new_instance['color_style']);
|
302 |
+
$instance['enable_ticker'] = intval($new_instance['enable_ticker']);
|
303 |
+
$instance['visible_items'] = intval($new_instance['visible_items']);
|
304 |
+
$instance['ticker_speed'] = intval($new_instance['ticker_speed']);
|
305 |
+
|
306 |
+
return $instance;
|
307 |
+
}
|
308 |
+
|
309 |
+
// HJA Widget form
|
310 |
+
public function form($instance){
|
311 |
+
|
312 |
+
$instance = wp_parse_args((array) $instance, srr_defaults());
|
313 |
+
|
314 |
+
$title = htmlspecialchars($instance['title']);
|
315 |
+
$urls = htmlspecialchars($instance['urls']);
|
316 |
+
$tab_titles = htmlspecialchars($instance['tab_titles']);
|
317 |
+
|
318 |
+
$count = intval($instance['count']);
|
319 |
+
$show_date = intval($instance['show_date']);
|
320 |
+
$show_desc = intval($instance['show_desc']);
|
321 |
+
$show_author = intval($instance['show_author']);
|
322 |
+
$show_thumb = intval($instance['show_thumb']);
|
323 |
+
$open_newtab = intval($instance['open_newtab']);
|
324 |
+
$strip_desc = intval($instance['strip_desc']);
|
325 |
+
$strip_title = intval($instance['strip_title']);
|
326 |
+
$read_more = htmlspecialchars($instance['read_more']);
|
327 |
+
$rich_desc = htmlspecialchars($instance['rich_desc']);
|
328 |
+
|
329 |
+
$color_style = stripslashes($instance['color_style']);
|
330 |
+
$enable_ticker = intval($instance['enable_ticker']);
|
331 |
+
$visible_items = intval($instance['visible_items']);
|
332 |
+
$ticker_speed = intval($instance['ticker_speed']);
|
333 |
+
|
334 |
+
?>
|
335 |
+
<div class="srr_settings">
|
336 |
+
<table width="100%" height="72" border="0">
|
337 |
+
<tr>
|
338 |
+
<td width="13%" height="33"><label for="<?php echo $this->get_field_id('title'); ?>">Title: </label></td>
|
339 |
+
<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>
|
340 |
+
</tr>
|
341 |
+
<tr>
|
342 |
+
<td><label for="<?php echo $this->get_field_id('urls'); ?>">URLs: </label></td>
|
343 |
+
<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"/>
|
344 |
+
<small class="srr_smalltext">Can enter multiple RSS/atom feed URLs seperated by a comma.</small>
|
345 |
+
</td>
|
346 |
+
</tr>
|
347 |
+
|
348 |
+
<tr>
|
349 |
+
<td><label for="<?php echo $this->get_field_id('tab_titles'); ?>">Tab titles: </label></td>
|
350 |
+
<td><input id="<?php echo $this->get_field_id('tab_titles');?>" name="<?php echo $this->get_field_name('tab_titles'); ?>" type="text" value="<?php echo $tab_titles; ?>" class="widefat"/>
|
351 |
+
<small class="srr_smalltext">Enter corresponding tab titles seperated by a comma.</small>
|
352 |
+
</td>
|
353 |
+
</tr>
|
354 |
+
|
355 |
+
</table>
|
356 |
+
</div>
|
357 |
+
|
358 |
+
<div class="srr_settings">
|
359 |
+
<h4>Settings</h4>
|
360 |
+
<table width="100%" border="0">
|
361 |
+
<tr>
|
362 |
+
<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>
|
363 |
+
<td width="40%"><label for="<?php echo $this->get_field_id('show_desc'); ?>">Show Description</label></td>
|
364 |
+
<td width="28%"><label for="<?php echo $this->get_field_id('count');?>">Total items to show:</label></td>
|
365 |
+
<td width="25%"><input id="<?php echo $this->get_field_id('count');?>" name="<?php echo $this->get_field_name('count'); ?>" type="number" value="<?php echo $count; ?>" class="widefat" title="No of feed items to parse"/></td>
|
366 |
+
</tr>
|
367 |
+
<tr>
|
368 |
+
<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>
|
369 |
+
<td><label for="<?php echo $this->get_field_id('show_date'); ?>">Show Date</label></td>
|
370 |
+
<td><label for="<?php echo $this->get_field_id('strip_desc');?>">Strip description characters:</label></td>
|
371 |
+
<td><input id="<?php echo $this->get_field_id('strip_desc');?>" name="<?php echo $this->get_field_name('strip_desc'); ?>" type="number" value="<?php echo $strip_desc; ?>" class="widefat" title="The number of charaters to be displayed. Use 0 to disable stripping"/> </td>
|
372 |
+
</tr>
|
373 |
+
<tr>
|
374 |
+
<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>
|
375 |
+
<td><label for="<?php echo $this->get_field_id('show_author'); ?>">Show Author</label></td>
|
376 |
+
<td><label for="<?php echo $this->get_field_id('strip_title'); ?>">Strip title characters:</label></td>
|
377 |
+
<td><input id="<?php echo $this->get_field_id('strip_title');?>" name="<?php echo $this->get_field_name('strip_title'); ?>" type="number" value="<?php echo $strip_title; ?>" class="widefat" title="The number of charaters to be displayed. Use 0 to disable stripping"/></td>
|
378 |
+
</tr>
|
379 |
+
<tr>
|
380 |
+
<td height="29"><input id="<?php echo $this->get_field_id('open_newtab'); ?>" type="checkbox" name="<?php echo $this->get_field_name('open_newtab'); ?>" value="1" <?php echo $open_newtab == "1" ? 'checked="checked"' : ""; ?> /></td>
|
381 |
+
<td><label for="<?php echo $this->get_field_id('open_newtab'); ?>">Open links in new tab</label></td>
|
382 |
+
<td><label for="<?php echo $this->get_field_id('read_more'); ?>">Read more text:</label></td>
|
383 |
+
<td><input id="<?php echo $this->get_field_id('read_more'); ?>" name="<?php echo $this->get_field_name('read_more'); ?>" type="text" value="<?php echo $read_more; ?>" class="widefat" title="Leave blank to hide read more text"/></td>
|
384 |
+
</tr>
|
385 |
+
<tr>
|
386 |
+
<td height="29"><input id="<?php echo $this->get_field_id('show_thumb'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_thumb'); ?>" value="1" <?php echo $show_thumb == "1" ? 'checked="checked"' : ""; ?> /></td>
|
387 |
+
<td><label for="<?php echo $this->get_field_id('show_thumb'); ?>">Show thumbnail if present</label></td>
|
388 |
+
<td> </td>
|
389 |
+
<td> </td>
|
390 |
+
</tr>
|
391 |
+
|
392 |
+
<tr>
|
393 |
+
<td height="29"><input id="<?php echo $this->get_field_id('rich_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('rich_desc'); ?>" value="1" <?php echo $rich_desc == "1" ? 'checked="checked"' : ""; ?> /></td>
|
394 |
+
<td><label for="<?php echo $this->get_field_id('rich_desc'); ?>">Enable full or rich description</label></td>
|
395 |
+
<td> </td>
|
396 |
+
<td> </td>
|
397 |
+
</tr>
|
398 |
+
|
399 |
+
</table>
|
400 |
+
</div>
|
401 |
+
|
402 |
+
<?php if( $rich_desc == 1 ): ?>
|
403 |
+
<span class="srr_note">Note: You have enabled "Full/Rich HTML" Please make sure that the feed(s) are from trusted sources and do not contain any harmful scripts. If there are some aligment issues in the description, please use custom CSS to fix that. </span>
|
404 |
+
<?php endif; ?>
|
405 |
+
|
406 |
+
<div class="srr_settings">
|
407 |
+
<h4>Other settings</h4>
|
408 |
+
<table width="100%" height="109" border="0">
|
409 |
+
<tr>
|
410 |
+
<td height="32"><label for="<?php echo $this->get_field_id('color_style');?>">Color style: </label></td>
|
411 |
+
<td>
|
412 |
+
<?php
|
413 |
+
$color_styles = srr_color_styles();
|
414 |
+
echo '<select name="' . $this->get_field_name('color_style') . '" id="' . $this->get_field_id('color_style') . '">';
|
415 |
+
foreach($color_styles as $k => $v){
|
416 |
+
echo '<option value="' . $v . '" ' . ($color_style == $v ? 'selected="selected"' : "") . '>' . $k . '</option>';
|
417 |
+
}
|
418 |
+
echo '</select>';
|
419 |
+
?>
|
420 |
+
</td>
|
421 |
+
</tr>
|
422 |
+
<tr>
|
423 |
+
<td height="36"><label for="<?php echo $this->get_field_id('visible_items');?>">Widget height:</label></td>
|
424 |
+
<td><input id="<?php echo $this->get_field_id('visible_items');?>" name="<?php echo $this->get_field_name('visible_items'); ?>" type="number" value="<?php echo $visible_items; ?>" title="Height of the RSS feed."/><br/>
|
425 |
+
<small>Set value less than 20 to show visible feed items. Example: <b>5</b> items</small></br>
|
426 |
+
<small>Set value greater than 20 for fixed widget height. Example: <b>400</b> px</small></br>
|
427 |
+
</td>
|
428 |
+
</tr>
|
429 |
+
<tr>
|
430 |
+
<td height="33"><label for="<?php echo $this->get_field_id('enable_ticker'); ?>">Ticker animation:</label> </td>
|
431 |
+
<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>
|
432 |
+
</tr>
|
433 |
+
<tr>
|
434 |
+
<td height="36"><label for="<?php echo $this->get_field_id('ticker_speed');?>">Ticker speed: </label></td>
|
435 |
+
<td><input id="<?php echo $this->get_field_id('ticker_speed');?>" name="<?php echo $this->get_field_name('ticker_speed'); ?>" type="number" value="<?php echo $ticker_speed; ?>" title="Speed of the ticker in seconds"/> seconds
|
436 |
+
</td>
|
437 |
+
</tr>
|
438 |
+
</table>
|
439 |
+
</div>
|
440 |
+
|
441 |
+
<div class="srr_coffee">
|
442 |
+
<p>Thank you for using Super RSS Reader. If you found it useful, please buy me a coffee !</p>
|
443 |
+
<div class="srr_coffee_wrap">
|
444 |
+
<p><select class="srr_coffee_amt">
|
445 |
+
<option value="2">$2</option>
|
446 |
+
<option value="3">$3</option>
|
447 |
+
<option value="4">$4</option>
|
448 |
+
<option value="5" selected="selected">$5</option>
|
449 |
+
<option value="6">$6</option>
|
450 |
+
<option value="7">$7</option>
|
451 |
+
<option value="8">$8</option>
|
452 |
+
<option value="9">$9</option>
|
453 |
+
<option value="10">$10</option>
|
454 |
+
<option value="11">$11</option>
|
455 |
+
<option value="12">$12</option>
|
456 |
+
<option value="">Custom</option>
|
457 |
+
</select></p>
|
458 |
+
<a class="button button-primary srr_coffee_btn" href="https://www.paypal.me/vaakash/5" data-link="https://www.paypal.me/vaakash/" target="_blank">Buy me a coffee !</a>
|
459 |
+
</div>
|
460 |
+
</div>
|
461 |
+
|
462 |
+
<p><a href="https://goo.gl/PB1oR6" target="_blank">Report issue</a> | <a href="https://goo.gl/7gCKb8" target="_blank">Rate 5 stars & review</a> | v<?php echo SRR_VERSION; ?></p>
|
463 |
+
|
464 |
+
<?php
|
465 |
+
}
|
466 |
}
|
467 |
|
468 |
function super_rss_reader_init(){
|
469 |
+
register_widget('super_rss_reader_widget');
|
470 |
}
|
471 |
add_action('widgets_init', 'super_rss_reader_init');
|
472 |
|
473 |
+
|
474 |
+
function srr_admin_scripts( $hook ){
|
475 |
+
if( $hook == 'widgets.php' ){
|
476 |
+
wp_enqueue_style( 'srr_admin_css', SRR_URL . 'admin/css/style.css' );
|
477 |
+
wp_enqueue_script( 'srr_admin_js', SRR_URL . 'admin/js/script.js' );
|
478 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
}
|
480 |
+
add_action( 'admin_enqueue_scripts', 'srr_admin_scripts' );
|
481 |
|
482 |
?>
|