Yasr – Yet Another Stars Rating - Version 0.1.0

Version Description

  • Added in admin dashboard votes log viewer
  • .Po file updated
  • Updated rateit to version 1.0.22
Download this release

Release Info

Developer Dudo
Plugin Icon 128x128 Yasr – Yet Another Stars Rating
Version 0.1.0
Comparing to
See all releases

Version 0.1.0

LICENSE ADDED
@@ -0,0 +1,280 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
+ 675 Mass Ave, Cambridge, MA 02139, USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Library General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The 'Program', below,
65
+ refers to any such program or work, and a 'work based on the Program'
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term 'modification'.) Each licensee is addressed as 'you'.
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and 'any
244
+ later version', you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
TODO ADDED
@@ -0,0 +1,4 @@
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
css/bigstars.css ADDED
@@ -0,0 +1,34 @@
1
+ /*
2
+ SOURCE: http://iconexpo.com/2008/12/free-8color-star-icons/
3
+
4
+ */
5
+
6
+
7
+ div.bigstars div.rateit-range
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-gold32.png');
16
+ }
17
+
18
+ div.bigstars div.rateit-selected
19
+ {
20
+ background: url('../img/star-red32.png');
21
+ }
22
+
23
+ div.bigstars div.rateit-reset
24
+ {
25
+ background: url('../img/star-black32.png');
26
+ width: 32px;
27
+ height: 32px;
28
+
29
+ }
30
+
31
+ div.bigstars div.rateit-reset:hover
32
+ {
33
+ background: url('../img/star-white32.png');
34
+ }
css/rateit.css ADDED
@@ -0,0 +1,98 @@
1
+ .rateit {
2
+ display: -moz-inline-box;
3
+ display: inline-block;
4
+ position: relative;
5
+ -webkit-user-select: none;
6
+ -khtml-user-select: none;
7
+ -moz-user-select: none;
8
+ -o-user-select: none;
9
+ -ms-user-select: none;
10
+ user-select: none;
11
+ -webkit-touch-callout: none;
12
+ }
13
+
14
+ .rateit .rateit-range
15
+ {
16
+ position: relative;
17
+ display: -moz-inline-box;
18
+ display: inline-block;
19
+ background: url('../img/star.gif');
20
+ height: 16px;
21
+ outline: none;
22
+ }
23
+
24
+ .rateit .rateit-range * {
25
+ display:block;
26
+ }
27
+
28
+ /* for IE 6 */
29
+ * html .rateit, * html .rateit .rateit-range
30
+ {
31
+ display: inline;
32
+ }
33
+
34
+ /* for IE 7 */
35
+ * + html .rateit, * + html .rateit .rateit-range
36
+ {
37
+ display: inline;
38
+ }
39
+
40
+ .rateit .rateit-hover, .rateit .rateit-selected
41
+ {
42
+ position: absolute;
43
+ left: 0px;
44
+ }
45
+
46
+ .rateit .rateit-hover-rtl, .rateit .rateit-selected-rtl
47
+ {
48
+ left: auto;
49
+ right: 0px;
50
+ }
51
+
52
+ .rateit .rateit-hover
53
+ {
54
+ background: url('../img/star.gif') left -32px;
55
+ }
56
+
57
+ .rateit .rateit-hover-rtl
58
+ {
59
+ background-position: right -32px;
60
+ }
61
+
62
+ .rateit .rateit-selected
63
+ {
64
+ background: url('../img/star.gif') left -16px;
65
+ }
66
+
67
+ .rateit .rateit-selected-rtl
68
+ {
69
+ background-position: right -16px;
70
+ }
71
+
72
+ .rateit .rateit-preset
73
+ {
74
+ background: url('../img/star.gif') left -48px;
75
+ }
76
+
77
+ .rateit .rateit-preset-rtl
78
+ {
79
+ background: url('../img/star.gif') left -48px;
80
+ }
81
+
82
+ .rateit button.rateit-reset
83
+ {
84
+ background: url('../img/delete.gif') 0 0;
85
+ width: 16px;
86
+ height: 16px;
87
+ display: -moz-inline-box;
88
+ display: inline-block;
89
+ float: left;
90
+ outline: none;
91
+ border:none;
92
+ padding: 0;
93
+ }
94
+
95
+ .rateit button.rateit-reset:hover, .rateit button.rateit-reset:focus
96
+ {
97
+ background-position: 0 -16px;
98
+ }
css/yasr.css ADDED
@@ -0,0 +1,241 @@
1
+ #multi_rating_table
2
+ {
3
+ vertical-align: text-top;
4
+ }
5
+
6
+ .yasr-form-result {
7
+ display: block;
8
+ }
9
+
10
+ @media (min-width: 972px) {
11
+
12
+ .yasr-settingsdiv {
13
+ float:left;
14
+ display:block;
15
+ width:70%;
16
+ background-color:#FFF;
17
+ border: 1px solid #DDD;
18
+ padding-left: 25px;
19
+ padding-right: 25px;
20
+ padding-bottom: 10px;
21
+ }
22
+
23
+ .yasr-donatedivdx {
24
+ float:right;
25
+ display:block !important;
26
+ width:15%;
27
+ background-color:#FFF;
28
+ border: 1px solid #DDD;
29
+ padding: 25px;
30
+ font-size: 12px;
31
+ }
32
+ }
33
+
34
+ @media (max-width: 971px) {
35
+
36
+ .yasr-settingsdiv {
37
+ float:left;
38
+ display:block;
39
+ width:95%;
40
+ background-color:#FFF;
41
+ border: 1px solid #DDD;
42
+ padding-left: 10px;
43
+ padding-right: 10px;
44
+ padding-bottom: 5px;
45
+ }
46
+
47
+ .yasr-donatedivbottom {
48
+ display:block !important;
49
+ width:95%;
50
+ background-color:#FFF;
51
+ border: 1px solid #DDD;
52
+ padding: 10px;
53
+ font-size: 12px;
54
+ }
55
+ }
56
+
57
+ .yasr-list-set-table {
58
+ margin-left:5px;
59
+ }
60
+
61
+ .yasr-space-settings-div {
62
+ padding-bottom: 15px;
63
+ clear: both;
64
+ }
65
+
66
+ .yasr-multi-set-left {
67
+ float:left;
68
+ width: 40%;
69
+ }
70
+
71
+ .yasr-multi-set-right {
72
+ float:right;
73
+ width: 55%;
74
+ }
75
+
76
+ .yasr-new-multi-set {
77
+ display: none;
78
+ overflow: auto;
79
+ margin-top: 10px;
80
+ padding: 8px;
81
+ border: 1px solid #DDD;
82
+ background-color: #f7f7f7;
83
+ }
84
+
85
+ .yasr-manage-multiset {
86
+ display: none;
87
+ overflow: auto;
88
+ margin-top: 10px;
89
+ padding: 8px;
90
+ border: 1px solid #DDD;
91
+ background-color: #f7f7f7;
92
+ }
93
+
94
+ .yasr-manage-multiset-single {
95
+ display: none;
96
+ overflow: auto;
97
+ margin-top: 10px;
98
+ padding: 8px;
99
+ border: 1px solid #DDD;
100
+ background-color: #f7f7f7;
101
+ }
102
+
103
+
104
+ .yasr-input-text-multi-set{
105
+ margin-left: 30px;
106
+ margin-bottom: 10px;
107
+ }
108
+
109
+ .yasr-result-step-1{
110
+ padding-left: 25px;
111
+ padding-top: 10px;
112
+ }
113
+
114
+ .yasr-result-step-2{
115
+ padding-left: 45px;
116
+ }
117
+
118
+ #yasr-multi-set-response {
119
+ margin-top: 10px;
120
+ padding: 10px;
121
+ border: 1px solid #DDD;
122
+ background-color: #f7f7f7;
123
+ }
124
+
125
+ #yasr-multi-set-response2 {
126
+ margin-top: 10px;
127
+ padding: 10px;
128
+ border: 1px solid #DDD;
129
+ background-color: #f7f7f7;
130
+ }
131
+
132
+ #yasr-table-form-edit-multi-set {
133
+ width: 100%;
134
+ }
135
+
136
+ #yasr-table-form-edit-multi-set-header {
137
+ text-align: center;
138
+ padding: 5px;
139
+ }
140
+
141
+ #yasr-table-form-edit-multi-set-remove {
142
+ text-align: center;
143
+ padding: 5px;
144
+ }
145
+
146
+ .yasr-edit-form-remove-entire-set {
147
+ padding-top: 30px;
148
+ padding-bottom: 30px;
149
+ text-align: center;
150
+ color: red;
151
+ }
152
+
153
+
154
+ .yasr_table_multi_set_shortcode tr:nth-child(odd) {
155
+ background: #FFFFec;
156
+ }
157
+ /* Define the background color for all the EVEN background rows */
158
+ .yasr_table_multi_set_shortcode tr:nth-child(even) {
159
+ background: #FFFFFF;
160
+ }
161
+
162
+ .yasr_table_multi_set_admin {
163
+ border: 1px solid rgba(0, 0, 0, 0.1);
164
+ padding: 10px;
165
+ font-size: 20px;
166
+ }
167
+
168
+ @media (min-width: 972px) {
169
+ .yasr_table_multi_set_admin {
170
+ width: 70%;
171
+ }
172
+ }
173
+
174
+
175
+ @media (max-width: 971px) {
176
+ .yasr_table_multi_set_admin {
177
+ width: 90%;
178
+ }
179
+ }
180
+
181
+ .yasr_table_multi_set_admin td {
182
+ width: 50%
183
+ }
184
+
185
+ .yasr_table_multi_set_admin tr:nth-child(odd) {
186
+ background: #feffd3;
187
+ }
188
+ /* Define the background color for all the EVEN background rows */
189
+ .yasr_table_multi_set_admin tr:nth-child(even) {
190
+ background: #FFFFFF;
191
+ }
192
+
193
+ #yasr-log-container {
194
+ width: 98%;
195
+ }
196
+
197
+ .yasr-log-div-child {
198
+ padding-top: 5px;
199
+ border-bottom: 1px solid #BBD8E7;
200
+ padding-bottom: 20px;
201
+ }
202
+
203
+ #yasr-log-image {
204
+ list-style-type: none;
205
+ display: inline-block;
206
+ float:left;
207
+ }
208
+
209
+ #yasr-log-child-head {
210
+ padding-left: 37px;
211
+ }
212
+
213
+ #yasr-log-vote {
214
+ color: red;
215
+ }
216
+
217
+ #yasr-log-post {
218
+ color: #2683AE;
219
+ }
220
+
221
+ #yasr-log-ip-date {
222
+ padding-top: 5px;
223
+ }
224
+
225
+ #yasr-log-ip {
226
+ float:left;
227
+ }
228
+
229
+ #yasr-log-date {
230
+ float: right;
231
+ }
232
+
233
+ #yasr-log-next-rows {
234
+ padding-top: 15px;
235
+ text-align: right;
236
+ }
237
+
238
+ #yasr-log-page-navigation {
239
+ padding-top: 7px;
240
+ text-align: center;
241
+ }
img/delete.gif ADDED
Binary file
img/dialog-ok-apply.png ADDED
Binary file
img/loader.gif ADDED
Binary file
img/star-black32.png ADDED
Binary file
img/star-gold32.png ADDED
Binary file
img/star-red32.png ADDED
Binary file
img/star-white32.png ADDED
Binary file
img/star.gif ADDED
Binary file
img/star_2.gif ADDED
Binary file
img/star_3.gif ADDED
Binary file
img/star_4.gif ADDED
Binary file
img/star_tiny.png ADDED
Binary file
js/addButton_tinymcs.js ADDED
@@ -0,0 +1,42 @@
1
+ jQuery(document).ready(function() {
2
+
3
+ tinymce.create('tinymce.plugins.yasr_plugin', {
4
+ init : function(ed, url) {
5
+ // Register command for when button is clicked
6
+ ed.addCommand('yasr_insert_shortcode', function() {
7
+
8
+ // triggers the thickbox
9
+ var width = jQuery(window).width(), W = ( 720 < width ) ? 720 : width;
10
+ W = W - 80;
11
+ tb_show( 'Insert YASR Shortcode', '#TB_inline?width=' + W + '&inlineId=yasr-form' );
12
+
13
+ tinymce.execCommand('mceInsertContent', false, content);
14
+ });
15
+
16
+ // Register buttons - trigger above command when clicked
17
+ ed.addButton('yasr_button', {title : 'Yasr Shortcode', cmd : 'yasr_insert_shortcode', image: url + '/../img/star_tiny.png' });
18
+ },
19
+ });
20
+
21
+ // Register our TinyMCE plugin
22
+ // first parameter is the button ID1
23
+ // second parameter must match the first parameter of the tinymce.create() function above
24
+ tinymce.PluginManager.add('yasr_button', tinymce.plugins.yasr_plugin);
25
+
26
+ // executes this when the DOM is ready
27
+ jQuery(document).ready(function(){
28
+ var data = {
29
+ action: 'yasr_create_shortcode'
30
+ }
31
+
32
+ jQuery.post(ajaxurl, data, function(button_content) {
33
+ // creates a table to be displayed everytime the button is clicked
34
+
35
+ var response=button_content;
36
+
37
+ var table = jQuery(response).find('yasr-form');
38
+ jQuery(response).appendTo('body').hide();
39
+ });
40
+ });
41
+
42
+ });
js/jquery.cookie.js ADDED
@@ -0,0 +1,117 @@
1
+ /*!
2
+ * jQuery Cookie Plugin v1.4.0
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2013 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd) {
10
+ // AMD. Register as anonymous module.
11
+ define(['jquery'], factory);
12
+ } else {
13
+ // Browser globals.
14
+ factory(jQuery);
15
+ }
16
+ }(function ($) {
17
+
18
+ var pluses = /\+/g;
19
+
20
+ function encode(s) {
21
+ return config.raw ? s : encodeURIComponent(s);
22
+ }
23
+
24
+ function decode(s) {
25
+ return config.raw ? s : decodeURIComponent(s);
26
+ }
27
+
28
+ function stringifyCookieValue(value) {
29
+ return encode(config.json ? JSON.stringify(value) : String(value));
30
+ }
31
+
32
+ function parseCookieValue(s) {
33
+ if (s.indexOf('"') === 0) {
34
+ // This is a quoted cookie as according to RFC2068, unescape...
35
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
36
+ }
37
+
38
+ try {
39
+ // Replace server-side written pluses with spaces.
40
+ // If we can't decode the cookie, ignore it, it's unusable.
41
+ s = decodeURIComponent(s.replace(pluses, ' '));
42
+ } catch(e) {
43
+ return;
44
+ }
45
+
46
+ try {
47
+ // If we can't parse the cookie, ignore it, it's unusable.
48
+ return config.json ? JSON.parse(s) : s;
49
+ } catch(e) {}
50
+ }
51
+
52
+ function read(s, converter) {
53
+ var value = config.raw ? s : parseCookieValue(s);
54
+ return $.isFunction(converter) ? converter(value) : value;
55
+ }
56
+
57
+ var config = $.cookie = function (key, value, options) {
58
+
59
+ // Write
60
+ if (value !== undefined && !$.isFunction(value)) {
61
+ options = $.extend({}, config.defaults, options);
62
+
63
+ if (typeof options.expires === 'number') {
64
+ var days = options.expires, t = options.expires = new Date();
65
+ t.setDate(t.getDate() + days);
66
+ }
67
+
68
+ return (document.cookie = [
69
+ encode(key), '=', stringifyCookieValue(value),
70
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
71
+ options.path ? '; path=' + options.path : '',
72
+ options.domain ? '; domain=' + options.domain : '',
73
+ options.secure ? '; secure' : ''
74
+ ].join(''));
75
+ }
76
+
77
+ // Read
78
+
79
+ var result = key ? undefined : {};
80
+
81
+ // To prevent the for loop in the first place assign an empty array
82
+ // in case there are no cookies at all. Also prevents odd result when
83
+ // calling $.cookie().
84
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
85
+
86
+ for (var i = 0, l = cookies.length; i < l; i++) {
87
+ var parts = cookies[i].split('=');
88
+ var name = decode(parts.shift());
89
+ var cookie = parts.join('=');
90
+
91
+ if (key && key === name) {
92
+ // If second argument (value) is a function it's a converter...
93
+ result = read(cookie, value);
94
+ break;
95
+ }
96
+
97
+ // Prevent storing a cookie that we couldn't decode.
98
+ if (!key && (cookie = read(cookie)) !== undefined) {
99
+ result[name] = cookie;
100
+ }
101
+ }
102
+
103
+ return result;
104
+ };
105
+
106
+ config.defaults = {};
107
+
108
+ $.removeCookie = function (key, options) {
109
+ if ($.cookie(key) !== undefined) {
110
+ // Must not alter options, thus extending a fresh object...
111
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
112
+ return true;
113
+ }
114
+ return false;
115
+ };
116
+
117
+ }));
js/jquery.rateit.min.js ADDED
@@ -0,0 +1,7 @@
1
+ /*! RateIt | v1.0.22 / 05/27/2014 | https://rateit.codeplex.com/license
2
+ http://rateit.codeplex.com | Twitter: @gjunge
3
+ */
4
+ (function(n){function t(n){var u=n.originalEvent.changedTouches,t=u[0],i="",r;switch(n.type){case"touchmove":i="mousemove";break;case"touchend":i="mouseup";break;default:return}r=document.createEvent("MouseEvent");r.initMouseEvent(i,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null);t.target.dispatchEvent(r);n.preventDefault()}n.rateit={aria:{resetLabel:"reset rating",ratingLabel:"rating"}};n.fn.rateit=function(i,r){var e=1,u={},o="init",s=function(n){return n.charAt(0).toUpperCase()+n.substr(1)},f;if(this.length===0)return this;if(f=n.type(i),f=="object"||i===undefined||i===null)u=n.extend({},n.fn.rateit.defaults,i);else{if(f=="string"&&i!=="reset"&&r===undefined)return this.data("rateit"+s(i));f=="string"&&(o="setvalue")}return this.each(function(){var c=n(this),f=function(n,t){if(t!=null){var i="aria-value"+(n=="value"?"now":n),r=c.find(".rateit-range");r.attr(i)!=undefined&&r.attr(i,t)}return arguments[0]="rateit"+s(n),c.data.apply(c,arguments)},p,w,v,h,b,g,nt,l,y,k,a;if(i=="reset"){p=f("init");for(w in p)c.data(w,p[w]);f("backingfld")&&(h=n(f("backingfld")),h.val(f("value")),h.trigger("change"),h[0].min&&(h[0].min=f("min")),h[0].max&&(h[0].max=f("max")),h[0].step&&(h[0].step=f("step")));c.trigger("reset")}if(c.hasClass("rateit")||c.addClass("rateit"),v=c.css("direction")!="rtl",o=="setvalue"){if(!f("init"))throw"Can't set value before init";i!="readonly"||r!=!0||f("readonly")||(c.find(".rateit-range").unbind(),f("wired",!1));i=="value"&&(r=r==null?f("min"):Math.max(f("min"),Math.min(f("max"),r)));f("backingfld")&&(h=n(f("backingfld")),i=="value"&&h.val(r),i=="min"&&h[0].min&&(h[0].min=r),i=="max"&&h[0].max&&(h[0].max=r),i=="step"&&h[0].step&&(h[0].step=r));f(i,r)}f("init")||(f("min",isNaN(f("min"))?u.min:f("min")),f("max",isNaN(f("max"))?u.max:f("max")),f("step",f("step")||u.step),f("readonly",f("readonly")!==undefined?f("readonly"):u.readonly),f("resetable",f("resetable")!==undefined?f("resetable"):u.resetable),f("backingfld",f("backingfld")||u.backingfld),f("starwidth",f("starwidth")||u.starwidth),f("starheight",f("starheight")||u.starheight),f("value",Math.max(f("min"),Math.min(f("max"),isNaN(f("value"))?isNaN(u.value)?u.min:u.value:f("value")))),f("ispreset",f("ispreset")!==undefined?f("ispreset"):u.ispreset),f("backingfld")&&(h=n(f("backingfld")).hide(),(h.attr("disabled")||h.attr("readonly"))&&f("readonly",!0),h[0].nodeName=="INPUT"&&(h[0].type=="range"||h[0].type=="text")&&(f("min",parseInt(h.attr("min"))||f("min")),f("max",parseInt(h.attr("max"))||f("max")),f("step",parseInt(h.attr("step"))||f("step"))),h[0].nodeName=="SELECT"&&h[0].options.length>1?(f("min",isNaN(f("min"))?Number(h[0].options[0].value):f("min")),f("max",Number(h[0].options[h[0].length-1].value)),f("step",Number(h[0].options[1].value)-Number(h[0].options[0].value)),b=h.find("option[selected]"),b.length==1&&f("value",b.val())):f("value",h.val())),g=c[0].nodeName=="DIV"?"div":"span",e++,nt='<button id="rateit-reset-{{index}}" type="button" data-role="none" class="rateit-reset" aria-label="'+n.rateit.aria.resetLabel+'" aria-controls="rateit-range-{{index}}"><\/button><{{element}} id="rateit-range-{{index}}" class="rateit-range" tabindex="0" role="slider" aria-label="'+n.rateit.aria.ratingLabel+'" aria-owns="rateit-reset-{{index}}" aria-valuemin="'+f("min")+'" aria-valuemax="'+f("max")+'" aria-valuenow="'+f("value")+'"><{{element}} class="rateit-selected" style="height:'+f("starheight")+'px"><\/{{element}}><{{element}} class="rateit-hover" style="height:'+f("starheight")+'px"><\/{{element}}><\/{{element}}>',c.append(nt.replace(/{{index}}/gi,e).replace(/{{element}}/gi,g)),v||(c.find(".rateit-reset").css("float","right"),c.find(".rateit-selected").addClass("rateit-selected-rtl"),c.find(".rateit-hover").addClass("rateit-hover-rtl")),f("init",JSON.parse(JSON.stringify(c.data()))));c.find(".rateit-selected, .rateit-hover").height(f("starheight"));l=c.find(".rateit-range");l.width(f("starwidth")*(f("max")-f("min"))).height(f("starheight"));y="rateit-preset"+(v?"":"-rtl");f("ispreset")?c.find(".rateit-selected").addClass(y):c.find(".rateit-selected").removeClass(y);f("value")!=null&&(k=(f("value")-f("min"))*f("starwidth"),c.find(".rateit-selected").width(k));a=c.find(".rateit-reset");a.data("wired")!==!0&&a.bind("click",function(t){t.preventDefault();a.blur();var i=n.Event("beforereset");if(c.trigger(i),i.isDefaultPrevented())return!1;c.rateit("value",null);c.trigger("reset")}).data("wired",!0);var tt=function(t,i){var u=i.changedTouches?i.changedTouches[0].pageX:i.pageX,r=u-n(t).offset().left;return v||(r=l.width()-r),r>l.width()&&(r=l.width()),r<0&&(r=0),k=Math.ceil(r/f("starwidth")*(1/f("step")))},it=function(n){var t=n*f("starwidth")*f("step"),r=l.find(".rateit-hover"),i;r.data("width")!=t&&(l.find(".rateit-selected").hide(),r.width(t).show().data("width",t),i=[n*f("step")+f("min")],c.trigger("hover",i).trigger("over",i))},d=function(t){var i=n.Event("beforerated");return(c.trigger(i,[t]),i.isDefaultPrevented())?!1:(f("value",t),f("backingfld")&&n(f("backingfld")).val(t).trigger("change"),f("ispreset")&&(l.find(".rateit-selected").removeClass(y),f("ispreset",!1)),l.find(".rateit-hover").hide(),l.find(".rateit-selected").width(t*f("starwidth")-f("min")*f("starwidth")).show(),c.trigger("hover",[null]).trigger("over",[null]).trigger("rated",[t]),!0)};f("readonly")?a.hide():(f("resetable")||a.hide(),f("wired")||(l.bind("touchmove touchend",t),l.mousemove(function(n){var t=tt(this,n);it(t)}),l.mouseleave(function(){l.find(".rateit-hover").hide().width(0).data("width","");c.trigger("hover",[null]).trigger("over",[null]);l.find(".rateit-selected").show()}),l.mouseup(function(n){var t=tt(this,n),i=t*f("step")+f("min");d(i);l.blur()}),l.keyup(function(n){(n.which==38||n.which==(v?39:37))&&d(Math.min(f("value")+f("step"),f("max")));(n.which==40||n.which==(v?37:39))&&d(Math.max(f("value")-f("step"),f("min")))}),f("wired",!0)),f("resetable")&&a.show());l.attr("aria-readonly",f("readonly"))})};n.fn.rateit.defaults={min:0,max:5,step:.5,starwidth:16,starheight:16,readonly:!1,resetable:!0,ispreset:!1};n(function(){n("div.rateit, span.rateit").rateit()})})(jQuery);
5
+ /*
6
+ //# sourceMappingURL=jquery.rateit.min.js.map
7
+ */
languages/yasr-it_IT.mo ADDED
Binary file
languages/yasr-it_IT.po ADDED
@@ -0,0 +1,32 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Yasr Translation\n"
4
+ "POT-Creation-Date: 2014-03-01 18:24+0100\n"
5
+ "PO-Revision-Date: 2014-03-01 18:25+0100\n"
6
+ "Last-Translator: Dario <thedudoworld@gmail.com>\n"
7
+ "Language-Team: \n"
8
+ "Language: it\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.4\n"
13
+ "X-Poedit-KeywordsList: __;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../yet-another-stars-rating.php:48
19
+ msgid "Overall Ranking"
20
+ msgstr "Voto Complessivo"
21
+
22
+ #: ../lib/yasr-functions.php:22
23
+ msgid "Front Page"
24
+ msgstr "Pagina Principale"
25
+
26
+ #: ../lib/yasr-functions.php:25
27
+ msgid "Settings"
28
+ msgstr "Impostazioni"
29
+
30
+ #: ../lib/yasr-functions.php:33 ../lib/yasr-functions.php:41
31
+ msgid "You do not have sufficient permissions to access this page."
32
+ msgstr ""
languages/yasr.mo ADDED
Binary file
languages/yasr.pot ADDED
@@ -0,0 +1,409 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Yasr Translation\n"
4
+ "POT-Creation-Date: 2014-06-07 16:41+0100\n"
5
+ "PO-Revision-Date: 2014-06-07 16:41+0100\n"
6
+ "Last-Translator: Dario <thedudoworld@gmail.com>\n"
7
+ "Language-Team: Me\n"
8
+ "Language: en-gb\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.4\n"
13
+ "X-Poedit-KeywordsList: __;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../yasr-settings-page.php:6 ../lib/yasr-functions.php:134
19
+ #: ../lib/yasr-functions.php:216 ../lib/yasr-functions.php:223
20
+ #: ../lib/yasr-ajax-functions.php:29 ../lib/yasr-ajax-functions.php:202
21
+ msgid "You do not have sufficient permissions to access this page."
22
+ msgstr ""
23
+
24
+ #: ../yasr-settings-page.php:12 ../yasr-settings-page.php:131
25
+ msgid "Donations"
26
+ msgstr ""
27
+
28
+ #: ../yasr-settings-page.php:14 ../yasr-settings-page.php:133
29
+ msgid ""
30
+ "If you have found this plugin useful, please consider making a donation to "
31
+ "help support future development. Your support will be much appreciated. "
32
+ msgstr ""
33
+
34
+ #: ../yasr-settings-page.php:16 ../yasr-settings-page.php:135
35
+ msgid "Thank you!"
36
+ msgstr ""
37
+
38
+ #: ../yasr-settings-page.php:31
39
+ msgid "Manage multi set"
40
+ msgstr ""
41
+
42
+ #: ../yasr-settings-page.php:35
43
+ msgid "Add new multi-set"
44
+ msgstr ""
45
+
46
+ #: ../yasr-settings-page.php:71
47
+ msgid "Import Gd Star Rating"
48
+ msgstr ""
49
+
50
+ #: ../yasr-settings-page.php:72
51
+ msgid ""
52
+ "I've found a previous installation of Gd Star Rating . <br />Do you want "
53
+ "proceed to import data?"
54
+ msgstr ""
55
+
56
+ #: ../yasr-settings-page.php:74
57
+ msgid "Yes, Begin Import"
58
+ msgstr ""
59
+
60
+ #: ../yasr-settings-page.php:78
61
+ msgid "Click on Proceed to Import Gd Star Rating Data."
62
+ msgstr ""
63
+
64
+ #: ../yasr-settings-page.php:81 ../yasr-settings-page.php:110
65
+ msgid "Proceed"
66
+ msgstr ""
67
+
68
+ #: ../yasr-settings-page.php:99
69
+ msgid "Manage GD Star Data"
70
+ msgstr ""
71
+
72
+ #: ../yasr-settings-page.php:100
73
+ msgid "Gd Star Rating has been already imported."
74
+ msgstr ""
75
+
76
+ #: ../yasr-settings-page.php:101
77
+ msgid "If you wish you can import it again, but"
78
+ msgstr ""
79
+
80
+ #: ../yasr-settings-page.php:101
81
+ msgid "you will lose all data you've collect since the import!"
82
+ msgstr ""
83
+
84
+ #: ../yasr-settings-page.php:103
85
+ msgid "Ok, Import Again"
86
+ msgstr ""
87
+
88
+ #: ../yasr-settings-page.php:107
89
+ msgid ""
90
+ "Click on Proceed to Import again Gd Star Rating Data. This may take a while!"
91
+ msgstr ""
92
+
93
+ #: ../yasr-metabox-multiple-rating.php:13
94
+ msgid "Choose wich set you want to use"
95
+ msgstr ""
96
+
97
+ #: ../yasr-metabox-overall-rating.php:16
98
+ msgid "Rate this article / item"
99
+ msgstr ""
100
+
101
+ #: ../lib/yasr-shortcode-functions.php:51 ../lib/yasr-ajax-functions.php:878
102
+ #: ../lib/yasr-ajax-functions.php:906
103
+ msgid "Average Rating"
104
+ msgstr ""
105
+
106
+ #: ../lib/yasr-shortcode-functions.php:55
107
+ msgid "No rating yet"
108
+ msgstr ""
109
+
110
+ #: ../lib/yasr-db-functions.php:96
111
+ msgid "Gd Star Rating non trovato"
112
+ msgstr ""
113
+
114
+ #: ../lib/yasr-db-functions.php:506 ../lib/yasr-db-functions.php:721
115
+ msgid "Settings Saved"
116
+ msgstr ""
117
+
118
+ #: ../lib/yasr-db-functions.php:511
119
+ msgid "Something goes wrong trying insert set field name. Please report it"
120
+ msgstr ""
121
+
122
+ #: ../lib/yasr-db-functions.php:517
123
+ msgid "Something goes wrong trying insert multi set name. Please report it"
124
+ msgstr ""
125
+
126
+ #: ../lib/yasr-db-functions.php:584
127
+ msgid "Something goes wrong trying to delete a multi-set . Please report it"
128
+ msgstr ""
129
+
130
+ #: ../lib/yasr-db-functions.php:589
131
+ msgid ""
132
+ "Something goes wrong trying to delete data values for a set. Please report it"
133
+ msgstr ""
134
+
135
+ #: ../lib/yasr-db-functions.php:620
136
+ msgid ""
137
+ "Something goes wrong trying to delete a multi-set element. Please report it"
138
+ msgstr ""
139
+
140
+ #: ../lib/yasr-db-functions.php:625
141
+ msgid ""
142
+ "Something goes wrong trying to delete data value for an element. Please "
143
+ "report it"
144
+ msgstr ""
145
+
146
+ #: ../lib/yasr-db-functions.php:665
147
+ msgid ""
148
+ "Something goes wrong trying to update a multi set element. Please report it"
149
+ msgstr ""
150
+
151
+ #: ../lib/yasr-db-functions.php:706
152
+ msgid ""
153
+ "Something goes wrong trying to insert set field name in edit form. Please "
154
+ "report it"
155
+ msgstr ""
156
+
157
+ #: ../lib/yasr-db-functions.php:765 ../lib/yasr-ajax-functions.php:678
158
+ msgid "anonymous"
159
+ msgstr ""
160
+
161
+ #: ../lib/yasr-db-functions.php:788 ../lib/yasr-ajax-functions.php:701
162
+ msgid "Ip address"
163
+ msgstr ""
164
+
165
+ #: ../lib/yasr-db-functions.php:826 ../lib/yasr-ajax-functions.php:739
166
+ msgid "Pages"
167
+ msgstr ""
168
+
169
+ #: ../lib/yasr-functions.php:40
170
+ msgid "Yet Another Stars Rating: Settings"
171
+ msgstr ""
172
+
173
+ #: ../lib/yasr-functions.php:64
174
+ msgid "Auto insert Settings"
175
+ msgstr ""
176
+
177
+ #: ../lib/yasr-functions.php:65
178
+ msgid "Use auto insert?"
179
+ msgstr ""
180
+
181
+ #: ../lib/yasr-functions.php:66
182
+ msgid "What?"
183
+ msgstr ""
184
+
185
+ #: ../lib/yasr-functions.php:67
186
+ msgid "Where?"
187
+ msgstr ""
188
+
189
+ #: ../lib/yasr-functions.php:80
190
+ msgid "Yes"
191
+ msgstr ""
192
+
193
+ #: ../lib/yasr-functions.php:84
194
+ msgid "No"
195
+ msgstr ""
196
+
197
+ #: ../lib/yasr-functions.php:104
198
+ msgid "Overall Rating / Author Rating"
199
+ msgstr ""
200
+
201
+ #: ../lib/yasr-functions.php:108 ../lib/yasr-ajax-functions.php:299
202
+ msgid "Visitor Votes"
203
+ msgstr ""
204
+
205
+ #: ../lib/yasr-functions.php:112
206
+ msgid "Both"
207
+ msgstr ""
208
+
209
+ #: ../lib/yasr-functions.php:121
210
+ msgid "Before the post"
211
+ msgstr ""
212
+
213
+ #: ../lib/yasr-functions.php:125
214
+ msgid "After the post"
215
+ msgstr ""
216
+
217
+ #: ../lib/yasr-functions.php:176
218
+ msgid "Save"
219
+ msgstr ""
220
+
221
+ #: ../lib/yasr-functions.php:202 ../lib/yasr-functions.php:209
222
+ msgid "Overall Rating"
223
+ msgstr ""
224
+
225
+ #: ../lib/yasr-functions.php:203
226
+ msgid "Yet Another Stars Rating: Multiple set"
227
+ msgstr ""
228
+
229
+ #: ../lib/yasr-functions.php:248
230
+ msgid " reviewed by "
231
+ msgstr ""
232
+
233
+ #: ../lib/yasr-functions.php:249
234
+ msgid " on "
235
+ msgstr ""
236
+
237
+ #: ../lib/yasr-functions.php:250
238
+ msgid " rated "
239
+ msgstr ""
240
+
241
+ #: ../lib/yasr-functions.php:250
242
+ msgid " on 5.0"
243
+ msgstr ""
244
+
245
+ #: ../lib/yasr-functions.php:369
246
+ msgid ""
247
+ "Field Name, Element#1 and Element#2 MUST be filled and must be long at least "
248
+ "3 characters"
249
+ msgstr ""
250
+
251
+ #: ../lib/yasr-functions.php:372
252
+ msgid "Name"
253
+ msgstr ""
254
+
255
+ #: ../lib/yasr-functions.php:377
256
+ msgid "You can insert up to nine element"
257
+ msgstr ""
258
+
259
+ #: ../lib/yasr-functions.php:382
260
+ msgid "Element "
261
+ msgstr ""
262
+
263
+ #: ../lib/yasr-functions.php:392
264
+ msgid "Create New Set"
265
+ msgstr ""
266
+
267
+ #: ../lib/yasr-functions.php:411 ../lib/yasr-functions.php:431
268
+ msgid "Manage existing multi-set"
269
+ msgstr ""
270
+
271
+ #: ../lib/yasr-functions.php:415
272
+ msgid "Wich set do you want to edit or remove?"
273
+ msgstr ""
274
+
275
+ #: ../lib/yasr-functions.php:455
276
+ msgid "No multiple set were found"
277
+ msgstr ""
278
+
279
+ #: ../lib/yasr-ajax-functions.php:91 ../lib/yasr-ajax-functions.php:151
280
+ msgid "Choose a vote for every element"
281
+ msgstr ""
282
+
283
+ #: ../lib/yasr-ajax-functions.php:140 ../lib/yasr-ajax-functions.php:174
284
+ msgid "Remember to insert this shortcode"
285
+ msgstr ""
286
+
287
+ #: ../lib/yasr-ajax-functions.php:142 ../lib/yasr-ajax-functions.php:176
288
+ msgid "where you want to display this multi set"
289
+ msgstr ""
290
+
291
+ #: ../lib/yasr-ajax-functions.php:294
292
+ msgid "Overall Rating / Review"
293
+ msgstr ""
294
+
295
+ #: ../lib/yasr-ajax-functions.php:296
296
+ msgid "Insert Overall Rating / Review for this post"
297
+ msgstr ""
298
+
299
+ #: ../lib/yasr-ajax-functions.php:301
300
+ msgid "Insert the ability for your visitor to vote"
301
+ msgstr ""
302
+
303
+ #: ../lib/yasr-ajax-functions.php:307
304
+ msgid "If you want to insert a multi-set, pick one:"
305
+ msgstr ""
306
+
307
+ #: ../lib/yasr-ajax-functions.php:313
308
+ msgid "Choose wich set you want to insert."
309
+ msgstr ""
310
+
311
+ #: ../lib/yasr-ajax-functions.php:321
312
+ msgid "Insert Multiset:"
313
+ msgstr ""
314
+
315
+ #: ../lib/yasr-ajax-functions.php:432
316
+ msgid "Field name"
317
+ msgstr ""
318
+
319
+ #: ../lib/yasr-ajax-functions.php:436
320
+ msgid "Remove"
321
+ msgstr ""
322
+
323
+ #: ../lib/yasr-ajax-functions.php:484
324
+ msgid ""
325
+ "If you remove something you will remove all the votes for that set or field. "
326
+ "This operation CAN'T BE undone."
327
+ msgstr ""
328
+
329
+ #: ../lib/yasr-ajax-functions.php:491
330
+ msgid "You can use up to 9 elements"
331
+ msgstr ""
332
+
333
+ #: ../lib/yasr-ajax-functions.php:493
334
+ msgid "Add element"
335
+ msgstr ""
336
+
337
+ #: ../lib/yasr-ajax-functions.php:495
338
+ msgid "Save changes"
339
+ msgstr ""
340
+
341
+ #: ../lib/yasr-ajax-functions.php:536
342
+ msgid "Reviews and visitor votes have been successfull imported."
343
+ msgstr ""
344
+
345
+ #: ../lib/yasr-ajax-functions.php:538
346
+ msgid ""
347
+ "Step2: I will check if you used multiple set and if so I will import it. "
348
+ "THIS MAY TAKE A WHILE!"
349
+ msgstr ""
350
+
351
+ #: ../lib/yasr-ajax-functions.php:540
352
+ msgid "Proceed Step 2"
353
+ msgstr ""
354
+
355
+ #: ../lib/yasr-ajax-functions.php:547
356
+ msgid "Something goes wrong! Refresh the page and try again!"
357
+ msgstr ""
358
+
359
+ #: ../lib/yasr-ajax-functions.php:571
360
+ msgid "I've found multiple set! Importing..."
361
+ msgstr ""
362
+
363
+ #: ../lib/yasr-ajax-functions.php:580
364
+ msgid "Multi set's name has been successfull imported."
365
+ msgstr ""
366
+
367
+ #: ../lib/yasr-ajax-functions.php:582
368
+ msgid "Now I'm going to import multi set data"
369
+ msgstr ""
370
+
371
+ #: ../lib/yasr-ajax-functions.php:593
372
+ msgid "All votes has been successfull imported."
373
+ msgstr ""
374
+
375
+ #: ../lib/yasr-ajax-functions.php:596
376
+ msgid "Done"
377
+ msgstr ""
378
+
379
+ #: ../lib/yasr-ajax-functions.php:601
380
+ msgid "I've found multiple set votes but I couldn't insert into db"
381
+ msgstr ""
382
+
383
+ #: ../lib/yasr-ajax-functions.php:609
384
+ msgid "I've found multi set but with no data"
385
+ msgstr ""
386
+
387
+ #: ../lib/yasr-ajax-functions.php:618
388
+ msgid "I've found multi set name but I couldn't insert into db"
389
+ msgstr ""
390
+
391
+ #: ../lib/yasr-ajax-functions.php:626
392
+ msgid "Multiset was not found. Imported is done!"
393
+ msgstr ""
394
+
395
+ #: ../lib/yasr-ajax-functions.php:665
396
+ msgid "No Recenet votes yet"
397
+ msgstr ""
398
+
399
+ #: ../lib/yasr-ajax-functions.php:878 ../lib/yasr-ajax-functions.php:883
400
+ msgid "Vote Saved"
401
+ msgstr ""
402
+
403
+ #: ../lib/yasr-ajax-functions.php:878 ../lib/yasr-ajax-functions.php:906
404
+ msgid "votes casts"
405
+ msgstr ""
406
+
407
+ #: ../lib/yasr-ajax-functions.php:883
408
+ msgid "vote casts"
409
+ msgstr ""
lib/yasr-ajax-functions.php ADDED
@@ -0,0 +1,915 @@
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
4
+
5
+ /*************************** Admin ajax functions ***********************/
6
+
7
+ /********** Functions used while wirting a new post or page ********/
8
+
9
+ /****** Get id and overall rating from post or page and write it in db, used in yasr-metabox-overall-rating******/
10
+
11
+ add_action( 'wp_ajax_yasr_send_overall_rating', 'yasr_insert_overall_rating_callback' );
12
+
13
+ function yasr_insert_overall_rating_callback() {
14
+
15
+ if (isset($_POST['rating']) && ($_POST['post_id'])) {
16
+ global $current_user;
17
+ get_currentuserinfo();
18
+
19
+ $rating = $_POST['rating'];
20
+ $post_id = $_POST['post_id'];
21
+ $reviewer_id = $current_user->ID;
22
+ }
23
+
24
+ else {
25
+ exit();
26
+ }
27
+
28
+ if ( ! current_user_can( 'manage_options' ) ) {
29
+ wp_die( __( 'You do not have sufficient permissions to access this page.', 'yasr' ) );
30
+ }
31
+
32
+ global $wpdb;
33
+
34
+ //If update works means that visitor already rated this post
35
+ $update_result=$wpdb->update(
36
+ YASR_VOTES_TABLE,
37
+ array (
38
+ 'overall_rating' => $rating,
39
+ 'reviewer_id' => $reviewer_id
40
+ ),
41
+ array('post_id' => $post_id),
42
+ array('%s', '%d')
43
+ );
44
+
45
+ if($update_result) {
46
+ echo $rating;
47
+ }
48
+ //else this is a new post or post has no visitor ratings
49
+ else {
50
+ $replace_result=$wpdb->replace(
51
+ YASR_VOTES_TABLE,
52
+ array (
53
+ 'post_id' => $post_id,
54
+ 'overall_rating' => $rating,
55
+ 'reviewer_id' => $reviewer_id
56
+ ),
57
+ array('%d', '%s', '%d')
58
+ );
59
+ if ($replace_result){
60
+ echo $rating;
61
+ }
62
+ }
63
+
64
+ die(); // this is required to return a proper result
65
+ }
66
+
67
+
68
+
69
+ /****** Get Set name from post or page and output the set,
70
+ used in yasr-metabox-multiple-rating******/
71
+
72
+ add_action( 'wp_ajax_yasr_send_id_nameset', 'yasr_output_multiple_set_callback' );
73
+
74
+ function yasr_output_multiple_set_callback() {
75
+ if(isset($_POST['set_id']) && isset($_POST['post_id'])) {
76
+ $set_type = $_POST['set_id'];
77
+ $post_id = $_POST['post_id'];
78
+ }
79
+ else {
80
+ exit();
81
+ }
82
+
83
+ global $wpdb;
84
+
85
+ $set_values=yasr_get_multi_set_values_and_field ($post_id, $set_type);
86
+
87
+ //If this is a new post or post has no multi values data
88
+ if (!$set_values) {
89
+ echo "<p>";
90
+
91
+ _e('Choose a vote for every element', 'yasr');
92
+
93
+ echo "
94
+
95
+ <br /> <br />
96
+
97
+ <table class=\"yasr_table_multi_set_admin\">";
98
+ //Get Set fields name
99
+ $set_name=$wpdb->get_results("SELECT field_name AS name, field_id AS id
100
+ FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
101
+ WHERE parent_set_id=$set_type
102
+ ORDER BY field_id ASC");
103
+
104
+ foreach ($set_name as $name) {
105
+
106
+ //get the highest id in table
107
+ $highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . " ORDER BY id DESC LIMIT 1 ");
108
+
109
+ if (!$highest_id) {
110
+ $new_id=0;
111
+ }
112
+
113
+ foreach ($highest_id as $id) {
114
+ $new_id=$id->id + 1;
115
+ }
116
+
117
+ $query_success=$wpdb->replace(
118
+ YASR_MULTI_SET_VALUES_TABLE,
119
+ array (
120
+ 'id'=>$new_id,
121
+ 'post_id'=>$post_id,
122
+ 'field_id'=>$name->id,
123
+ 'votes'=>'-1',
124
+ 'set_type'=>$set_type
125
+ ),
126
+ array ("%d", "%d", "%d", "%s", "%d")
127
+ );
128
+
129
+ echo "<tr> <td>";
130
+ echo "$name->name </td>";
131
+ echo "<td> <div class=\"rateit\" id=\"$name->id\" data-rateit-value=\"\" data-rateit-step=\"0.5\" data-rateit-resetable=\"true\" data-rateit-readonly=\"false\"></div> </td>";
132
+ echo "</tr>";
133
+ }
134
+ echo "</table>
135
+
136
+ </p>";
137
+
138
+ echo "<p>";
139
+
140
+ _e("Remember to insert this shortcode", "yasr");
141
+ echo "<strong> [yasr_multiset setid=$set_type] </strong>";
142
+ _e("where you want to display this multi set", "yasr");
143
+
144
+ echo "</p>";
145
+
146
+ } //
147
+
148
+ //else means that post already has vote and here I show it
149
+ else {
150
+
151
+ _e('Choose a vote for every element', 'yasr');
152
+
153
+ echo "<table class=\"yasr_table_multi_set_admin\">";
154
+ foreach ($set_values as $set_content) {
155
+ echo "<tr><td width=\"50%\">$set_content->name </td>";
156
+
157
+ $integer_vote = floor($set_content->vote);
158
+ if($set_content->vote < ($integer_vote+0.3)) {
159
+ $set_content->vote = $integer_vote;
160
+ }
161
+ elseif ($set_content->vote >= ($integer_vote+0.3) AND $set_content->vote < ($integer_vote+0.7)) {
162
+ $set_content->vote = $integer_vote+0.5;
163
+ }
164
+ elseif ($set_content->vote >= ($integer_vote+0.7)) {
165
+ $set_content->vote = $integer_vote+1;
166
+ }
167
+
168
+ echo "<td width=\"50%\"> <div class=\"rateit\" id=\"$set_content->id\" data-rateit-value=\"$set_content->vote\" data-rateit-step=\"0.5\" data-rateit-resetable=\"true\" data-rateit-readonly=\"false\"></div> </td></tr>";
169
+ } //End foreach
170
+ echo "</table>";
171
+
172
+ echo "<p>";
173
+
174
+ _e("Remember to insert this shortcode", "yasr");
175
+ echo "<strong> [yasr_multiset setid=$set_type] </strong>";
176
+ _e("where you want to display this multi set", "yasr");
177
+
178
+ echo "</p>";
179
+ }
180
+
181
+ die();
182
+ }
183
+
184
+
185
+ /****** Get multiple value and insert into database, used in yasr-metabox-multiple-rating ******/
186
+
187
+ add_action( 'wp_ajax_yasr_send_id_field_with_vote', 'yasr_get_multiple_votes_callback' );
188
+
189
+ function yasr_get_multiple_votes_callback() {
190
+
191
+ if (isset($_POST['post_id']) && isset($_POST['rating']) && isset($_POST['id_field']) && isset($_POST['set_type'])) {
192
+ $post_id = $_POST['post_id'];
193
+ $vote = $_POST['rating'];
194
+ $id_field = $_POST['id_field'];
195
+ $set_type = $_POST['set_type'];
196
+ }
197
+ else {
198
+ exit();
199
+ }
200
+
201
+ if ( ! current_user_can( 'manage_options' ) ) {
202
+ wp_die( __( 'You do not have sufficient permissions to access this page.', 'yasr' ) );
203
+ }
204
+
205
+ global $wpdb;
206
+
207
+ //Check if vote already exist
208
+ $vote_already_exist=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . "
209
+ WHERE post_id = $post_id
210
+ AND set_type = $set_type
211
+ AND field_id = $id_field
212
+ ");
213
+
214
+ //If vote already exist, overwrite it
215
+ if ($vote_already_exist) {
216
+ foreach ($vote_already_exist as $index_id) {
217
+ $id = $index_id->id;
218
+ }
219
+ $query_success=$wpdb->replace(
220
+ YASR_MULTI_SET_VALUES_TABLE,
221
+ array (
222
+ 'id'=>$id,
223
+ 'post_id'=>$post_id,
224
+ 'field_id'=>$id_field,
225
+ 'votes'=>$vote,
226
+ 'set_type'=>$set_type
227
+ ),
228
+ array ("%d", "%d", "%d", "%s", "%d")
229
+ );
230
+ if($query_success) {
231
+ echo $vote;
232
+ }
233
+ } //End if vote already exist
234
+
235
+ //If vote doesn't exist create a new one
236
+ else {
237
+
238
+ //get the highest id in table
239
+ $highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . " ORDER BY id DESC LIMIT 1 ");
240
+
241
+ if (!$highest_id) {
242
+ $new_id=0;
243
+ }
244
+
245
+ foreach ($highest_id as $id) {
246
+ $new_id=$id->id + 1;
247
+ }
248
+
249
+ $result=$wpdb->replace(
250
+ YASR_MULTI_SET_VALUES_TABLE,
251
+ array (
252
+ 'id' => $new_id,
253
+ 'post_id'=>$post_id,
254
+ 'field_id'=>$id_field,
255
+ 'votes'=>$vote,
256
+ 'set_type'=>$set_type
257
+ ),
258
+ array ("%d", "%d", "%s", "%d")
259
+ );
260
+
261
+ if($result) {
262
+ echo $vote;
263
+ }
264
+
265
+ } //End else
266
+ die();
267
+ } //End callback function
268
+
269
+
270
+
271
+ /****** Create the content for the button shortcode in Tinymce ******/
272
+
273
+ //Add ajax action that will be called from the .js for button in tinymce
274
+ add_action('wp_ajax_yasr_create_shortcode', 'wp_ajax_yasr_create_shortcode_callback');
275
+
276
+ function wp_ajax_yasr_create_shortcode_callback() {
277
+ if (isset($_POST['action'])) {
278
+ $action=$_POST['action'];
279
+ }
280
+ else {
281
+ exit();
282
+ }
283
+
284
+ global $wpdb;
285
+
286
+ $multi_set=yasr_get_multi_set();
287
+
288
+ $n_multi_set=$wpdb->num_rows;
289
+
290
+ ?>
291
+ <div id="yasr-form">
292
+ <table id="yasr-table" class="form-table">
293
+ <tr>
294
+ <th><label for="yasr-overall"><?php _e("Overall Rating / Review"); ?></label></th>
295
+ <td><input type="button" class="button-primary" id="yasr-overall" name="yasr-overall" value="Insert Overall Rating" /><br />
296
+ <small><?php _e("Insert Overall Rating / Review for this post"); ?></small></td>
297
+ </tr>
298
+ <tr>
299
+ <th><label for="yasr-id"><?php _e("Visitor Votes"); ?></label></th>
300
+ <td><input type="button" class="button-primary" name="yasr-visitor-votes" id="yasr-visitor-votes" value="Insert Visitor Votes"/><br />
301
+ <small><?php _e("Insert the ability for your visitor to vote"); ?></small></td>
302
+ </tr>
303
+
304
+ <?php if ($n_multi_set>1) { //If multiple Set are found ?>
305
+
306
+ <tr>
307
+ <th><label for="yasr-size"><?php _e("If you want to insert a multi-set, pick one:"); ?></label></th>
308
+ <td>
309
+ <?php foreach ($multi_set as $name) { ?>
310
+ <input type="radio" value="<?php echo $name->set_id ?>" name="yasr_tinymce_pick_set" class="yasr_tinymce_select_set"><?php echo $name->set_name ?>
311
+ <br />
312
+ <?php } //End foreach ?>
313
+ <small><?php _e("Choose wich set you want to insert."); ?></small>
314
+ </td>
315
+ </tr>
316
+
317
+ <?php } //End if
318
+
319
+ elseif ($n_multi_set==1) { ?>
320
+ <tr>\
321
+ <th><label for="yasr-size"><?php _e("Insert Multiset:"); ?></label></th>
322
+ <td>
323
+ <?php foreach ($multi_set as $name) { ?>
324
+ <button type="button" class="button-primary" id="yasr-single-set" name="yasr-single-set" value="<?php echo $name->set_id ?>" >Insert Multiple Set</button><br />
325
+ <small><?php _e("Insert multiple set <?php echo $name->set_name ?> in this post ?"); ?></small>
326
+ <?php } //End foreach ?>
327
+ </td>
328
+ </tr>
329
+ <?php
330
+ }
331
+ //End elseif ?>
332
+
333
+ </table>
334
+ </div>
335
+
336
+ <script>
337
+ // Add shortcode fore overall rating
338
+ jQuery('#yasr-overall').on("click", function(){
339
+ var shortcode = '[yasr_overall_rating]';
340
+ // inserts the shortcode into the active editor
341
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
342
+ // closes Thickbox
343
+ tb_remove();
344
+ });
345
+
346
+ //Add shortcode for visitors rating
347
+ jQuery('#yasr-visitor-votes').on("click", function(){
348
+ var shortcode = '[yasr_visitor_votes]';
349
+ // inserts the shortcode into the active editor
350
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
351
+ // closes Thickbox
352
+ tb_remove();
353
+ });
354
+
355
+ <?php if ($n_multi_set>1) { ?>
356
+
357
+ //Add shortcode for multiple set
358
+ jQuery('.yasr_tinymce_select_set').on("click", function(){
359
+ var setType = jQuery("input:radio[name=yasr_tinymce_pick_set]:checked" ).val();
360
+ var shortcode = '[yasr_multiset setid=';
361
+ shortcode += setType;
362
+ shortcode += ']';
363
+ // inserts the shortcode into the active editor
364
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
365
+ // closes Thickbox
366
+ tb_remove();
367
+ });
368
+
369
+ <?php } //End if
370
+
371
+ elseif ($n_multi_set==1) { ?>
372
+
373
+ //Add shortcode for single set (if only 1 are found)
374
+ jQuery('#yasr-single-set').on("click", function(){
375
+ var setType = jQuery('#yasr-single-set').val();
376
+ var shortcode = '[yasr_multiset setid=';
377
+ shortcode += setType;
378
+ shortcode += ']';
379
+ // inserts the shortcode into the active editor
380
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
381
+ // closes Thickbox
382
+ tb_remove();
383
+ });
384
+
385
+ <?php
386
+ }
387
+ //End elseif ?>
388
+
389
+ </script>
390
+
391
+ <?php
392
+ die();
393
+
394
+ } //End callback function
395
+
396
+ /********** END Functions used while wirting a new post or page ********/
397
+
398
+
399
+
400
+
401
+ /****** Get multiple set, used in settings page ******/
402
+
403
+ add_action( 'wp_ajax_yasr_get_multi_set', 'yasr_get_multi_set_callback' );
404
+
405
+ function yasr_get_multi_set_callback() {
406
+ if (isset($_POST['set_id'])) {
407
+ $set_type = $_POST['set_id'];
408
+ }
409
+ else {
410
+ exit ();
411
+ }
412
+
413
+ global $wpdb;
414
+
415
+ $set_name=$wpdb->get_results("SELECT field_name AS name, field_id AS id
416
+ FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
417
+ WHERE parent_set_id=$set_type
418
+ ORDER BY field_id ASC");
419
+
420
+ $i=1;
421
+
422
+ ?>
423
+
424
+ <form action=" <?php echo admin_url('options-general.php?page=yasr_settings_page') ?>" id="form_edit_multi_set" method="post">
425
+ <input type="hidden" name="yasr_edit_multi_set_form" value="<?php echo $set_type ?>" />
426
+
427
+
428
+ <table id="yasr-table-form-edit-multi-set">
429
+ <tr>
430
+
431
+ <td id="yasr-table-form-edit-multi-set-header">
432
+ <?php _e('Field name', 'yasr') ?>
433
+ </td>
434
+
435
+ <td id="yasr-table-form-edit-multi-set-remove">
436
+ <?php _e('Remove', 'yasr') ?>
437
+ </td>
438
+
439
+ </tr>
440
+
441
+ <?php
442
+ foreach ($set_name as $name) {
443
+ echo "
444
+ <tr>
445
+
446
+ <td width=\"80%\">
447
+ Element #$i <input type=\"text\" value=\"$name->name\" name=\"edit-multi-set-element-$name->id\">
448
+ </td>
449
+
450
+ <td width=\"20%\" style=\"text-align:center\">
451
+ <input type=\"checkbox\" name=\"remove-element-$name->id\">
452
+ </td>