Version Description
- New feature: you can add your own css rules!
- Popup shortcode creator use the built-in wordpress style, fresher and lighter
- Fixed many bugs in shortcode [yasr_visitor_votes] : if you've had problem with a size that was not "large", try it now!
- Swiched color for all stars set: yellow by default, red only when is active
- Changed file name jquery.cookie.min.js in jquery-cookie.min.js, to avoid conflict with apache mod_security (thank's SubZeroD)
- Many code changes
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 0.4.6 |
Comparing to | |
See all releases |
Code changes from version 0.4.5 to 0.4.6
- css/bigstars.css +4 -5
- css/jquery-ui.min.css +0 -5
- css/rateit.css +4 -4
- css/yasr.css +9 -3
- img/jqueryui/animated-overlay.gif +0 -0
- img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- img/jqueryui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- img/jqueryui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- img/jqueryui/ui-bg_glass_75_dadada_1x400.png +0 -0
- img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- img/jqueryui/ui-icons_222222_256x240.png +0 -0
- img/jqueryui/ui-icons_2e83ff_256x240.png +0 -0
- img/jqueryui/ui-icons_454545_256x240.png +0 -0
- img/jqueryui/ui-icons_888888_256x240.png +0 -0
- img/jqueryui/ui-icons_cd0a0a_256x240.png +0 -0
- js/{jquery.cookie.min.js → jquery-cookie.min.js} +0 -0
- lib/yasr-ajax-functions.php +69 -10
- lib/yasr-functions.php +35 -18
- lib/yasr-settings-functions.php +56 -16
- lib/yasr-shortcode-functions.php +19 -15
- readme.txt +11 -3
- yasr-settings-page.php +45 -9
- yet-another-stars-rating.php +17 -2
css/bigstars.css
CHANGED
@@ -5,20 +5,19 @@ SOURCE: Oxygen Team
|
|
5 |
|
6 |
div.bigstars div.rateit-range
|
7 |
{
|
8 |
-
|
9 |
background: url('../img/star-white32.png');
|
10 |
height: 32px;
|
11 |
}
|
12 |
|
13 |
div.bigstars div.rateit-hover
|
14 |
{
|
15 |
-
background: url('../img/star-
|
16 |
height: 32px;
|
17 |
}
|
18 |
|
19 |
div.bigstars div.rateit-selected
|
20 |
{
|
21 |
-
background: url('../img/star-
|
22 |
height: 32px;
|
23 |
}
|
24 |
|
@@ -39,7 +38,7 @@ div.bigstars div.rateit-reset:hover
|
|
39 |
|
40 |
/***** Added by Dario Curvino ******/
|
41 |
|
42 |
-
/* Creating set 24px image with yellow color read only.
|
43 |
|
44 |
div.medium div.rateit-range
|
45 |
{
|
@@ -50,7 +49,7 @@ div.medium div.rateit-range
|
|
50 |
|
51 |
div.medium div.rateit-hover
|
52 |
{
|
53 |
-
background: url('../img/star-
|
54 |
}
|
55 |
|
56 |
div.medium div.rateit-selected
|
5 |
|
6 |
div.bigstars div.rateit-range
|
7 |
{
|
|
|
8 |
background: url('../img/star-white32.png');
|
9 |
height: 32px;
|
10 |
}
|
11 |
|
12 |
div.bigstars div.rateit-hover
|
13 |
{
|
14 |
+
background: url('../img/star-red32.png');
|
15 |
height: 32px;
|
16 |
}
|
17 |
|
18 |
div.bigstars div.rateit-selected
|
19 |
{
|
20 |
+
background: url('../img/star-gold32.png');
|
21 |
height: 32px;
|
22 |
}
|
23 |
|
38 |
|
39 |
/***** Added by Dario Curvino ******/
|
40 |
|
41 |
+
/* Creating set 24px image with yellow color read only. */
|
42 |
|
43 |
div.medium div.rateit-range
|
44 |
{
|
49 |
|
50 |
div.medium div.rateit-hover
|
51 |
{
|
52 |
+
background: url('../img/star-red24.png');
|
53 |
}
|
54 |
|
55 |
div.medium div.rateit-selected
|
css/jquery-ui.min.css
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/*! jQuery UI - v1.11.0 - 2014-07-11
|
2 |
-
* http://jqueryui.com
|
3 |
-
* Includes: core.css, draggable.css, resizable.css, button.css, dialog.css, theme.css
|
4 |
-
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
5 |
-
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default !important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("../img/jqueryui/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("../img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("../img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("../img/jqueryui/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("../img/jqueryui/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("../img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("../img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("../img/jqueryui/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("../img/jqueryui/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("../img/jqueryui/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("../img/jqueryui/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("../img/jqueryui/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("../img/jqueryui/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("../img/jqueryui/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
|
|
|
|
|
|
|
|
|
|
css/rateit.css
CHANGED
@@ -51,22 +51,22 @@
|
|
51 |
|
52 |
.rateit .rateit-hover
|
53 |
{
|
54 |
-
background: url('../img/star.png') left -
|
55 |
}
|
56 |
|
57 |
.rateit .rateit-hover-rtl
|
58 |
{
|
59 |
-
background-position: right -
|
60 |
}
|
61 |
|
62 |
.rateit .rateit-selected
|
63 |
{
|
64 |
-
background: url('../img/star.png') left -
|
65 |
}
|
66 |
|
67 |
.rateit .rateit-selected-rtl
|
68 |
{
|
69 |
-
background-position: right -
|
70 |
}
|
71 |
|
72 |
.rateit .rateit-preset
|
51 |
|
52 |
.rateit .rateit-hover
|
53 |
{
|
54 |
+
background: url('../img/star.png') left -16px;
|
55 |
}
|
56 |
|
57 |
.rateit .rateit-hover-rtl
|
58 |
{
|
59 |
+
background-position: right -16px;
|
60 |
}
|
61 |
|
62 |
.rateit .rateit-selected
|
63 |
{
|
64 |
+
background: url('../img/star.png') left -32px;
|
65 |
}
|
66 |
|
67 |
.rateit .rateit-selected-rtl
|
68 |
{
|
69 |
+
background-position: right -32px;
|
70 |
}
|
71 |
|
72 |
.rateit .rateit-preset
|
css/yasr.css
CHANGED
@@ -344,8 +344,14 @@
|
|
344 |
}
|
345 |
|
346 |
#yasr-custom-text-before-overall {
|
347 |
-
|
348 |
-
padding-
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
vertical-align: top;
|
350 |
}
|
351 |
|
@@ -354,7 +360,7 @@
|
|
354 |
}
|
355 |
|
356 |
#yasr-custom-text-before-visitor-rating {
|
357 |
-
display:
|
358 |
vertical-align: top;
|
359 |
padding-right: 15px;
|
360 |
}
|
344 |
}
|
345 |
|
346 |
#yasr-custom-text-before-overall {
|
347 |
+
display: block;
|
348 |
+
padding-right: 15px;
|
349 |
+
vertical-align: top;
|
350 |
+
}
|
351 |
+
|
352 |
+
#yasr-custom-text-before-visitor-rating {
|
353 |
+
display: block;
|
354 |
+
padding-right: 15px;
|
355 |
vertical-align: top;
|
356 |
}
|
357 |
|
360 |
}
|
361 |
|
362 |
#yasr-custom-text-before-visitor-rating {
|
363 |
+
display: block;
|
364 |
vertical-align: top;
|
365 |
padding-right: 15px;
|
366 |
}
|
img/jqueryui/animated-overlay.gif
DELETED
Binary file
|
img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png
DELETED
Binary file
|
img/jqueryui/ui-bg_flat_75_ffffff_40x100.png
DELETED
Binary file
|
img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png
DELETED
Binary file
|
img/jqueryui/ui-bg_glass_65_ffffff_1x400.png
DELETED
Binary file
|
img/jqueryui/ui-bg_glass_75_dadada_1x400.png
DELETED
Binary file
|
img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png
DELETED
Binary file
|
img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png
DELETED
Binary file
|
img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png
DELETED
Binary file
|
img/jqueryui/ui-icons_222222_256x240.png
DELETED
Binary file
|
img/jqueryui/ui-icons_2e83ff_256x240.png
DELETED
Binary file
|
img/jqueryui/ui-icons_454545_256x240.png
DELETED
Binary file
|
img/jqueryui/ui-icons_888888_256x240.png
DELETED
Binary file
|
img/jqueryui/ui-icons_cd0a0a_256x240.png
DELETED
Binary file
|
js/{jquery.cookie.min.js → jquery-cookie.min.js}
RENAMED
File without changes
|
lib/yasr-ajax-functions.php
CHANGED
@@ -906,6 +906,7 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
|
|
906 |
if(isset($_POST['rating']) && isset($_POST['post_id'])) {
|
907 |
$rating = $_POST['rating'];
|
908 |
$post_id = $_POST['post_id'];
|
|
|
909 |
$nonce_visitor = $_POST['nonce_visitor'];
|
910 |
}
|
911 |
else {
|
@@ -983,15 +984,59 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
|
|
983 |
if($row_exists_result) {
|
984 |
$total_rating = ($user_votes_sum / $number_of_votes);
|
985 |
$medium_rating=round ($total_rating, 1);
|
986 |
-
|
987 |
-
|
988 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
989 |
}
|
990 |
|
991 |
elseif ($new_row_result) {
|
992 |
-
|
993 |
-
|
994 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
995 |
}
|
996 |
|
997 |
die(); // this is required to return a proper result
|
@@ -1008,6 +1053,7 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
|
|
1008 |
if(isset($_POST['rating']) && isset($_POST['post_id']) && isset($_POST['votes']) && isset($_POST['votes_number'])) {
|
1009 |
$rating = $_POST['rating'];
|
1010 |
$post_id = $_POST['post_id'];
|
|
|
1011 |
$average_rating= $_POST['votes'];
|
1012 |
$number_of_votes = $_POST['votes_number'];
|
1013 |
}
|
@@ -1020,9 +1066,23 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
|
|
1020 |
|
1021 |
if( YASR_TEXT_BEFORE_STARS == 1 && YASR_CUSTOM_TEXT_USER_VOTED != '' ) {
|
1022 |
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1026 |
|
1027 |
}
|
1028 |
|
@@ -1041,7 +1101,6 @@ add_action( 'wp_ajax_yasr_change_log_page', 'yasr_change_log_page_callback' );
|
|
1041 |
} //End callback function
|
1042 |
|
1043 |
|
1044 |
-
/****** Order yasr_multi_chart ******/
|
1045 |
|
1046 |
/****** Order yasr_multi_chart ******/
|
1047 |
|
906 |
if(isset($_POST['rating']) && isset($_POST['post_id'])) {
|
907 |
$rating = $_POST['rating'];
|
908 |
$post_id = $_POST['post_id'];
|
909 |
+
$size = $_POST['size'];
|
910 |
$nonce_visitor = $_POST['nonce_visitor'];
|
911 |
}
|
912 |
else {
|
984 |
if($row_exists_result) {
|
985 |
$total_rating = ($user_votes_sum / $number_of_votes);
|
986 |
$medium_rating=round ($total_rating, 1);
|
987 |
+
|
988 |
+
if ($size == 'small') {
|
989 |
+
|
990 |
+
echo "<div class=\"rateit\" id=\"yasr_rateit_user_votes_voted\" data-rateit-value=\"$total_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
991 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
992 |
+
<strong>" . __("Vote Saved" , "yasr") . "</strong>";
|
993 |
+
|
994 |
+
}
|
995 |
+
|
996 |
+
elseif ($size == 'medium') {
|
997 |
+
|
998 |
+
echo "<div class=\"rateit medium\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$total_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
999 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
1000 |
+
<strong>" . __("Vote Saved" , "yasr") . "</strong>";
|
1001 |
+
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
elseif ($size == 'large' || $size =='' || ($size !='medium' && $size != 'small')) {
|
1005 |
+
|
1006 |
+
echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$total_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1007 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
1008 |
+
<strong>" . __("Vote Saved" , "yasr") . "</strong>";
|
1009 |
+
|
1010 |
+
}
|
1011 |
+
|
1012 |
}
|
1013 |
|
1014 |
elseif ($new_row_result) {
|
1015 |
+
|
1016 |
+
$number_of_votes = 1;
|
1017 |
+
|
1018 |
+
if ($size == 'small') {
|
1019 |
+
|
1020 |
+
echo "<div class=\"rateit\" id=\"yasr_rateit_user_votes_voted\" data-rateit-value=\"$rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1021 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average rating/5" , "yasr") . "]</span>
|
1022 |
+
<strong>". __("Vote Saved" , "yasr");
|
1023 |
+
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
if ($size == 'medium') {
|
1027 |
+
|
1028 |
+
echo "<div class=\"rateit medium\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1029 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average rating/5" , "yasr") . "]</span>
|
1030 |
+
<strong>". __("Vote Saved" , "yasr");
|
1031 |
+
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
elseif ($size == 'large' || $size =='' || ($size !='medium' && $size != 'small')) {
|
1035 |
+
echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1036 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average rating/5" , "yasr") . "]</span>
|
1037 |
+
<strong>". __("Vote Saved" , "yasr");
|
1038 |
+
}
|
1039 |
+
|
1040 |
}
|
1041 |
|
1042 |
die(); // this is required to return a proper result
|
1053 |
if(isset($_POST['rating']) && isset($_POST['post_id']) && isset($_POST['votes']) && isset($_POST['votes_number'])) {
|
1054 |
$rating = $_POST['rating'];
|
1055 |
$post_id = $_POST['post_id'];
|
1056 |
+
$size = $_POST['size'];
|
1057 |
$average_rating= $_POST['votes'];
|
1058 |
$number_of_votes = $_POST['votes_number'];
|
1059 |
}
|
1066 |
|
1067 |
if( YASR_TEXT_BEFORE_STARS == 1 && YASR_CUSTOM_TEXT_USER_VOTED != '' ) {
|
1068 |
|
1069 |
+
if ($size == 'small') {
|
1070 |
+
echo "<div class=\"rateit\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1071 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average $average_rating/5" , "yasr") . "]</span>
|
1072 |
+
<strong>" . YASR_CUSTOM_TEXT_USER_VOTED . " </strong>";
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
if ($size == 'medium') {
|
1076 |
+
echo "<div class=\"rateit medium\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1077 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average $average_rating/5" , "yasr") . "]</span>
|
1078 |
+
<strong>" . YASR_CUSTOM_TEXT_USER_VOTED . " </strong>";
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
elseif ($size == 'large' || $size =='' || ($size !='medium' && $size != 'small')) {
|
1082 |
+
echo "<div class=\"rateit bigstars\" id=\"yasr_rateit_user_votes_voted_ro\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$average_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1083 |
+
<span class=\"yasr-total-average-text\"> [" . __("Total: ", "yasr") . "$number_of_votes " . __("Average $average_rating/5" , "yasr") . "]</span>
|
1084 |
+
<strong>" . YASR_CUSTOM_TEXT_USER_VOTED . " </strong>";
|
1085 |
+
}
|
1086 |
|
1087 |
}
|
1088 |
|
1101 |
} //End callback function
|
1102 |
|
1103 |
|
|
|
1104 |
|
1105 |
/****** Order yasr_multi_chart ******/
|
1106 |
|
lib/yasr-functions.php
CHANGED
@@ -6,13 +6,13 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
6 |
/***** Adding javascript and css *****/
|
7 |
|
8 |
add_action( 'wp_enqueue_scripts', 'yasr_add_scripts' );
|
9 |
-
add_action( 'admin_enqueue_scripts', '
|
10 |
|
11 |
function yasr_add_scripts () {
|
|
|
12 |
wp_enqueue_style( 'rateitcss', YASR_CSS_DIR . 'rateit.css', FALSE, NULL, 'all' );
|
13 |
wp_enqueue_style( 'rateitbigstars', YASR_CSS_DIR . 'bigstars.css', array('rateitcss'), NULL, 'all' );
|
14 |
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', array('rateitcss'), NULL, 'all' );
|
15 |
-
wp_enqueue_style( 'jqueryui', YASR_CSS_DIR . 'jquery-ui.min.css', FALSE, NULL, 'all' );
|
16 |
|
17 |
|
18 |
//If choosen is light or not dark (force to be default)
|
@@ -24,11 +24,26 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
24 |
wp_enqueue_style( 'yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), NULL, 'all' );
|
25 |
}
|
26 |
|
27 |
-
|
|
|
|
|
|
|
28 |
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
|
29 |
-
wp_enqueue_script( 'cookie', YASR_JS_DIR . 'jquery
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
|
34 |
/****** Translating YASR ******/
|
@@ -273,8 +288,8 @@ function visitor_votes_auto_insert_code () {
|
|
273 |
global $current_user;
|
274 |
get_currentuserinfo();
|
275 |
|
276 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
277 |
-
|
278 |
|
279 |
}
|
280 |
|
@@ -284,12 +299,12 @@ function visitor_votes_auto_insert_code () {
|
|
284 |
$vote_if_user_already_rated = 0;
|
285 |
|
286 |
if ($votes_number>0) {
|
287 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
288 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ")</div>";
|
289 |
}
|
290 |
|
291 |
else {
|
292 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
293 |
</div><br /> " . __("No rating yet" , "yasr") . "</div>";
|
294 |
}
|
295 |
|
@@ -302,12 +317,12 @@ function visitor_votes_auto_insert_code () {
|
|
302 |
else {
|
303 |
|
304 |
if ($votes_number>0) {
|
305 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
306 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ")</div>";
|
307 |
}
|
308 |
|
309 |
else {
|
310 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
311 |
</div><br /> " . __("No rating yet" , "yasr") . "</div>";
|
312 |
}
|
313 |
|
@@ -330,7 +345,7 @@ function visitor_votes_auto_insert_code () {
|
|
330 |
global $current_user;
|
331 |
get_currentuserinfo();
|
332 |
|
333 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
334 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ") <br /><strong>" . __("User ") . "$current_user->user_login" . __(" has already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
|
335 |
|
336 |
}
|
@@ -338,12 +353,12 @@ function visitor_votes_auto_insert_code () {
|
|
338 |
else {
|
339 |
|
340 |
if ($votes_number>0) {
|
341 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
342 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ")</div>";
|
343 |
}
|
344 |
|
345 |
else {
|
346 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
347 |
</div><br /> " . __("No rating yet" , "yasr") . "</div>";
|
348 |
}
|
349 |
|
@@ -372,7 +387,7 @@ function visitor_votes_auto_insert_code () {
|
|
372 |
} // end if YASR_AUTO_INSERT_SIZE === 'small'
|
373 |
|
374 |
|
375 |
-
|
376 |
|
377 |
//if anonymous are allowed to vote
|
378 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
@@ -488,7 +503,7 @@ function visitor_votes_auto_insert_code () {
|
|
488 |
} // end if YASR_AUTO_INSERT_SIZE === 'medium'
|
489 |
|
490 |
|
491 |
-
|
492 |
|
493 |
//if anonymous are allowed to vote
|
494 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
@@ -607,7 +622,7 @@ function visitor_votes_auto_insert_code () {
|
|
607 |
if(YASR_TEXT_BEFORE_STARS == 1 && YASR_TEXT_BEFORE_VISITOR_RATING != '') {
|
608 |
|
609 |
$shortcode_html_tmp = "<div class=\"yasr-container-custom-text-and-visitor-rating\">
|
610 |
-
<
|
611 |
|
612 |
$shortcode_html = $shortcode_html_tmp;
|
613 |
|
@@ -627,11 +642,11 @@ function visitor_votes_auto_insert_code () {
|
|
627 |
logged_message_showed = true;
|
628 |
}
|
629 |
|
630 |
-
|
631 |
-
|
632 |
var tooltipvalues = ['bad', 'poor', 'ok', 'good', 'super'];
|
633 |
jQuery("#yasr_rateit_visitor_votes").bind('over', function (event, value) { jQuery(this).attr('title', tooltipvalues[value-1]); });
|
634 |
|
|
|
|
|
635 |
var postid = <?php the_ID(); ?>;
|
636 |
var cookiename = "yasr_visitor_vote_" + postid;
|
637 |
|
@@ -650,6 +665,7 @@ function visitor_votes_auto_insert_code () {
|
|
650 |
action: 'yasr_send_visitor_rating',
|
651 |
rating: value,
|
652 |
post_id: postid,
|
|
|
653 |
nonce_visitor: "<?php echo "$ajax_nonce_visitor"; ?>"
|
654 |
};
|
655 |
|
@@ -675,6 +691,7 @@ function visitor_votes_auto_insert_code () {
|
|
675 |
var data = {
|
676 |
action: 'yasr_readonly_visitor_shortcode',
|
677 |
rating: cookievote,
|
|
|
678 |
votes: <?php echo $medium_rating ?>,
|
679 |
votes_number: <?php echo $votes_number ?>,
|
680 |
post_id: postid
|
6 |
/***** Adding javascript and css *****/
|
7 |
|
8 |
add_action( 'wp_enqueue_scripts', 'yasr_add_scripts' );
|
9 |
+
add_action( 'admin_enqueue_scripts', 'yasr_add_admin_scripts' );
|
10 |
|
11 |
function yasr_add_scripts () {
|
12 |
+
|
13 |
wp_enqueue_style( 'rateitcss', YASR_CSS_DIR . 'rateit.css', FALSE, NULL, 'all' );
|
14 |
wp_enqueue_style( 'rateitbigstars', YASR_CSS_DIR . 'bigstars.css', array('rateitcss'), NULL, 'all' );
|
15 |
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', array('rateitcss'), NULL, 'all' );
|
|
|
16 |
|
17 |
|
18 |
//If choosen is light or not dark (force to be default)
|
24 |
wp_enqueue_style( 'yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), NULL, 'all' );
|
25 |
}
|
26 |
|
27 |
+
if (YASR_CUSTOM_CSS_RULES) {
|
28 |
+
wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
|
29 |
+
}
|
30 |
+
|
31 |
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
|
32 |
+
wp_enqueue_script( 'cookie', YASR_JS_DIR . 'jquery-cookie.min.js' , array('jquery', 'rateit'), '1.4.0', TRUE );
|
33 |
}
|
34 |
|
35 |
+
function yasr_add_admin_scripts () {
|
36 |
+
|
37 |
+
wp_enqueue_style( 'rateitcss', YASR_CSS_DIR . 'rateit.css', FALSE, NULL, 'all' );
|
38 |
+
wp_enqueue_style( 'rateitbigstars', YASR_CSS_DIR . 'bigstars.css', array('rateitcss'), NULL, 'all' );
|
39 |
+
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', array('rateitcss'), NULL, 'all' );
|
40 |
+
wp_enqueue_style( 'wp-jquery-ui-dialog' );
|
41 |
+
|
42 |
+
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
|
43 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
|
48 |
|
49 |
/****** Translating YASR ******/
|
288 |
global $current_user;
|
289 |
get_currentuserinfo();
|
290 |
|
291 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
292 |
+
<br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ") <br /><strong>" . __("User ") . "$current_user->user_login" . __(" has already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
|
293 |
|
294 |
}
|
295 |
|
299 |
$vote_if_user_already_rated = 0;
|
300 |
|
301 |
if ($votes_number>0) {
|
302 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
303 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ")</div>";
|
304 |
}
|
305 |
|
306 |
else {
|
307 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
308 |
</div><br /> " . __("No rating yet" , "yasr") . "</div>";
|
309 |
}
|
310 |
|
317 |
else {
|
318 |
|
319 |
if ($votes_number>0) {
|
320 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
321 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ")</div>";
|
322 |
}
|
323 |
|
324 |
else {
|
325 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
326 |
</div><br /> " . __("No rating yet" , "yasr") . "</div>";
|
327 |
}
|
328 |
|
345 |
global $current_user;
|
346 |
get_currentuserinfo();
|
347 |
|
348 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
349 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ") <br /><strong>" . __("User ") . "$current_user->user_login" . __(" has already voted this article with $vote_if_user_already_rated ", "yasr") . "</strong></div>";
|
350 |
|
351 |
}
|
353 |
else {
|
354 |
|
355 |
if ($votes_number>0) {
|
356 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
357 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ")</div>";
|
358 |
}
|
359 |
|
360 |
else {
|
361 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\">
|
362 |
</div><br /> " . __("No rating yet" , "yasr") . "</div>";
|
363 |
}
|
364 |
|
387 |
} // end if YASR_AUTO_INSERT_SIZE === 'small'
|
388 |
|
389 |
|
390 |
+
elseif (YASR_AUTO_INSERT_SIZE === 'medium') {
|
391 |
|
392 |
//if anonymous are allowed to vote
|
393 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
503 |
} // end if YASR_AUTO_INSERT_SIZE === 'medium'
|
504 |
|
505 |
|
506 |
+
elseif (YASR_AUTO_INSERT_SIZE === 'large') {
|
507 |
|
508 |
//if anonymous are allowed to vote
|
509 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
622 |
if(YASR_TEXT_BEFORE_STARS == 1 && YASR_TEXT_BEFORE_VISITOR_RATING != '') {
|
623 |
|
624 |
$shortcode_html_tmp = "<div class=\"yasr-container-custom-text-and-visitor-rating\">
|
625 |
+
<span id=\"yasr-custom-text-before-visitor-rating\">" . YASR_TEXT_BEFORE_VISITOR_RATING . "</span>" . $shortcode_html . "</div>";
|
626 |
|
627 |
$shortcode_html = $shortcode_html_tmp;
|
628 |
|
642 |
logged_message_showed = true;
|
643 |
}
|
644 |
|
|
|
|
|
645 |
var tooltipvalues = ['bad', 'poor', 'ok', 'good', 'super'];
|
646 |
jQuery("#yasr_rateit_visitor_votes").bind('over', function (event, value) { jQuery(this).attr('title', tooltipvalues[value-1]); });
|
647 |
|
648 |
+
var size = "<?php echo (YASR_AUTO_INSERT_SIZE) ; ?>";
|
649 |
+
|
650 |
var postid = <?php the_ID(); ?>;
|
651 |
var cookiename = "yasr_visitor_vote_" + postid;
|
652 |
|
665 |
action: 'yasr_send_visitor_rating',
|
666 |
rating: value,
|
667 |
post_id: postid,
|
668 |
+
size: size,
|
669 |
nonce_visitor: "<?php echo "$ajax_nonce_visitor"; ?>"
|
670 |
};
|
671 |
|
691 |
var data = {
|
692 |
action: 'yasr_readonly_visitor_shortcode',
|
693 |
rating: cookievote,
|
694 |
+
size: size,
|
695 |
votes: <?php echo $medium_rating ?>,
|
696 |
votes_number: <?php echo $votes_number ?>,
|
697 |
post_id: postid
|
lib/yasr-settings-functions.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
|
4 |
-
/****** Add
|
5 |
|
6 |
-
add_action( 'admin_init', '
|
7 |
|
8 |
-
function
|
9 |
register_setting(
|
10 |
'yasr_general_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
11 |
'yasr_general_options' //The name of an option to sanitize and save.
|
@@ -28,13 +28,13 @@
|
|
28 |
$option['custom_text_user_voted']='';
|
29 |
}
|
30 |
|
31 |
-
add_settings_section( 'yasr_general_options_section_id', __('General settings', 'yasr'), 'yasr_section_callback', '
|
32 |
-
add_settings_field( 'yasr_use_auto_insert_id', __('Auto insert options', 'yasr'), 'yasr_auto_insert_callback', '
|
33 |
-
add_settings_field( 'yasr_show_overall_in_loop', __('Show overall rating in Home Page?', 'yasr'), 'yasr_show_overall_in_loop_callback', '
|
34 |
-
add_settings_field( 'yasr_custom_text', __('Insert custom text to show before / after stars', 'yasr'), 'yasr_custom_text_callback', '
|
35 |
-
add_settings_field( 'yasr_color_scheme', __('Which color scheme do you want to use?', 'yasr') , 'yasr_color_scheme_callback', '
|
36 |
-
add_settings_field( 'yasr_allow_only_logged_in_id', __('Allow only logged in user to vote?', 'yasr'), 'yasr_allow_only_logged_in_callback', '
|
37 |
-
add_settings_field( 'yasr_choose_snippet_id', __('Which rich snippets do you want to use?', 'yasr'), 'yasr_choose_snippet_callback', '
|
38 |
|
39 |
}
|
40 |
|
@@ -56,13 +56,15 @@
|
|
56 |
|
57 |
|
58 |
<input type='radio' name='yasr_general_options[auto_insert_enabled]' value='0' id='yasr_auto_insert_radio_off'
|
59 |
-
<?php
|
|
|
60 |
echo " checked='checked' />";
|
61 |
-
echo ("
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
66 |
}
|
67 |
|
68 |
else {
|
@@ -1008,6 +1010,44 @@ function yasr_process_edit_multi_set_form() {
|
|
1008 |
} //End yasr_process_edit_multi_set_form() function
|
1009 |
|
1010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1011 |
/*************************BEGIN IMPORT FUNCTIONS*******************************/
|
1012 |
|
1013 |
/****** Check for previous GD STAR INSTALLATION *******/
|
1 |
<?php
|
2 |
|
3 |
|
4 |
+
/****** Add yasr general option ******/
|
5 |
|
6 |
+
add_action( 'admin_init', 'yasr_general_options_init' ); //This is for general options
|
7 |
|
8 |
+
function yasr_general_options_init() {
|
9 |
register_setting(
|
10 |
'yasr_general_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
11 |
'yasr_general_options' //The name of an option to sanitize and save.
|
28 |
$option['custom_text_user_voted']='';
|
29 |
}
|
30 |
|
31 |
+
add_settings_section( 'yasr_general_options_section_id', __('General settings', 'yasr'), 'yasr_section_callback', 'yasr_general_settings_tab' );
|
32 |
+
add_settings_field( 'yasr_use_auto_insert_id', __('Auto insert options', 'yasr'), 'yasr_auto_insert_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
33 |
+
add_settings_field( 'yasr_show_overall_in_loop', __('Show overall rating in Home Page?', 'yasr'), 'yasr_show_overall_in_loop_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
34 |
+
add_settings_field( 'yasr_custom_text', __('Insert custom text to show before / after stars', 'yasr'), 'yasr_custom_text_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
35 |
+
add_settings_field( 'yasr_color_scheme', __('Which color scheme do you want to use?', 'yasr') , 'yasr_color_scheme_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
36 |
+
add_settings_field( 'yasr_allow_only_logged_in_id', __('Allow only logged in user to vote?', 'yasr'), 'yasr_allow_only_logged_in_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
37 |
+
add_settings_field( 'yasr_choose_snippet_id', __('Which rich snippets do you want to use?', 'yasr'), 'yasr_choose_snippet_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
38 |
|
39 |
}
|
40 |
|
56 |
|
57 |
|
58 |
<input type='radio' name='yasr_general_options[auto_insert_enabled]' value='0' id='yasr_auto_insert_radio_off'
|
59 |
+
<?php
|
60 |
+
if ($option['auto_insert_enabled']==0) {
|
61 |
echo " checked='checked' />";
|
62 |
+
echo ("
|
63 |
+
<script>
|
64 |
+
jQuery( document ).ready(function() {
|
65 |
+
jQuery('.yasr_auto_insert_where_what_radio').prop('disabled', true);
|
66 |
+
});
|
67 |
+
</script>") ;
|
68 |
}
|
69 |
|
70 |
else {
|
1010 |
} //End yasr_process_edit_multi_set_form() function
|
1011 |
|
1012 |
|
1013 |
+
add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert options
|
1014 |
+
|
1015 |
+
function yasr_style_options_init() {
|
1016 |
+
register_setting(
|
1017 |
+
'yasr_style_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
1018 |
+
'yasr_style_options' //The name of an option to sanitize and save.
|
1019 |
+
);
|
1020 |
+
|
1021 |
+
$style_options = get_option( 'yasr_style_options' );
|
1022 |
+
|
1023 |
+
if (!$style_options) {
|
1024 |
+
|
1025 |
+
$style_options = array();
|
1026 |
+
$style_options['textarea'] = NULL;
|
1027 |
+
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yasr'), 'yasr_style_section_callback', 'yasr_style_tab' );
|
1031 |
+
add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yasr'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
|
1032 |
+
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
function yasr_style_section_callback () {
|
1036 |
+
_e("Please use text area below to write your own CSS styles to override the default ones.", "yasr");
|
1037 |
+
echo "<strong>";
|
1038 |
+
_e("Leave it blank if you don't know what you're doing", "yasr");
|
1039 |
+
echo "</strong>";
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
function yasr_style_options_textarea_callback ($style_options) {
|
1043 |
+
|
1044 |
+
echo ("
|
1045 |
+
<textarea rows=\"20\" cols=\"50\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
|
1046 |
+
");
|
1047 |
+
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
|
1051 |
/*************************BEGIN IMPORT FUNCTIONS*******************************/
|
1052 |
|
1053 |
/****** Check for previous GD STAR INSTALLATION *******/
|
lib/yasr-shortcode-functions.php
CHANGED
@@ -152,7 +152,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
152 |
//If user has already rated show readonly stars
|
153 |
if ($vote_if_user_already_rated) {
|
154 |
|
155 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
156 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
157 |
<strong><span class=\"yasr-visitor-shortcode-small-already-voted-text\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
|
158 |
|
@@ -164,12 +164,12 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
164 |
$vote_if_user_already_rated = 0;
|
165 |
|
166 |
if ($votes_number>0) {
|
167 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
168 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
169 |
}
|
170 |
|
171 |
else {
|
172 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
173 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
174 |
}
|
175 |
|
@@ -182,12 +182,12 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
182 |
else {
|
183 |
|
184 |
if ($votes_number>0) {
|
185 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
186 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
187 |
}
|
188 |
|
189 |
else {
|
190 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
191 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
192 |
}
|
193 |
|
@@ -196,7 +196,6 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
196 |
} //end if ($allow_logged_option['allowed_user']==='allow_anonymous') {
|
197 |
|
198 |
|
199 |
-
|
200 |
//If only logged in users can vote
|
201 |
elseif (YASR_ALLOWED_USER === 'logged_only') {
|
202 |
|
@@ -208,7 +207,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
208 |
|
209 |
if ($vote_if_user_already_rated) {
|
210 |
|
211 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
212 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
213 |
<strong><span=\"class=\"yasr-visitor-shortcode-small-already-voted-text\">\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
|
214 |
|
@@ -217,13 +216,13 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
217 |
else {
|
218 |
|
219 |
if ($votes_number>0) {
|
220 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
221 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
222 |
</div>";
|
223 |
}
|
224 |
|
225 |
else {
|
226 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
227 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
228 |
</div>";
|
229 |
}
|
@@ -237,13 +236,13 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
237 |
|
238 |
|
239 |
if ($votes_number>0) {
|
240 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
241 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
242 |
" . __("You must sign to vote", "yasr") . "</div>";
|
243 |
}
|
244 |
|
245 |
else {
|
246 |
-
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
247 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
248 |
</div>";
|
249 |
}
|
@@ -254,7 +253,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
254 |
|
255 |
} //End if $size == 'small'
|
256 |
|
257 |
-
|
258 |
|
259 |
//if anonymous are allowed to vote
|
260 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
@@ -370,7 +369,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
370 |
|
371 |
} //End if $size == 'medium'
|
372 |
|
373 |
-
|
374 |
|
375 |
//if anonymous are allowed to vote
|
376 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
@@ -489,7 +488,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
489 |
if(YASR_TEXT_BEFORE_STARS == 1 && YASR_TEXT_BEFORE_VISITOR_RATING != '') {
|
490 |
|
491 |
$shortcode_html_tmp = "<div class=\"yasr-container-custom-text-and-visitor-rating\">
|
492 |
-
<
|
493 |
|
494 |
$shortcode_html = $shortcode_html_tmp;
|
495 |
|
@@ -517,6 +516,8 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
517 |
var postid = <?php the_ID(); ?>;
|
518 |
var cookiename = "yasr_visitor_vote_" + postid;
|
519 |
|
|
|
|
|
520 |
//If there is not cookie allow visitor to vote
|
521 |
if (!jQuery.cookie(cookiename)) {
|
522 |
|
@@ -532,11 +533,13 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
532 |
action: 'yasr_send_visitor_rating',
|
533 |
rating: value,
|
534 |
post_id: postid,
|
|
|
535 |
nonce_visitor: "<?php echo "$ajax_nonce_visitor"; ?>"
|
536 |
};
|
537 |
|
538 |
//Send value to the Server
|
539 |
jQuery.post(ajaxurl, data, function(response) {
|
|
|
540 |
jQuery('#yasr_visitor_votes').html(response);
|
541 |
jQuery('.rateit').rateit();
|
542 |
//Create a cookie to disable double vote
|
@@ -548,7 +551,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
548 |
//Else user cannot vote
|
549 |
else {
|
550 |
|
551 |
-
//if php read only stars are not be
|
552 |
if (!logged_message_showed) {
|
553 |
|
554 |
var cookievote=jQuery.cookie(cookiename);
|
@@ -556,6 +559,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
556 |
|
557 |
var data = {
|
558 |
action: 'yasr_readonly_visitor_shortcode',
|
|
|
559 |
rating: cookievote,
|
560 |
votes: <?php echo $medium_rating ?>,
|
561 |
votes_number: <?php echo $votes_number ?>,
|
152 |
//If user has already rated show readonly stars
|
153 |
if ($vote_if_user_already_rated) {
|
154 |
|
155 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
156 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
157 |
<strong><span class=\"yasr-visitor-shortcode-small-already-voted-text\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
|
158 |
|
164 |
$vote_if_user_already_rated = 0;
|
165 |
|
166 |
if ($votes_number>0) {
|
167 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
168 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
169 |
}
|
170 |
|
171 |
else {
|
172 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
173 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
174 |
}
|
175 |
|
182 |
else {
|
183 |
|
184 |
if ($votes_number>0) {
|
185 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
186 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
187 |
}
|
188 |
|
189 |
else {
|
190 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
191 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span></div>";
|
192 |
}
|
193 |
|
196 |
} //end if ($allow_logged_option['allowed_user']==='allow_anonymous') {
|
197 |
|
198 |
|
|
|
199 |
//If only logged in users can vote
|
200 |
elseif (YASR_ALLOWED_USER === 'logged_only') {
|
201 |
|
207 |
|
208 |
if ($vote_if_user_already_rated) {
|
209 |
|
210 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes_logged_rated\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
211 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
212 |
<strong><span=\"class=\"yasr-visitor-shortcode-small-already-voted-text\">\">" . __("You've already voted this article with $vote_if_user_already_rated ", "yasr") . "</span></strong></div>";
|
213 |
|
216 |
else {
|
217 |
|
218 |
if ($votes_number>0) {
|
219 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
220 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
221 |
</div>";
|
222 |
}
|
223 |
|
224 |
else {
|
225 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
226 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
227 |
</div>";
|
228 |
}
|
236 |
|
237 |
|
238 |
if ($votes_number>0) {
|
239 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
240 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
241 |
" . __("You must sign to vote", "yasr") . "</div>";
|
242 |
}
|
243 |
|
244 |
else {
|
245 |
+
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"16\" data-rateit-starheight=\"16\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
246 |
<span class=\"yasr-total-average-text-small\"> [" . __("Total: ", "yasr") . "$votes_number " . __("Average $medium_rating/5" , "yasr") . "]</span>
|
247 |
</div>";
|
248 |
}
|
253 |
|
254 |
} //End if $size == 'small'
|
255 |
|
256 |
+
elseif ($size == 'medium') {
|
257 |
|
258 |
//if anonymous are allowed to vote
|
259 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
369 |
|
370 |
} //End if $size == 'medium'
|
371 |
|
372 |
+
elseif ($size == 'large') {
|
373 |
|
374 |
//if anonymous are allowed to vote
|
375 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
488 |
if(YASR_TEXT_BEFORE_STARS == 1 && YASR_TEXT_BEFORE_VISITOR_RATING != '') {
|
489 |
|
490 |
$shortcode_html_tmp = "<div class=\"yasr-container-custom-text-and-visitor-rating\">
|
491 |
+
<span id=\"yasr-custom-text-before-visitor-rating\">" . YASR_TEXT_BEFORE_VISITOR_RATING . "</span>" . $shortcode_html . "</div>";
|
492 |
|
493 |
$shortcode_html = $shortcode_html_tmp;
|
494 |
|
516 |
var postid = <?php the_ID(); ?>;
|
517 |
var cookiename = "yasr_visitor_vote_" + postid;
|
518 |
|
519 |
+
var size = "<?php echo $size ?>";
|
520 |
+
|
521 |
//If there is not cookie allow visitor to vote
|
522 |
if (!jQuery.cookie(cookiename)) {
|
523 |
|
533 |
action: 'yasr_send_visitor_rating',
|
534 |
rating: value,
|
535 |
post_id: postid,
|
536 |
+
size: size,
|
537 |
nonce_visitor: "<?php echo "$ajax_nonce_visitor"; ?>"
|
538 |
};
|
539 |
|
540 |
//Send value to the Server
|
541 |
jQuery.post(ajaxurl, data, function(response) {
|
542 |
+
//response
|
543 |
jQuery('#yasr_visitor_votes').html(response);
|
544 |
jQuery('.rateit').rateit();
|
545 |
//Create a cookie to disable double vote
|
551 |
//Else user cannot vote
|
552 |
else {
|
553 |
|
554 |
+
//if php read only stars are not be showed echo readonly stars from cookie
|
555 |
if (!logged_message_showed) {
|
556 |
|
557 |
var cookievote=jQuery.cookie(cookiename);
|
559 |
|
560 |
var data = {
|
561 |
action: 'yasr_readonly_visitor_shortcode',
|
562 |
+
size: size,
|
563 |
rating: cookievote,
|
564 |
votes: <?php echo $medium_rating ?>,
|
565 |
votes_number: <?php echo $votes_number ?>,
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Yasr - Yet Another Stars Rating ===
|
2 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC
|
3 |
-
Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post rating, posts, rate, rating, rating platform, rating system, ratings, review, reviews, rich snippets, seo, star, star rating, stars, vote, Votes, voting, voting contest,
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.9.1
|
6 |
-
Stable tag: 0.4.
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -79,6 +79,14 @@ Of course not: you can easily add it on the visual editor just by clicking on th
|
|
79 |
|
80 |
== Changelog ==
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
= 0.4.5 =
|
83 |
* New feature: Added custom post type support!
|
84 |
* Some fixes while editing / updating a multi-set
|
@@ -102,7 +110,7 @@ Of course not: you can easily add it on the visual editor just by clicking on th
|
|
102 |
* Fixed typo errors
|
103 |
|
104 |
= 0.4.0 =
|
105 |
-
* Popup shortcode
|
106 |
* Minor changes and bugfixes
|
107 |
|
108 |
= 0.3.9 =
|
1 |
=== Yasr - Yet Another Stars Rating ===
|
2 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC
|
3 |
+
Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post rating, posts, rate, rating, rating platform, rating system, ratings, review, reviews, rich snippets, seo, star, star rating, stars, vote, Votes, voting, voting contest, schema, serp
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.9.1
|
6 |
+
Stable tag: 0.4.6
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
79 |
|
80 |
== Changelog ==
|
81 |
|
82 |
+
= 0.4.6 =
|
83 |
+
* New feature: you can add your own css rules!
|
84 |
+
* Popup shortcode creator use the built-in wordpress style, fresher and lighter
|
85 |
+
* Fixed many bugs in shortcode [yasr_visitor_votes] : if you've had problem with a size that was not "large", try it now!
|
86 |
+
* Swiched color for all stars set: yellow by default, red only when is active
|
87 |
+
* Changed file name jquery.cookie.min.js in jquery-cookie.min.js, to avoid conflict with apache mod_security (thank's SubZeroD)
|
88 |
+
* Many code changes
|
89 |
+
|
90 |
= 0.4.5 =
|
91 |
* New feature: Added custom post type support!
|
92 |
* Some fixes while editing / updating a multi-set
|
110 |
* Fixed typo errors
|
111 |
|
112 |
= 0.4.0 =
|
113 |
+
* Popup shortcode creator it's now tabbed and got a link to the new doc
|
114 |
* Minor changes and bugfixes
|
115 |
|
116 |
= 0.3.9 =
|
yasr-settings-page.php
CHANGED
@@ -53,23 +53,24 @@ if ( !current_user_can( 'manage_options' ) ) {
|
|
53 |
?>
|
54 |
|
55 |
<h2 class="nav-tab-wrapper yasr-no-underline">
|
56 |
-
<a href="?page=yasr_settings_page&tab=general_settings" class="nav-tab <?php if ($active_tab == 'general_settings') echo 'nav-tab-active'; ?>" > General Settings </a>
|
57 |
<a href="?page=yasr_settings_page&tab=manage_multi" class="nav-tab <?php if ($active_tab == 'manage_multi') echo 'nav-tab-active'; ?>" > Multi Sets </a>
|
|
|
58 |
</h2>
|
59 |
|
60 |
|
61 |
|
62 |
<?php
|
63 |
|
64 |
-
if ($active_tab == 'general_settings') {
|
65 |
|
66 |
-
|
67 |
|
68 |
<div class="yasr-settingsdiv">
|
69 |
<form action="options.php" method="post" id="yasr_settings_form">
|
70 |
<?php
|
71 |
settings_fields( 'yasr_general_options_group' );
|
72 |
-
do_settings_sections('
|
73 |
submit_button( __('Save') );
|
74 |
?>
|
75 |
</form>
|
@@ -90,7 +91,7 @@ if ( !current_user_can( 'manage_options' ) ) {
|
|
90 |
<div class="yasr-space-settings-div">
|
91 |
</div>
|
92 |
|
93 |
-
|
94 |
|
95 |
$gd_star_rating_found = yasr_search_gd_star_rating();
|
96 |
|
@@ -124,7 +125,7 @@ if ( !current_user_can( 'manage_options' ) ) {
|
|
124 |
<div class="yasr-space-settings-div">
|
125 |
</div>
|
126 |
|
127 |
-
|
128 |
|
129 |
} //End If $gd_star_rating_found && !$gd_star_imported
|
130 |
|
@@ -177,8 +178,7 @@ if ( !current_user_can( 'manage_options' ) ) {
|
|
177 |
|
178 |
$n_multi_set = $wpdb->num_rows; //wpdb->num_rows always store the last of the last query
|
179 |
|
180 |
-
|
181 |
-
?>
|
182 |
|
183 |
<div class="yasr-settingsdiv">
|
184 |
|
@@ -260,7 +260,43 @@ if ( !current_user_can( 'manage_options' ) ) {
|
|
260 |
} //End if ($active_tab=='manage_multi')
|
261 |
|
262 |
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
?>
|
265 |
|
266 |
<div class="yasr-donatedivbottom" style="display:none">
|
53 |
?>
|
54 |
|
55 |
<h2 class="nav-tab-wrapper yasr-no-underline">
|
56 |
+
<a href="?page=yasr_settings_page&tab=general_settings" class="nav-tab <?php if ($active_tab == 'general_settings' || ($active_tab != 'manage_multi' && $active_tab != 'style_options')) echo 'nav-tab-active'; ?>" > General Settings </a>
|
57 |
<a href="?page=yasr_settings_page&tab=manage_multi" class="nav-tab <?php if ($active_tab == 'manage_multi') echo 'nav-tab-active'; ?>" > Multi Sets </a>
|
58 |
+
<a href="?page=yasr_settings_page&tab=style_options" class="nav-tab <?php if ($active_tab == 'style_options') echo 'nav-tab-active'; ?>" > Styles </a>
|
59 |
</h2>
|
60 |
|
61 |
|
62 |
|
63 |
<?php
|
64 |
|
65 |
+
if ($active_tab == 'general_settings' || $active_tab != 'manage_multi' && $active_tab != 'style_options') {
|
66 |
|
67 |
+
?>
|
68 |
|
69 |
<div class="yasr-settingsdiv">
|
70 |
<form action="options.php" method="post" id="yasr_settings_form">
|
71 |
<?php
|
72 |
settings_fields( 'yasr_general_options_group' );
|
73 |
+
do_settings_sections('yasr_general_settings_tab' );
|
74 |
submit_button( __('Save') );
|
75 |
?>
|
76 |
</form>
|
91 |
<div class="yasr-space-settings-div">
|
92 |
</div>
|
93 |
|
94 |
+
<?php
|
95 |
|
96 |
$gd_star_rating_found = yasr_search_gd_star_rating();
|
97 |
|
125 |
<div class="yasr-space-settings-div">
|
126 |
</div>
|
127 |
|
128 |
+
<?php
|
129 |
|
130 |
} //End If $gd_star_rating_found && !$gd_star_imported
|
131 |
|
178 |
|
179 |
$n_multi_set = $wpdb->num_rows; //wpdb->num_rows always store the last of the last query
|
180 |
|
181 |
+
?>
|
|
|
182 |
|
183 |
<div class="yasr-settingsdiv">
|
184 |
|
260 |
} //End if ($active_tab=='manage_multi')
|
261 |
|
262 |
|
263 |
+
if ($active_tab == 'style_options') {
|
264 |
+
|
265 |
+
?>
|
266 |
+
|
267 |
+
<div class="yasr-settingsdiv">
|
268 |
+
<form action="options.php" method="post" id="yasr_settings_form">
|
269 |
+
<?php
|
270 |
+
settings_fields( 'yasr_style_options_group' );
|
271 |
+
do_settings_sections('yasr_style_tab' );
|
272 |
+
submit_button( __('Save') );
|
273 |
+
?>
|
274 |
+
</form>
|
275 |
+
</div>
|
276 |
+
|
277 |
+
|
278 |
+
<div class="yasr-donatedivdx" style="display:none">
|
279 |
+
<h3><?php _e('Donations'); ?></h3>
|
280 |
+
|
281 |
+
<?php _e('If you have found this plugin useful, please consider making a donation to help support future development. Your support will be much appreciated. '); ?>
|
282 |
+
<br />
|
283 |
+
<?php _e('Thank you!'); ?>
|
284 |
+
<br />
|
285 |
+
|
286 |
+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC">
|
287 |
+
<?php echo("<img src=" . YASR_IMG_DIR . "/paypal.png>"); ?>
|
288 |
+
</a>
|
289 |
+
|
290 |
+
</div>
|
291 |
+
|
292 |
+
<div class="yasr-space-settings-div">
|
293 |
+
</div>
|
294 |
+
|
295 |
+
|
296 |
+
<?php
|
297 |
+
|
298 |
+
}
|
299 |
+
|
300 |
?>
|
301 |
|
302 |
<div class="yasr-donatedivbottom" style="display:none">
|
yet-another-stars-rating.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Yet Another Stars Rating
|
4 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
5 |
* Description: Rating system with rich snippets
|
6 |
-
* Version: 0.4.
|
7 |
* Author: Dario Curvino
|
8 |
* Author URI: http://profiles.wordpress.org/dudo/
|
9 |
* License: GPL2
|
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
28 |
*/
|
29 |
|
30 |
|
31 |
-
define('YASR_VERSION_NUM', '0.4.
|
32 |
|
33 |
//Plugin absolute path
|
34 |
define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
|
@@ -154,4 +154,19 @@ define ("YASR_SNIPPET", $stored_options['snippet']);
|
|
154 |
define ("YASR_ALLOWED_USER", $stored_options['allowed_user']);
|
155 |
define ("YASR_SCHEME_COLOR", $stored_options['scheme_color']);
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
?>
|
3 |
* Plugin Name: Yet Another Stars Rating
|
4 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
5 |
* Description: Rating system with rich snippets
|
6 |
+
* Version: 0.4.6
|
7 |
* Author: Dario Curvino
|
8 |
* Author URI: http://profiles.wordpress.org/dudo/
|
9 |
* License: GPL2
|
28 |
*/
|
29 |
|
30 |
|
31 |
+
define('YASR_VERSION_NUM', '0.4.6');
|
32 |
|
33 |
//Plugin absolute path
|
34 |
define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
|
154 |
define ("YASR_ALLOWED_USER", $stored_options['allowed_user']);
|
155 |
define ("YASR_SCHEME_COLOR", $stored_options['scheme_color']);
|
156 |
|
157 |
+
//Get stored style options
|
158 |
+
$custom_style = get_option ('yasr_style_options');
|
159 |
+
|
160 |
+
if ($custom_style && $custom_style['textarea'] != '') {
|
161 |
+
|
162 |
+
define ("YASR_CUSTOM_CSS_RULES", $custom_style['textarea']);
|
163 |
+
|
164 |
+
}
|
165 |
+
|
166 |
+
else {
|
167 |
+
|
168 |
+
define ("YASR_CUSTOM_CSS_RULES", NULL);
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
?>
|