Version Description
- Added new chart: Top 5 most active reviewers
- Added new chart: Top 10 most active users (in visitor rating)
- Changed popup for shortcode creator in visual editor, switched from thickbox to jquery ui dialog
- Removed javascript error when the shortcode creator is called
- Fixed multiset form editor
- Various bugfixes
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 0.3.7 |
Comparing to | |
See all releases |
Code changes from version 0.3.6 to 0.3.7
- TODO +0 -1
- css/jquery-ui.min.css +5 -0
- css/yasr-table-dark.css +30 -0
- css/yasr-table-light.css +29 -0
- 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/addButton_tinymcs.js +11 -6
- lib/yasr-ajax-functions.php +29 -17
- lib/yasr-functions.php +16 -9
- lib/yasr-settings-functions.php +1 -1
- lib/yasr-shortcode-functions.php +91 -10
- readme.txt +9 -1
- yet-another-stars-rating.php +2 -2
TODO
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-Create multiset where visitor can vote
|
2 |
-
-Change thickbox
|
3 |
-Use dashicons
|
4 |
-Use get_option or json instead of regex to import gd star rating data
|
1 |
-Create multiset where visitor can vote
|
|
|
2 |
-Use dashicons
|
3 |
-Use get_option or json instead of regex to import gd star rating data
|
css/jquery-ui.min.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
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/yasr-table-dark.css
CHANGED
@@ -46,6 +46,34 @@
|
|
46 |
|
47 |
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
.yasr-top-10-active-users {
|
50 |
border-spacing: 1px;
|
51 |
margin-top: 10px;
|
@@ -54,11 +82,13 @@
|
|
54 |
}
|
55 |
|
56 |
.yasr-top-10-active-users th {
|
|
|
57 |
color: white;
|
58 |
}
|
59 |
|
60 |
.yasr-top-10-active-users td {
|
61 |
padding: 8px;
|
|
|
62 |
width: 50%;
|
63 |
}
|
64 |
|
46 |
|
47 |
|
48 |
|
49 |
+
.yasr-top-5-active-reviewer {
|
50 |
+
color: #ffffff;
|
51 |
+
border-spacing: 1px;
|
52 |
+
margin-top: 10px;
|
53 |
+
margin-bottom: 24px;
|
54 |
+
width: 100%;
|
55 |
+
}
|
56 |
+
|
57 |
+
.yasr-top-5-active-reviewer th {
|
58 |
+
padding: 12px;
|
59 |
+
color: white;
|
60 |
+
}
|
61 |
+
|
62 |
+
.yasr-top-5-active-reviewer td {
|
63 |
+
padding: 8px;
|
64 |
+
width: 50%;
|
65 |
+
}
|
66 |
+
|
67 |
+
.yasr-top-5-active-reviewer tr:nth-child(odd) {
|
68 |
+
background: #292929;
|
69 |
+
}
|
70 |
+
/* Define the background color for all the EVEN background rows */
|
71 |
+
.yasr-top-5-active-reviewer tr:nth-child(even) {
|
72 |
+
background: #161616;
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
.yasr-top-10-active-users {
|
78 |
border-spacing: 1px;
|
79 |
margin-top: 10px;
|
82 |
}
|
83 |
|
84 |
.yasr-top-10-active-users th {
|
85 |
+
padding: 12px;
|
86 |
color: white;
|
87 |
}
|
88 |
|
89 |
.yasr-top-10-active-users td {
|
90 |
padding: 8px;
|
91 |
+
color: white;
|
92 |
width: 50%;
|
93 |
}
|
94 |
|
css/yasr-table-light.css
CHANGED
@@ -45,6 +45,34 @@
|
|
45 |
}
|
46 |
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
.yasr-top-10-active-users {
|
49 |
border-spacing: 1px;
|
50 |
margin-top: 10px;
|
@@ -53,6 +81,7 @@
|
|
53 |
}
|
54 |
|
55 |
.yasr-top-10-active-users th {
|
|
|
56 |
color: #555;
|
57 |
}
|
58 |
|
45 |
}
|
46 |
|
47 |
|
48 |
+
.yasr-top-5-active-reviewer {
|
49 |
+
border-spacing: 1px;
|
50 |
+
margin-top: 10px;
|
51 |
+
margin-bottom: 24px;
|
52 |
+
width: 100%;
|
53 |
+
}
|
54 |
+
|
55 |
+
.yasr-top-5-active-reviewer th {
|
56 |
+
padding: 12px;
|
57 |
+
color: #555;
|
58 |
+
}
|
59 |
+
|
60 |
+
.yasr-top-5-active-reviewer td {
|
61 |
+
padding: 8px;
|
62 |
+
width: 50%;
|
63 |
+
}
|
64 |
+
|
65 |
+
.yasr-top-5-active-reviewer tr:nth-child(odd) {
|
66 |
+
background: #FFFFec;
|
67 |
+
}
|
68 |
+
/* Define the background color for all the EVEN background rows */
|
69 |
+
.yasr-top-5-active-reviewer tr:nth-child(even) {
|
70 |
+
background: #FFFFFF;
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
.yasr-top-10-active-users {
|
77 |
border-spacing: 1px;
|
78 |
margin-top: 10px;
|
81 |
}
|
82 |
|
83 |
.yasr-top-10-active-users th {
|
84 |
+
padding: 12px;
|
85 |
color: #555;
|
86 |
}
|
87 |
|
img/jqueryui/animated-overlay.gif
ADDED
Binary file
|
img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png
ADDED
Binary file
|
img/jqueryui/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
img/jqueryui/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
img/jqueryui/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png
ADDED
Binary file
|
img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
img/jqueryui/ui-icons_222222_256x240.png
ADDED
Binary file
|
img/jqueryui/ui-icons_2e83ff_256x240.png
ADDED
Binary file
|
img/jqueryui/ui-icons_454545_256x240.png
ADDED
Binary file
|
img/jqueryui/ui-icons_888888_256x240.png
ADDED
Binary file
|
img/jqueryui/ui-icons_cd0a0a_256x240.png
ADDED
Binary file
|
js/addButton_tinymcs.js
CHANGED
@@ -5,12 +5,16 @@ jQuery(document).ready(function() {
|
|
5 |
// Register command for when button is clicked
|
6 |
ed.addCommand('yasr_insert_shortcode', function() {
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
});
|
15 |
|
16 |
// Register buttons - trigger above command when clicked
|
@@ -25,6 +29,7 @@ jQuery(document).ready(function() {
|
|
25 |
|
26 |
// executes this when the DOM is ready
|
27 |
jQuery(document).ready(function(){
|
|
|
28 |
var data = {
|
29 |
action: 'yasr_create_shortcode'
|
30 |
}
|
5 |
// Register command for when button is clicked
|
6 |
ed.addCommand('yasr_insert_shortcode', function() {
|
7 |
|
8 |
+
jQuery('#yasr-form').dialog({
|
9 |
+
title: 'Insert YASR shortcode',
|
10 |
+
width: 'auto', // overcomes width:'auto' and maxWidth bug
|
11 |
+
maxWidth: 600,
|
12 |
+
height: 'auto',
|
13 |
+
modal: true,
|
14 |
+
fluid: true, //new option
|
15 |
+
resizable: false
|
16 |
+
|
17 |
+
});
|
18 |
});
|
19 |
|
20 |
// Register buttons - trigger above command when clicked
|
29 |
|
30 |
// executes this when the DOM is ready
|
31 |
jQuery(document).ready(function(){
|
32 |
+
|
33 |
var data = {
|
34 |
action: 'yasr_create_shortcode'
|
35 |
}
|
lib/yasr-ajax-functions.php
CHANGED
@@ -318,6 +318,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
318 |
$n_multi_set=$wpdb->num_rows;
|
319 |
|
320 |
?>
|
|
|
321 |
<div id="yasr-form">
|
322 |
<table id="yasr-table" class="form-table">
|
323 |
<tr>
|
@@ -366,14 +367,17 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
366 |
<small><?php _e("Insert Top 10 highest rated by post author"); ?></small></td>
|
367 |
</tr>
|
368 |
|
369 |
-
<!--
|
370 |
<tr>
|
371 |
-
<th><label for="yasr-
|
372 |
-
<td><input type="button" class="button-primary" name="yasr-
|
373 |
-
<small><?php
|
374 |
</tr>
|
375 |
|
376 |
-
|
|
|
|
|
|
|
|
|
377 |
|
378 |
</table>
|
379 |
</div>
|
@@ -384,8 +388,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
384 |
var shortcode = '[yasr_overall_rating]';
|
385 |
// inserts the shortcode into the active editor
|
386 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
387 |
-
// closes
|
388 |
-
|
389 |
});
|
390 |
|
391 |
//Add shortcode for visitors rating
|
@@ -394,7 +398,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
394 |
// inserts the shortcode into the active editor
|
395 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
396 |
// closes Thickbox
|
397 |
-
|
398 |
});
|
399 |
|
400 |
<?php if ($n_multi_set>1) { ?>
|
@@ -407,8 +411,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
407 |
shortcode += ']';
|
408 |
// inserts the shortcode into the active editor
|
409 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
410 |
-
// closes
|
411 |
-
|
412 |
});
|
413 |
|
414 |
<?php } //End if
|
@@ -423,8 +427,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
423 |
shortcode += ']';
|
424 |
// inserts the shortcode into the active editor
|
425 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
426 |
-
// closes
|
427 |
-
|
428 |
});
|
429 |
|
430 |
<?php
|
@@ -436,18 +440,26 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
436 |
var shortcode = '[yasr_top_ten_highest_rated]';
|
437 |
// inserts the shortcode into the active editor
|
438 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
439 |
-
// closes
|
440 |
-
|
441 |
});
|
442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
|
444 |
-
// Add shortcode for top 10
|
445 |
jQuery('#yasr-top-10-active-users').on("click", function(){
|
446 |
var shortcode = '[yasr_top_ten_active_users]';
|
447 |
// inserts the shortcode into the active editor
|
448 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
449 |
-
// closes
|
450 |
-
|
451 |
});
|
452 |
|
453 |
</script>
|
318 |
$n_multi_set=$wpdb->num_rows;
|
319 |
|
320 |
?>
|
321 |
+
|
322 |
<div id="yasr-form">
|
323 |
<table id="yasr-table" class="form-table">
|
324 |
<tr>
|
367 |
<small><?php _e("Insert Top 10 highest rated by post author"); ?></small></td>
|
368 |
</tr>
|
369 |
|
|
|
370 |
<tr>
|
371 |
+
<th><label for="yasr-5-active-reviewers"><?php _e("Most active reviewers"); ?></label></th>
|
372 |
+
<td><input type="button" class="button-primary" name="yasr-5-active-reviewers" id="yasr-5-active-reviewers" value="Insert Top 5 most active reviewers"/><br />
|
373 |
+
<small><?php _e("Insert Top 5 active reviewers"); ?></small></td>
|
374 |
</tr>
|
375 |
|
376 |
+
<tr>
|
377 |
+
<th><label for="yasr-10-active-users"><?php _e("Most active users"); ?></label></th>
|
378 |
+
<td><input type="button" class="button-primary" name="yasr-top-10-active-users" id="yasr-top-10-active-users" value="Insert Top 10 most active users"/><br />
|
379 |
+
<small><?php _e("Insert Top 10 active users in visitor ratings"); ?></small></td>
|
380 |
+
</tr>
|
381 |
|
382 |
</table>
|
383 |
</div>
|
388 |
var shortcode = '[yasr_overall_rating]';
|
389 |
// inserts the shortcode into the active editor
|
390 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
391 |
+
// closes jqueryui
|
392 |
+
jQuery('#yasr-form').dialog('close');
|
393 |
});
|
394 |
|
395 |
//Add shortcode for visitors rating
|
398 |
// inserts the shortcode into the active editor
|
399 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
400 |
// closes Thickbox
|
401 |
+
jQuery('#yasr-form').dialog('close');
|
402 |
});
|
403 |
|
404 |
<?php if ($n_multi_set>1) { ?>
|
411 |
shortcode += ']';
|
412 |
// inserts the shortcode into the active editor
|
413 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
414 |
+
// closes jqueryui
|
415 |
+
jQuery('#yasr-form').dialog('close');
|
416 |
});
|
417 |
|
418 |
<?php } //End if
|
427 |
shortcode += ']';
|
428 |
// inserts the shortcode into the active editor
|
429 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
430 |
+
// closes jqueryui
|
431 |
+
jQuery('#yasr-form').dialog('close');
|
432 |
});
|
433 |
|
434 |
<?php
|
440 |
var shortcode = '[yasr_top_ten_highest_rated]';
|
441 |
// inserts the shortcode into the active editor
|
442 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
443 |
+
// closes jqueryui
|
444 |
+
jQuery('#yasr-form').dialog('close');
|
445 |
});
|
446 |
|
447 |
+
// Add shortcode for top 5 active reviewer
|
448 |
+
jQuery('#yasr-5-active-reviewers').on("click", function(){
|
449 |
+
var shortcode = '[yasr_top_5_reviewers]';
|
450 |
+
// inserts the shortcode into the active editor
|
451 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
452 |
+
// closes jqueryui
|
453 |
+
jQuery('#yasr-form').dialog('close');
|
454 |
+
});
|
455 |
|
456 |
+
// Add shortcode for top 10 active users
|
457 |
jQuery('#yasr-top-10-active-users').on("click", function(){
|
458 |
var shortcode = '[yasr_top_ten_active_users]';
|
459 |
// inserts the shortcode into the active editor
|
460 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
461 |
+
// closes jqueryui
|
462 |
+
jQuery('#yasr-form').dialog('close');
|
463 |
});
|
464 |
|
465 |
</script>
|
lib/yasr-functions.php
CHANGED
@@ -12,6 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
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 |
|
16 |
$chosen_color=NULL;
|
17 |
|
@@ -32,6 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
32 |
wp_enqueue_style( 'yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), NULL, 'all' );
|
33 |
}
|
34 |
|
|
|
35 |
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
|
36 |
wp_enqueue_script( 'cookie', YASR_JS_DIR . 'jquery.cookie.min.js' , array('jquery', 'rateit'), '1.4.0', TRUE );
|
37 |
}
|
@@ -100,17 +102,23 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
100 |
}
|
101 |
|
102 |
function yasr_metabox_overall_rating_content() {
|
103 |
-
if (
|
104 |
-
|
105 |
}
|
106 |
-
|
|
|
|
|
|
|
107 |
}
|
108 |
|
109 |
function yasr_metabox_multiple_rating_content() {
|
110 |
-
if (
|
111 |
-
|
112 |
}
|
113 |
-
|
|
|
|
|
|
|
114 |
}
|
115 |
|
116 |
|
@@ -310,7 +318,6 @@ function visitor_votes_auto_insert_code () {
|
|
310 |
//Else mean user is not logged in
|
311 |
else {
|
312 |
|
313 |
-
|
314 |
if ($votes_number>0) {
|
315 |
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
316 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ") <br />" . __("You must sign to vote", "yasr") . "</div>";
|
@@ -318,7 +325,7 @@ function visitor_votes_auto_insert_code () {
|
|
318 |
|
319 |
else {
|
320 |
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
321 |
-
</div><br /> " . __("No rating yet" , "yasr") . "<br />" .
|
322 |
}
|
323 |
|
324 |
}
|
@@ -576,7 +583,7 @@ add_action('init', 'yasr_shortcode_button_init');
|
|
576 |
function yasr_shortcode_button_init() {
|
577 |
|
578 |
//Abort early if the user will never see TinyMCE
|
579 |
-
if ( ! current_user_can('
|
580 |
return;
|
581 |
|
582 |
//Add a callback to regiser our tinymce plugin
|
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 |
$chosen_color=NULL;
|
18 |
|
33 |
wp_enqueue_style( 'yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), NULL, 'all' );
|
34 |
}
|
35 |
|
36 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
37 |
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
|
38 |
wp_enqueue_script( 'cookie', YASR_JS_DIR . 'jquery.cookie.min.js' , array('jquery', 'rateit'), '1.4.0', TRUE );
|
39 |
}
|
102 |
}
|
103 |
|
104 |
function yasr_metabox_overall_rating_content() {
|
105 |
+
if ( current_user_can( 'publish_posts' ) ) {
|
106 |
+
include (YASR_ABSOLUTE_PATH . '/yasr-metabox-overall-rating.php');
|
107 |
}
|
108 |
+
else {
|
109 |
+
_e("You don't have enought privileges to insert overall rating");
|
110 |
+
}
|
111 |
+
|
112 |
}
|
113 |
|
114 |
function yasr_metabox_multiple_rating_content() {
|
115 |
+
if ( current_user_can( 'publish_posts' ) ) {
|
116 |
+
include (YASR_ABSOLUTE_PATH . '/yasr-metabox-multiple-rating.php');
|
117 |
}
|
118 |
+
else {
|
119 |
+
_e("You don't have enought privileges to insert multi-set");
|
120 |
+
}
|
121 |
+
|
122 |
}
|
123 |
|
124 |
|
318 |
//Else mean user is not logged in
|
319 |
else {
|
320 |
|
|
|
321 |
if ($votes_number>0) {
|
322 |
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
323 |
</div><br /> " . __("Average Rating", "yasr") . " $medium_rating / 5 (" . __("$votes_number votes casts" , "yasr") . ") <br />" . __("You must sign to vote", "yasr") . "</div>";
|
325 |
|
326 |
else {
|
327 |
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
328 |
+
</div><br /> " . __("No rating yet" , "yasr") . "<br />" . __("You must sign to vote", "") . "</div>";
|
329 |
}
|
330 |
|
331 |
}
|
583 |
function yasr_shortcode_button_init() {
|
584 |
|
585 |
//Abort early if the user will never see TinyMCE
|
586 |
+
if ( ! current_user_can('publish_posts') && ! current_user_can('publish_posts') && get_user_option('rich_editing') == 'true')
|
587 |
return;
|
588 |
|
589 |
//Add a callback to regiser our tinymce plugin
|
lib/yasr-settings-functions.php
CHANGED
@@ -842,7 +842,7 @@ function yasr_process_edit_multi_set_form() {
|
|
842 |
else {
|
843 |
|
844 |
//Check if field name is changed
|
845 |
-
$field_name_in_db = $wpdb->get_results("SELECT field_name FROM " . YASR_MULTI_SET_FIELDS_TABLE . " WHERE field_id=$field_id");
|
846 |
|
847 |
foreach ($field_name_in_db as $field_in_db) {
|
848 |
$field_name_in_database = $field_in_db->field_name;
|
842 |
else {
|
843 |
|
844 |
//Check if field name is changed
|
845 |
+
$field_name_in_db = $wpdb->get_results("SELECT field_name FROM " . YASR_MULTI_SET_FIELDS_TABLE . " WHERE field_id=$field_id AND parent_set_id=$set_id");
|
846 |
|
847 |
foreach ($field_name_in_db as $field_in_db) {
|
848 |
$field_name_in_database = $field_in_db->field_name;
|
lib/yasr-shortcode-functions.php
CHANGED
@@ -214,7 +214,7 @@ function shortcode_visitor_votes_callback () {
|
|
214 |
|
215 |
else {
|
216 |
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
217 |
-
</div><br /> " . __("No rating yet" , "yasr") . "<br />" .
|
218 |
}
|
219 |
|
220 |
}
|
@@ -381,7 +381,7 @@ function yasr_top_ten_highest_rated_callback () {
|
|
381 |
|
382 |
global $wpdb;
|
383 |
|
384 |
-
$query_result = $wpdb->get_results("SELECT v.overall_rating, v.post_id
|
385 |
FROM " . YASR_VOTES_TABLE . " AS v, $wpdb->posts AS p
|
386 |
WHERE v.post_id = p.ID
|
387 |
AND p.post_status = 'publish'
|
@@ -393,8 +393,6 @@ function yasr_top_ten_highest_rated_callback () {
|
|
393 |
|
394 |
foreach ($query_result as $result) {
|
395 |
|
396 |
-
$post_status = get_post_status($result->post_id);
|
397 |
-
|
398 |
$post_title = get_the_title($result->post_id);
|
399 |
|
400 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
@@ -420,6 +418,77 @@ function yasr_top_ten_highest_rated_callback () {
|
|
420 |
} //End function
|
421 |
|
422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
/****** Add top 10 most active user *****/
|
425 |
|
@@ -430,7 +499,9 @@ function yasr_top_ten_active_users_callback () {
|
|
430 |
global $wpdb;
|
431 |
|
432 |
$query_result = $wpdb->get_results("SELECT COUNT( user_id ) as total_count, user_id as user
|
433 |
-
FROM " . YASR_LOG_TABLE . "
|
|
|
|
|
434 |
GROUP BY user_id
|
435 |
ORDER BY ( total_count ) DESC
|
436 |
LIMIT 10");
|
@@ -441,25 +512,31 @@ function yasr_top_ten_active_users_callback () {
|
|
441 |
<table class=\"yasr-top-10-active-users\">
|
442 |
<tr>
|
443 |
<th>UserName</th>
|
444 |
-
<th>
|
445 |
</tr>
|
446 |
";
|
447 |
|
448 |
foreach ($query_result as $result) {
|
449 |
|
450 |
-
$user_data = get_userdata(
|
|
|
|
|
451 |
|
452 |
-
|
453 |
|
454 |
-
|
|
|
|
|
|
|
455 |
$user_data = new stdClass;
|
456 |
$user_data->user_login = 'Anonymous';
|
457 |
}
|
458 |
|
459 |
$shortcode_html .= "<tr>
|
460 |
<td><a href=\"$user_profile\">$user_data->user_login</a></td>
|
461 |
-
<td
|
462 |
</tr>";
|
|
|
463 |
}
|
464 |
|
465 |
|
@@ -469,6 +546,10 @@ function yasr_top_ten_active_users_callback () {
|
|
469 |
|
470 |
}
|
471 |
|
|
|
|
|
|
|
|
|
472 |
|
473 |
} //End function
|
474 |
|
214 |
|
215 |
else {
|
216 |
$shortcode_html="<div id=\"yasr_visitor_votes\"><div class=\"rateit bigstars\" id=\"yasr_rateit_visitor_votes\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"0\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\">
|
217 |
+
</div><br /> " . __("No rating yet" , "yasr") . "<br />" . __("You must sign to vote", "") . "</div>";
|
218 |
}
|
219 |
|
220 |
}
|
381 |
|
382 |
global $wpdb;
|
383 |
|
384 |
+
$query_result = $wpdb->get_results("SELECT v.overall_rating, v.post_id
|
385 |
FROM " . YASR_VOTES_TABLE . " AS v, $wpdb->posts AS p
|
386 |
WHERE v.post_id = p.ID
|
387 |
AND p.post_status = 'publish'
|
393 |
|
394 |
foreach ($query_result as $result) {
|
395 |
|
|
|
|
|
396 |
$post_title = get_the_title($result->post_id);
|
397 |
|
398 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
418 |
} //End function
|
419 |
|
420 |
|
421 |
+
/****** Add top 5 most active reviewer ******/
|
422 |
+
|
423 |
+
add_shortcode ('yasr_top_5_reviewers', 'yasr_top_5_reviewers_callback');
|
424 |
+
|
425 |
+
function yasr_top_5_reviewers_callback () {
|
426 |
+
|
427 |
+
global $wpdb;
|
428 |
+
|
429 |
+
$query_result = $wpdb->get_results("SELECT COUNT( reviewer_id ) as total_count, reviewer_id as reviewer
|
430 |
+
FROM " . YASR_VOTES_TABLE . ", $wpdb->posts AS p
|
431 |
+
WHERE post_id = p.ID
|
432 |
+
AND p.post_status = 'publish'
|
433 |
+
GROUP BY reviewer_id
|
434 |
+
ORDER BY (total_count) DESC
|
435 |
+
LIMIT 5");
|
436 |
+
|
437 |
+
|
438 |
+
if ($query_result) {
|
439 |
+
|
440 |
+
$shortcode_html = "
|
441 |
+
<table class=\"yasr-top-5-active-reviewer\">
|
442 |
+
<tr>
|
443 |
+
<th>Author</th>
|
444 |
+
<th>Reviews</th>
|
445 |
+
</tr>
|
446 |
+
";
|
447 |
+
|
448 |
+
foreach ($query_result as $result) {
|
449 |
+
|
450 |
+
$user_data = get_userdata($result->reviewer);
|
451 |
+
|
452 |
+
if ($user_data) {
|
453 |
+
|
454 |
+
$user_profile = get_author_posts_url($result->reviewer);
|
455 |
+
|
456 |
+
}
|
457 |
+
|
458 |
+
else {
|
459 |
+
|
460 |
+
$user_profile = '#';
|
461 |
+
$user_data = new stdClass;
|
462 |
+
$user_data->user_login = 'Anonymous';
|
463 |
+
|
464 |
+
}
|
465 |
+
|
466 |
+
|
467 |
+
$shortcode_html .= "<tr>
|
468 |
+
<td><a href=\"$user_profile\">$user_data->user_login</a></td>
|
469 |
+
<td>$result->total_count</td>
|
470 |
+
</tr>";
|
471 |
+
|
472 |
+
}
|
473 |
+
|
474 |
+
$shortcode_html .= "</table>";
|
475 |
+
|
476 |
+
return $shortcode_html;
|
477 |
+
|
478 |
+
}
|
479 |
+
|
480 |
+
else {
|
481 |
+
|
482 |
+
_e("Problem while retriving the top 5 most active reviewers. Did you published any review?");
|
483 |
+
|
484 |
+
}
|
485 |
+
|
486 |
+
|
487 |
+
} //End top 5 reviewers function
|
488 |
+
|
489 |
+
|
490 |
+
|
491 |
+
|
492 |
|
493 |
/****** Add top 10 most active user *****/
|
494 |
|
499 |
global $wpdb;
|
500 |
|
501 |
$query_result = $wpdb->get_results("SELECT COUNT( user_id ) as total_count, user_id as user
|
502 |
+
FROM " . YASR_LOG_TABLE . ", $wpdb->posts AS p
|
503 |
+
WHERE post_id = p.ID
|
504 |
+
AND p.post_status = 'publish'
|
505 |
GROUP BY user_id
|
506 |
ORDER BY ( total_count ) DESC
|
507 |
LIMIT 10");
|
512 |
<table class=\"yasr-top-10-active-users\">
|
513 |
<tr>
|
514 |
<th>UserName</th>
|
515 |
+
<th>Number of votes</th>
|
516 |
</tr>
|
517 |
";
|
518 |
|
519 |
foreach ($query_result as $result) {
|
520 |
|
521 |
+
$user_data = get_userdata($result->user);
|
522 |
+
|
523 |
+
if ($user_data) {
|
524 |
|
525 |
+
$user_profile = get_author_posts_url($result->user);
|
526 |
|
527 |
+
}
|
528 |
+
|
529 |
+
else {
|
530 |
+
$user_profile = '#';
|
531 |
$user_data = new stdClass;
|
532 |
$user_data->user_login = 'Anonymous';
|
533 |
}
|
534 |
|
535 |
$shortcode_html .= "<tr>
|
536 |
<td><a href=\"$user_profile\">$user_data->user_login</a></td>
|
537 |
+
<td>$result->total_count</td>
|
538 |
</tr>";
|
539 |
+
|
540 |
}
|
541 |
|
542 |
|
546 |
|
547 |
}
|
548 |
|
549 |
+
else {
|
550 |
+
_e("Problem while retriving the top 10 active users chart. Are you sure you have votes to show?");
|
551 |
+
}
|
552 |
+
|
553 |
|
554 |
} //End function
|
555 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
3 |
Tags: Rating, Review, Star, Snippet, Rich snippet, Schema, Schema.org, Serp
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.9.1
|
6 |
-
Stable tag: 0.3.
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -48,6 +48,14 @@ If with gd-star-rating you're using a different number of stars from the default
|
|
48 |
|
49 |
== Changelog ==
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
= 0.3.6 =
|
52 |
* Changed permission: now while writing a post or page everyone with a role >= author can insert votes
|
53 |
* Some bugfixes
|
3 |
Tags: Rating, Review, Star, Snippet, Rich snippet, Schema, Schema.org, Serp
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.9.1
|
6 |
+
Stable tag: 0.3.7
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
48 |
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 0.3.7 =
|
52 |
+
* Added new chart: Top 5 most active reviewers
|
53 |
+
* Added new chart: Top 10 most active users (in visitor rating)
|
54 |
+
* Changed popup for shortcode creator in visual editor, switched from thickbox to jquery ui dialog
|
55 |
+
* Removed javascript error when the shortcode creator is called
|
56 |
+
* Fixed multiset form editor
|
57 |
+
* Various bugfixes
|
58 |
+
|
59 |
= 0.3.6 =
|
60 |
* Changed permission: now while writing a post or page everyone with a role >= author can insert votes
|
61 |
* Some bugfixes
|
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.3.
|
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.3.
|
32 |
|
33 |
//Plugin absolute path
|
34 |
define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
|
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.3.7
|
7 |
* Author: Dario Curvino
|
8 |
* Author URI: http://profiles.wordpress.org/dudo/
|
9 |
* License: GPL2
|
28 |
*/
|
29 |
|
30 |
|
31 |
+
define('YASR_VERSION_NUM', '0.3.7');
|
32 |
|
33 |
//Plugin absolute path
|
34 |
define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
|